Commit b2c6aa31 authored by dest's avatar dest Committed by nanahira

update level/rank/link functions (#1055)

* update level/rank/link functions

* fix
parent 773e9017
...@@ -29,7 +29,7 @@ function c10026986.otcon(e,c,minc) ...@@ -29,7 +29,7 @@ function c10026986.otcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c10026986.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) local mg=Duel.GetMatchingGroup(c10026986.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and minc<=1 and Duel.CheckTribute(c,1,1,mg) return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end end
function c10026986.otop(e,tp,eg,ep,ev,re,r,rp,c) function c10026986.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c10026986.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) local mg=Duel.GetMatchingGroup(c10026986.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
......
...@@ -18,7 +18,7 @@ function c1003028.initial_effect(c) ...@@ -18,7 +18,7 @@ function c1003028.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c1003028.cfilter(c) function c1003028.cfilter(c)
return c:IsFaceup() and c:GetLevel()~=4 return c:IsFaceup() and not c:IsLevel(4)
end end
function c1003028.spcon(e,c) function c1003028.spcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -36,7 +36,7 @@ function c1003840.cfilter(c,e,tp,ft) ...@@ -36,7 +36,7 @@ function c1003840.cfilter(c,e,tp,ft)
and Duel.IsExistingMatchingCard(c1003840.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,lv) and Duel.IsExistingMatchingCard(c1003840.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,lv)
end end
function c1003840.spfilter(c,e,tp,lv) function c1003840.spfilter(c,e,tp,lv)
return c:IsSetCard(0x1017) and c:GetLevel()~=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x1017) and not c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c1003840.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c1003840.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......
...@@ -81,7 +81,7 @@ function c10060427.otcon(e,c,minc) ...@@ -81,7 +81,7 @@ function c10060427.otcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c10060427.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) local mg=Duel.GetMatchingGroup(c10060427.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and minc<=1 and Duel.CheckTribute(c,1,1,mg) return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end end
function c10060427.otop(e,tp,eg,ep,ev,re,r,rp,c) function c10060427.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c10060427.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) local mg=Duel.GetMatchingGroup(c10060427.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
......
...@@ -24,7 +24,7 @@ function c1006081.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -24,7 +24,7 @@ function c1006081.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c1006081.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c1006081.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local op=0 local op=0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
if g:GetFirst():GetLevel()==1 then if g:GetFirst():IsLevel(1) then
op=Duel.SelectOption(tp,aux.Stringid(1006081,1)) op=Duel.SelectOption(tp,aux.Stringid(1006081,1))
else else
op=Duel.SelectOption(tp,aux.Stringid(1006081,1),aux.Stringid(1006081,2)) op=Duel.SelectOption(tp,aux.Stringid(1006081,1),aux.Stringid(1006081,2))
......
...@@ -67,7 +67,7 @@ function c10239627.thop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +67,7 @@ function c10239627.thop1(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c10239627.thfilter2(c) function c10239627.thfilter2(c)
return c:IsRace(RACE_SPELLCASTER) and c:GetLevel()==1 and c:IsAbleToHand() return c:IsRace(RACE_SPELLCASTER) and c:IsLevel(1) and c:IsAbleToHand()
end end
function c10239627.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) function c10239627.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10239627.thfilter2,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c10239627.thfilter2,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -29,7 +29,7 @@ function c10441498.cfilter(c,tp) ...@@ -29,7 +29,7 @@ function c10441498.cfilter(c,tp)
return c:IsLevelAbove(1) and not c:IsPublic() and Duel.IsExistingTarget(c10441498.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetLevel()) return c:IsLevelAbove(1) and not c:IsPublic() and Duel.IsExistingTarget(c10441498.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetLevel())
end end
function c10441498.lvfilter(c,lv) function c10441498.lvfilter(c,lv)
return c:IsFaceup() and c:IsLevelAbove(1) and c:GetLevel()~=lv return c:IsFaceup() and c:IsLevelAbove(1) and not c:IsLevel(lv)
end end
function c10441498.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c10441498.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c10441498.lvfilter(chkc,e:GetLabel()) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c10441498.lvfilter(chkc,e:GetLabel()) end
......
...@@ -22,7 +22,7 @@ function c10591919.initial_effect(c) ...@@ -22,7 +22,7 @@ function c10591919.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c10591919.filter(c,e,tp) function c10591919.filter(c,e,tp)
return c:IsSetCard(0x26) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x26) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c10591919.cona(e,tp,eg,ep,ev,re,r,rp) function c10591919.cona(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsDisabled() and e:GetHandler():IsAttackPos() return not e:GetHandler():IsDisabled() and e:GetHandler():IsAttackPos()
......
...@@ -60,7 +60,7 @@ function c10736540.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function c10736540.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c10736540.spfilter(c) function c10736540.spfilter(c)
return c:IsFaceup() and c:IsSetCard(0x107a) and c:GetLevel()==5 return c:IsFaceup() and c:IsSetCard(0x107a) and c:IsLevel(5)
end end
function c10736540.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c10736540.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c10736540.spfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c10736540.spfilter(chkc) end
...@@ -73,7 +73,7 @@ function c10736540.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -73,7 +73,7 @@ function c10736540.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c10736540.spop(e,tp,eg,ep,ev,re,r,rp) function c10736540.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) or tc:GetLevel()<2 then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) or tc:IsLevel(1) then return end
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -55,7 +55,7 @@ function c10753491.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c10753491.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL) return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
end end
function c10753491.filter(c,e,tp) function c10753491.filter(c,e,tp)
return c:GetLevel()==1 and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(1) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c10753491.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c10753491.sptg(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
......
...@@ -11,7 +11,7 @@ function c10802915.initial_effect(c) ...@@ -11,7 +11,7 @@ function c10802915.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c10802915.filter(c,e,tp) function c10802915.filter(c,e,tp)
return c:GetLevel()==3 and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(3) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c10802915.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c10802915.sptg(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
......
...@@ -23,7 +23,7 @@ function c10971759.initial_effect(c) ...@@ -23,7 +23,7 @@ function c10971759.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c10971759.spfilter(c,e,tp) function c10971759.spfilter(c,e,tp)
return c:GetLevel()==3 and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(3) and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c10971759.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c10971759.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10971759.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10971759.spfilter(chkc,e,tp) end
...@@ -67,7 +67,7 @@ function c10971759.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -67,7 +67,7 @@ function c10971759.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c10971759.filter(c) function c10971759.filter(c)
return c:IsFaceup() and c:GetLevel()==3 and c:IsRace(RACE_INSECT) return c:IsFaceup() and c:IsLevel(3) and c:IsRace(RACE_INSECT)
end end
function c10971759.target(e,tp,eg,ep,ev,re,r,rp,chk) function c10971759.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10971759.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c10971759.filter,tp,LOCATION_MZONE,0,1,nil) end
......
...@@ -21,7 +21,7 @@ function c11047543.filter2(c,e,tp,lv) ...@@ -21,7 +21,7 @@ function c11047543.filter2(c,e,tp,lv)
and Duel.IsExistingMatchingCard(c11047543.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+clv) and Duel.IsExistingMatchingCard(c11047543.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+clv)
end end
function c11047543.spfilter(c,e,tp,lv) function c11047543.spfilter(c,e,tp,lv)
return c:IsRace(RACE_PSYCHO) and c:IsType(TYPE_SYNCHRO) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsRace(RACE_PSYCHO) and c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c11047543.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c11047543.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -21,8 +21,7 @@ function c11109820.filter2(c,e,tp,mc,rk) ...@@ -21,8 +21,7 @@ function c11109820.filter2(c,e,tp,mc,rk)
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0 and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end end
function c11109820.spfilter(c,e,tp,rk) function c11109820.spfilter(c,e,tp,rk)
local crk=c:GetRank() return (c:IsRank(rk) or c:IsRank(rk-1)) and not c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return (crk==rk or crk==rk-1) and not c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c11109820.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c11109820.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -15,15 +15,12 @@ end ...@@ -15,15 +15,12 @@ end
function c11228035.condition(e,tp,eg,ep,ev,re,r,rp) function c11228035.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 c11228035.filter(c)
return c:IsType(TYPE_XYZ)
end
function c11228035.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c11228035.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c11228035.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsType(TYPE_XYZ) end
if chk==0 then return Duel.IsExistingTarget(c11228035.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,TYPE_XYZ)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c11228035.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,TYPE_XYZ)
end end
function c11228035.activate(e,tp,eg,ep,ev,re,r,rp) function c11228035.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -24,7 +24,7 @@ function c11613567.ntfilter(c) ...@@ -24,7 +24,7 @@ function c11613567.ntfilter(c)
end end
function c11613567.ntcon(e,c,minc) function c11613567.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11613567.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c11613567.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end end
function c11613567.filter(c) function c11613567.filter(c)
......
...@@ -23,7 +23,7 @@ function c123709.initial_effect(c) ...@@ -23,7 +23,7 @@ function c123709.initial_effect(c)
end end
function c123709.ntcon(e,c,minc) function c123709.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
function c123709.ntop(e,tp,eg,ep,ev,re,r,rp,c) function c123709.ntop(e,tp,eg,ep,ev,re,r,rp,c)
--to grave --to grave
......
...@@ -23,7 +23,7 @@ function c12533811.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,7 +23,7 @@ function c12533811.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c12533811.filter(c) function c12533811.filter(c)
return c:IsFaceup() and c:GetLevel()==1 and c:GetEffectCount(EFFECT_DIRECT_ATTACK)==0 return c:IsFaceup() and c:IsLevel(1) and c:GetEffectCount(EFFECT_DIRECT_ATTACK)==0
end end
function c12533811.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c12533811.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c12533811.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c12533811.filter(chkc) end
......
...@@ -37,7 +37,7 @@ function c12948099.tdcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +37,7 @@ function c12948099.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c12948099.filter(c) function c12948099.filter(c)
return c:IsType(TYPE_XYZ) and c:GetRank()==4 and c:IsAbleToExtra() return c:IsType(TYPE_XYZ) and c:IsRank(4) and c:IsAbleToExtra()
end end
function c12948099.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function c12948099.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12948099.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c12948099.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
...@@ -75,7 +75,7 @@ function c13073850.splimit(e,c) ...@@ -75,7 +75,7 @@ function c13073850.splimit(e,c)
end end
function c13073850.ntcon(e,c,minc) function c13073850.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
function c13073850.lvcon(e) function c13073850.lvcon(e)
return e:GetHandler():GetMaterialCount()==0 return e:GetHandler():GetMaterialCount()==0
......
...@@ -30,10 +30,10 @@ function c13536606.atkval(e,c) ...@@ -30,10 +30,10 @@ function c13536606.atkval(e,c)
return c:GetMutualLinkedGroupCount()*300 return c:GetMutualLinkedGroupCount()*300
end end
function c13536606.rfilter(c,tp,g) function c13536606.rfilter(c,tp,g)
local lk=c:GetLink()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsLinkBelow(3) and c:IsReleasableByEffect() and g:IsContains(c) local lk=math.min(3,ft)
and ft>=lk and (ft==1 or not Duel.IsPlayerAffectedByEffect(tp,59822133)) return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsLinkBelow(lk) and c:IsReleasableByEffect() and g:IsContains(c)
and (ft==1 or not Duel.IsPlayerAffectedByEffect(tp,59822133))
end end
function c13536606.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13536606.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -71,5 +71,5 @@ function c13536606.tkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,5 +71,5 @@ function c13536606.tkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c13536606.splimit(e,c,sump,sumtype,sumpos,targetp,se) function c13536606.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetLink()==e:GetLabel() return c:IsLink(e:GetLabel())
end end
...@@ -25,7 +25,7 @@ function c14198496.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,7 @@ function c14198496.operation(e,tp,eg,ep,ev,re,r,rp)
if ct==0 then return end if ct==0 then return end
local dc=Duel.GetOperatedGroup():GetFirst() local dc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,dc) Duel.ConfirmCards(1-tp,dc)
if dc:GetLevel()==1 then if dc:IsLevel(1) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
......
...@@ -11,7 +11,7 @@ function c14506878.initial_effect(c) ...@@ -11,7 +11,7 @@ function c14506878.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c14506878.filter(c) function c14506878.filter(c)
return c:GetLevel()==4 and c:IsAbleToHand() return c:IsLevel(4) and c:IsAbleToHand()
end end
function c14506878.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c14506878.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14506878.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14506878.filter(chkc) end
......
...@@ -23,7 +23,7 @@ function c14536035.initial_effect(c) ...@@ -23,7 +23,7 @@ function c14536035.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c14536035.spfilter(c) function c14536035.spfilter(c)
return c:GetLevel()>=5 and c:IsAttribute(ATTRIBUTE_DARK) return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_DARK)
end end
function c14536035.spcon(e,c) function c14536035.spcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -30,7 +30,7 @@ function c14882493.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,7 +30,7 @@ function c14882493.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c14882493.filter(c) function c14882493.filter(c)
return c:GetLevel()==4 and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() return c:IsLevel(4) and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand()
end end
function c14882493.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c14882493.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14882493.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c14882493.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -29,7 +29,7 @@ function c14943837.synlimit(e,c) ...@@ -29,7 +29,7 @@ function c14943837.synlimit(e,c)
return not c:IsRace(RACE_DRAGON) return not c:IsRace(RACE_DRAGON)
end end
function c14943837.synlimit2(e,c) function c14943837.synlimit2(e,c)
return c:GetLevel()~=4 return not c:IsLevel(4)
end end
function c14943837.filter2(c,e,sp) function c14943837.filter2(c,e,sp)
return c:IsAttackBelow(500) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) return c:IsAttackBelow(500) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
......
...@@ -28,7 +28,7 @@ function c15066114.initial_effect(c) ...@@ -28,7 +28,7 @@ function c15066114.initial_effect(c)
end end
function c15066114.ntcon(e,c,minc) function c15066114.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
function c15066114.ntop(e,tp,eg,ep,ev,re,r,rp,c) function c15066114.ntop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -44,7 +44,7 @@ function c15327215.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c15327215.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function c15327215.filter(c,mc) function c15327215.filter(c,mc)
return c:IsLevelBelow(4) and c:IsSetCard(0x3d) and c:IsAbleToRemoveAsCost() return c:IsLevelBelow(4) and c:IsSetCard(0x3d) and c:IsAbleToRemoveAsCost()
and not (c:GetLevel()==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:GetAttack()==mc:GetAttack() and c:GetDefense()==mc:GetDefense())
end end
function c15327215.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 if chk==0 then return Duel.IsExistingMatchingCard(c15327215.filter,tp,LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
......
...@@ -11,7 +11,7 @@ function c1533292.initial_effect(c) ...@@ -11,7 +11,7 @@ function c1533292.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c1533292.filter(c) function c1533292.filter(c)
return c:GetLevel()==2 and c:IsSetCard(0x1002) and c:IsAbleToHand() return c:IsLevel(2) and c:IsSetCard(0x1002) and c:IsAbleToHand()
end end
function c1533292.target(e,tp,eg,ep,ev,re,r,rp,chk) function c1533292.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1533292.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c1533292.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -52,7 +52,7 @@ function c15502037.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,7 +52,7 @@ function c15502037.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c15502037.spfilter(c,e,tp) function c15502037.spfilter(c,e,tp)
return c:IsSetCard(0x2066) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x2066) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c15502037.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c15502037.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......
...@@ -37,7 +37,7 @@ end ...@@ -37,7 +37,7 @@ end
function c15545291.otcon(e,c,minc) function c15545291.otcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
local mg=Duel.GetMatchingGroup(c15545291.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) local mg=Duel.GetMatchingGroup(c15545291.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:GetLevel()>6 and minc<=1 and Duel.CheckTribute(c,1,1,mg) return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end end
function c15545291.otop(e,tp,eg,ep,ev,re,r,rp,c) function c15545291.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c15545291.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) local mg=Duel.GetMatchingGroup(c15545291.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
......
...@@ -23,8 +23,7 @@ function c15555120.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,8 +23,7 @@ function c15555120.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(g:GetFirst():GetLevel()) e:SetLabel(g:GetFirst():GetLevel())
end end
function c15555120.filter(c,lv) function c15555120.filter(c,lv)
local clv=c:GetLevel() return c:IsFaceup() and not c:IsLevel(lv) and c:IsType(TYPE_SYNCHRO)
return c:IsFaceup() and clv>0 and clv~=lv and c:IsType(TYPE_SYNCHRO)
end end
function c15555120.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15555120.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c15555120.filter(chkc,e:GetLabel()) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c15555120.filter(chkc,e:GetLabel()) end
...@@ -35,7 +34,7 @@ end ...@@ -35,7 +34,7 @@ end
function c15555120.activate(e,tp,eg,ep,ev,re,r,rp) function c15555120.activate(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetLabel() local lv=e:GetLabel()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetLevel()~=lv then if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsLevel(lv) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
......
...@@ -14,7 +14,7 @@ function c15576074.filter(c) ...@@ -14,7 +14,7 @@ function c15576074.filter(c)
return c:IsSetCard(0x57) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsSetCard(0x57) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end end
function c15576074.filter2(c) function c15576074.filter2(c)
return c:GetLevel()==4 and c:IsAbleToHand() return c:IsLevel(4) and c:IsAbleToHand()
end end
function c15576074.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15576074.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c15576074.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c15576074.filter(chkc) end
......
...@@ -30,7 +30,7 @@ function c15605085.otcon(e,c,minc) ...@@ -30,7 +30,7 @@ function c15605085.otcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c15605085.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) local mg=Duel.GetMatchingGroup(c15605085.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and minc<=1 and Duel.CheckTribute(c,1,1,mg) return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end end
function c15605085.otop(e,tp,eg,ep,ev,re,r,rp,c) function c15605085.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c15605085.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) local mg=Duel.GetMatchingGroup(c15605085.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
......
...@@ -11,7 +11,7 @@ function c15871676.initial_effect(c) ...@@ -11,7 +11,7 @@ function c15871676.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c15871676.filter(c,e,tp) function c15871676.filter(c,e,tp)
return c:IsSetCard(0x53) and c:GetLevel()==3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x53) and c:IsLevel(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c15871676.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c15871676.sptg(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
......
...@@ -32,7 +32,7 @@ function c16024176.initial_effect(c) ...@@ -32,7 +32,7 @@ function c16024176.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c16024176.hspfilter(c,ft,tp) function c16024176.hspfilter(c,ft,tp)
return c:IsSetCard(0xe6) and c:GetLevel()==1 and not c:IsCode(16024176) return c:IsSetCard(0xe6) and c:IsLevel(1) and not c:IsCode(16024176)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c16024176.hspcon(e,c) function c16024176.hspcon(e,c)
......
...@@ -15,7 +15,7 @@ function c16135253.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,7 +15,7 @@ function c16135253.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end end
function c16135253.filter(c,e,tp,lv) function c16135253.filter(c,e,tp,lv)
if (lv~=6 and c:GetLevel()~=lv) or (lv==6 and c:GetLevel()<6) then return false end if (lv~=6 and not c:IsLevel(lv)) or (lv==6 and c:IsLevelBelow(5)) then return false end
return c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c16135253.target(e,tp,eg,ep,ev,re,r,rp,chk) function c16135253.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -70,7 +70,7 @@ function c16259549.tdcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +70,7 @@ function c16259549.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c16259549.filter(c,e) function c16259549.filter(c,e)
return c:GetLevel()==3 and c:IsCanBeEffectTarget(e) and c:IsAbleToDeck() return c:IsLevel(3) and c:IsCanBeEffectTarget(e) and c:IsAbleToDeck()
end end
function c16259549.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c16259549.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c16259549.filter(chkc,e) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c16259549.filter(chkc,e) end
......
...@@ -11,7 +11,7 @@ function c16494704.initial_effect(c) ...@@ -11,7 +11,7 @@ function c16494704.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c16494704.exfilter0(c) function c16494704.exfilter0(c)
return c:IsSetCard(0x99) and c:GetLevel()>=1 and c:IsAbleToGrave() return c:IsSetCard(0x99) and c:IsLevelAbove(1) and c:IsAbleToGrave()
end end
function c16494704.filter(c,e,tp,m,ft) function c16494704.filter(c,e,tp,m,ft)
if not c:IsRace(RACE_DRAGON) or bit.band(c:GetType(),0x81)~=0x81 if not c:IsRace(RACE_DRAGON) or bit.band(c:GetType(),0x81)~=0x81
......
...@@ -11,6 +11,6 @@ function c16589042.initial_effect(c) ...@@ -11,6 +11,6 @@ function c16589042.initial_effect(c)
end end
function c16589042.ntcon(e,c,minc) function c16589042.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:GetLevel()>4 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)==1 return minc==0 and c:IsLevelAbove(5) and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)==1
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
...@@ -24,7 +24,7 @@ function c1662004.synlimit(e,c) ...@@ -24,7 +24,7 @@ function c1662004.synlimit(e,c)
return not c:IsRace(RACE_BEASTWARRIOR) return not c:IsRace(RACE_BEASTWARRIOR)
end end
function c1662004.spfilter(c,e,tp) function c1662004.spfilter(c,e,tp)
return c:IsDefenseBelow(200) and c:IsAttribute(ATTRIBUTE_FIRE) and c:GetLevel()==3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsDefenseBelow(200) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevel(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c1662004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c1662004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1662004.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1662004.spfilter(chkc,e,tp) end
......
...@@ -31,7 +31,7 @@ function c16802689.initial_effect(c) ...@@ -31,7 +31,7 @@ function c16802689.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c16802689.hspfilter(c,ft,tp) function c16802689.hspfilter(c,ft,tp)
return c:IsSetCard(0xe6) and c:GetLevel()==12 and not c:IsCode(16802689) return c:IsSetCard(0xe6) and c:IsLevel(12) and not c:IsCode(16802689)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c16802689.hspcon(e,c) function c16802689.hspcon(e,c)
......
...@@ -42,7 +42,7 @@ function c1686814.initial_effect(c) ...@@ -42,7 +42,7 @@ function c1686814.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c1686814.sprfilter(c) function c1686814.sprfilter(c)
return c:IsFaceup() and c:GetLevel()>4 and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsLevelAbove(5) and c:IsAbleToGraveAsCost()
end end
function c1686814.sprfilter1(c,tp,g,sc) function c1686814.sprfilter1(c,tp,g,sc)
local lv=c:GetLevel() local lv=c:GetLevel()
...@@ -50,7 +50,7 @@ function c1686814.sprfilter1(c,tp,g,sc) ...@@ -50,7 +50,7 @@ function c1686814.sprfilter1(c,tp,g,sc)
end end
function c1686814.sprfilter2(c,tp,mc,sc,lv) function c1686814.sprfilter2(c,tp,mc,sc,lv)
local sg=Group.FromCards(c,mc) local sg=Group.FromCards(c,mc)
return c:GetLevel()==lv and not c:IsType(TYPE_TUNER) return c:IsLevel(lv) and not c:IsType(TYPE_TUNER)
and Duel.GetLocationCountFromEx(tp,tp,sg,sc)>0 and Duel.GetLocationCountFromEx(tp,tp,sg,sc)>0
end end
function c1686814.sprcon(e,c) function c1686814.sprcon(e,c)
...@@ -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:GetLevel()==7 or c:GetLevel()==8) and c:IsRace(RACE_DRAGON))) return (c:IsSetCard(0xc2) or ((c:IsLevel(7) or c:IsLevel(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)
......
...@@ -24,7 +24,7 @@ function c16960351.rfilter(c,e,tp,ft) ...@@ -24,7 +24,7 @@ function c16960351.rfilter(c,e,tp,ft)
and Duel.IsExistingMatchingCard(c16960351.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,lv) and Duel.IsExistingMatchingCard(c16960351.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,lv)
end end
function c16960351.spfilter(c,e,tp,lv) function c16960351.spfilter(c,e,tp,lv)
return c:GetLevel()==lv and c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(lv) and c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c16960351.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c16960351.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......
...@@ -44,7 +44,7 @@ function c17086528.rkfilter(c,tp) ...@@ -44,7 +44,7 @@ function c17086528.rkfilter(c,tp)
and Duel.IsExistingTarget(c17086528.lvfilter,tp,LOCATION_MZONE,0,1,c,c:GetRank()) and Duel.IsExistingTarget(c17086528.lvfilter,tp,LOCATION_MZONE,0,1,c,c:GetRank())
end end
function c17086528.lvfilter(c,rk) function c17086528.lvfilter(c,rk)
return c:IsFaceup() and c:IsLevelAbove(5) and c:GetLevel()~=rk return c:IsFaceup() and c:IsLevelAbove(5) and not c:IsLevel(rk)
end end
function c17086528.rktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c17086528.rktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -34,5 +34,5 @@ function c17530001.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,5 +34,5 @@ function c17530001.operation(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c17530001.tglimit(e,c) function c17530001.tglimit(e,c)
return c:GetLevel()==e:GetLabel() return c:IsLevel(e:GetLabel())
end end
...@@ -16,7 +16,7 @@ function c17643265.initial_effect(c) ...@@ -16,7 +16,7 @@ function c17643265.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c17643265.filter(c) function c17643265.filter(c)
return c:IsFaceup() and c:GetLevel()==4 and c:IsRace(RACE_FISH) return c:IsFaceup() and c:IsLevel(4) and c:IsRace(RACE_FISH)
end end
function c17643265.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) function c17643265.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c17643265.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c17643265.filter,tp,LOCATION_MZONE,0,1,nil) end
......
...@@ -11,7 +11,7 @@ function c18063928.initial_effect(c) ...@@ -11,7 +11,7 @@ function c18063928.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c18063928.filter(c,e,tp) function c18063928.filter(c,e,tp)
return c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c18063928.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c18063928.sptg(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
......
...@@ -65,7 +65,7 @@ function c18210764.teop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function c18210764.teop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c18210764.spfilter(c,e,tp) function c18210764.spfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:GetLevel()==1 return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsLevel(1)
and not c:IsCode(18210764) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(18210764) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c18210764.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c18210764.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -20,7 +20,7 @@ function c18322364.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +20,7 @@ function c18322364.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c18322364.spfilter(c,e,tp) function c18322364.spfilter(c,e,tp)
return c:GetLevel()==3 and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c18322364.target(e,tp,eg,ep,ev,re,r,rp,chk) function c18322364.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)
......
...@@ -42,13 +42,13 @@ function c18326736.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -42,13 +42,13 @@ function c18326736.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
c:RegisterFlagEffect(18326736,RESET_CHAIN,0,1) c:RegisterFlagEffect(18326736,RESET_CHAIN,0,1)
end end
function c18326736.filter(c,e,tp,rk) function c18326736.filter(c,e,tp,rk)
return c:GetRank()==rk+1 and not c:IsSetCard(0x48) and e:GetHandler():IsCanBeXyzMaterial(c) return c:IsRank(rk) and not c:IsSetCard(0x48) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
function c18326736.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c18326736.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0 if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0
and aux.MustMaterialCheck(e:GetHandler(),tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(e:GetHandler(),tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c18326736.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetRank()) end and Duel.IsExistingMatchingCard(c18326736.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetRank()+1) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c18326736.spop(e,tp,eg,ep,ev,re,r,rp) function c18326736.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -56,7 +56,7 @@ function c18326736.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c18326736.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp,tp,c)<=0 or not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end if Duel.GetLocationCountFromEx(tp,tp,c)<=0 or not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c18326736.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank()) local g=Duel.SelectMatchingCard(tp,c18326736.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank()+1)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=c:GetOverlayGroup() local mg=c:GetOverlayGroup()
......
...@@ -25,7 +25,7 @@ function c1834753.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,7 +25,7 @@ function c1834753.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,2000) Duel.PayLPCost(tp,2000)
end end
function c1834753.filter(c,e,tp) function c1834753.filter(c,e,tp)
return c:GetLevel()==3 and c:IsRace(RACE_PSYCHO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(3) and c:IsRace(RACE_PSYCHO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c1834753.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c1834753.sptg(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)
......
...@@ -16,7 +16,7 @@ function c1845204.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -16,7 +16,7 @@ function c1845204.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
end end
function c1845204.filter(c,e,tp) function c1845204.filter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:GetLevel()<=5 return c:IsType(TYPE_FUSION) and c:IsLevelBelow(5)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial()
end end
function c1845204.target(e,tp,eg,ep,ev,re,r,rp,chk) function c1845204.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -55,7 +55,7 @@ function c18634367.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c18634367.spcon(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(c18634367.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(c18634367.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end end
function c18634367.filter(c,e,tp) function c18634367.filter(c,e,tp)
return c:GetLevel()==1 and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(1) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c18634367.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c18634367.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c18634367.filter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c18634367.filter(chkc,e,tp) end
......
...@@ -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:GetLevel()==7 or c:GetLevel()==8) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() return (c:IsLevel(7) or c:IsLevel(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)
......
...@@ -11,6 +11,6 @@ function c18842395.initial_effect(c) ...@@ -11,6 +11,6 @@ function c18842395.initial_effect(c)
end end
function c18842395.ntcon(e,c,minc) function c18842395.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>=2 and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>=2
end end
...@@ -32,7 +32,7 @@ function c18993198.spop(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,7 +32,7 @@ function c18993198.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetMatchingGroup(c18993198.lvfilter,tp,LOCATION_MZONE,0,nil) local tg=Duel.GetMatchingGroup(c18993198.lvfilter,tp,LOCATION_MZONE,0,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
while tc do while tc do
if tc:GetLevel()~=lv then if not tc:IsLevel(lv) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL)
......
...@@ -10,7 +10,7 @@ function c19012345.initial_effect(c) ...@@ -10,7 +10,7 @@ function c19012345.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c19012345.condition(e,tp,eg,ep,ev,re,r,rp) function c19012345.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetLevel()<12 return ep~=tp and e:GetHandler():IsLevelBelow(11)
end end
function c19012345.operation(e,tp,eg,ep,ev,re,r,rp) function c19012345.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -20,7 +20,7 @@ function c19353570.initial_effect(c) ...@@ -20,7 +20,7 @@ function c19353570.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c19353570.spcon(e,tp,eg,ep,ev,re,r,rp) function c19353570.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and eg:GetFirst():GetLevel()==3 return rp==tp and eg:GetFirst():IsLevel(3)
end end
function c19353570.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c19353570.sptg(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
......
...@@ -42,7 +42,7 @@ function c19462747.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -42,7 +42,7 @@ function c19462747.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c19462747.filter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c19462747.filter,tp,LOCATION_MZONE,0,1,1,nil)
local op=0 local op=0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
if g:GetFirst():GetLevel()==1 then if g:GetFirst():IsLevel(1) then
op=Duel.SelectOption(tp,aux.Stringid(19462747,1)) op=Duel.SelectOption(tp,aux.Stringid(19462747,1))
else else
op=Duel.SelectOption(tp,aux.Stringid(19462747,1),aux.Stringid(19462747,2)) op=Duel.SelectOption(tp,aux.Stringid(19462747,1),aux.Stringid(19462747,2))
......
...@@ -27,7 +27,7 @@ function c1969506.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,7 +27,7 @@ function c1969506.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c1969506.filter(c,e,tp) function c1969506.filter(c,e,tp)
return c:IsSetCard(0x83) and c:GetLevel()==8 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x83) and c:IsLevel(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c1969506.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c1969506.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c1969506.filter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c1969506.filter(chkc,e,tp) end
......
...@@ -41,7 +41,7 @@ function c19801646.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,7 @@ function c19801646.thcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) and c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK)
end end
function c19801646.thfilter(c) function c19801646.thfilter(c)
return c:GetLevel()==7 and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand() return c:IsLevel(7) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand()
end end
function c19801646.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c19801646.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19801646.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c19801646.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -61,7 +61,7 @@ function c20003527.sumcon(e,c,minc) ...@@ -61,7 +61,7 @@ function c20003527.sumcon(e,c,minc)
if minc>=1 then min=minc end if minc>=1 then min=minc end
local tp=c:GetControler() local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c20003527.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) local mg=Duel.GetMatchingGroup(c20003527.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>4 and Duel.CheckTribute(c,min,10,mg) return c:IsLevelAbove(5) and Duel.CheckTribute(c,min,10,mg)
end end
function c20003527.sumop(e,tp,eg,ep,ev,re,r,rp,c,minc) function c20003527.sumop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local min=1 local min=1
......
...@@ -17,7 +17,7 @@ function c20032555.efftg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,7 +17,7 @@ function c20032555.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c20032555.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c20032555.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c20032555.cfilter,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,c20032555.cfilter,1,1,REASON_COST+REASON_DISCARD)
local opt=0 local opt=0
if e:GetHandler():GetLevel()==8 then if e:GetHandler():IsLevel(8) then
opt=Duel.SelectOption(tp,aux.Stringid(20032555,1)) opt=Duel.SelectOption(tp,aux.Stringid(20032555,1))
else else
opt=Duel.SelectOption(tp,aux.Stringid(20032555,1),aux.Stringid(20032555,2)) opt=Duel.SelectOption(tp,aux.Stringid(20032555,1),aux.Stringid(20032555,2))
......
...@@ -11,7 +11,7 @@ function c20474741.initial_effect(c) ...@@ -11,7 +11,7 @@ function c20474741.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c20474741.filter(c,e,tp) function c20474741.filter(c,e,tp)
return c:GetLevel()==3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c20474741.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function c20474741.sumtg(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
......
...@@ -31,7 +31,7 @@ function c20802187.xyzfilter(c) ...@@ -31,7 +31,7 @@ function c20802187.xyzfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
end end
function c20802187.matfilter(c) function c20802187.matfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==4 and not c:IsType(TYPE_TOKEN) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(4) and not c:IsType(TYPE_TOKEN)
end end
function c20802187.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c20802187.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c20802187.xyzfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c20802187.xyzfilter(chkc) end
...@@ -55,7 +55,7 @@ function c20802187.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c20802187.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c20802187.thfilter(c,e) function c20802187.thfilter(c,e)
return c:IsRace(RACE_THUNDER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==4 and c:IsCanBeEffectTarget(e) return c:IsRace(RACE_THUNDER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(4) and c:IsCanBeEffectTarget(e)
end end
function c20802187.thfilter2(c,g) function c20802187.thfilter2(c,g)
return g:IsExists(Card.IsCode,1,c,c:GetCode()) return g:IsExists(Card.IsCode,1,c,c:GetCode())
......
...@@ -16,6 +16,5 @@ function c2084239.initial_effect(c) ...@@ -16,6 +16,5 @@ function c2084239.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c2084239.tg(e,c) function c2084239.tg(e,c)
local lv=c:GetLevel() return c:IsLevelBelow(2) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_AQUA)
return lv>0 and lv<=2 and c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_AQUA)
end end
...@@ -111,10 +111,7 @@ function c21105106.ritfilter2(c,lv,mg) ...@@ -111,10 +111,7 @@ function c21105106.ritfilter2(c,lv,mg)
if lv<1 then return false end if lv<1 then return false end
local mg2=mg:Clone() local mg2=mg:Clone()
mg2:Remove(Card.IsRace,nil,c:GetRace()) mg2:Remove(Card.IsRace,nil,c:GetRace())
return mg2:IsExists(c21105106.ritfilter3,1,nil,lv) return mg2:IsExists(Card.IsLevel,1,nil,lv)
end
function c21105106.ritfilter3(c,lv)
return c:GetLevel()==lv
end end
function c21105106.ritual_custom_operation(c,mg) function c21105106.ritual_custom_operation(c,mg)
local tp=c:GetControler() local tp=c:GetControler()
...@@ -131,7 +128,7 @@ function c21105106.ritual_custom_operation(c,mg) ...@@ -131,7 +128,7 @@ function c21105106.ritual_custom_operation(c,mg)
lv=lv-tc2:GetLevel() lv=lv-tc2:GetLevel()
g:Remove(Card.IsRace,nil,tc2:GetRace()) g:Remove(Card.IsRace,nil,tc2:GetRace())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g3=g:FilterSelect(tp,c21105106.ritfilter3,1,1,nil,lv) local g3=g:FilterSelect(tp,Card.IsLevel,1,1,nil,lv)
g1:Merge(g2) g1:Merge(g2)
g1:Merge(g3) g1:Merge(g3)
c:SetMaterial(g1) c:SetMaterial(g1)
......
...@@ -50,8 +50,7 @@ function c21390858.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -50,8 +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)
local lv=c:GetLevel() return (c:IsLevel(3) or c:IsLevel(4)) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
return (lv==3 or lv==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
......
...@@ -12,7 +12,7 @@ function c21524779.initial_effect(c) ...@@ -12,7 +12,7 @@ function c21524779.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c21524779.filter(c) function c21524779.filter(c)
return c:IsRace(RACE_THUNDER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==4 return c:IsRace(RACE_THUNDER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(4)
and c:GetCode()~=21524779 and c:IsSummonable(true,nil) and c:GetCode()~=21524779 and c:IsSummonable(true,nil)
end end
function c21524779.target(e,tp,eg,ep,ev,re,r,rp,chk) function c21524779.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -21,8 +21,7 @@ function c21620076.initial_effect(c) ...@@ -21,8 +21,7 @@ function c21620076.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c21620076.lvfilter(c) function c21620076.lvfilter(c)
local lv=c:GetLevel() return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and not c:IsLevel(2)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and lv>0 and lv~=2
end end
function c21620076.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c21620076.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c21620076.lvfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c21620076.lvfilter(chkc) end
......
...@@ -41,7 +41,7 @@ function c22138839.cop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,7 @@ function c22138839.cop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
tc:AddCounter(0x1041,1) tc:AddCounter(0x1041,1)
if tc:GetLevel()>1 then if tc:IsLevelAbove(2) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
......
...@@ -65,7 +65,7 @@ function c22227683.spfilter1(c,e,tp) ...@@ -65,7 +65,7 @@ function c22227683.spfilter1(c,e,tp)
and Duel.IsExistingMatchingCard(c22227683.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,c,e,tp,c:GetLevel()) and Duel.IsExistingMatchingCard(c22227683.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,c,e,tp,c:GetLevel())
end end
function c22227683.spfilter2(c,e,tp,lv) function c22227683.spfilter2(c,e,tp,lv)
return c:IsSetCard(0xab) and c:IsType(TYPE_MONSTER) and c:GetLevel()~=lv return c:IsSetCard(0xab) and c:IsType(TYPE_MONSTER) and not c:IsLevel(lv)
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 c22227683.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c22227683.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -15,7 +15,7 @@ function c2295440.costfilter(c,e,tp) ...@@ -15,7 +15,7 @@ function c2295440.costfilter(c,e,tp)
and Duel.IsExistingMatchingCard(c2295440.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,e,tp) and Duel.IsExistingMatchingCard(c2295440.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,e,tp)
end end
function c2295440.filter(c,e,tp) function c2295440.filter(c,e,tp)
return c:GetLevel()==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c2295440.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c2295440.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1) e:SetLabel(1)
......
...@@ -26,7 +26,7 @@ function c22996376.initial_effect(c) ...@@ -26,7 +26,7 @@ function c22996376.initial_effect(c)
end end
function c22996376.otcon(e,c,minc) function c22996376.otcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return c:GetLevel()>6 and minc<=1 and Duel.CheckTribute(c,1) return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1)
end end
function c22996376.otop(e,tp,eg,ep,ev,re,r,rp,c) function c22996376.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,1,1) local g=Duel.SelectTribute(tp,c,1,1)
......
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
function c23064604.otcon(e,c,minc) function c23064604.otcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
local mg=Duel.GetMatchingGroup(c23064604.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) local mg=Duel.GetMatchingGroup(c23064604.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:GetLevel()>6 and minc<=1 and Duel.CheckTribute(c,1,1,mg) return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end end
function c23064604.otop(e,tp,eg,ep,ev,re,r,rp,c) function c23064604.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c23064604.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) local mg=Duel.GetMatchingGroup(c23064604.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
......
...@@ -11,7 +11,7 @@ function c23168060.initial_effect(c) ...@@ -11,7 +11,7 @@ function c23168060.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c23168060.condition(e,tp,eg,ep,ev,re,r,rp) function c23168060.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()~=3 return not e:GetHandler():IsLevel(3)
end end
function c23168060.operation(e,tp,eg,ep,ev,re,r,rp) function c23168060.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -43,7 +43,7 @@ function c23187256.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,7 +43,7 @@ function c23187256.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c23187256.gfilter(c,rank) function c23187256.gfilter(c,rank)
return c:GetRank()==rank return c:IsRank(rank)
end end
function c23187256.operation(e,tp,eg,ep,ev,re,r,rp) function c23187256.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCountFromEx(tp) local ft=Duel.GetLocationCountFromEx(tp)
......
...@@ -14,7 +14,7 @@ function c23269426.spfilter(c,e,tp,code) ...@@ -14,7 +14,7 @@ function c23269426.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c23269426.filter(c,e,tp) function c23269426.filter(c,e,tp)
return c:IsFaceup() and c:GetLevel()==3 return c:IsFaceup() and c:IsLevel(3)
and Duel.IsExistingMatchingCard(c23269426.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode()) and Duel.IsExistingMatchingCard(c23269426.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode())
end end
function c23269426.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23269426.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -40,7 +40,7 @@ function c23379054.filter1(c,e,tp,lv) ...@@ -40,7 +40,7 @@ function c23379054.filter1(c,e,tp,lv)
and Duel.IsExistingMatchingCard(c23379054.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+c:GetLevel()) and Duel.IsExistingMatchingCard(c23379054.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+c:GetLevel())
end end
function c23379054.filter2(c,e,tp,lv) function c23379054.filter2(c,e,tp,lv)
return c:GetLevel()==lv and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(lv) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c23379054.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23379054.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -14,7 +14,7 @@ function c23536866.initial_effect(c) ...@@ -14,7 +14,7 @@ function c23536866.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c23536866.filter(c,e,tp) function c23536866.filter(c,e,tp)
return c:GetLevel()==5 and c:IsAttribute(ATTRIBUTE_WATER) and not c:IsCode(23536866) return c:IsLevel(5) and c:IsAttribute(ATTRIBUTE_WATER) and not c:IsCode(23536866)
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c23536866.xyzfilter(c,mg) function c23536866.xyzfilter(c,mg)
......
...@@ -21,7 +21,7 @@ function c23581825.filter1(c,e,tp) ...@@ -21,7 +21,7 @@ function c23581825.filter1(c,e,tp)
and Duel.IsExistingMatchingCard(c23581825.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+2) and Duel.IsExistingMatchingCard(c23581825.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+2)
end end
function c23581825.filter2(c,e,tp,mc,rk) function c23581825.filter2(c,e,tp,mc,rk)
return c:GetRank()==rk and mc:IsCanBeXyzMaterial(c) return c:IsRank(rk) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
function c23581825.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23581825.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -37,7 +37,7 @@ end ...@@ -37,7 +37,7 @@ end
function c23689697.otcon(e,c,minc) function c23689697.otcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
local mg=Duel.GetMatchingGroup(c23689697.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) local mg=Duel.GetMatchingGroup(c23689697.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:GetLevel()>6 and minc<=1 and Duel.CheckTribute(c,1,1,mg) return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end end
function c23689697.otop(e,tp,eg,ep,ev,re,r,rp,c) function c23689697.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c23689697.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) local mg=Duel.GetMatchingGroup(c23689697.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
......
...@@ -47,8 +47,7 @@ function c23756165.eqcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,8 +47,7 @@ function c23756165.eqcon(e,tp,eg,ep,ev,re,r,rp)
return ec==nil or ec:GetFlagEffect(23756165)==0 return ec==nil or ec:GetFlagEffect(23756165)==0
end end
function c23756165.filter(c) function c23756165.filter(c)
local lv=c:GetLevel() return c:IsLevelBelow(5) and c:IsFaceup() and c:IsAbleToChangeControler()
return lv>0 and lv<=5 and c:IsFaceup() and c:IsAbleToChangeControler()
end end
function c23756165.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23756165.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c23756165.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c23756165.filter(chkc) end
......
...@@ -17,5 +17,5 @@ function c23950192.con(e) ...@@ -17,5 +17,5 @@ function c23950192.con(e)
return Duel.IsExistingMatchingCard(c23950192.filter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,e:GetHandler()) return Duel.IsExistingMatchingCard(c23950192.filter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,e:GetHandler())
end end
function c23950192.tg(e,c) function c23950192.tg(e,c)
return c:GetLevel()>=4 return c:IsLevelAbove(4)
end end
...@@ -16,7 +16,7 @@ function c24019261.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c24019261.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c24019261.filter(c,e,tp,tid) function c24019261.filter(c,e,tp,tid)
return bit.band(c:GetReason(),0x41)==0x41 and c:GetTurnID()==tid return bit.band(c:GetReason(),0x41)==0x41 and c:GetTurnID()==tid
and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c24019261.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c24019261.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tid=Duel.GetTurnCount() local tid=Duel.GetTurnCount()
......
...@@ -13,7 +13,7 @@ function c24062258.initial_effect(c) ...@@ -13,7 +13,7 @@ function c24062258.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c24062258.filter(c,e,tp) function c24062258.filter(c,e,tp)
return c:GetCode()~=24062258 and c:GetLevel()==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:GetAttack()==0 or c:IsDefenseBelow(0))
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 c24062258.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c24062258.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -42,7 +42,7 @@ function c24082387.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -42,7 +42,7 @@ function c24082387.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c24082387.filter2(c,e,tp,lv) function c24082387.filter2(c,e,tp,lv)
return c:IsSetCard(0xc) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xc) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c24082387.activate(e,tp,eg,ep,ev,re,r,rp) function c24082387.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then Duel.Damage(tp,2000,REASON_EFFECT) return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then Duel.Damage(tp,2000,REASON_EFFECT) return end
......
...@@ -33,7 +33,7 @@ function c24382602.initial_effect(c) ...@@ -33,7 +33,7 @@ function c24382602.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c24382602.extg(e,c) function c24382602.extg(e,c)
return c:IsType(TYPE_TUNER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==1 return c:IsType(TYPE_TUNER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(1)
end end
function c24382602.tgfilter(c) function c24382602.tgfilter(c)
return c:IsFaceup() return c:IsFaceup()
......
...@@ -18,7 +18,7 @@ function c24449083.initial_effect(c) ...@@ -18,7 +18,7 @@ function c24449083.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c24449083.cfilter(c) function c24449083.cfilter(c)
return c:IsFaceup() and c:GetLevel()==1 and c:IsRace(RACE_FAIRY) return c:IsFaceup() and c:IsLevel(1) and c:IsRace(RACE_FAIRY)
end end
function c24449083.condition(e,tp,eg,ep,ev,re,r,rp) function c24449083.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c24449083.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c24449083.cfilter,tp,LOCATION_MZONE,0,1,nil)
......
...@@ -54,7 +54,7 @@ function c24919805.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,7 +54,7 @@ function c24919805.regop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c24919805.filter(c) function c24919805.filter(c)
return c:GetLevel()==10 and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand() return c:IsLevel(10) and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand()
end end
function c24919805.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c24919805.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24919805.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c24919805.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -11,7 +11,7 @@ function c25247218.initial_effect(c) ...@@ -11,7 +11,7 @@ function c25247218.initial_effect(c)
end end
function c25247218.ntcon(e,c,minc) function c25247218.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
end end
...@@ -35,7 +35,7 @@ function c2530830.initial_effect(c) ...@@ -35,7 +35,7 @@ function c2530830.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c2530830.ovfilter(c) function c2530830.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x107b) and c:IsType(TYPE_XYZ) and c:GetRank()==8 return c:IsFaceup() and c:IsSetCard(0x107b) and c:IsType(TYPE_XYZ) and c:IsRank(8)
end end
function c2530830.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c2530830.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
...@@ -19,7 +19,7 @@ function c25472513.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,7 +19,7 @@ function c25472513.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c25472513.spfilter(c,e,tp) function c25472513.spfilter(c,e,tp)
return c:GetLevel()==2 and not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsLevel(2) and not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c25472513.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c25472513.sptg(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
......
...@@ -55,7 +55,7 @@ function c25524823.otcon(e,c,minc) ...@@ -55,7 +55,7 @@ function c25524823.otcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c25524823.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) local mg=Duel.GetMatchingGroup(c25524823.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and minc<=1 and Duel.CheckTribute(c,1,1,mg) return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end end
function c25524823.otop(e,tp,eg,ep,ev,re,r,rp,c) function c25524823.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c25524823.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) local mg=Duel.GetMatchingGroup(c25524823.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
......
...@@ -23,7 +23,7 @@ function c25578802.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,7 +23,7 @@ function c25578802.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
function c25578802.spfilter(c,e,tp) function c25578802.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_NORMAL) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c25578802.target(e,tp,eg,ep,ev,re,r,rp,chk) function c25578802.target(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
......
...@@ -32,7 +32,7 @@ function c25853045.initial_effect(c) ...@@ -32,7 +32,7 @@ function c25853045.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c25853045.ovfilter(c) function c25853045.ovfilter(c)
return c:IsFaceup() and c:GetRank()==3 and c:IsAttribute(ATTRIBUTE_WATER) and c:GetOverlayCount()==0 return c:IsFaceup() and c:IsRank(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:GetOverlayCount()==0
end end
function c25853045.atkval(e,c) function c25853045.atkval(e,c)
return c:GetOverlayCount()*200 return c:GetOverlayCount()*200
......
...@@ -31,7 +31,7 @@ function c25857246.initial_effect(c) ...@@ -31,7 +31,7 @@ function c25857246.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c25857246.mat_filter(c) function c25857246.mat_filter(c)
return c:GetLevel()~=8 return not c:IsLevel(8)
end end
function c25857246.atkcon(e,tp,eg,ep,ev,re,r,rp) function c25857246.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) return Duel.GetAttacker():IsControler(1-tp)
......
...@@ -10,12 +10,11 @@ function c26864586.initial_effect(c) ...@@ -10,12 +10,11 @@ function c26864586.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c26864586.filter1(c,tp) function c26864586.filter1(c,tp)
local lv1=c:GetLevel() local lv=c:GetLevel()
return lv1>0 and c:IsFaceup() and Duel.IsExistingTarget(c26864586.filter2,tp,LOCATION_MZONE,0,1,c,c:GetRace(),c:GetAttribute(),lv1) return lv>0 and c:IsFaceup() and Duel.IsExistingTarget(c26864586.filter2,tp,LOCATION_MZONE,0,1,c,c:GetRace(),c:GetAttribute(),lv)
end end
function c26864586.filter2(c,rc,at,lv1) function c26864586.filter2(c,rc,at,lv)
local lv2=c:GetLevel() return not c:IsLevel(lv) and c:IsFaceup() and c:IsRace(rc) and c:IsAttribute(at)
return lv2>0 and lv2~=lv1 and c:IsFaceup() and c:IsRace(rc) and c:IsAttribute(at)
end end
function c26864586.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c26864586.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
...@@ -32,14 +31,13 @@ function c26864586.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,14 +31,13 @@ function c26864586.activate(e,tp,eg,ep,ev,re,r,rp)
local tc1=e:GetLabelObject() local tc1=e:GetLabelObject()
local tc2=g:GetFirst() local tc2=g:GetFirst()
if tc1==tc2 then tc2=g:GetNext() end if tc1==tc2 then tc2=g:GetNext() end
local lv1=tc1:GetLevel() local lv=tc1:GetLevel()
local lv2=tc2:GetLevel() if tc2:IsLevel(lv) then return end
if lv1==lv2 then return end
if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc2:IsFaceup() and tc2:IsRelateToEffect(e) then if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc2:IsFaceup() and tc2:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv1) e1:SetValue(lv)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc2:RegisterEffect(e1) tc2:RegisterEffect(e1)
end end
......
...@@ -22,7 +22,7 @@ end ...@@ -22,7 +22,7 @@ end
function c27103517.sumcon(e,c,minc) function c27103517.sumcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=5 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=5
end end
function c27103517.spcon(e,tp,eg,ep,ev,re,r,rp) function c27103517.spcon(e,tp,eg,ep,ev,re,r,rp)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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