Commit cc6d509b authored by nekrozar's avatar nekrozar Committed by nanahira

update Card.IsLevel and so on(#1057)

parent 2d76f63e
......@@ -73,7 +73,7 @@ function c1686814.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,tp)
end
function c1686814.spfilter(c,e,tp)
return (c:IsSetCard(0xc2) or ((c:IsLevel(7) or c:IsLevel(8)) and c:IsRace(RACE_DRAGON)))
return (c:IsSetCard(0xc2) or (c:IsLevel(7,8) and c:IsRace(RACE_DRAGON)))
and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1686814.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -10,7 +10,7 @@ function c18809562.initial_effect(c)
c:RegisterEffect(e1)
end
function c18809562.filter(c)
return (c:IsLevel(7) or c:IsLevel(8)) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
return c:IsLevel(7,8) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
end
function c18809562.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND,0,1,e:GetHandler(),TYPE_SPELL)
......
......@@ -50,7 +50,7 @@ function c21390858.spop(e,tp,eg,ep,ev,re,r,rp,c)
c:RegisterEffect(e1)
end
function c21390858.tfilter(c)
return (c:IsLevel(3) or c:IsLevel(4)) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
return c:IsLevel(3,4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
end
function c21390858.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
......
......@@ -64,7 +64,7 @@ function c33282498.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:GetTurnID()~=Duel.GetTurnCount() and c:GetFlagEffect(33282498)>0
end
function c33282498.spfilter(c,e,tp)
return (c:IsLevel(7) or c:IsLevel(8)) and not c:IsCode(33282498) and c:IsRace(RACE_DRAGON)
return c:IsLevel(7,8) and not c:IsCode(33282498) and c:IsRace(RACE_DRAGON)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33282498.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -24,7 +24,7 @@ function c33460840.initial_effect(c)
c:RegisterEffect(e3)
end
function c33460840.filter(c,ec)
return c:IsRace(RACE_DRAGON) and (c:IsLevel(7) or c:IsLevel(8)) and not c:IsForbidden()
return c:IsRace(RACE_DRAGON) and c:IsLevel(7,8) and not c:IsForbidden()
end
function c33460840.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......@@ -74,7 +74,7 @@ function c33460840.eqlimit(e,c)
return e:GetOwner()==c
end
function c33460840.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and (c:IsLevel(7) or c:IsLevel(8)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsRace(RACE_DRAGON) and c:IsLevel(7,8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33460840.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -33,7 +33,7 @@ function c39024589.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c39024589.cfilter,1,nil,tp)
end
function c39024589.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x10ec) and (c:IsLevel(1) or c:IsLevel(8)) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
return c:IsFaceup() and c:IsSetCard(0x10ec) and c:IsLevel(1,8) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c39024589.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c39024589.thfilter,tp,LOCATION_EXTRA,0,1,nil) end
......@@ -57,7 +57,7 @@ function c39024589.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c39024589.filter(c,e,tp)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x10ec)
and (c:IsLevel(1) or c:IsLevel(8)) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsLevel(1,8) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c39024589.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=0
......
......@@ -14,7 +14,7 @@ function c43140791.initial_effect(c)
Duel.AddCustomActivityCounter(43140791,ACTIVITY_SPSUMMON,c43140791.counterfilter)
end
function c43140791.counterfilter(c)
return not (c:IsLevel(3) or c:IsLevel(4))
return not c:IsLevel(3,4)
end
function c43140791.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT)
......@@ -38,7 +38,7 @@ function c43140791.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e2,tp)
end
function c43140791.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLevel(3) or c:IsLevel(4)
return c:IsLevel(3,4)
end
function c43140791.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
......
......@@ -29,7 +29,7 @@ function c58600555.initial_effect(c)
c:RegisterEffect(e3)
end
function c58600555.ovfilter(c)
return c:IsFaceup() and c:IsXyzType(TYPE_XYZ) and (c:IsRank(3) or c:IsRank(4)) and c:IsRace(RACE_INSECT)
return c:IsFaceup() and c:IsXyzType(TYPE_XYZ) and c:IsRank(3,4) and c:IsRace(RACE_INSECT)
end
function c58600555.mfilter(c)
return c:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_LIGHT)
......
......@@ -54,7 +54,7 @@ function c60681103.rmop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c60681103.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and (c:IsLevel(7) or c:IsLevel(8)) and not c:IsCode(60681103)
return c:IsRace(RACE_DRAGON) and c:IsLevel(7,8) and not c:IsCode(60681103)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60681103.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -33,7 +33,7 @@ function c6075801.initial_effect(c)
c:RegisterEffect(e4)
end
function c6075801.filter(c)
return c:IsRace(RACE_DRAGON) and (c:IsLevel(7) or c:IsLevel(8)) and not c:IsForbidden()
return c:IsRace(RACE_DRAGON) and c:IsLevel(7,8) and not c:IsForbidden()
end
function c6075801.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......@@ -69,7 +69,7 @@ function c6075801.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner()
end
function c6075801.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and (c:IsLevel(7) or c:IsLevel(8)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsRace(RACE_DRAGON) and c:IsLevel(7,8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c6075801.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -25,7 +25,7 @@ function c62541668.initial_effect(c)
end
c62541668.xyz_number=77
function c62541668.ovfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ) and (c:IsRank(10) or c:IsRank(11))
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ) and c:IsRank(10,11)
end
function c62541668.xyzop(e,tp,chk)
if chk==0 then return true end
......
......@@ -31,7 +31,7 @@ function c64319467.splimit(e,c)
return c:GetAttribute()~=ATTRIBUTE_WATER
end
function c64319467.filter(c,e,tp)
return (c:IsLevel(3) or c:IsLevel(4)) and c:IsRace(RACE_FISH) and c:IsAttribute(ATTRIBUTE_WATER)
return c:IsLevel(3,4) and c:IsRace(RACE_FISH) and c:IsAttribute(ATTRIBUTE_WATER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c64319467.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -20,7 +20,7 @@ function c6853254.initial_effect(c)
c:RegisterEffect(e2)
end
function c6853254.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and (c:IsLevel(7) or c:IsLevel(8)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsRace(RACE_DRAGON) and c:IsLevel(7,8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c6853254.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c6853254.filter(chkc,e,tp) end
......
......@@ -42,7 +42,7 @@ function c69868555.cfilter(c)
return c:GetSummonLocation()~=LOCATION_GRAVE
end
function c69868555.dfilter(c,eg)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and (c:IsLevel(7) or c:IsLevel(8)) and not eg:IsContains(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsLevel(7,8) and not eg:IsContains(c)
end
function c69868555.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c69868555.cfilter,1,nil) and Duel.IsExistingMatchingCard(c69868555.dfilter,tp,LOCATION_MZONE,0,1,nil,eg)
......@@ -105,7 +105,7 @@ function c69868555.tkop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
function c69868555.thcostfilter(c)
return c:IsRace(RACE_DRAGON) and (c:IsLevel(7) or c:IsLevel(8)) and c:IsAbleToGraveAsCost()
return c:IsRace(RACE_DRAGON) and c:IsLevel(7,8) and c:IsAbleToGraveAsCost()
and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
end
function c69868555.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -22,7 +22,7 @@ function c85004150.initial_effect(c)
c:RegisterEffect(e3)
end
function c85004150.ovfilter(c)
return c:IsFaceup() and c:IsXyzType(TYPE_XYZ) and (c:IsRank(5) or c:IsRank(6)) and c:IsRace(RACE_INSECT)
return c:IsFaceup() and c:IsXyzType(TYPE_XYZ) and c:IsRank(5,6) and c:IsRace(RACE_INSECT)
end
function c85004150.mfilter(c)
return c:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_LIGHT)
......
......@@ -11,7 +11,7 @@ function c87047161.initial_effect(c)
c:RegisterEffect(e1)
end
function c87047161.filter(c)
return (c:IsLevel(3) or c:IsLevel(4) or c:IsLevel(5)) and c:IsRace(RACE_FISH) and c:IsAbleToHand()
return c:IsLevel(3,4,5) and c:IsRace(RACE_FISH) and c:IsAbleToHand()
end
function c87047161.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c87047161.filter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -36,7 +36,7 @@ function c87835759.lvcon(e)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end
function c87835759.tgfilter(c)
return c:IsRace(RACE_DRAGON) and (c:IsLevel(7) or c:IsLevel(8)) and c:IsAbleToGrave()
return c:IsRace(RACE_DRAGON) and c:IsLevel(7,8) and c:IsAbleToGrave()
end
function c87835759.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c87835759.tgfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -54,7 +54,7 @@ function c87835759.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
end
function c87835759.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and (c:IsLevel(7) or c:IsLevel(8)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsRace(RACE_DRAGON) and c:IsLevel(7,8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c87835759.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c87835759.spfilter(chkc,e,tp) end
......
......@@ -10,5 +10,5 @@ function c91949988.initial_effect(c)
c:RegisterEffect(e1)
end
function c91949988.ovfilter(c)
return c:IsFaceup() and (c:IsRank(5) or c:IsRank(6))
return c:IsFaceup() and c:IsRank(5,6)
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