Commit 372428ec authored by nekrozar's avatar nekrozar Committed by VanillaSalt

fix (#825)

parent 1122d389
--デコード・トーカー --デコード・トーカー
function c1861692.initial_effect(c) function c1861692.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_EFFECT),2) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_EFFECT),2)
c:EnableReviveLimit()
--atk --atk
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -1620,15 +1620,16 @@ function Auxiliary.PendOperation() ...@@ -1620,15 +1620,16 @@ function Auxiliary.PendOperation()
end end
end end
--Link Summon --Link Summon
function Auxiliary.AddLinkProcedure(c,f,ct) function Auxiliary.AddLinkProcedure(c,f,min,max)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(POS_FACEUP_ATTACK,0) e1:SetTargetRange(POS_FACEUP_ATTACK,0)
e1:SetCondition(Auxiliary.LinkCondition(f,ct,99)) if max==nil then max=99 end
e1:SetOperation(Auxiliary.LinkOperation(f,ct,99)) e1:SetCondition(Auxiliary.LinkCondition(f,min,max))
e1:SetOperation(Auxiliary.LinkOperation(f,min,max))
e1:SetValue(SUMMON_TYPE_LINK) e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
...@@ -1673,7 +1674,7 @@ function Auxiliary.IsCodeListed(c,code) ...@@ -1673,7 +1674,7 @@ function Auxiliary.IsCodeListed(c,code)
if code==ccode then return true end if code==ccode then return true end
end end
return false return false
end end
--card effect disable filter(target) --card effect disable filter(target)
function Auxiliary.disfilter1(c) function Auxiliary.disfilter1(c)
return c:IsFaceup() and not c:IsDisabled() and (not c:IsType(TYPE_NORMAL) or bit.band(c:GetOriginalType(),TYPE_EFFECT)~=0) return c:IsFaceup() and not c:IsDisabled() and (not c:IsType(TYPE_NORMAL) or bit.band(c:GetOriginalType(),TYPE_EFFECT)~=0)
...@@ -1719,11 +1720,11 @@ end ...@@ -1719,11 +1720,11 @@ end
function Auxiliary.imval1(e,c) function Auxiliary.imval1(e,c)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
--filter for EFFECT_CANNOT_BE_EFFECT_TARGET + opponent --filter for EFFECT_CANNOT_BE_EFFECT_TARGET + opponent
function Auxiliary.tgoval(e,re,rp) function Auxiliary.tgoval(e,re,rp)
return rp~=e:GetHandlerPlayer() return rp~=e:GetHandlerPlayer()
end end
--filter for non-zero ATK --filter for non-zero ATK
function Auxiliary.nzatk(c) function Auxiliary.nzatk(c)
return c:IsFaceup() and c:GetAttack()>0 return c:IsFaceup() and c:GetAttack()>0
end end
...@@ -1736,8 +1737,8 @@ function Auxiliary.sumreg(e,tp,eg,ep,ev,re,r,rp) ...@@ -1736,8 +1737,8 @@ function Auxiliary.sumreg(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
local code=e:GetLabel() local code=e:GetLabel()
while tc do while tc do
if tc:GetOriginalCode()==code then if tc:GetOriginalCode()==code then
tc:RegisterFlagEffect(code,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1) tc:RegisterFlagEffect(code,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1)
end end
tc=eg:GetNext() tc=eg:GetNext()
end end
...@@ -1769,8 +1770,8 @@ function Auxiliary.damcon1(e,tp,eg,ep,ev,re,r,rp) ...@@ -1769,8 +1770,8 @@ function Auxiliary.damcon1(e,tp,eg,ep,ev,re,r,rp)
local rd=e1 and not e2 local rd=e1 and not e2
local rr=not e1 and e2 local rr=not e1 and e2
local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE)
if ex and (cp==tp or cp==PLAYER_ALL) and not rd and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NO_EFFECT_DAMAGE) then if ex and (cp==tp or cp==PLAYER_ALL) and not rd and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NO_EFFECT_DAMAGE) then
return true return true
end end
ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER) ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER)
return ex and (cp==tp or cp==PLAYER_ALL) and rr and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NO_EFFECT_DAMAGE) return ex and (cp==tp or cp==PLAYER_ALL) and rr and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NO_EFFECT_DAMAGE)
......
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