Commit 0ff9037c authored by mercury233's avatar mercury233 Committed by GitHub

use Card.IsNonAttribute (#1997)

parent 27d9d7d4
......@@ -68,10 +68,10 @@ function c23931679.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c23931679.sumlimit(e,c,sump,sumtype,sumpos,targetp)
if sumpos and bit.band(sumpos,POS_FACEDOWN)>0 then return false end
return c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WATER) and c23931679[targetp or sump]==1
return c:IsNonAttribute(ATTRIBUTE_WATER) and c23931679[targetp or sump]==1
end
function c23931679.wtfilter(c)
return c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WATER) and c:IsFaceup()
return c:IsNonAttribute(ATTRIBUTE_WATER) and c:IsFaceup()
end
function c23931679.rmfilter(c,at)
return c:GetAttribute()==at
......
......@@ -17,7 +17,7 @@ function c26593852.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if tc==c then tc=Duel.GetAttackTarget() end
if chk==0 then return tc and tc:IsFaceup() and tc:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_DARK) end
if chk==0 then return tc and tc:IsFaceup() and tc:IsNonAttribute(ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function c26593852.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -20,7 +20,7 @@ function c28290705.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c28290705.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_EARTH)
return c:IsFaceup() and c:IsNonAttribute(ATTRIBUTE_EARTH)
end
function c28290705.adtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28290705.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -87,7 +87,7 @@ function c30539496.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c30539496.thfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_EARTH) and c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsNonAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c30539496.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -13,7 +13,7 @@ function c31456110.initial_effect(c)
c:RegisterEffect(e1)
end
function c31456110.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_DARK) and c:IsLevelAbove(5)
return c:IsFaceup() and c:IsNonAttribute(ATTRIBUTE_DARK) and c:IsLevelAbove(5)
end
function c31456110.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c31456110.filter(chkc) end
......
......@@ -21,7 +21,7 @@ function c32281491.initial_effect(c)
c:RegisterEffect(e2)
end
function c32281491.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_LIGHT) and c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsNonAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c32281491.eqfilter(c)
return c:IsSetCard(0x107f) and c:IsFaceup()
......
......@@ -74,7 +74,7 @@ function c36745317.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c36745317.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_EARTH)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_EARTH)
end
function c36745317.atkfilter(c)
return c:IsSetCard(0x182) and c:IsFaceup()
......
......@@ -45,7 +45,7 @@ function c39853199.initial_effect(c)
end
function c39853199.destg1(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc and tc:IsFaceup() and tc:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WIND) end
if chk==0 then return tc and tc:IsFaceup() and tc:IsNonAttribute(ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function c39853199.desop1(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -63,5 +63,5 @@ function c46173679.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c46173679.recon(e,c)
return c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_DARK)
return c:IsNonAttribute(ATTRIBUTE_DARK)
end
......@@ -36,7 +36,7 @@ function c4754691.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(22702055)
end
function c4754691.desfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WATER)
return c:IsFaceup() and c:IsNonAttribute(ATTRIBUTE_WATER)
end
function c4754691.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c4754691.desfilter(chkc) end
......
......@@ -63,5 +63,5 @@ function c50074392.lvop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp)
end
function c50074392.actfilter(e,c)
return c:GetControler()==e:GetHandlerPlayer() and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WATER)
return c:GetControler()==e:GetHandlerPlayer() and c:IsType(TYPE_MONSTER) and c:IsNonAttribute(ATTRIBUTE_WATER)
end
......@@ -24,7 +24,7 @@ function c54059040.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c54059040.pfilter(c,e)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WATER) and (not e or c:IsRelateToEffect(e))
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsNonAttribute(ATTRIBUTE_WATER) and (not e or c:IsRelateToEffect(e))
end
function c54059040.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c54059040.cfilter,tp,LOCATION_MZONE,0,1,nil)
......
......@@ -24,7 +24,7 @@ function c55557574.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsLevel(10)
end
function c55557574.thfilter(c)
return c:GetTextAttack()==-2 and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsLevel(10) and c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_DARK)
return c:GetTextAttack()==-2 and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsLevel(10) and c:IsNonAttribute(ATTRIBUTE_DARK)
end
function c55557574.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c55557574.checkfilter,tp,LOCATION_MZONE,0,nil)
......
......@@ -35,7 +35,7 @@ function c58203736.eftg(e,c)
end
function c58203736.efilter(e,re,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsControler(1-e:GetHandlerPlayer()) and rc:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WATER)
return re:IsActiveType(TYPE_MONSTER) and rc:IsControler(1-e:GetHandlerPlayer()) and rc:IsNonAttribute(ATTRIBUTE_WATER)
end
function c58203736.spfilter(c,e,tp)
return (aux.IsCodeListed(c,22702055) or (c:IsType(TYPE_NORMAL) and c:IsAttribute(ATTRIBUTE_WATER)))
......
......@@ -30,7 +30,7 @@ function c5908650.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
function c5908650.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_LIGHT)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_LIGHT)
end
function c5908650.filter(c)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand()
......
......@@ -74,7 +74,7 @@ function c62133026.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c62133026.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_EARTH)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_EARTH)
end
function c62133026.tgtg(e,c)
return c:IsSetCard(0x182) and c:IsFaceup()
......
......@@ -70,7 +70,7 @@ function c62803464.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c62803464.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_EARTH)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_EARTH)
end
function c62803464.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
......
......@@ -23,7 +23,7 @@ function c70117860.cfilter1(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND)
end
function c70117860.cfilter2(c)
return c:IsFacedown() or c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WIND)
return c:IsFacedown() or c:IsNonAttribute(ATTRIBUTE_WIND)
end
function c70117860.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c70117860.cfilter1,tp,LOCATION_MZONE,0,2,nil)
......
......@@ -10,7 +10,7 @@ function c70797118.initial_effect(c)
c:RegisterEffect(e1)
end
function c70797118.sdfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_LIGHT)
return c:IsFaceup() and c:IsNonAttribute(ATTRIBUTE_LIGHT)
end
function c70797118.sdcon(e)
return Duel.IsExistingMatchingCard(c70797118.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
......
......@@ -33,7 +33,7 @@ function c71340250.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(sg,REASON_COST)
end
function c71340250.filter(c,e,tp)
return c:IsSetCard(0x16) and c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x16) and c:IsNonAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71340250.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71340250.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
......
......@@ -38,7 +38,7 @@ function c73422829.initial_effect(c)
c:RegisterEffect(e4)
end
function c73422829.cfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xdc)
return c:IsNonAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xdc)
and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and Duel.GetMZoneCount(tp,c)>0
end
function c73422829.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -49,7 +49,7 @@ function c73659078.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c73659078.atktg(e,c)
return c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WATER)
return c:IsNonAttribute(ATTRIBUTE_WATER)
end
function c73659078.atkval(e,c)
return Duel.GetCounter(0,1,1,0x1015)*-200
......
......@@ -18,7 +18,7 @@ function c74010769.initial_effect(c)
c:RegisterEffect(e2)
end
function c74010769.cfilter(c)
return (c:IsFacedown() or c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_FIRE)) and c:IsType(TYPE_MONSTER)
return (c:IsFacedown() or c:IsNonAttribute(ATTRIBUTE_FIRE)) and c:IsType(TYPE_MONSTER)
end
function c74010769.spcon(e,c)
if c==nil then return true end
......
......@@ -73,7 +73,7 @@ function c81519836.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c81519836.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_EARTH)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_EARTH)
end
function c81519836.atktg(e,c)
return not c:IsSetCard(0x182)
......
......@@ -87,7 +87,7 @@ function c82321037.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c82321037.thfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WATER) and c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
return c:IsNonAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c82321037.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -24,7 +24,7 @@ function c85876417.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local a=Duel.GetAttacker()
if a==c then a=Duel.GetAttackTarget() end
return a and a:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_LIGHT)
return a and a:IsNonAttribute(ATTRIBUTE_LIGHT)
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
......
......@@ -60,7 +60,7 @@ function c86395581.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c86395581.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WIND)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_WIND)
end
function c86395581.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
......
......@@ -58,7 +58,7 @@ function c87327776.spop(e,tp,eg,ep,ev,re,r,rp)
end
function c87327776.actlimit(e,re,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_FIRE)
return re:IsActiveType(TYPE_MONSTER) and rc:IsNonAttribute(ATTRIBUTE_FIRE)
end
function c87327776.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -14,7 +14,7 @@ function c89732524.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c89732524.filter(c)
return c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_DARK-ATTRIBUTE_LIGHT) and c:IsAbleToHand()
return c:IsRace(RACE_FIEND) and c:IsNonAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and c:IsAbleToHand()
end
function c89732524.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -23,7 +23,7 @@ function c9069157.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c9069157.thfilter(c)
return c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WIND) and c:IsSetCard(0x16) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsNonAttribute(ATTRIBUTE_WIND) and c:IsSetCard(0x16) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c9069157.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c9069157.thfilter,tp,LOCATION_DECK,0,1,nil)
......
......@@ -71,7 +71,7 @@ function c9238125.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c9238125.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_EARTH)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_EARTH)
end
function c9238125.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
......
......@@ -73,7 +73,7 @@ function c9350312.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c9350312.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_EARTH)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_EARTH)
end
function c9350312.indtg(e,c)
return c:IsSetCard(0x182) and c:IsFaceup()
......
......@@ -94,7 +94,7 @@ function c94160895.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c94160895.thfilter(c)
return c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WIND) and c:IsRace(RACE_WYRM) and c:IsAbleToHand()
return c:IsNonAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_WYRM) and c:IsAbleToHand()
end
function c94160895.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c94160895.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -96,7 +96,7 @@ function c96746083.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c96746083.thfilter(c)
return c:IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_FIRE) and c:IsRace(RACE_WYRM) and c:IsAbleToHand()
return c:IsNonAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_WYRM) and c:IsAbleToHand()
end
function c96746083.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c96746083.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -49,7 +49,7 @@ function c96945958.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c96945958.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_ALL-ATTRIBUTE_WIND)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_WIND)
end
function c96945958.costfilter(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
......
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