@@ -25,45 +25,40 @@ function s.initial_effect(c)
2525 e2 :SetProperty (EFFECT_FLAG_CARD_TARGET )
2626 e2 :SetCode (EVENT_ATTACK_ANNOUNCE )
2727 e2 :SetCountLimit (1 ,id )
28+ e2 :SetCost (Cost .Replaceable (s .ctcost ,s .extracon ))
2829 e2 :SetTarget (s .cttg )
2930 e2 :SetOperation (s .ctop )
3031 c :RegisterEffect (e2 )
3132end
32- -- Lists "Fire Fist" archetype
3333s .listed_series = {SET_FIRE_FORMATION ,SET_FIRE_FIST }
34- -- If this card is pointing to "Fire Fist"
3534function s .lkfilter (c )
3635 return c :IsFaceup () and c :IsSetCard (SET_FIRE_FIST ) and c :IsMonster ()
3736end
3837function s .tgcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
3938 return e :GetHandler ():GetLinkedGroup ():IsExists (s .lkfilter ,1 ,nil )
4039end
41- -- Check for "Fire Formation" S/T for cost
42- function s .ctfilter (c )
40+ function s .ctcostfilter (c ,tp ,zones )
4341 return c :IsFaceup () and c :IsSetCard (SET_FIRE_FORMATION ) and c :IsSpellTrap () and c :IsAbleToGraveAsCost ()
42+ and Duel .GetMZoneCount (tp ,c ,tp ,LOCATION_REASON_CONTROL ,zones )> 0
43+ end
44+ function s .ctcost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
45+ local zones = e :GetHandler ():GetLinkedZone ()&ZONES_MMZ
46+ if chk == 0 then return Duel .IsExistingMatchingCard (s .ctcostfilter ,tp ,LOCATION_ONFIELD ,0 ,1 ,nil ,tp ,zones ) end
47+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TOGRAVE )
48+ local g = Duel .SelectMatchingCard (tp ,s .ctcostfilter ,tp ,LOCATION_ONFIELD ,0 ,1 ,1 ,nil ,tp ,zones )
49+ Duel .SendtoGrave (g ,REASON_COST )
50+ end
51+ function s .extracon (base ,e ,tp )
52+ local zones = e :GetHandler ():GetLinkedZone ()&ZONES_MMZ
53+ return Duel .GetLocationCount (tp ,LOCATION_MZONE ,tp ,LOCATION_REASON_CONTROL ,zones )> 0
4454end
45- -- Activation legality
4655function s .cttg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
47- local c = e :GetHandler ()
48- local zone = c :GetLinkedZone ()&ZONES_MMZ
49- if chkc then return chkc :IsLocation (LOCATION_MZONE ) and chkc :IsControler (1 - tp ) and chkc :IsControlerCanBeChanged (false ,zone ) end
50- local nc = Duel .IsExistingMatchingCard (s .ctfilter ,tp ,LOCATION_ONFIELD ,0 ,1 ,nil )
51- local tgchk = Duel .IsExistingTarget (Card .IsControlerCanBeChanged ,tp ,0 ,LOCATION_MZONE ,1 ,nil ,false ,zone )
52- if chk == 0 then
53- if Duel .IsPlayerAffectedByEffect (tp ,CARD_FIRE_FIST_EAGLE ) then
54- return tgchk
55- else return nc and tgchk end
56- end
57- if nc and not (Duel .IsPlayerAffectedByEffect (tp ,CARD_FIRE_FIST_EAGLE ) and Duel .SelectYesNo (tp ,aux .Stringid (CARD_FIRE_FIST_EAGLE ,0 ))) then
58- Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TOGRAVE )
59- local g1 = Duel .SelectMatchingCard (tp ,s .ctfilter ,tp ,LOCATION_ONFIELD ,0 ,1 ,1 ,nil )
60- Duel .SendtoGrave (g1 ,REASON_COST )
61- end
56+ if chkc then return chkc :IsLocation (LOCATION_MZONE ) and chkc :IsControler (1 - tp ) and chkc :IsControlerCanBeChanged () end
57+ if chk == 0 then return Duel .IsExistingTarget (Card .IsControlerCanBeChanged ,tp ,0 ,LOCATION_MZONE ,1 ,nil ) end
6258 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_CONTROL )
63- local g2 = Duel .SelectTarget (tp ,Card .IsControlerCanBeChanged ,tp ,0 ,LOCATION_MZONE ,1 ,1 ,nil , false , zone )
64- Duel .SetOperationInfo (0 ,CATEGORY_CONTROL ,g2 ,1 ,0 ,0 )
59+ local g = Duel .SelectTarget (tp ,Card .IsControlerCanBeChanged ,tp ,0 ,LOCATION_MZONE ,1 ,1 ,nil )
60+ Duel .SetOperationInfo (0 ,CATEGORY_CONTROL ,g ,1 ,0 ,0 )
6561end
66- -- Take control of opponent's monster until end phase, it cannot attack
6762function s .ctop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
6863 local tc = Duel .GetFirstTarget ()
6964 local c = e :GetHandler ()
@@ -80,4 +75,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp)
8075 tc :RegisterEffect (e1 )
8176 end
8277 end
83- end
78+ end
0 commit comments