Commit a013a8ad authored by salix5's avatar salix5

Merge pull request #1182 from nekrozar/patch-2

fix Anti-Spell Fragrance
parents 1cfd07a0 4de55981
......@@ -15,9 +15,22 @@ function c58921041.initial_effect(c)
e2:SetTargetRange(1,1)
e2:SetValue(c58921041.aclimit)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SSET)
e3:SetRange(LOCATION_SZONE)
e3:SetOperation(c58921041.aclimset)
c:RegisterEffect(e3)
end
function c58921041.aclimit(e,re,tp)
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL) then return false end
local c=re:GetHandler()
return not c:IsLocation(LOCATION_SZONE) or (Duel.GetTurnCount()-c:GetTurnID()<2 and c:GetFieldID()>e:GetHandler():GetFieldID())
return not c:IsLocation(LOCATION_SZONE) or c:GetFlagEffect(58921041)>0
end
function c58921041.aclimset(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
tc:RegisterFlagEffect(58921041,RESET_PHASE+RESET_END+RESET_OPPO_TURN,0,1)
tc=eg:GetNext()
end
end
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