Commit 84366f2a authored by VanillaSalt's avatar VanillaSalt

use ForEach

parent d611a471
...@@ -18,17 +18,14 @@ function c98905.initial_effect(c) ...@@ -18,17 +18,14 @@ function c98905.initial_effect(c)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function c98905.cfilter(c) function c98905.callback(c)
local tp=c:GetPreviousControler() local tp=c:GetPreviousControler()
return c:IsSetCard(0xe5) and c:IsType(TYPE_XYZ) and c:IsControler(tp) and c:GetOverlayCount()>0 if c:IsSetCard(0xe5) and c:IsType(TYPE_XYZ) and c:IsControler(tp) and c:GetOverlayCount()>0 then
c:RegisterFlagEffect(98905,RESET_EVENT+0x1fe0000,0,1)
end
end end
function c98905.checkop(e,tp,eg,ep,ev,re,r,rp) function c98905.checkop(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(c98905.cfilter,nil) eg:ForEach(c98905.callback)
local tc=sg:GetFirst()
while tc do
tc:RegisterFlagEffect(98905,RESET_EVENT+0x1fe0000,0,1)
tc=sg:GetNext()
end
end end
function c98905.filter(c,e,tp) function c98905.filter(c,e,tp)
return c:GetFlagEffect(98905)~=0 and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) return c:GetFlagEffect(98905)~=0 and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment