Commit 288c5812 authored by Momobako's avatar Momobako

Push by Appveyor

parent 94d7d096
......@@ -43,7 +43,7 @@ function c101002051.initial_effect(c)
c:RegisterEffect(e3)
end
function c101002051.regcon(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 c101002051.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -79,7 +79,7 @@ function c101002051.lkop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SendtoGrave(g1,REASON_MATERIAL+REASON_LINK)
end
function c101002051.thcon(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 c101002051.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup():Filter(Card.IsAbleToHand,nil)
......
......@@ -52,7 +52,7 @@ function c10102011.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST)
end
function c10102011.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 c10102011.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x9330)
......
......@@ -52,7 +52,7 @@ function c10103006.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c10103006.thcon(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 c10103006.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsSetCard(0x337)
......
......@@ -85,7 +85,7 @@ function c10113058.cfilter(c)
return c:GetFlagEffect(10113058)~=0
end
function c10113058.rmcon(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 c10113058.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
......
......@@ -42,10 +42,10 @@ function c10113073.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c10113073.effcon(e)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c10113073.sumcon(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 c10113073.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,10113073)
......
......@@ -58,7 +58,7 @@ function c10129011.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c10129011.recon(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 c10129011.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -65,7 +65,7 @@ function c10162004.pccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(p)<=2000
end
function c10162004.pctg(e,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 c10162004.antarget(e,c)
return c~=e:GetHandler()
......
......@@ -48,7 +48,7 @@ function c10173002.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c10173002.atkcon(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 c10173002.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -49,7 +49,7 @@ function c10173005.setop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c10173005.macon(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 c10173005.matg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsType(TYPE_SPELL+TYPE_TRAP) end
......
......@@ -17,7 +17,7 @@ function c10173019.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c10173019.desfilter1(c,e,tp)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and aux.disfilter1(c) and Duel.IsExistingMatchingCard(c10173019.desfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,e)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and aux.disfilter1(c) and Duel.IsExistingMatchingCard(c10173019.desfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,e)
end
function c10173019.desfilter2(c,e)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsCanBeEffectTarget(e) and aux.disfilter1(c)
......
......@@ -69,5 +69,5 @@ function c10173022.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
function c10173022.condition(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
\ No newline at end of file
......@@ -47,7 +47,7 @@ function c10173038.initial_effect(c)
c:RegisterEffect(e7)
end
function c10173038.adcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION and e:GetLabel()==1
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and e:GetLabel()==1
end
function c10173038.valcheck(e,c)
local g=c:GetMaterial()
......
......@@ -37,7 +37,7 @@ function c114000181.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck()
and g:GetCount()>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)+1>=g:GetCount()
and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
and not g:IsExists(c114000181.mgfilter,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
......
......@@ -45,7 +45,7 @@ function c114100624.valcheck(e,c)
e:SetLabel(atk)
end
function c114100624.atkcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION and e:GetHandler():GetMaterialCount()>0
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and e:GetHandler():GetMaterialCount()>0
end
function c114100624.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -76,7 +76,7 @@ function c121053292.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c121053292.atkfilter(e,c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c121053292.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler()==Duel.GetAttacker() and e:GetHandler():IsRelateToBattle()
......
......@@ -79,7 +79,7 @@ function c13254107.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c13254107.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 c13254107.thfilter(c)
return c:IsSetCard(0x356) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
......@@ -33,7 +33,7 @@ function cm.aclimit(e,re,tp)
end
--Disable Special Summon
function cm.filter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function cm.condition(e)
return not Duel.IsExistingMatchingCard(cm.filter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
......
......@@ -47,7 +47,7 @@ function c16063012.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c16063012.desfilter(c)
return c:IsAbleToHand() and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsAbleToHand() and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c16063012.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16063012.desfilter(chkc) end
......
......@@ -55,7 +55,7 @@ function c16063036.operation(e,tp,eg,ep,ev,re,r,rp)
end
function c16063036.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 c16063036.spfilter(c,e,tp)
return c:IsSetCard(0x5c5) and c:IsCode(16063020) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -13,7 +13,7 @@ function c16080013.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER)
and bit.band(re:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
and re:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
and Duel.IsChainNegatable(ev) and tp~=ep
end
function c16080013.filter(c,e)
......
......@@ -54,7 +54,7 @@ function c16080027.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c16080027.aclimit1(e,re,tp)
return re:IsType(TYPE_EFFECT) and re:IsType(TYPE_MONSTER) and re:GetSummonLocation()==LOCATION_EXTRA and not re:GetHandler():IsImmuneToEffect(e) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return re:IsType(TYPE_EFFECT) and re:IsType(TYPE_MONSTER) and re:GetSummonLocation()==LOCATION_EXTRA and not re:GetHandler():IsImmuneToEffect(e) and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c16080027.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -10,7 +10,7 @@ function c16080028.initial_effect(c)
c:RegisterEffect(e1)
end
function c16080028.desfilter(c)
return not c:IsDisabled() and not c:IsType(TYPE_NORMAL) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return not c:IsDisabled() and not c:IsType(TYPE_NORMAL) and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c16080028.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16080028.desfilter(chkc) end
......
......@@ -76,5 +76,5 @@ function c17060828.spop(e,tp,eg,ep,ev,re,r,rp)
end
function c17060828.rmcon(e,tp,eg,ep,ev,re,r,rp)
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
\ No newline at end of file
......@@ -86,7 +86,7 @@ end
function c17060838.atkcon(e)
local ph=Duel.GetCurrentPhase()
local bc=e:GetHandler():GetBattleTarget()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and bc and bit.band(bc:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c17060838.atkval(e,c)
return e:GetHandler():GetAttack()*2
......
......@@ -81,5 +81,5 @@ function c17060846.spop(e,tp,eg,ep,ev,re,r,rp)
end
function c17060846.rmcon(e,tp,eg,ep,ev,re,r,rp)
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
\ No newline at end of file
......@@ -78,7 +78,7 @@ function c17060861.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c17060861.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 c17060861.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
......@@ -196,7 +196,7 @@ function c17060864.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c17060864.thcon(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 c17060864.thfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(4) and c:IsAbleToHand()
......
......@@ -57,7 +57,7 @@ function c2100007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c2100007.cfilter1(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 c2100007.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c2100007.cfilter1(chkc) and chkc:IsAbleToHand() end
......
......@@ -42,7 +42,7 @@ function c21401117.initial_effect(c)
c:RegisterEffect(e4)
end
function c21401117.adcon(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 c21401117.filter(c)
return c:IsFaceup() and c:GetAttack()>0 and c:GetDefense()>0
......
......@@ -35,7 +35,7 @@ function c21401118.initial_effect(c)
c:RegisterEffect(e3)
end
function c21401118.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 c21401118.filter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON)
......
......@@ -38,7 +38,7 @@ function c21401119.initial_effect(c)
c:RegisterEffect(e3)
end
function c21401119.accon(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 c21401119.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanAddCounter(0xf0f,2,false) end
......
......@@ -36,7 +36,7 @@ function c21401120.initial_effect(c)
c:RegisterEffect(e3)
end
function c21401120.ddcon(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 c21401120.filter(c)
return c:IsFaceup() and c:GetDefense()>0 and c:GetAttack()>0
......
......@@ -44,7 +44,7 @@ function c21401123.initial_effect(c)
c:RegisterEffect(e4)
end
function c21401123.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 c21401123.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
......@@ -32,7 +32,7 @@ function c2177800.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
local p=tc:GetSummonPlayer()
if bit.band(tc:GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL then
if tc:IsSummonType(SUMMON_TYPE_RITUAL) then
c2177800[p]=c2177800[p]+1
end
tc=eg:GetNext()
......
......@@ -125,7 +125,7 @@ function cm.repfilter(c)
return c.prim_replace_att
end
function cm.destg(c,ec)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return cm.XMaterialCountCondition(4)(e,tp,eg,ep,ev,re,r,rp) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
......
......@@ -16,7 +16,7 @@ function cm.filter1(c,e,tp)
return Senya.check_set_elem(c) and c:GetOverlayCount()==0 and c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function cm.filter3(c)
return c:IsAbleToChangeControler() and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
return c:IsAbleToChangeControler() and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and cm.filter1(chkc,e,tp) end
......
......@@ -38,7 +38,7 @@ function cm.xmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(cm.xmfilter,1,nil)
end
function cm.filter(c,tp)
return c:IsFaceup() and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and (c:IsControler(tp) or c:IsAbleToChangeControler()) and not c:IsType(TYPE_TOKEN)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) and (c:IsControler(tp) or c:IsAbleToChangeControler()) and not c:IsType(TYPE_TOKEN)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc,tp) and chkc~=e:GetHandler() end
......
......@@ -32,7 +32,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.filter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsControlerCanBeChanged()
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsControlerCanBeChanged()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end
......
......@@ -109,7 +109,7 @@ function cm.tgfilter(e,c)
return c:IsFacedown() and c:IsLocation(LOCATION_MZONE)
end
function cm.rmfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsAbleToDeck()
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToDeck()
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -62,7 +62,7 @@ function cm.filter(c,tp,l)
return c:IsPreviousLocation(l) and c:GetPreviousControler()==tp
end
function cm.drcon1(e,tp,eg,ep,ev,re,r,rp)
return not re or not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS)
return not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function cm.drop1(e,tp,eg,ep,ev,re,r,rp)
local t=Senya.order_table[e:GetLabel()]
......@@ -71,7 +71,7 @@ function cm.drop1(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
return re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local t=Senya.order_table[e:GetLabel()]
......@@ -151,4 +151,4 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
end
\ No newline at end of file
......@@ -2276,7 +2276,7 @@ function cm.enable_get_all_cards()
end
function cm.SummonTypeCondition(t,con)
return function(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),t)==t and (not con or con(e,tp,eg,ep,ev,re,r,rp))
return e:GetHandler():IsSummonType(t) and (not con or con(e,tp,eg,ep,ev,re,r,rp))
end
end
function cm.NonImmuneFilter(c,e)
......
......@@ -16,7 +16,7 @@ function cm.effect_operation_3L(c,ctlm)
e:SetCost(Senya.DescriptionCost())
local con=e:GetCondition()
e:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION and con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and con(e,tp,eg,ep,ev,re,r,rp)
end)
c:RegisterEffect(e,true)
return e
......
......@@ -10,7 +10,7 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(function(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)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -10,7 +10,7 @@ function cm.initial_effect(c)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(function(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)
end)
e0:SetOperation(cm.skipop)
c:RegisterEffect(e0)
......
......@@ -21,7 +21,7 @@ function cm.initial_effect(c)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(c:GetSummonType(),SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK and e:GetHandler():GetFlagEffectLabel(m)
return c:IsSummonType(SUMMON_TYPE_LINK) and e:GetHandler():GetFlagEffectLabel(m)
end)
e0:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -12,7 +12,7 @@ function cm.initial_effect(c)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(c:GetSummonType(),SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
return c:IsSummonType(SUMMON_TYPE_LINK)
end)
e0:SetOperation(cm.skipop)
c:RegisterEffect(e0)
......
......@@ -21,7 +21,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m-1000)
e1:SetCondition(function(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)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
......
......@@ -4,6 +4,7 @@ local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.Senya_name_with_sayuri=true
function cm.initial_effect(c)
Senya.AddSummonMusic(c,m*16,SUMMON_TYPE_LINK)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
......
......@@ -66,7 +66,7 @@ function c46564765.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST)
end
function c46564765.decon(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 c46564765.damfilter(c,p)
return c:GetOwner()==p and c:IsAbleToGrave()
......
......@@ -10,7 +10,7 @@ function c50000039.initial_effect(c)
e1:SetCountLimit(1,50000039)
e1:SetProperty(0x14000)
e1:SetCondition(function(e)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end)
e1:SetTarget(c50000039.destg)
e1:SetOperation(c50000039.desop)
......
......@@ -42,7 +42,7 @@ function c50000065.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 c50000065.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -15,7 +15,7 @@ function c50000070.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(function(e)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end)
e2:SetTarget(c50000070.destg)
e2:SetOperation(c50000070.desop)
......
......@@ -490,7 +490,7 @@ function cm.WindbotCommonEffect(c,tg,op,expr,ctg)
c:RegisterEffect(e1)
end
function cm.WindbotSSCost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_NORMAL)==SUMMON_TYPE_NORMAL end
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function cm.WindbotSSFilter(c,e,tp)
......
......@@ -49,7 +49,7 @@ function c60151127.filter2(c)
return c:IsAbleToGrave()
end
function c60151127.filter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsDestructable()
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsDestructable()
end
function c60151127.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -41,7 +41,7 @@ function c60151731.initial_effect(c)
end
function c60151731.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c60151731.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151731.disfilter,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -27,7 +27,7 @@ function c66619910.initial_effect(c)
c:RegisterEffect(e2)
end
function c66619910.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 c66619910.filter1(c)
return c:IsSetCard(0x666) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
......@@ -49,7 +49,7 @@ function c66619916.chainlm(e,rp,tp)
return tp==rp
end
function c66619916.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x666) and c:IsControler(tp) and bit.band(c:GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
return c:IsFaceup() and c:IsSetCard(0x666) and c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c66619916.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c66619916.cfilter,1,nil,tp)
......
......@@ -62,7 +62,7 @@ function c66619917.tgval(e,c)
return c:IsSetCard(0x666)
end
function c66619917.cfilter1(c,tp)
return c:IsFaceup() and c:IsSetCard(0x666) and c:IsControler(tp) and (bit.band(c:GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO or bit.band(c:GetSummonType(),SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ)
return c:IsFaceup() and c:IsSetCard(0x666) and c:IsControler(tp) and (c:IsSummonType(SUMMON_TYPE_SYNCHRO) or c:IsSummonType(SUMMON_TYPE_XYZ))
end
function c66619917.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c66619917.cfilter1,1,nil,tp)
......
......@@ -100,7 +100,7 @@ function c66619918.val(e,re,rp)
return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_MONSTER)
end
function c66619918.cfilter1(c,tp)
return c:IsFaceup() and c:IsSetCard(0x666) and c:IsControler(tp) and bit.band(c:GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
return c:IsFaceup() and c:IsSetCard(0x666) and c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c66619918.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c66619918.cfilter1,1,nil,tp)
......
......@@ -127,7 +127,7 @@ function c66619919.handcon1(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer() and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c66619919.cfilter1(c,tp)
return c:IsFaceup() and c:IsSetCard(0x666) and c:IsControler(tp) and bit.band(c:GetSummonType(),SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ
return c:IsFaceup() and c:IsSetCard(0x666) and c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function c66619919.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c66619919.cfilter1,1,nil,tp)
......
......@@ -6,7 +6,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
--e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
......@@ -17,7 +17,7 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
--e2:SetCountLimit(1,66677718)
e2:SetCountLimit(1,m-700)
e2:SetCost(Senya.SelfRemoveCost)
e2:SetCondition(cm.drcon)
e2:SetTarget(cm.drtg)
......
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