Commit b26f3513 authored by mercury233's avatar mercury233

fix

parent f36e7561
...@@ -27,7 +27,7 @@ function c10035717.adcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,7 +27,7 @@ function c10035717.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,700) Duel.PayLPCost(tp,700)
end end
function c10035717.filter(c) function c10035717.filter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE+RACE_WARRIOR) return c:IsFaceup() and c:IsRace(RACE_MACHINE+RACE_WARRIOR) and c:IsDefenseAbove(0)
end end
function c10035717.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c10035717.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c10035717.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c10035717.filter(chkc) end
......
...@@ -12,11 +12,14 @@ function c36407615.initial_effect(c) ...@@ -12,11 +12,14 @@ function c36407615.initial_effect(c)
e1:SetOperation(c36407615.atop) e1:SetOperation(c36407615.atop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c36407615.filter(c)
return c:IsFaceup() and c:IsDefenseAbove(0)
end
function c36407615.attg(e,tp,eg,ep,ev,re,r,rp,chk) function c36407615.attg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c36407615.filter,tp,0,LOCATION_MZONE,1,nil) end
end end
function c36407615.atop(e,tp,eg,ep,ev,re,r,rp) function c36407615.atop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c36407615.filter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local atk=tc:GetAttack() local atk=tc:GetAttack()
......
...@@ -26,7 +26,7 @@ function c4239451.initial_effect(c) ...@@ -26,7 +26,7 @@ function c4239451.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c4239451.filter(c) function c4239451.filter(c)
return c:IsFaceup() return c:IsFaceup() and c:IsDefenseAbove(0)
end end
function c4239451.adtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c4239451.adtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c4239451.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c4239451.filter(chkc) end
...@@ -56,10 +56,10 @@ function c4239451.adcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,10 +56,10 @@ function c4239451.adcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and Duel.GetCurrentChain()==0 return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and Duel.GetCurrentChain()==0
end end
function c4239451.adtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c4239451.adtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsDefenseAbove(0) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsDefenseAbove,tp,LOCATION_MZONE,0,1,nil,0) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,Card.IsDefenseAbove,tp,LOCATION_MZONE,0,1,1,nil,0)
end end
function c4239451.adop2(e,tp,eg,ep,ev,re,r,rp) function c4239451.adop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -26,7 +26,7 @@ function c71578874.initial_effect(c) ...@@ -26,7 +26,7 @@ function c71578874.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c71578874.filter(c) function c71578874.filter(c)
return c:IsFaceup() and c:GetAttack()~=c:GetDefense() return c:IsFaceup() and c:GetAttack()~=c:GetDefense() and c:IsDefenseAbove(0)
and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end end
function c71578874.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71578874.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -54,11 +54,14 @@ end ...@@ -54,11 +54,14 @@ end
function c71578874.swcon(e,tp,eg,ep,ev,re,r,rp) function c71578874.swcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end end
function c71578874.swfilter(c)
return c:IsFaceup() and c:IsDefenseAbove(0)
end
function c71578874.swtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71578874.swtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c71578874.swfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c71578874.swfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c71578874.swfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,500)
end end
function c71578874.swop(e,tp,eg,ep,ev,re,r,rp) function c71578874.swop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -16,7 +16,7 @@ function c79161790.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c79161790.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end end
function c79161790.filter(c) function c79161790.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsDefenseAbove(0)
end end
function c79161790.target(e,tp,eg,ep,ev,re,r,rp,chk) function c79161790.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79161790.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c79161790.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
...@@ -19,7 +19,7 @@ function c79967395.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,7 +19,7 @@ function c79967395.condition(e,tp,eg,ep,ev,re,r,rp)
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function c79967395.filter(c) function c79967395.filter(c)
return c:IsFaceup() return c:IsFaceup() and c:IsDefenseAbove(0)
end end
function c79967395.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c79967395.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c79967395.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c79967395.filter(chkc) end
......
...@@ -32,7 +32,7 @@ function c92736188.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +32,7 @@ function c92736188.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c92736188.filter(c) function c92736188.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsDefenseAbove(0)
end end
function c92736188.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c92736188.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c92736188.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c92736188.filter(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