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