Commit 321e5f57 authored by Chen Bill's avatar Chen Bill

fix aux.dscon() call

parent 5f74f474
......@@ -109,7 +109,7 @@ function c10497636.disop2(e,tp,eg,ep,ev,re,r,rp)
end
function c10497636.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,10497636)>0
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and aux.dscon()
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c10497636.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x15f)
......
......@@ -68,5 +68,5 @@ function c12219047.operation(e,tp,eg,ep,ev,re,r,rp)
end
function c12219047.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x10db)
and aux.dscon()
and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
......@@ -52,7 +52,7 @@ function s.indct(e,re,r,rp)
else return 0 end
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and aux.dscon()
return Duel.GetTurnPlayer()~=tp and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -17,7 +17,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) and aux.dscon()
return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function s.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -14,7 +14,7 @@ function c16708652.initial_effect(c)
end
function c16708652.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c16708652.filter1(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x11) and c:IsCanChangePosition()
......
......@@ -48,7 +48,7 @@ function c18558867.checkop(e,tp,eg,ep,ev,re,r,rp)
end
function c18558867.dracon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,18558867)>0
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and aux.dscon()
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c18558867.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x15f)
......
......@@ -52,7 +52,7 @@ function c20137754.tgop(e,tp,eg,ep,ev,re,r,rp)
end
function c20137754.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(20137754)>0
and aux.dscon()
and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c20137754.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)>0 end
......
......@@ -23,7 +23,7 @@ function c20419926.initial_effect(c)
end
function c20419926.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c20419926.costfilter(c)
return c:IsType(TYPE_LINK) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAttackAbove(1) and c:IsAbleToRemoveAsCost()
......
......@@ -41,7 +41,7 @@ function c23790299.initial_effect(c)
end
function c23790299.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c23790299.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -29,7 +29,7 @@ function c26773909.checkop(e,tp,eg,ep,ev,re,r,rp)
end
function c26773909.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c26773909.filter(c,lp)
return c:IsFaceup() and c:IsAttackBelow(lp) and c:GetFlagEffect(26773909)==0
......
......@@ -16,7 +16,7 @@ function c28325165.cfilter(c)
return c:IsSetCard(0xcd) and c:IsType(TYPE_MONSTER)
end
function c28325165.condition(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon()
return aux.dscon(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(c28325165.cfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c28325165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -45,7 +45,7 @@ function c3134857.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,90351981)
end
function c3134857.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon() and Duel.IsPlayerAffectedByEffect(tp,90351981)
return aux.dscon(e,tp,eg,ep,ev,re,r,rp) and Duel.IsPlayerAffectedByEffect(tp,90351981)
end
function c3134857.tdfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAbleToDeck()
......
......@@ -51,7 +51,7 @@ function c31600845.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c31600845.dhcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and aux.dscon()
return Duel.GetTurnPlayer()==1-tp and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c31600845.xfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:GetAttack()>0
......
......@@ -30,7 +30,7 @@ function c32549749.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then ft=ft-1 end
local b1=aux.dscon()
local b1=aux.dscon(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
local b2=Duel.GetCurrentPhase()~=PHASE_DAMAGE and ft>0
and Duel.IsExistingTarget(c32549749.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp)
......
......@@ -44,7 +44,7 @@ function c32615065.ffilter(c)
end
function c32615065.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
and aux.dscon()
and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c32615065.atkfilter(c)
return c:IsFaceup() and c:GetAttack()>0
......
......@@ -30,7 +30,7 @@ function c34976176.discon1(e,tp,eg,ep,ev,re,r,rp)
end
function c34976176.discon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c34976176.cfilter,tp,LOCATION_MZONE,0,1,nil)
and aux.dscon()
and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c34976176.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
......@@ -29,7 +29,7 @@ function c38695361.initial_effect(c)
end
function c38695361.atkcon1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c38695361.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
......
......@@ -32,7 +32,7 @@ function c4055337.atkcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,90351981)
end
function c4055337.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon() and Duel.IsPlayerAffectedByEffect(tp,90351981)
return aux.dscon(e,tp,eg,ep,ev,re,r,rp) and Duel.IsPlayerAffectedByEffect(tp,90351981)
end
function c4055337.tgfilter(c)
return c:IsFaceup()
......
......@@ -26,7 +26,7 @@ function c46724542.lcheck(g,lc)
end
function c46724542.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
and aux.dscon() and e:GetHandler():GetAttackAnnouncedCount()<1
and aux.dscon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():GetAttackAnnouncedCount()<1
end
function c46724542.filter(c)
return c:IsFaceup() and c:IsAttackAbove(2100) and c:IsRace(RACE_MACHINE)
......
......@@ -84,7 +84,7 @@ function c47946130.negop(e,tp,eg,ep,ev,re,r,rp)
end
function c47946130.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsAttack(c:GetBaseAttack()) and aux.dscon()
return not c:IsAttack(c:GetBaseAttack()) and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c47946130.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -23,7 +23,7 @@ function c49221191.ovfilter(c)
return c:IsFaceup() and c:IsCode(65676461)
end
function c49221191.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=1000 and aux.dscon()
return Duel.GetLP(tp)<=1000 and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c49221191.rfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
......
......@@ -29,7 +29,7 @@ function c50903514.initial_effect(c)
end
function c50903514.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c50903514.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
......
......@@ -78,7 +78,7 @@ function c54965929.acop(e,tp,eg,ep,ev,re,r,rp)
end
function c54965929.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
and aux.dscon()
and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c54965929.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -17,7 +17,7 @@ function c55461064.initial_effect(c)
end
function c55461064.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon()
return Duel.GetTurnPlayer()~=tp and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c55461064.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
......
......@@ -25,7 +25,7 @@ end
function c56535497.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
if Duel.GetTurnPlayer()==tp then return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
else return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon() end
else return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon(e,tp,eg,ep,ev,re,r,rp) end
end
function c56535497.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
......
......@@ -89,7 +89,7 @@ function c57135971.eqlimit(e,c)
return c:IsSetCard(0x3b)
end
function c57135971.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget() and aux.dscon()
return e:GetHandler():GetEquipTarget() and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c57135971.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
......@@ -37,7 +37,7 @@ end
function c61397885.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
and not Duel.IsExistingMatchingCard(c61397885.cfilter,tp,LOCATION_MZONE,0,1,nil)
and aux.dscon()
and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c61397885.mfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
......
......@@ -12,7 +12,7 @@ function c67113830.initial_effect(c)
c:RegisterEffect(e1)
end
function c67113830.condition(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon()
return aux.dscon(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>7
end
function c67113830.filter(c)
......
......@@ -61,7 +61,7 @@ end
function c68679595.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetEquipGroup()
return g:IsExists(c68679595.cfilter,1,nil) and aux.dscon()
return g:IsExists(c68679595.cfilter,1,nil) and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c68679595.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
......
......@@ -47,7 +47,7 @@ function c71612253.checkop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c71612253.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,71612253)~=0 and aux.dscon()
return Duel.GetFlagEffect(tp,71612253)~=0 and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c71612253.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
......@@ -47,7 +47,7 @@ function c72554862.val(e,c)
end
function c72554862.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,72554862)>0
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and aux.dscon()
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c72554862.spfilter(c,e,tp)
return c:IsLevelBelow(5) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -46,5 +46,5 @@ function c73729209.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c73729209.atkcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and Duel.GetTurnPlayer()==tp and aux.dscon()
return aux.exccon(e) and Duel.GetTurnPlayer()==tp and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
......@@ -47,7 +47,7 @@ function c79016563.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(p,d,REASON_EFFECT)
end
function c79016563.atkcon(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon()
return aux.dscon(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():GetMutualLinkedGroupCount()>=2
end
function c79016563.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -60,7 +60,7 @@ function c79856792.spop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(79856792,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1)
end
function c79856792.atcon(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon() and e:GetHandler():GetFlagEffect(79856792)==0
return aux.dscon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():GetFlagEffect(79856792)==0
end
function c79856792.afilter(c)
return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsAbleToGraveAsCost()
......
......@@ -13,7 +13,7 @@ function c88494120.initial_effect(c)
c:RegisterEffect(e1)
end
function c88494120.condition(e,tp,eg,ep,ev,re,r,rp)
return aux.dscon()
return aux.dscon(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)==1
end
function c88494120.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -31,7 +31,7 @@ function c89238128.initial_effect(c)
end
function c89238128.atkcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
and aux.dscon()
and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c89238128.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
......
......@@ -41,7 +41,7 @@ function c93211810.clear(e,tp,eg,ep,ev,re,r,rp)
end
function c93211810.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()==tp and ph<PHASE_MAIN2 and aux.dscon()
return Duel.GetTurnPlayer()==tp and ph<PHASE_MAIN2 and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c93211810.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c93211810[tp]<2 end
......
......@@ -18,7 +18,7 @@ function c93356623.cfilter(c)
end
function c93356623.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c93356623.cfilter,tp,LOCATION_MZONE,0,1,nil)
and aux.dscon()
and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c93356623.filter(c)
return c:IsFaceup() and (c:GetAttack()>0 or c:GetDefense()>0 or aux.NegateMonsterFilter(c))
......
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