Commit 8f172be1 authored by Chen Bill's avatar Chen Bill

fix aux.dsercon() call

parent d9231f18
...@@ -62,7 +62,7 @@ function c1953925.actcon(e) ...@@ -62,7 +62,7 @@ function c1953925.actcon(e)
return Duel.GetAttacker()==e:GetHandler() return Duel.GetAttacker()==e:GetHandler()
end end
function c1953925.descon(e,tp,eg,ep,ev,re,r,rp) function c1953925.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler()==Duel.GetAttacker() and aux.dsercon(e) return e:GetHandler()==Duel.GetAttacker() and aux.dsercon(e,tp,eg,ep,ev,re,r,rp)
end end
function c1953925.filter(c) function c1953925.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
......
...@@ -45,7 +45,7 @@ function c2129638.rmcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function c2129638.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
e:SetLabelObject(bc) e:SetLabelObject(bc)
return c==Duel.GetAttacker() and aux.dsercon(e) return c==Duel.GetAttacker() and aux.dsercon(e,tp,eg,ep,ev,re,r,rp)
and bc and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsOnField() and bc:IsRelateToBattle() and bc and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsOnField() and bc:IsRelateToBattle()
end end
function c2129638.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c2129638.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -14,7 +14,7 @@ end ...@@ -14,7 +14,7 @@ end
function c21887179.descon(e,tp,eg,ep,ev,re,r,rp) function c21887179.descon(e,tp,eg,ep,ev,re,r,rp)
local t=e:GetHandler():GetBattleTarget() local t=e:GetHandler():GetBattleTarget()
e:SetLabelObject(t) e:SetLabelObject(t)
return aux.dsercon(e) and t and t:IsRace(RACE_FIEND+RACE_ZOMBIE) and t:IsRelateToBattle() return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and t and t:IsRace(RACE_FIEND+RACE_ZOMBIE) and t:IsRelateToBattle()
end end
function c21887179.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c21887179.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -41,7 +41,7 @@ function c24550676.initial_effect(c) ...@@ -41,7 +41,7 @@ function c24550676.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c24550676.condition(e,tp,eg,ep,ev,re,r,rp) function c24550676.condition(e,tp,eg,ep,ev,re,r,rp)
return aux.dsercon(e) and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget() return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()
end end
function c24550676.filter(c) function c24550676.filter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) return c:IsSummonType(SUMMON_TYPE_SPECIAL)
......
...@@ -12,7 +12,7 @@ function c25773409.initial_effect(c) ...@@ -12,7 +12,7 @@ function c25773409.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c25773409.condition(e,tp,eg,ep,ev,re,r,rp) function c25773409.condition(e,tp,eg,ep,ev,re,r,rp)
return aux.dsercon(e) and Duel.GetAttackTarget()==e:GetHandler() return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetAttackTarget()==e:GetHandler()
and bit.band(e:GetHandler():GetBattlePosition(),POS_DEFENSE)~=0 and bit.band(e:GetHandler():GetBattlePosition(),POS_DEFENSE)~=0
end end
function c25773409.target(e,tp,eg,ep,ev,re,r,rp,chk) function c25773409.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -14,7 +14,7 @@ end ...@@ -14,7 +14,7 @@ end
function c2671330.retcon(e,tp,eg,ep,ev,re,r,rp) function c2671330.retcon(e,tp,eg,ep,ev,re,r,rp)
local t=e:GetHandler():GetBattleTarget() local t=e:GetHandler():GetBattleTarget()
e:SetLabelObject(t) e:SetLabelObject(t)
return aux.dsercon(e) and t and t:IsRelateToBattle() return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and t and t:IsRelateToBattle()
end end
function c2671330.rettg(e,tp,eg,ep,ev,re,r,rp,chk) function c2671330.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -33,7 +33,7 @@ function c37169670.initial_effect(c) ...@@ -33,7 +33,7 @@ function c37169670.initial_effect(c)
end end
c37169670.assault_name=95526884 c37169670.assault_name=95526884
function c37169670.damcon(e,tp,eg,ep,ev,re,r,rp) function c37169670.damcon(e,tp,eg,ep,ev,re,r,rp)
return aux.dsercon(e) and Duel.GetAttackTarget()~=nil return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetAttackTarget()~=nil
end end
function c37169670.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c37169670.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -76,7 +76,7 @@ function c44874522.actcon(e) ...@@ -76,7 +76,7 @@ function c44874522.actcon(e)
return Duel.GetAttacker()==e:GetHandler() return Duel.GetAttacker()==e:GetHandler()
end end
function c44874522.condition(e,tp,eg,ep,ev,re,r,rp) function c44874522.condition(e,tp,eg,ep,ev,re,r,rp)
return aux.dsercon(e) and Duel.GetAttacker()==e:GetHandler() return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetAttacker()==e:GetHandler()
end end
function c44874522.desfilter(c) function c44874522.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
......
...@@ -14,7 +14,7 @@ end ...@@ -14,7 +14,7 @@ end
function c57281778.descon(e,tp,eg,ep,ev,re,r,rp) function c57281778.descon(e,tp,eg,ep,ev,re,r,rp)
local t=e:GetHandler():GetBattleTarget() local t=e:GetHandler():GetBattleTarget()
e:SetLabelObject(t) e:SetLabelObject(t)
return aux.dsercon(e) and t and t:IsRace(RACE_SPELLCASTER+RACE_WARRIOR) and t:IsRelateToBattle() return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and t and t:IsRace(RACE_SPELLCASTER+RACE_WARRIOR) and t:IsRelateToBattle()
end end
function c57281778.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c57281778.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -42,7 +42,7 @@ function c67508932.initial_effect(c) ...@@ -42,7 +42,7 @@ function c67508932.initial_effect(c)
end end
function c67508932.rmcond(e,tp,eg,ep,ev,re,r,rp) function c67508932.rmcond(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return aux.dsercon(e) and c:IsSummonLocation(LOCATION_EXTRA) and c:GetBattledGroupCount()>0 return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and c:IsSummonLocation(LOCATION_EXTRA) and c:GetBattledGroupCount()>0
end end
function c67508932.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c67508932.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
......
...@@ -34,7 +34,7 @@ function c69031175.initial_effect(c) ...@@ -34,7 +34,7 @@ function c69031175.initial_effect(c)
end end
function c69031175.ctcon(e,tp,eg,ep,ev,re,r,rp) function c69031175.ctcon(e,tp,eg,ep,ev,re,r,rp)
local atg=Duel.GetAttackTarget() local atg=Duel.GetAttackTarget()
return aux.dsercon(e) and Duel.GetAttacker()==e:GetHandler() return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetAttacker()==e:GetHandler()
and atg and atg:IsRelateToBattle() and atg:GetCounter(0x1002)==0 and atg:IsCanAddCounter(0x1002,1) and atg and atg:IsRelateToBattle() and atg:GetCounter(0x1002)==0 and atg:IsCanAddCounter(0x1002,1)
end end
function c69031175.ctop(e,tp,eg,ep,ev,re,r,rp) function c69031175.ctop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -56,7 +56,7 @@ function c77855162.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c77855162.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
e:SetLabelObject(bc) e:SetLabelObject(bc)
return aux.dsercon(e) and bc and bc:IsRelateToBattle() and bc:IsOnField() return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and bc and bc:IsRelateToBattle() and bc:IsOnField()
and c:IsStatus(STATUS_OPPO_BATTLE) and c:IsStatus(STATUS_OPPO_BATTLE)
end end
function c77855162.descon2(e,tp,eg,ep,ev,re,r,rp) function c77855162.descon2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -33,7 +33,7 @@ function c78266168.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,7 +33,7 @@ function c78266168.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c78266168.descon(e,tp,eg,ep,ev,re,r,rp) function c78266168.descon(e,tp,eg,ep,ev,re,r,rp)
return aux.dsercon(e) and Duel.GetAttackTarget()==e:GetHandler() return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetAttackTarget()==e:GetHandler()
and e:GetHandler():GetBattlePosition()==POS_FACEDOWN_DEFENSE and e:GetHandler():GetBattlePosition()==POS_FACEDOWN_DEFENSE
and Duel.GetAttacker():GetAttack()<e:GetHandler():GetDefense() and Duel.GetAttacker():GetAttack()<e:GetHandler():GetDefense()
end end
......
...@@ -12,7 +12,7 @@ function c78613627.initial_effect(c) ...@@ -12,7 +12,7 @@ function c78613627.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c78613627.condition(e,tp,eg,ep,ev,re,r,rp) function c78613627.condition(e,tp,eg,ep,ev,re,r,rp)
return aux.dsercon(e) and Duel.GetAttackTarget()==e:GetHandler() return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetAttackTarget()==e:GetHandler()
and bit.band(e:GetHandler():GetBattlePosition(),POS_DEFENSE)~=0 and bit.band(e:GetHandler():GetBattlePosition(),POS_DEFENSE)~=0
and Duel.GetAttacker():GetAttack()<e:GetHandler():GetDefense() and Duel.GetAttacker():GetAttack()<e:GetHandler():GetDefense()
end end
......
...@@ -67,7 +67,7 @@ end ...@@ -67,7 +67,7 @@ end
function c81269231.rmcon(e,tp,eg,ep,ev,re,r,rp) function c81269231.rmcon(e,tp,eg,ep,ev,re,r,rp)
local t=Duel.GetBattleMonster(1-tp) local t=Duel.GetBattleMonster(1-tp)
e:SetLabelObject(t) e:SetLabelObject(t)
return aux.dsercon(e) and t and t:IsRelateToBattle() return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and t and t:IsRelateToBattle()
end end
function c81269231.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c81269231.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetLabelObject():IsAbleToRemove() end if chk==0 then return e:GetLabelObject():IsAbleToRemove() end
......
...@@ -78,7 +78,7 @@ function c88305705.rmcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,7 +78,7 @@ function c88305705.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
e:SetLabelObject(bc) e:SetLabelObject(bc)
return aux.dsercon(e) and c==Duel.GetAttacker() and c:IsStatus(STATUS_OPPO_BATTLE) return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and c==Duel.GetAttacker() and c:IsStatus(STATUS_OPPO_BATTLE)
and bc and bc:IsOnField() and bc:IsRelateToBattle() and bc and bc:IsOnField() and bc:IsRelateToBattle()
end end
function c88305705.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c88305705.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -25,7 +25,7 @@ end ...@@ -25,7 +25,7 @@ end
function c91559748.cpcon(e,tp,eg,ep,ev,re,r,rp) function c91559748.cpcon(e,tp,eg,ep,ev,re,r,rp)
local t=e:GetHandler():GetBattleTarget() local t=e:GetHandler():GetBattleTarget()
e:SetLabelObject(t) e:SetLabelObject(t)
return aux.dsercon(e) and t and t:IsRelateToBattle() return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and t and t:IsRelateToBattle()
end end
function c91559748.cptg(e,tp,eg,ep,ev,re,r,rp,chk) function c91559748.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -24,7 +24,7 @@ function c95519486.cfilter(c) ...@@ -24,7 +24,7 @@ function c95519486.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsCode(95519486) return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsCode(95519486)
end end
function c95519486.descon(e,tp,eg,ep,ev,re,r,rp) function c95519486.descon(e,tp,eg,ep,ev,re,r,rp)
return aux.dsercon(e) and e:GetHandler()==Duel.GetAttacker() and Duel.GetAttackTarget() return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler()==Duel.GetAttacker() and Duel.GetAttackTarget()
and Duel.IsExistingMatchingCard(c95519486.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c95519486.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c95519486.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c95519486.destg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -27,7 +27,7 @@ function c95526884.reccon(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +27,7 @@ function c95526884.reccon(e,tp,eg,ep,ev,re,r,rp)
if not d then return false end if not d then return false end
local m=a:GetAttack()-d:GetDefense() local m=a:GetAttack()-d:GetDefense()
e:SetLabel(m) e:SetLabel(m)
return aux.dsercon(e) and c==a and d:GetDefense()>=0 and m>0 and bit.band(d:GetBattlePosition(),POS_DEFENSE)~=0 return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and c==a and d:GetDefense()>=0 and m>0 and bit.band(d:GetBattlePosition(),POS_DEFENSE)~=0
end end
function c95526884.rectg(e,tp,eg,ep,ev,re,r,rp,chk) function c95526884.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -14,7 +14,7 @@ end ...@@ -14,7 +14,7 @@ end
function c95789089.cpcon(e,tp,eg,ep,ev,re,r,rp) function c95789089.cpcon(e,tp,eg,ep,ev,re,r,rp)
local t=e:GetHandler():GetBattleTarget() local t=e:GetHandler():GetBattleTarget()
e:SetLabelObject(t) e:SetLabelObject(t)
return aux.dsercon(e) and t and t:IsRelateToBattle() return aux.dsercon(e,tp,eg,ep,ev,re,r,rp) and t and t:IsRelateToBattle()
end end
function c95789089.cptg(e,tp,eg,ep,ev,re,r,rp,chk) function c95789089.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true 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