Commit d064ee19 authored by mercury233's avatar mercury233

fix def 0 check

parent 72806b1a
......@@ -41,7 +41,7 @@ function c11390349.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c11390349.ctlop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetDefense()==0 then
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsDefenseBelow(0) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
......@@ -13,7 +13,7 @@ function c24062258.initial_effect(c)
c:RegisterEffect(e1)
end
function c24062258.filter(c,e,tp)
return c:GetCode()~=24062258 and c:GetLevel()==4 and c:IsAttribute(ATTRIBUTE_DARK) and (c:GetAttack()==0 or c:GetDefense()==0)
return c:GetCode()~=24062258 and c:GetLevel()==4 and c:IsAttribute(ATTRIBUTE_DARK) and (c:GetAttack()==0 or c:IsDefenseBelow(0))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c24062258.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -61,7 +61,7 @@ function c25935625.spfilter1(c,e,tp)
and Duel.IsExistingMatchingCard(c25935625.spfilter2,tp,LOCATION_DECK,0,1,c,e,tp)
end
function c25935625.spfilter2(c,e,tp)
return c:IsSetCard(0x9e) and c:GetDefense()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x9e) and c:IsDefenseBelow(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c25935625.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
......
......@@ -31,7 +31,7 @@ function c27971137.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY)
end
function c27971137.filter(c,e,tp)
return c:GetLevel()==1 and (c:GetAttack()==0 and c:GetDefense()==0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:GetLevel()==1 and (c:GetAttack()==0 and c:IsDefenseBelow(0)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c27971137.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -41,7 +41,7 @@ function c40005099.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
end
function c40005099.filter1(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:GetDefense()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsRace(RACE_ZOMBIE) and c:IsDefenseBelow(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40005099.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40005099.filter1(chkc,e,tp) end
......@@ -59,7 +59,7 @@ function c40005099.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c40005099.filter2(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:GetDefense()==0
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsDefenseBelow(0)
end
function c40005099.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c40005099.filter2(chkc) end
......
......@@ -47,7 +47,7 @@ function c53573406.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetLabel()~=se:GetLabel() and not c:IsLocation(LOCATION_EXTRA)
end
function c53573406.filter(c,e,tp)
return c:GetDefense()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
return c:IsDefenseBelow(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c53573406.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c53573406.filter(chkc,e,tp) end
......
......@@ -98,7 +98,7 @@ function c78765160.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp)
end
function c78765160.tdfilter(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:GetDefense()==0 and c:IsAbleToDeck()
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsDefenseBelow(0) and c:IsAbleToDeck()
end
function c78765160.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c78765160.tdfilter(chkc) end
......
......@@ -11,7 +11,7 @@ function c81191584.initial_effect(c)
c:RegisterEffect(e1)
end
function c81191584.filter(c)
return c:GetDefense()==0 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
return c:IsDefenseBelow(0) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
end
function c81191584.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c81191584.filter(chkc) end
......
......@@ -17,7 +17,7 @@ function c81587028.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function c81587028.filter1(c,e,tp)
return c:IsType(TYPE_NORMAL) and (c:GetAttack()==0 or c:GetDefense()==0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
return c:IsType(TYPE_NORMAL) and (c:GetAttack()==0 or c:IsDefenseBelow(0)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c81587028.filter2(c,g)
return g:IsExists(c81587028.filter3,1,c,c:GetCode())
......
......@@ -53,7 +53,7 @@ function c83283063.tgcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c83283063.filter(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:GetDefense()==0
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsDefenseBelow(0)
end
function c83283063.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c83283063.filter(chkc) end
......
......@@ -34,7 +34,7 @@ function c94801854.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(sg,REASON_COST)
end
function c94801854.spfilter1(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_TUNER) and c:GetDefense()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_TUNER) and c:IsDefenseBelow(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c94801854.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c94801854.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
......
......@@ -20,7 +20,7 @@ function c96163807.initial_effect(c)
c:RegisterEffect(e2)
end
function c96163807.thfilter(c)
return c:GetDefense()==0 and c:IsRace(RACE_ZOMBIE) and c:IsAbleToHand()
return c:IsDefenseBelow(0) and c:IsRace(RACE_ZOMBIE) and c:IsAbleToHand()
end
function c96163807.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c96163807.thfilter(chkc) 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