Commit 2faf6b41 authored by nanahira's avatar nanahira

fix

parent fc3dc0ec
...@@ -27,20 +27,22 @@ function Auxiliary.PreloadUds() ...@@ -27,20 +27,22 @@ function Auxiliary.PreloadUds()
}) })
if not _FORBID_INITIALIZED then if not _FORBID_INITIALIZED then
_FORBID_INITIALIZED=true _FORBID_INITIALIZED=true
local tempc=Duel.CreateToken(0,10000000) for p=0,1 do
local e2=Effect.CreateEffect(tempc) local tempc=Duel.CreateToken(p,10000000)
e2:SetType(EFFECT_TYPE_FIELD) local e2=Effect.CreateEffect(tempc)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_IGNORE_RANGE) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_FORBIDDEN) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_IGNORE_RANGE)
e2:SetTargetRange(0xff,0xff) e2:SetCode(EFFECT_FORBIDDEN)
e2:SetTarget(function(e,c) e2:SetTargetRange(0xff,0xff)
local code1,code2=c:GetOriginalCodeRule() e2:SetTarget(function(e,c)
local turnID=c:IsOnField() and c:GetTurnID() or 99 local code1,code2=c:GetOriginalCodeRule()
return _.any(_FORBID_LIST,function(m) local turnID=c:IsOnField() and c:GetTurnID() or 99
return (code1==m.code or code2==m.code) and turnID>=m.turn return _.any(_FORBID_LIST,function(m)
return (code1==m.code or code2==m.code) and turnID>=m.turn
end)
end) end)
end) Duel.RegisterEffect(e2,p)
Duel.RegisterEffect(e2,0) end
end end
end) end)
Duel.RegisterEffect(e1,0) Duel.RegisterEffect(e1,0)
......
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