1- -- D-HERO ドレッドガイ
1+ -- D-HERO ドレッドガイ
22-- Destiny HERO - Dreadmaster
33local s ,id = GetID ()
44function s .initial_effect (c )
5- -- Destroys monsters and Special Summon up to 2 "Destiny HERO" monsters
5+ -- If this card is Special Summoned by "Clock Tower Prison": Destroy all monsters you control, except "Destiny HERO" monsters, also, after that, you can Special Summon up to 2 "Destiny HERO" monsters from your GY
66 local e1 = Effect .CreateEffect (c )
77 e1 :SetDescription (aux .Stringid (id ,0 ))
88 e1 :SetCategory (CATEGORY_DESTROY + CATEGORY_SPECIAL_SUMMON )
99 e1 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F )
1010 e1 :SetCode (EVENT_SPSUMMON_SUCCESS )
11- e1 :SetCondition (s . spcon )
11+ e1 :SetCondition (function ( e , tp , eg , ep , ev , re , r , rp ) return re : GetHandler (): IsCode ( 75041269 , 101402062 ) end )
1212 e1 :SetTarget (s .sptg )
1313 e1 :SetOperation (s .spop )
1414 c :RegisterEffect (e1 )
15- -- Prevents "Destiny HERO" monsters from being destroyed
15+ -- After this card is Special Summoned, for the rest of this turn, "Destiny HERO" monsters you control cannot be destroyed, also you take no battle damage when they battle
1616 local e2 = Effect .CreateEffect (c )
1717 e2 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS )
1818 e2 :SetCode (EVENT_SPSUMMON_SUCCESS )
19- e2 :SetOperation (s .indop )
19+ e2 :SetOperation (s .effop )
2020 c :RegisterEffect (e2 )
21- -- Gains ATK equal to the total ATK of all "Destiny HERO"
22- local e3 = Effect .CreateEffect (c )
23- e3 :SetType (EFFECT_TYPE_SINGLE )
24- e3 :SetProperty (EFFECT_FLAG_SINGLE_RANGE )
25- e3 : SetRange ( LOCATION_MZONE )
26- e3 : SetCode ( EFFECT_SET_ATTACK )
27- e3 :SetValue (s . val )
28- c :RegisterEffect (e3 )
29- local e4 = e3 :Clone ()
30- e4 :SetCode (EFFECT_SET_DEFENSE )
31- c :RegisterEffect (e4 )
21+ -- The ATK/DEF of this card are equal to the combined original ATK of all other "Destiny HERO" monsters you control
22+ local e3a = Effect .CreateEffect (c )
23+ e3a :SetType (EFFECT_TYPE_SINGLE )
24+ e3a :SetProperty (EFFECT_FLAG_SINGLE_RANGE )
25+ e3a : SetCode ( EFFECT_SET_ATTACK )
26+ e3a : SetRange ( LOCATION_MZONE )
27+ e3a :SetValue (function ( e , c ) return Duel . GetMatchingGroup ( aux . FaceupFilter ( Card . IsSetCard , SET_DESTINY_HERO ), c : GetControler (), LOCATION_MZONE , 0 , c ): GetSum ( Card . GetBaseAttack ) end )
28+ c :RegisterEffect (e3a )
29+ local e3b = e3a :Clone ()
30+ e3b :SetCode (EFFECT_SET_DEFENSE )
31+ c :RegisterEffect (e3b )
3232end
33+ s .listed_names = {75041269 } -- "Clock Tower Prison"
3334s .listed_series = {SET_DESTINY_HERO }
34- s .listed_names = {75041269 }
35- function s .spcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
36- return e :GetHandler ():GetSummonType ()== SUMMON_TYPE_SPECIAL + 1
37- end
3835function s .desfilter (c )
3936 return c :IsFacedown () or not c :IsSetCard (SET_DESTINY_HERO )
4037end
4138function s .sptg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
4239 if chk == 0 then return true end
4340 local g = Duel .GetMatchingGroup (s .desfilter ,tp ,LOCATION_MZONE ,0 ,nil )
44- Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,g ,# g ,0 ,0 )
41+ Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,g ,# g ,tp ,0 )
4542 Duel .SetPossibleOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,2 ,tp ,LOCATION_GRAVE )
4643end
4744function s .spfilter (c ,e ,tp )
4845 return c :IsSetCard (SET_DESTINY_HERO ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
4946end
5047function s .spop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
48+ local break_chk = false
5149 local g = Duel .GetMatchingGroup (s .desfilter ,tp ,LOCATION_MZONE ,0 ,nil )
52- Duel .Destroy (g ,REASON_EFFECT )
53- local ft = Duel .GetLocationCount (tp ,LOCATION_MZONE )
54- if ft <= 0 then return end
55- if ft > 2 then ft = 2 end
56- if Duel .IsPlayerAffectedByEffect (tp ,CARD_BLUEEYES_SPIRIT ) then ft = 1 end
57- g = Duel .GetMatchingGroup (s .spfilter ,tp ,LOCATION_GRAVE ,0 ,nil ,e ,tp )
58- if # g ~= 0 and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
59- Duel .BreakEffect ()
50+ if # g > 0 then
51+ break_chk = true
52+ Duel .Destroy (g ,REASON_EFFECT )
53+ end
54+ local mmz_count = Duel .GetLocationCount (tp ,LOCATION_MZONE )
55+ if mmz_count > 0 and Duel .IsExistingMatchingCard (aux .NecroValleyFilter (s .spfilter ),tp ,LOCATION_GRAVE ,0 ,1 ,nil ,e ,tp )
56+ and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
57+ mmz_count = math.min (mmz_count ,2 )
58+ if Duel .IsPlayerAffectedByEffect (tp ,CARD_BLUEEYES_SPIRIT ) then mmz_count = 1 end
6059 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
61- local sg = g :Select (tp ,1 ,ft ,nil )
62- Duel .SpecialSummon (sg ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
60+ local sg = Duel .SelectMatchingCard (tp ,aux .NecroValleyFilter (s .spfilter ),tp ,LOCATION_GRAVE ,0 ,1 ,mmz_count ,nil ,e ,tp )
61+ if # sg > 0 then
62+ if break_chk then Duel .BreakEffect () end
63+ Duel .SpecialSummon (sg ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
64+ end
6365 end
6466end
65- function s .filter (e ,c )
66- return c :IsFaceup () and c :IsSetCard (SET_DESTINY_HERO )
67- end
68- function s .indop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
67+ function s .effop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
6968 local c = e :GetHandler ()
69+ aux .RegisterClientHint (c ,nil ,tp ,1 ,0 ,aux .Stringid (id ,2 ))
70+ -- For the rest of this turn, "Destiny HERO" monsters you control cannot be destroyed, also you take no battle damage when they battle
7071 local e1 = Effect .CreateEffect (c )
7172 e1 :SetType (EFFECT_TYPE_FIELD )
7273 e1 :SetCode (EFFECT_INDESTRUCTABLE )
7374 e1 :SetTargetRange (LOCATION_MZONE ,0 )
74- e1 :SetTarget (s .filter )
75- e1 :SetReset (RESET_PHASE |PHASE_END )
75+ e1 :SetTarget (function (e ,c ) return c :IsSetCard (SET_DESTINY_HERO ) end )
7676 e1 :SetValue (1 )
77+ e1 :SetReset (RESET_PHASE |PHASE_END )
7778 Duel .RegisterEffect (e1 ,tp )
78- local e2 = Effect .CreateEffect (c )
79- e2 :SetType (EFFECT_TYPE_FIELD )
79+ local e2 = e1 :Clone ()
8080 e2 :SetCode (EFFECT_AVOID_BATTLE_DAMAGE )
81- e2 :SetTargetRange (LOCATION_MZONE ,0 )
82- e2 :SetTarget (s .filter )
83- e2 :SetValue (1 )
84- e2 :SetReset (RESET_PHASE |PHASE_END )
8581 Duel .RegisterEffect (e2 ,tp )
8682end
87- function s .vfilter (c )
88- return c :IsFaceup () and c :IsSetCard (SET_DESTINY_HERO )
89- end
90- function s .val (e ,c )
91- local g = Duel .GetMatchingGroup (s .vfilter ,c :GetControler (),LOCATION_MZONE ,0 ,c )
92- return g :GetSum (Card .GetBaseAttack )
93- end
0 commit comments