Commit 4a04ad48 authored by nekrozar's avatar nekrozar Committed by nanahira

add Card.IsAttack(#1058)

parent cc6d509b
......@@ -119,7 +119,7 @@ function c10000020.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(-2000)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
if preatk~=0 and tc:GetAttack()==0 then dg:AddCard(tc) end
if preatk~=0 and tc:IsAttack(0) then dg:AddCard(tc) end
tc=g:GetNext()
end
Duel.Destroy(dg,REASON_EFFECT)
......
......@@ -30,7 +30,7 @@ function c11390349.val(e,c)
return Duel.GetMatchingGroupCount(c11390349.vfilter,e:GetOwnerPlayer(),LOCATION_MZONE,0,nil)*-300
end
function c11390349.filter(c)
return c:IsFaceup() and c:IsDefenseBelow(0) and c:IsControlerCanBeChanged()
return c:IsFaceup() and c:IsDefense(0) and c:IsControlerCanBeChanged()
end
function c11390349.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c11390349.filter(chkc) end
......@@ -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:IsDefenseBelow(0) then
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsDefense(0) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
......@@ -30,7 +30,7 @@ function c12219047.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c12219047.filter(c)
return c:IsFaceup() and not (c:GetAttack()==0 and c:IsDisabled())
return c:IsFaceup() and not (c:IsAttack(0) and c:IsDisabled())
end
function c12219047.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c12219047.filter(chkc) end
......
......@@ -44,7 +44,7 @@ function c15327215.spop(e,tp,eg,ep,ev,re,r,rp)
end
function c15327215.filter(c,mc)
return c:IsLevelBelow(4) and c:IsSetCard(0x3d) and c:IsAbleToRemoveAsCost()
and not (c:IsLevel(mc:GetLevel()) and c:IsAttribute(mc:GetAttribute()) and c:GetAttack()==mc:GetAttack() and c:GetDefense()==mc:GetDefense())
and not (c:IsLevel(mc:GetLevel()) and c:IsAttribute(mc:GetAttribute()) and c:IsAttack(mc:GetAttack()) and c:IsDefense(mc:GetDefense()))
end
function c15327215.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c15327215.filter,tp,LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
......
......@@ -31,10 +31,10 @@ function c16886617.initial_effect(c)
c:RegisterEffect(e5)
end
function c16886617.rfilter(c)
return c:IsFaceup() and c:GetAttack()==0 and c:IsReleasable()
return c:IsFaceup() and c:IsAttack(0) and c:IsReleasable()
end
function c16886617.mzfilter(c)
return c:IsFaceup() and c:GetAttack()==0 and c:IsReleasable() and c:GetSequence()<5
return c:IsFaceup() and c:IsAttack(0) and c:IsReleasable() and c:GetSequence()<5
end
function c16886617.spcon(e,c)
if c==nil then return true end
......
......@@ -75,7 +75,7 @@ function c17086528.slcon(e)
return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
end
function c17086528.atkfilter(c,atk)
return c:IsFaceup() and c:GetAttack()~=atk
return c:IsFaceup() and not c:IsAttack(atk)
end
function c17086528.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
......
......@@ -27,7 +27,7 @@ function c17857780.atktg(e,c)
return c:IsType(TYPE_PENDULUM)
end
function c17857780.filter(c)
return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack()
return c:IsFaceup() and not c:IsAttack(c:GetBaseAttack())
end
function c17857780.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c17857780.filter(chkc) end
......
......@@ -16,5 +16,5 @@ function c19451302.initial_effect(c)
c:RegisterEffect(e2)
end
function c19451302.indtg(e,c)
return c:GetAttack()==0 and c:IsAttackPos()
return c:IsAttack(0) and c:IsAttackPos()
end
......@@ -34,7 +34,7 @@ function c20785975.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c20785975.filter(c)
return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() and c:IsAbleToRemove()
return c:IsFaceup() and not c:IsAttack(c:GetBaseAttack()) and c:IsAbleToRemove()
end
function c20785975.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c20785975.filter(chkc) end
......
......@@ -56,7 +56,7 @@ function c22382087.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_SUMMON)
end
function c22382087.filter(c)
return c:GetAttack()==800 and c:GetDefense()==1000 and not c:IsCode(22382087) and c:IsAbleToHand()
return c:IsAttack(800) and c:IsDefense(1000) and not c:IsCode(22382087) and c:IsAbleToHand()
end
function c22382087.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22382087.filter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -131,7 +131,7 @@ function c23064604.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,c23064604.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c23064604.thfilter(c)
return c:IsAttackAbove(2400) and c:GetDefense()==1000 and c:IsAbleToHand()
return c:IsAttackAbove(2400) and c:IsDefense(1000) and c:IsAbleToHand()
end
function c23064604.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c23064604.thfilter(chkc) end
......
......@@ -56,5 +56,5 @@ function c23770284.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c23770284.indval(e,c)
return c:GetAttack()==e:GetHandler():GetAttack()
return c:IsAttack(e:GetHandler():GetAttack())
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:IsLevel(4) and c:IsAttribute(ATTRIBUTE_DARK) and (c:GetAttack()==0 or c:IsDefenseBelow(0))
return c:GetCode()~=24062258 and c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_DARK) and (c:IsAttack(0) or c:IsDefense(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)
......
......@@ -57,7 +57,7 @@ function c25704359.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c25704359.cfilter,1,nil,tp)
end
function c25704359.spfilter(c,e,tp,att)
return c:IsRace(RACE_SPELLCASTER) and c:GetDefense()==1500 and c:IsAttribute(att)
return c:IsRace(RACE_SPELLCASTER) and c:IsDefense(1500) and c:IsAttribute(att)
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function c25704359.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -57,11 +57,11 @@ function c25935625.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,c25935625.cfilter,2,2,REASON_COST)
end
function c25935625.spfilter1(c,e,tp)
return c:IsSetCard(0x9e) and c:GetAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x9e) and c:IsAttack(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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:IsDefenseBelow(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x9e) and c:IsDefense(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)
......
......@@ -49,7 +49,7 @@ function c27107590.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST)
end
function c27107590.thfilter(c)
return c:IsSetCard(0x4a) and c:IsType(TYPE_MONSTER) and c:GetAttack()==0 and c:IsAbleToHand()
return c:IsSetCard(0x4a) and c:IsType(TYPE_MONSTER) and c:IsAttack(0) and c:IsAbleToHand()
end
function c27107590.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c27107590.thfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -81,7 +81,7 @@ function c27107590.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return se~=e:GetLabelObject()
end
function c27107590.spfilter(c,e,tp)
return c:IsSetCard(0x4a) and c:IsType(TYPE_MONSTER) and c:GetAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
return c:IsSetCard(0x4a) and c:IsType(TYPE_MONSTER) and c:IsAttack(0) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c27107590.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -11,7 +11,7 @@ function c27821104.initial_effect(c)
c:RegisterEffect(e1)
end
function c27821104.tfilter(c,atk,code,e,tp)
return c:IsSetCard(0x3d) and not c:IsCode(code) and c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x3d) and not c:IsCode(code) and c:IsAttack(atk) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c27821104.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x3d)
......
......@@ -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:IsLevel(1) and (c:GetAttack()==0 and c:IsDefenseBelow(0)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsLevel(1) and c:IsAttack(0) and c:IsDefense(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
......
......@@ -16,7 +16,7 @@ function c28332833.thcon(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():IsReason(REASON_BATTLE)
end
function c28332833.filter(c)
return c:GetDefense()==200 and c:IsAbleToHand()
return c:IsDefense(200) and c:IsAbleToHand()
end
function c28332833.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28332833.filter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -35,7 +35,7 @@ function c31472884.cfilter(c)
and Duel.IsExistingTarget(c31472884.tgfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c)
end
function c31472884.tgfilter(c,dc)
return c:IsFaceup() and (c:GetAttack()~=dc:GetAttack() or c:GetDefense()~=dc:GetDefense())
return c:IsFaceup() and (not c:IsAttack(dc:GetAttack()) or not c:IsDefense(dc:GetDefense()))
end
function c31472884.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
......
......@@ -12,7 +12,7 @@ function c33609262.initial_effect(c)
c:RegisterEffect(e1)
end
function c33609262.cfilter(c)
return (c:GetAttack()==2400 or c:GetAttack()==2800) and c:GetDefense()==1000 and not c:IsPublic()
return c:IsAttack(2400,2800) and c:IsDefense(1000) and not c:IsPublic()
end
function c33609262.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33609262.cfilter,tp,LOCATION_HAND,0,1,nil) end
......
......@@ -58,7 +58,7 @@ function c35606858.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
c:RegisterFlagEffect(35606858,RESET_CHAIN,0,1)
end
function c35606858.tgfilter(c,val)
return c:IsRace(RACE_FIEND) and c:IsType(TYPE_MONSTER) and (c:GetAttack()==val or c:GetDefense()==val) and c:IsAbleToGrave()
return c:IsRace(RACE_FIEND) and c:IsType(TYPE_MONSTER) and (c:IsAttack(val) or c:IsDefense(val)) and c:IsAbleToGrave()
end
function c35606858.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c35606858.tgfilter,tp,LOCATION_DECK,0,1,nil,ev) end
......
......@@ -24,7 +24,7 @@ function c36278828.operation(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x1009,1) then
local atk=tc:GetAttack()
tc:AddCounter(0x1009,1)
if atk>0 and tc:GetAttack()==0 then
if atk>0 and tc:IsAttack(0) then
Duel.RaiseEvent(tc,EVENT_CUSTOM+54306223,e,0,0,0,0)
end
end
......
......@@ -23,7 +23,7 @@ function c37256334.initial_effect(c)
c:RegisterEffect(e2)
end
function c37256334.deffilter1(c,def)
return c:IsPosition(POS_FACEUP_DEFENSE) and c:GetDefense()~=def
return c:IsPosition(POS_FACEUP_DEFENSE) and not c:IsDefense(def)
end
function c37256334.deftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(Card.IsPosition,tp,LOCATION_MZONE,0,nil,POS_FACEUP_DEFENSE)
......
......@@ -22,7 +22,7 @@ function c39139935.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c39139935.filter(c)
return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack()
return c:IsFaceup() and not c:IsAttack(c:GetBaseAttack())
end
function c39139935.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c39139935.filter(chkc) end
......
......@@ -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:IsDefenseBelow(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsRace(RACE_ZOMBIE) and c:IsDefense(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:IsDefenseBelow(0)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsDefense(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
......
......@@ -45,7 +45,7 @@ function c40189917.sumop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c40189917.cfilter(c)
return c:GetDefense()==200 and c:IsAbleToRemoveAsCost()
return c:IsDefense(200) and c:IsAbleToRemoveAsCost()
end
function c40189917.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40189917.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -49,7 +49,7 @@ function c40542825.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SendtoGrave(g1,REASON_COST)
end
function c40542825.thfilter(c)
return c:GetDefense()==1500 and c:IsRace(RACE_SPELLCASTER) and not c:IsCode(40542825) and c:IsAbleToHand()
return c:IsDefense(1500) and c:IsRace(RACE_SPELLCASTER) and not c:IsCode(40542825) and c:IsAbleToHand()
end
function c40542825.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
......
......@@ -33,7 +33,7 @@ function c40894584.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c40894584.filter(c,e,tp)
return c:GetAttack()==1500 and c:GetDefense()==200 and not c:IsCode(40894584) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsAttack(1500) and c:IsDefense(200) and not c:IsCode(40894584) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40894584.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -11,7 +11,7 @@ function c42303365.initial_effect(c)
c:RegisterEffect(e1)
end
function c42303365.filter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged() and c:GetAttack()==0
return c:IsFaceup() and c:IsControlerCanBeChanged() and c:IsAttack(0)
end
function c42303365.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c42303365.filter(chkc) end
......@@ -22,7 +22,7 @@ function c42303365.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c42303365.ctlop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()==0 then
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttack(0) then
Duel.GetControl(tc,tp)
end
end
......@@ -16,7 +16,7 @@ function c43661068.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SelectTarget(tp,c43661068.tfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c43661068.filter(c,atk,def)
return c:IsFaceup() and c:GetLevel()>0 and (c:GetAttack()==atk or c:GetDefense()==def)
return c:IsFaceup() and c:GetLevel()>0 and (c:IsAttack(atk) or c:IsDefense(def))
end
function c43661068.tfilter(c,tp)
return c:IsFaceup() and c:GetLevel()>0
......
......@@ -19,7 +19,7 @@ function c46589034.initial_effect(c)
c:RegisterEffect(e2)
end
function c46589034.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xba) and c:IsLevelAbove(1) and c:GetAttack()~=0 and c:GetDefense()~=0
return c:IsFaceup() and c:IsSetCard(0xba) and c:IsLevelAbove(1) and c:IsAttackAbove(1) and c:IsDefenseAbove(1)
end
function c46589034.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c46589034.cfilter(chkc) end
......
......@@ -13,7 +13,7 @@ function c46961802.filter1(c,tp)
return c:IsFaceup() and Duel.IsExistingTarget(c46961802.filter2,tp,LOCATION_MZONE,0,1,c,c:GetAttack())
end
function c46961802.filter2(c,atk)
return c:IsFaceup() and c:GetAttack()==atk
return c:IsFaceup() and c:IsAttack(atk)
end
function c46961802.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
......@@ -28,7 +28,7 @@ function c46961802.activate(e,tp,eg,ep,ev,re,r,rp)
local tc1=g:GetFirst()
local tc2=g:GetNext()
if tc1:IsFacedown() or tc2:IsFacedown() or not tc1:IsRelateToEffect(e) or not tc2:IsRelateToEffect(e)
or tc1:GetAttack()~=tc2:GetAttack() then return end
or not tc1:IsAttack(tc2:GetAttack()) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
......
......@@ -83,7 +83,7 @@ function c47946130.negop(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c47946130.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetAttack()~=c:GetBaseAttack() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
return not c:IsAttack(c:GetBaseAttack()) and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end
function c47946130.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -64,7 +64,7 @@ function c50260683.descost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST)
end
function c50260683.filter2(c)
return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack()
return c:IsFaceup() and not c:IsAttack(c:GetBaseAttack())
end
function c50260683.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c50260683.filter2(chkc) end
......@@ -75,7 +75,7 @@ function c50260683.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c50260683.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()~=tc:GetBaseAttack() then
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsAttack(tc:GetBaseAttack()) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--グリーディー・ヴェノム ・フュージョン・ドラゴン
--グリーディー・ヴェノム ・フュージョン・ドラゴン
function c51570882.initial_effect(c)
--fusion material
c:EnableReviveLimit()
......@@ -39,7 +39,7 @@ function c51570882.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function c51570882.disfilter(c)
return c:IsFaceup() and not (c:GetAttack()==0 and c:IsDisabled())
return c:IsFaceup() and not (c:IsAttack(0) and c:IsDisabled())
end
function c51570882.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c51570882.disfilter(chkc) end
......
......@@ -19,7 +19,7 @@ function c52824910.initial_effect(c)
c:RegisterEffect(e2)
end
function c52824910.indes(e,c)
return c:GetAttack()==e:GetHandler():GetAttack()
return c:IsAttack(e:GetHandler():GetAttack())
end
function c52824910.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
......
......@@ -18,7 +18,7 @@ function c53077251.filter(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c53077251.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetAttack())
end
function c53077251.filter2(c,atk)
return c:IsFaceup() and c:GetAttack()~=atk
return c:IsFaceup() and not c:IsAttack(atk)
end
function c53077251.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c53077251.filter(chkc,tp) end
......
......@@ -99,7 +99,7 @@ function c53315891.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,c)
if g:GetCount()==0 then return false end
local g1,atk=g:GetMaxGroup(Card.GetAttack)
return c:GetAttack()~=atk and c:GetFlagEffect(53315891)==0
return not c:IsAttack(atk) and c:GetFlagEffect(53315891)==0
end
c:RegisterFlagEffect(53315891,RESET_CHAIN,0,1)
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:IsDefenseBelow(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
return c:IsDefense(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
......
......@@ -46,7 +46,7 @@ function c54306223.acop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsCanAddCounter(0x1009,1) and not tc:IsSetCard(0x50) then
local atk=tc:GetAttack()
tc:AddCounter(0x1009,1)
if atk>0 and tc:GetAttack()==0 then
if atk>0 and tc:IsAttack(0) then
g:AddCard(tc)
end
end
......
......@@ -38,7 +38,7 @@ function c59463312.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,59463312,RESET_PHASE+PHASE_END,0,1)
end
function c59463312.filter(c,e,tp)
return c:GetAttack()==800 and c:GetDefense()==1000 and not c:IsCode(59463312) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
return c:IsAttack(800) and c:IsDefense(1000) and not c:IsCode(59463312) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c59463312.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c59463312.filter(chkc,e,tp) end
......
......@@ -20,5 +20,5 @@ function c60519422.indtg(e,c)
return true
end
function c60519422.indval(e,c)
return c:GetAttack()==e:GetLabel()
return c:IsAttack(e:GetLabel())
end
......@@ -18,7 +18,7 @@ function c60634565.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c60634565.desfilter(c)
return c:IsFaceup() and c:GetAttack()==0
return c:IsFaceup() and c:IsAttack(0)
end
function c60634565.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -15,7 +15,7 @@ function c60718396.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c60718396.cfilter(c)
return c:GetDefense()==200 and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost()
return c:IsDefense(200) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost()
end
function c60718396.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60718396.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -37,7 +37,7 @@ function c60728397.activate(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x1009,2) and g:GetFirst():IsLocation(LOCATION_GRAVE) then
local atk=tc:GetAttack()
tc:AddCounter(0x1009,2)
if atk>0 and tc:GetAttack()==0 then
if atk>0 and tc:IsAttack(0) then
Duel.RaiseEvent(tc,EVENT_CUSTOM+54306223,e,0,0,0,0)
end
end
......
......@@ -18,7 +18,7 @@ function c60953949.thcon(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE)
end
function c60953949.filter(c)
return (c:GetAttack()==500 or c:GetDefense()==500) and c:GetCode()~=60953949
return (c:IsAttack(500) or c:IsDefense(500)) and c:GetCode()~=60953949
and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand()
end
function c60953949.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -34,10 +34,10 @@ function c61466310.thcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and eg:GetFirst():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c61466310.filter(c,code)
return (c:GetAttack()==2400 or c:GetAttack()==2800) and c:GetDefense()==1000 and c:GetCode()~=code and c:IsAbleToHand()
return c:IsAttack(2400,2800) and c:IsDefense(1000) and c:GetCode()~=code and c:IsAbleToHand()
end
function c61466310.filter2(c,atk,code)
return c:GetAttack()==atk and c:GetDefense()==1000 and c:GetCode()~=code and c:IsAbleToHand()
return c:IsAttack(atk) and c:IsDefense(1000) and c:GetCode()~=code and c:IsAbleToHand()
end
function c61466310.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c61466310.filter,tp,LOCATION_DECK,0,1,nil,eg:GetFirst():GetCode()) end
......
......@@ -43,7 +43,7 @@ function c71071546.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveCounter(tp,0x2c,ct,REASON_COST)
end
function c71071546.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttack()~=2000 end
if chk==0 then return not e:GetHandler():IsAttack(2000) end
end
function c71071546.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -12,7 +12,7 @@ function c7152333.initial_effect(c)
c:RegisterEffect(e1)
end
function c7152333.spfilter(c,e,tp)
return c:IsSetCard(0x87) and c:GetAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x87) and c:IsAttack(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c7152333.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttack()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -21,7 +21,7 @@ function c7152333.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c7152333.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:GetAttack()==0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsAttack(0) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......
......@@ -26,7 +26,7 @@ function c71578874.initial_effect(c)
c:RegisterEffect(e3)
end
function c71578874.filter(c)
return c:IsFaceup() and c:GetAttack()~=c:GetDefense() and c:IsDefenseAbove(0)
return c:IsFaceup() and not c:IsAttack(c:GetDefense()) and c:IsDefenseAbove(0)
and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c71578874.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -92,7 +92,7 @@ function c71645242.desfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT)
end
function c71645242.filter2(c,atk,e,tp)
return c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,0x20,tp,false,false)
return c:IsAttack(atk) and c:IsCanBeSpecialSummoned(e,0x20,tp,false,false)
end
function c71645242.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71645242.filter2(chkc,e:GetLabel(),e,tp) end
......@@ -121,7 +121,7 @@ function c71645242.spop2(e,tp,eg,ep,ev,re,r,rp)
og:RemoveCard(c)
local atk=og:GetSum(Card.GetPreviousAttackOnField)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:GetAttack()==atk then
if tc:IsRelateToEffect(e) and tc:IsAttack(atk) then
Duel.SpecialSummon(tc,0x20,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -34,7 +34,7 @@ function c73899015.operation(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x1009,1) then
local atk=tc:GetAttack()
tc:AddCounter(0x1009,1)
if atk>0 and tc:GetAttack()==0 then
if atk>0 and tc:IsAttack(0) then
Duel.RaiseEvent(tc,EVENT_CUSTOM+54306223,e,0,0,0,0)
end
end
......
......@@ -10,10 +10,10 @@ function c74845897.initial_effect(c)
c:RegisterEffect(e1)
end
function c74845897.filter(c,e,tp)
return c:GetDefense()==200 and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsDefense(200) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c74845897.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c74845897.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
......
......@@ -27,7 +27,7 @@ function c77972406.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
local atk=tc:GetAttack()
tc:AddCounter(0x1009,1)
if atk>0 and tc:GetAttack()==0 then
if atk>0 and tc:IsAttack(0) then
Duel.RaiseEvent(tc,EVENT_CUSTOM+54306223,e,0,0,0,0)
end
end
......
......@@ -61,7 +61,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:IsDefenseBelow(0) and c:IsAbleToDeck()
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsDefense(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
......
......@@ -35,7 +35,7 @@ function c78785392.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xe6)
end
function c78785392.filter(c,e,tp)
return c:GetAttack()==100 and c:IsSetCard(0xe6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsAttack(100) and c:IsSetCard(0xe6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c78785392.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
......
......@@ -11,7 +11,7 @@ function c81191584.initial_effect(c)
c:RegisterEffect(e1)
end
function c81191584.filter(c)
return c:IsDefenseBelow(0) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
return c:IsDefense(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:IsDefenseBelow(0)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
return c:IsType(TYPE_NORMAL) and (c:IsAttack(0) or c:IsDefense(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())
......
......@@ -100,7 +100,7 @@ function c82103466.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,c)
if g:GetCount()==0 then return false end
local g1,atk=g:GetMaxGroup(Card.GetBaseAttack)
return c:GetAttack()~=atk and c:GetFlagEffect(82103466)==0
return not c:IsAttack(atk) and c:GetFlagEffect(82103466)==0
end
c:RegisterFlagEffect(82103466,RESET_CHAIN,0,1)
end
......
......@@ -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:IsDefenseBelow(0)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsDefense(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
......
......@@ -56,7 +56,7 @@ function c84171830.atktg(e,c)
return c==Duel.GetAttacker() and c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c84171830.filter(c)
return c:GetAttack()==2800 and c:GetDefense()==1000
return c:IsAttack(2800) and c:IsDefense(1000)
end
function c84171830.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c84171830.filter,tp,LOCATION_HAND,0,1,nil) end
......
......@@ -73,7 +73,7 @@ function c84401683.negop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c84401683.desfilter(c)
return c:IsFaceup() and c:GetAttack()==0
return c:IsFaceup() and c:IsAttack(0)
end
function c84401683.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c84401683.desfilter(chkc) end
......
......@@ -91,12 +91,12 @@ function c84569886.atkcon2(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=a:GetBattleTarget()
if a:IsControler(tp) then a,d=d,a end
return a and a:IsControler(1-tp) and a:GetAttack()~=a:GetBaseAttack()
return a and a:IsControler(1-tp) and not a:IsAttack(a:GetBaseAttack())
end
function c84569886.atkop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsControler(tp) then tc=tc:GetBattleTarget() end
if tc and tc:IsFaceup() and tc:GetAttack()~=tc:GetBaseAttack() then
if tc and tc:IsFaceup() and not tc:IsAttack(tc:GetBaseAttack()) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......
......@@ -15,5 +15,5 @@ function c85446833.initial_effect(c)
c:RegisterEffect(e2)
end
function c85446833.target(e,c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:GetAttack()==0
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttack(0)
end
......@@ -24,7 +24,7 @@ function c86937530.initial_effect(c)
c:RegisterEffect(e2)
end
function c86937530.filter(c)
return c:GetAttack()==1850 and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
return c:IsAttack(1850) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
end
function c86937530.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86937530.filter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -36,7 +36,7 @@ function c88177324.filter1(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function c88177324.filter2(c)
return c:IsFaceup() and (c:GetAttack()~=c:GetBaseAttack() or c:GetDefense()~=c:GetBaseDefense())
return c:IsFaceup() and (not c:IsAttack(c:GetBaseAttack()) or not c:IsDefense(c:GetBaseDefense()))
end
function c88177324.filter3(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
......@@ -68,7 +68,7 @@ function c88177324.negop(e,tp,eg,ep,ev,re,r,rp)
g=Duel.GetMatchingGroup(c88177324.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
tc=g:GetFirst()
while tc do
if tc:GetAttack()~=tc:GetBaseAttack() then
if not tc:IsAttack(tc:GetBaseAttack()) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......@@ -76,7 +76,7 @@ function c88177324.negop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
if tc:GetDefense()~=tc:GetBaseDefense() then
if not tc:IsDefense(tc:GetBaseDefense()) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENSE_FINAL)
......
......@@ -68,7 +68,7 @@ function c88305705.ftarget(e,c)
end
function c88305705.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetAttack()==0
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttack(0)
end
function c88305705.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
......
......@@ -71,7 +71,7 @@ function c90036274.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c90036274.disfilter(c)
return c:GetSummonLocation()==LOCATION_EXTRA and not (c:GetAttack()==0 and c:IsDisabled())
return c:GetSummonLocation()==LOCATION_EXTRA and not (c:IsAttack(0) and c:IsDisabled())
end
function c90036274.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c90036274.disfilter(chkc) end
......
......@@ -47,7 +47,7 @@ function c90579153.damop(e,tp,eg,ep,ev,re,r,rp)
end
function c90579153.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetAttack()~=c:GetBaseAttack()
return not c:IsAttack(c:GetBaseAttack())
end
function c90579153.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
......
......@@ -25,7 +25,7 @@ function c91422370.filter(c,e,tp)
return c:IsSetCard(0x58) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c91422370.filter2(c,atk,e,tp)
return c:IsSetCard(0x58) and c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x58) and c:IsAttack(atk) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c91422370.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c91422370.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
......
......@@ -34,7 +34,7 @@ function c9284723.operation(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x1009,2) then
local atk=tc:GetAttack()
tc:AddCounter(0x1009,2)
if atk>0 and tc:GetAttack()==0 then
if atk>0 and tc:IsAttack(0) then
Duel.RaiseEvent(tc,EVENT_CUSTOM+54306223,e,0,0,0,0)
end
end
......
......@@ -21,7 +21,7 @@ function c93356623.condition(e,tp,eg,ep,ev,re,r,rp)
and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end
function c93356623.filter(c)
return c:IsFaceup() and not (c:GetAttack()==0 and c:GetDefense()==0 and c:IsDisabled())
return c:IsFaceup() and not (c:IsAttack(0) and c:IsDefense(0) and c:IsDisabled())
end
function c93356623.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c93356623.filter(chkc) end
......
......@@ -24,7 +24,7 @@ function c94380860.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c94380860.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:GetAttack()~=c:GetBaseAttack()
return c:IsPosition(POS_FACEUP_ATTACK) and not c:IsAttack(c:GetBaseAttack())
end
function c94380860.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c94380860.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:IsDefenseBelow(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_TUNER) and c:IsDefense(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
......
......@@ -27,7 +27,7 @@ function c95457011.initial_effect(c)
c:RegisterEffect(e3)
end
function c95457011.spfilter(c,e,tp)
return c:GetAttack()==800 and c:GetDefense()==1000 and not c:IsCode(95457011) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
return c:IsAttack(800) and c:IsDefense(1000) and not c:IsCode(95457011) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c95457011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -60,7 +60,7 @@ function c95993388.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_SUMMON)
end
function c95993388.thfilter(c)
return c:GetAttack()==800 and c:GetDefense()==1000 and not c:IsCode(95993388) and c:IsAbleToHand()
return c:IsAttack(800) and c:IsDefense(1000) and not c:IsCode(95993388) and c:IsAbleToHand()
end
function c95993388.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c95993388.thfilter(chkc) end
......
......@@ -20,7 +20,7 @@ function c96163807.initial_effect(c)
c:RegisterEffect(e2)
end
function c96163807.thfilter(c)
return c:IsDefenseBelow(0) and c:IsRace(RACE_ZOMBIE) and c:IsAbleToHand()
return c:IsDefense(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
......
......@@ -101,7 +101,7 @@ function c96381979.afilter1(c,g)
return g:IsExists(c96381979.afilter2,1,c,c:GetAttack())
end
function c96381979.afilter2(c,atk)
return c:GetAttack()==atk
return c:IsAttack(atk)
end
function c96381979.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......
......@@ -59,7 +59,7 @@ function c96570609.tgfilter(c)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function c96570609.spfilter(c,e,tp)
return c:IsAttackAbove(2400) and c:GetDefense()==1000 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsAttackAbove(2400) and c:IsDefense(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c96570609.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......
......@@ -17,7 +17,7 @@ function c97001138.condition(e,tp,eg,ep,ev,re,r,rp)
return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2
end
function c97001138.thfilter(c)
return c:IsAttackAbove(2400) and c:GetDefense()==1000 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsAttackAbove(2400) and c:IsDefense(1000) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c97001138.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c97001138.thfilter(chkc) end
......@@ -27,7 +27,7 @@ function c97001138.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c97001138.sumfilter(c)
return c:IsAttackAbove(2400) and c:GetDefense()==1000 and c:IsSummonable(true,nil,1)
return c:IsAttackAbove(2400) and c:IsDefense(1000) and c:IsSummonable(true,nil,1)
end
function c97001138.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -15,7 +15,7 @@ function c97926515.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function c97926515.thfilter(c)
return c:IsRace(RACE_BEAST) and c:GetAttack()==300 and c:GetDefense()==100 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsRace(RACE_BEAST) and c:IsAttack(300) and c:IsDefense(100) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c97926515.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c97926515.thfilter,tp,LOCATION_DECK,0,3,nil) end
......
......@@ -31,7 +31,7 @@ function c98552723.initial_effect(c)
c:RegisterEffect(e4)
end
function c98552723.spfilter(c,e,tp)
return (c:GetAttack()==2400 or c:GetAttack()==2800) and c:GetDefense()==1000 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsAttack(2400,2800) and c:IsDefense(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98552723.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c98552723.spfilter(chkc,e,tp) end
......
......@@ -58,7 +58,7 @@ function c99185129.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c99185129.filter(c)
return c:GetSummonLocation()==LOCATION_EXTRA and not (c:GetAttack()==0 and c:IsDisabled())
return c:GetSummonLocation()==LOCATION_EXTRA and not (c:IsAttack(0) and c:IsDisabled())
end
function c99185129.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c99185129.filter(chkc) end
......
......@@ -24,7 +24,7 @@ function c99940363.initial_effect(c)
c:RegisterEffect(e2)
end
function c99940363.mfilter(c)
return c:IsFaceup() and c:IsAttackAbove(2400) and c:GetDefense()==1000
return c:IsFaceup() and c:IsAttackAbove(2400) and c:IsDefense(1000)
end
function c99940363.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c99940363.mfilter,tp,LOCATION_MZONE,0,1,nil)
......
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