22-- Flash of the Forbidden Spell
33local s ,id = GetID ()
44function s .initial_effect (c )
5- -- Activate
5+ -- If your opponent controls monsters in all of their Main Monster Zones: Destroy all monsters your opponent controls.
66 local e1 = Effect .CreateEffect (c )
77 e1 :SetCategory (CATEGORY_DESTROY )
88 e1 :SetType (EFFECT_TYPE_ACTIVATE )
@@ -12,11 +12,16 @@ function s.initial_effect(c)
1212 e1 :SetOperation (s .activate )
1313 c :RegisterEffect (e1 )
1414end
15- function s .cfilter (c )
16- return c :GetSequence ()< 5
15+ function s .filter (c )
16+ local seq = c :GetSequence ()
17+ if Duel .IsDuelType (DUEL_3_COLUMNS_FIELD ) then
18+ return seq > 0 and seq < 4
19+ else
20+ return seq < 5
21+ end
1722end
1823function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
19- return Duel .GetMatchingGroupCount (s .cfilter ,tp ,0 ,LOCATION_MZONE ,nil )>= 5
24+ return Duel .GetMatchingGroupCount (s .filter ,tp ,0 ,LOCATION_MZONE ,nil )== ( Duel . IsDuelType ( DUEL_3_COLUMNS_FIELD ) and 3 or 5 )
2025end
2126function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
2227 if chk == 0 then return Duel .IsExistingMatchingCard (aux .TRUE ,tp ,0 ,LOCATION_MZONE ,1 ,nil ) end
2631function s .activate (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
2732 local sg = Duel .GetMatchingGroup (aux .TRUE ,tp ,0 ,LOCATION_MZONE ,nil )
2833 Duel .Destroy (sg ,REASON_EFFECT )
29- end
34+ end
0 commit comments