Skip to content

Commit 09f48ab

Browse files
authored
Update "Flash of the Forbidden Spell"
- Changed the filter/condition check to accommodate 3-column rules (e.g. Speed Duel)
1 parent 2755370 commit 09f48ab

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

official/c39956951.lua

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--Flash of the Forbidden Spell
33
local s,id=GetID()
44
function 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)
1414
end
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
1722
end
1823
function 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)
2025
end
2126
function 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
@@ -26,4 +31,4 @@ end
2631
function 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

Comments
 (0)