Commit 96e06979 authored by mercury233's avatar mercury233

update

parent b489f873
......@@ -74,7 +74,7 @@ function c10000000.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(aux.FALSE)
end
function c10000000.tgcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c10000000.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -81,7 +81,7 @@ function c10000020.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(aux.FALSE)
end
function c10000020.tgcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c10000020.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -16,7 +16,7 @@ function c10365322.initial_effect(c)
c:RegisterEffect(e2)
end
function c10365322.descon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c10365322.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
......
......@@ -37,5 +37,5 @@ function c11067666.operation(e,tp,eg,ep,ev,re,r,rp)
end
function c11067666.rmcon(e)
local c=e:GetHandler()
return bit.band(c:GetSummonType(),SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM and c:IsReason(REASON_MATERIAL) and c:IsReason(REASON_SYNCHRO)
return c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsReason(REASON_MATERIAL) and c:IsReason(REASON_SYNCHRO)
end
......@@ -14,7 +14,7 @@ function c11877465.initial_effect(c)
c:RegisterEffect(e1)
end
function c11877465.condition(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c11877465.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end
......
......@@ -28,7 +28,7 @@ end
c12744567.xyz_number=101
function c12744567.filter(c)
return not c:IsType(TYPE_TOKEN) and c:IsAbleToChangeControler()
and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c12744567.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c12744567.filter(chkc) end
......
......@@ -38,7 +38,7 @@ function c13035077.initial_effect(c)
c:RegisterEffect(e5)
end
function c13035077.indtg(e,c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and c:IsSetCard(0xf9)
return c:IsSummonType(SUMMON_TYPE_ADVANCE) and c:IsSetCard(0xf9)
end
function c13035077.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then
......
......@@ -121,7 +121,7 @@ function c13073850.lvop2(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2)
end
function c13073850.immcon(e)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL)
end
function c13073850.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1
......
......@@ -32,7 +32,7 @@ function c15545291.initial_effect(c)
c:RegisterEffect(e4)
end
function c15545291.otfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c15545291.otcon(e,c,minc)
if c==nil then return true end
......
......@@ -24,7 +24,7 @@ function c16304628.initial_effect(c)
end
c16304628.material_setcode=0x8
function c16304628.atkcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c16304628.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
......
......@@ -48,7 +48,7 @@ function c16691074.atkop(e,tp,eg,ep,ev,re,r,rp)
end
function c16691074.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and bit.band(c:GetSummonType(),SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function c16691074.spfilter2(c,e,tp)
return c:IsSetCard(0x99) and not c:IsCode(16691074) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -13,7 +13,7 @@ function c18816758.initial_effect(c)
end
function c18816758.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x100a)
and bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and c:IsAbleToHandAsCost()
and c:IsSummonType(SUMMON_TYPE_ADVANCE) and c:IsAbleToHandAsCost()
end
function c18816758.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c18816758.cfilter,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -77,7 +77,7 @@ function c18897163.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c18897163.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c18897163.xyzfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xaf)
......
......@@ -38,5 +38,5 @@ function c19870120.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA)
end
function c19870120.target(e,c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
......@@ -12,7 +12,7 @@ function c19932396.initial_effect(c)
end
function c19932396.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x100a)
and bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and c:IsAbleToHandAsCost()
and c:IsSummonType(SUMMON_TYPE_ADVANCE) and c:IsAbleToHandAsCost()
end
function c19932396.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19932396.cfilter,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -11,7 +11,7 @@ function c20140382.initial_effect(c)
c:RegisterEffect(e1)
end
function c20140382.cfilter(c)
return c:IsFaceup() and c:IsLevelAbove(7) and bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return c:IsFaceup() and c:IsLevelAbove(7) and c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c20140382.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c20140382.cfilter,tp,LOCATION_MZONE,0,1,nil)
......
......@@ -23,7 +23,7 @@ function c20174189.valcheck(e,c)
e:SetLabel(flag)
end
function c20174189.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
and e:GetLabelObject():GetLabel()~=0
end
function c20174189.regop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -133,7 +133,7 @@ end
function c20366274.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bit.band(bc:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c20366274.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -19,7 +19,7 @@ function c20590784.target(e,tp,eg,ep,ev,re,r,rp,chk)
local at=Duel.GetAttacker()
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and at:IsOnField() and at:GetAttack()>=Duel.GetLP(tp)
and bit.band(at:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL end
and at:IsSummonType(SUMMON_TYPE_SPECIAL) end
end
function c20590784.filter(c,e,tp)
return c:IsSetCard(0xa3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -26,7 +26,7 @@ function c21249921.initial_effect(c)
c:RegisterEffect(e2)
end
function c21249921.eqcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c21249921.filter(c)
return c:IsLevelBelow(3) and c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) and not c:IsForbidden()
......
......@@ -84,7 +84,7 @@ function c21377582.valcheck(e,c)
e:SetLabel(typ)
end
function c21377582.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c21377582.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -112,7 +112,7 @@ function c21377582.efilter(e,te)
return te:IsActiveType(e:GetLabel()) and te:GetOwner()~=e:GetOwner()
end
function c21377582.descon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c21377582.costfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsAbleToRemoveAsCost()
......
......@@ -18,7 +18,7 @@ function c21672573.initial_effect(c)
end
function c21672573.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()~=e:GetHandler() and ep==tp
and bit.band(eg:GetFirst():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
and eg:GetFirst():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c21672573.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst():GetMaterialCount()~=0 and ep==tp
......
......@@ -23,7 +23,7 @@ function c22382087.initial_effect(c)
c:RegisterEffect(e2)
end
function c22382087.cfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and c:IsAbleToHandAsCost()
return c:IsSummonType(SUMMON_TYPE_ADVANCE) and c:IsAbleToHandAsCost()
end
function c22382087.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22382087.cfilter,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -39,7 +39,7 @@ function c22499034.otop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c22499034.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and rp~=tp
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE) and rp~=tp
end
function c22499034.thfilter(c,tp)
return c:IsSetCard(0xf9) and c:GetType()==0x20002
......
......@@ -40,7 +40,7 @@ function c23064604.initial_effect(c)
c:RegisterEffect(e4)
end
function c23064604.otfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c23064604.otcon(e,c,minc)
if c==nil then return true end
......
......@@ -32,7 +32,7 @@ function c23689697.initial_effect(c)
c:RegisterEffect(e4)
end
function c23689697.otfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c23689697.otcon(e,c,minc)
if c==nil then return true end
......
......@@ -29,7 +29,7 @@ function c24348804.initial_effect(c)
c:RegisterEffect(e3)
end
function c24348804.cfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c24348804.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c24348804.cfilter,tp,LOCATION_MZONE,0,1,nil)
......@@ -65,5 +65,5 @@ function c24348804.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c24348804.distg(e,c)
return c:IsStatus(STATUS_SPSUMMON_TURN) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
......@@ -47,7 +47,7 @@ function c24550676.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()
end
function c24550676.filter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c24550676.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24550676.filter,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -38,7 +38,7 @@ function c24672164.matcheck(e,c)
end
function c24672164.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and bit.band(c:GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION)
end
function c24672164.filter(c)
return c:IsSetCard(0x9b) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
......@@ -58,7 +58,7 @@ function c2530830.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsReason(REASON_DESTROY) and (c:IsReason(REASON_EFFECT) or (c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp)))
and bit.band(c:GetSummonType(),SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ
and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function c2530830.filter(c,e,tp)
return c:IsCode(18963306) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -28,7 +28,7 @@ function c25415052.initial_effect(c)
c:RegisterEffect(e3)
end
function c25415052.tdcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c25415052.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
......
......@@ -24,7 +24,7 @@ function c25682811.initial_effect(c)
c:RegisterEffect(e2)
end
function c25682811.eqcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c25682811.filter(c)
return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) and not c:IsForbidden()
......
......@@ -67,7 +67,7 @@ function c26400609.hspop(e,tp,eg,ep,ev,re,r,rp)
end
function c26400609.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
and e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c26400609.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -43,7 +43,7 @@ function c26781870.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c26781870.filter(c)
return c:GetSummonLocation()==LOCATION_HAND and c:IsAbleToHand()
and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c26781870.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c26781870.filter,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -14,7 +14,7 @@ function c26822796.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c26822796.filter(c)
return c:IsFaceup() and bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c26822796.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c26822796.filter(chkc) end
......
......@@ -69,14 +69,14 @@ function c27279764.ttop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function c27279764.immcon(e)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL)
end
function c27279764.efilter(e,te)
if te:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return true
else return aux.qlifilter(e,te) end
end
function c27279764.adtg(e,c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c27279764.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE+LOCATION_HAND)>0 end
......
......@@ -37,7 +37,7 @@ function c29169993.initial_effect(c)
c:RegisterEffect(e3)
end
function c29169993.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return r,REASON_BATTLE)~=0 and bit.band(e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c29169993.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
......
......@@ -39,7 +39,7 @@ function c29343734.initial_effect(c)
end
c29343734.material_setcode=0x8
function c29343734.retcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c29343734.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -31,7 +31,7 @@ function c29455728.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if e:GetHandler():GetSequence()<5 then ft=ft+1 end
return ct>0 and ft>=ct and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
and g:FilterCount(c29455728.mgfilter,nil,e,tp,e:GetHandler(),g)==ct
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
......
......@@ -34,7 +34,7 @@ function c30086349.mfilter2(c)
return c:IsRace(RACE_DRAGON) and c:GetLevel()==6
end
function c30086349.damcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c30086349.damfilter(c)
return c:IsFusionSetCard(0x3b) and c:GetBaseAttack()>0 and c:IsAbleToGrave()
......
......@@ -38,7 +38,7 @@ function c30194529.initial_effect(c)
c:RegisterEffect(e5)
end
function c30194529.drcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c30194529.drfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfd)
......
......@@ -20,7 +20,7 @@ function c30548775.initial_effect(c)
end
function c30548775.filter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsType(TYPE_FUSION)
and bit.band(c:GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
and c:IsSummonType(SUMMON_TYPE_FUSION)
end
function c30548775.condition(e,tp,eg,ep,ev,re,r,rp,chk)
return eg:IsExists(c30548775.filter,1,nil)
......
......@@ -16,7 +16,7 @@ function c30845999.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c30845999.filter(c)
return c:IsFaceup() and c:IsSetCard(0xaa) and bit.band(c:GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL
return c:IsFaceup() and c:IsSetCard(0xaa) and c:IsSummonType(SUMMON_TYPE_NORMAL)
end
function c30845999.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30845999.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -12,7 +12,7 @@ function c32752319.initial_effect(c)
c:RegisterEffect(e1)
end
function c32752319.atkcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c32752319.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -37,7 +37,7 @@ function c33698022.evop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+33698022,re,r,rp,ep,ev)
end
function c33698022.filter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsAbleToHand()
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToHand()
end
function c33698022.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c33698022.filter(chkc) end
......
......@@ -20,7 +20,7 @@ function c34449261.filter2(c,tp,tc)
and Duel.IsExistingMatchingCard(c34449261.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tg)
end
function c34449261.desfilter(c,tg)
return not tg:IsContains(c) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return not tg:IsContains(c) and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c34449261.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
......
......@@ -16,7 +16,7 @@ function c34761062.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsDualState() and Duel.GetAttacker()==c
and bc and bit.band(bc:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and bc:IsAbleToRemove()
and bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL) and bc:IsAbleToRemove()
end
function c34761062.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -17,7 +17,7 @@ function c35073065.initial_effect(c)
end
function c35073065.spcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
return ep==tp and bit.band(ec:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return ep==tp and ec:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c35073065.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -49,7 +49,7 @@ end
function c3576031.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsSetCard(0xea) and bit.band(tc:GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO then
if tc:IsSetCard(0xea) and tc:IsSummonType(SUMMON_TYPE_SYNCHRO) then
local p=tc:GetSummonPlayer()
c3576031[p]=c3576031[p]+1
end
......
......@@ -74,7 +74,7 @@ function c3606728.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
function c3606728.atkfilter(c)
return c:IsFaceup() and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c3606728.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c3606728.atkfilter(chkc) end
......
......@@ -24,7 +24,7 @@ function c3629090.initial_effect(c)
c:RegisterEffect(e2)
end
function c3629090.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c3629090.thfilter(c)
return c:GetType()==0x82 and c:IsAbleToHand()
......
......@@ -14,7 +14,7 @@ function c36352429.initial_effect(c)
end
function c36352429.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
and e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c36352429.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c36352429.filter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -22,7 +22,7 @@ function c3642509.initial_effect(c)
end
c3642509.material_setcode=0x8
function c3642509.atkcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c3642509.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -29,7 +29,7 @@ function c37192109.initial_effect(c)
end
function c37192109.rmfilter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAbleToRemove()
and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c37192109.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c37192109.rmfilter(chkc) end
......
......@@ -23,7 +23,7 @@ function c3752422.initial_effect(c)
c:RegisterEffect(e2)
end
function c3752422.lvfilter(c)
return c:IsFaceup() and bit.band(c:GetSummonType(),SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM and c:GetLevel()>0
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:GetLevel()>0
end
function c3752422.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c3752422.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -108,7 +108,7 @@ function c37991342.lvop2(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2)
end
function c37991342.immcon(e)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL)
end
function c37991342.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
......
......@@ -39,7 +39,7 @@ function c3912064.posfilter(c)
return c:IsDefensePos() or c:IsFacedown()
end
function c3912064.poscon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c3912064.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c3912064.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -35,7 +35,7 @@ function c39618799.initial_effect(c)
c:RegisterEffect(e3)
end
function c39618799.tgcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c39618799.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end
......
......@@ -58,7 +58,7 @@ function c40061558.ttop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function c40061558.immcon(e)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL)
end
function c40061558.efilter(e,te)
if te:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return true
......
......@@ -16,5 +16,5 @@ function c40502912.initial_effect(c)
c:RegisterEffect(e2)
end
function c40502912.tgcon(e)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
......@@ -41,10 +41,10 @@ function c41209827.ffilter(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsOnField() and not c:IsType(TYPE_TOKEN)
end
function c41209827.atkcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c41209827.atkfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsFaceup()
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsFaceup()
end
function c41209827.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c41209827.atkfilter,tp,0,LOCATION_MZONE,1,nil) end
......@@ -96,10 +96,10 @@ function c41209827.copyop(e,tp,eg,ep,ev,re,r,rp)
end
function c41209827.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and bit.band(c:GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION)
end
function c41209827.desfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c41209827.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c41209827.desfilter,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -14,7 +14,7 @@ function c41442341.initial_effect(c)
c:RegisterEffect(e1)
end
function c41442341.spcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c41442341.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) end
......
......@@ -26,7 +26,7 @@ function c4149689.initial_effect(c)
end
function c4149689.aclimit(e,re,tp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and bit.band(rc:GetSummonType(),SUMMON_TYPE_FLIP)==SUMMON_TYPE_FLIP and rc:IsLevelBelow(2)
return re:IsActiveType(TYPE_MONSTER) and rc:IsSummonType(SUMMON_TYPE_FLIP) and rc:IsLevelBelow(2)
end
function c4149689.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:GetFirst():IsLevelBelow(2) end
......
......@@ -16,7 +16,7 @@ function c41902352.initial_effect(c)
c:RegisterEffect(e2)
end
function c41902352.synlimit(e)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c41902352.spcost(e,c,tp,sumtype)
return sumtype~=SUMMON_TYPE_SPECIAL+182
......
......@@ -15,7 +15,7 @@ function c42598242.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c42598242.filter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c42598242.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c42598242.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -14,7 +14,7 @@ function c43845801.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function c43845801.filter(c)
return c:IsFaceup() and bit.band(c:GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_FUSION)
and c:IsCode(23995346) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK)
end
function c43845801.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -48,7 +48,7 @@ function c44874522.valcheck(e,c)
e:SetLabel(flag)
end
function c44874522.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c44874522.regop(e,tp,eg,ep,ev,re,r,rp)
local flag=e:GetLabelObject():GetLabel()
......
......@@ -13,7 +13,7 @@ function c45222299.initial_effect(c)
c:RegisterEffect(e1)
end
function c45222299.condition(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c45222299.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
......
......@@ -54,7 +54,7 @@ function c45533023.descost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c45533023.filter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c45533023.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45533023.filter,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -39,7 +39,7 @@ function c4591250.indtg(e,c)
end
function c4591250.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(c:GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return c:IsSummonType(SUMMON_TYPE_FUSION)
and (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()~=tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousPosition(POS_FACEUP)
end
......
......@@ -25,7 +25,7 @@ function c464362.initial_effect(c)
c:RegisterEffect(e3)
end
function c464362.descon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c464362.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
......
......@@ -29,7 +29,7 @@ function c47611119.filter(c)
return c:IsSetCard(0x1047) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c47611119.ctfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c47611119.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c47611119.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil)
......
......@@ -49,7 +49,7 @@ function c47679935.efilter(e,ct)
return p==tp and te:IsHasCategory(CATEGORY_FUSION_SUMMON)
end
function c47679935.limfilter(c,tp)
return c:GetSummonPlayer()==tp and bit.band(c:GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return c:GetSummonPlayer()==tp and c:IsSummonType(SUMMON_TYPE_FUSION)
end
function c47679935.limcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c47679935.limfilter,1,nil,tp)
......
......@@ -25,7 +25,7 @@ function c48716527.initial_effect(c)
c:RegisterEffect(e3)
end
function c48716527.cfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c48716527.actcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
......
......@@ -30,7 +30,7 @@ function c48739166.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c48739166.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAbleToChangeControler()
and not c:IsType(TYPE_TOKEN) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
and not c:IsType(TYPE_TOKEN) and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c48739166.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c48739166.filter(chkc) end
......
......@@ -26,7 +26,7 @@ function c49820233.ffilter(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsLevelAbove(5)
end
function c49820233.damcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c49820233.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 end
......
......@@ -47,7 +47,7 @@ function c50933533.valcheck(e,c)
e:SetLabel(flag)
end
function c50933533.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c50933533.regop(e,tp,eg,ep,ev,re,r,rp)
local flag=e:GetLabelObject():GetLabel()
......
......@@ -56,7 +56,7 @@ function c51194046.splimit(e,c)
end
function c51194046.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if bit.band(tc:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE then
if tc:IsSummonType(SUMMON_TYPE_ADVANCE) then
local p=tc:GetSummonPlayer()
c51194046[p]=c51194046[p]+e:GetLabelObject():GetLabel()
end
......
......@@ -21,7 +21,7 @@ function c52323874.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c52323874.filter(c)
return c:IsFaceup() and c:GetBaseAttack()>0
and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c52323874.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c52323874.filter(chkc) end
......
......@@ -28,7 +28,7 @@ function c52900000.initial_effect(c)
c:RegisterEffect(e3)
end
function c52900000.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c52900000.spfilter(c,e,tp)
return c:IsType(TYPE_SPIRIT) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
......
......@@ -68,7 +68,7 @@ function c53804307.hspop(e,tp,eg,ep,ev,re,r,rp)
end
function c53804307.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
and e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c53804307.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -9,7 +9,7 @@ function c54094821.initial_effect(c)
c:RegisterEffect(e1)
end
function c54094821.cfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
return c:IsSummonType(SUMMON_TYPE_RITUAL)
end
function c54094821.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c54094821.cfilter,1,nil)
......
......@@ -68,7 +68,7 @@ function c54520292.descost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST)
end
function c54520292.filter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c54520292.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c54520292.filter(chkc) end
......
......@@ -21,7 +21,7 @@ function c56350972.initial_effect(c)
c:RegisterEffect(e2)
end
function c56350972.regcon1(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c56350972.regfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsPreviousLocation(LOCATION_HAND+LOCATION_DECK)
......
......@@ -26,7 +26,7 @@ function c56526564.initial_effect(c)
end
end
function c56526564.cfilter(c)
return c:IsType(TYPE_LINK) and bit.band(c:GetSummonType(),SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
return c:IsType(TYPE_LINK) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function c56526564.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c56526564.cfilter,1,nil)
......
......@@ -30,7 +30,7 @@ function c56532353.costfilter(c)
end
function c56532353.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(c:GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return c:IsSummonType(SUMMON_TYPE_FUSION)
and Duel.GetAttacker()==c and c:IsChainAttackable(0)
and not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,c)
end
......
......@@ -88,7 +88,7 @@ function c57761191.valcheck(e,c)
e:SetLabel(typ)
end
function c57761191.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c57761191.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -118,7 +118,7 @@ end
function c57761191.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
and c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c57761191.spfilter(c,e,tp)
return c:IsAttribute(0xf) and c:IsType(0x802040) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -39,7 +39,7 @@ function c58984738.otop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c58984738.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and rp~=tp
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE) and rp~=tp
end
function c58984738.thfilter(c,tp)
return c:IsSetCard(0xf9) and c:GetType()==0x20004
......
......@@ -13,7 +13,7 @@ function c59695933.initial_effect(c)
end
function c59695933.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return bit.band(tc:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return tc:IsSummonType(SUMMON_TYPE_ADVANCE)
and tc:GetMaterialCount()==1
end
function c59695933.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -49,7 +49,7 @@ function c59822133.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
function c59822133.spcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c59822133.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
......
......@@ -74,7 +74,7 @@ function c60954556.efop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c60954556.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c60954556.xyzfilter(c)
return c:IsSetCard(0xf7) and c:IsType(TYPE_MONSTER)
......
......@@ -31,7 +31,7 @@ function c61466310.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA)
end
function c61466310.thcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(eg:GetFirst():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return ep==tp and eg:GetFirst():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c61466310.filter(c,code)
return (c:GetAttack()==2400 or c:GetAttack()==2800) and c:GetDefense()==1000 and c:GetCode()~=code and c:IsAbleToHand()
......
......@@ -37,7 +37,7 @@ function c62541668.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c62541668.rmfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsAbleToRemove()
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToRemove()
end
function c62541668.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(62541668)==0
......
......@@ -51,7 +51,7 @@ function c62709239.desop(e,tp,eg,ep,ev,re,r,rp)
end
function c62709239.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and bit.band(c:GetSummonType(),SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function c62709239.spfilter1(c,e,tp)
return c:GetLevel()>0 and c:IsSetCard(0x10db) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -116,7 +116,7 @@ function c64496451.lvop2(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2)
end
function c64496451.immcon(e)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL
return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL)
end
function c64496451.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()==1
......
......@@ -23,7 +23,7 @@ function c64880894.initial_effect(c)
c:RegisterEffect(e2)
end
function c64880894.drcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c64880894.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......@@ -36,5 +36,5 @@ function c64880894.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(p,d,REASON_EFFECT)
end
function c64880894.atkfilter(e,c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
......@@ -28,7 +28,7 @@ function c65029288.initial_effect(c)
c:RegisterEffect(e3)
end
function c65029288.immcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(24094653) and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return re and re:GetHandler():IsCode(24094653) and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c65029288.immop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -13,7 +13,7 @@ function c65612386.initial_effect(c)
c:RegisterEffect(e1)
end
function c65612386.condition(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c65612386.cfilter(c,tp)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost()
......
......@@ -22,7 +22,7 @@ function c68304813.initial_effect(c)
end
function c68304813.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return bit.band(tc:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE and tc:GetMaterialCount()>=2 and tc:GetSummonPlayer()==tp
return tc:IsSummonType(SUMMON_TYPE_ADVANCE) and tc:GetMaterialCount()>=2 and tc:GetSummonPlayer()==tp
end
function c68304813.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -11,7 +11,7 @@ function c68396778.initial_effect(c)
c:RegisterEffect(e1)
end
function c68396778.filter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c68396778.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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