Commit bb425886 authored by salix5's avatar salix5 Committed by GitHub

add aux.xyz_number and aux.GetXyzNumber() (#1826)

parent e6da49ec
......@@ -15,7 +15,7 @@ function c10389142.initial_effect(c)
e1:SetOperation(c10389142.spop)
c:RegisterEffect(e1)
end
c10389142.xyz_number=42
aux.xyz_number[10389142]=42
function c10389142.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
......
......@@ -15,7 +15,7 @@ function c11411223.initial_effect(c)
e1:SetOperation(c11411223.operation)
c:RegisterEffect(e1)
end
c11411223.xyz_number=10
aux.xyz_number[11411223]=10
function c11411223.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -27,7 +27,7 @@ function c11522979.initial_effect(c)
e2:SetOperation(c11522979.operation)
c:RegisterEffect(e2)
end
c11522979.xyz_number=69
aux.xyz_number[11522979]=69
function c11522979.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
......
......@@ -25,7 +25,7 @@ function c12744567.initial_effect(c)
e2:SetOperation(c12744567.spop)
c:RegisterEffect(e2)
end
c12744567.xyz_number=101
aux.xyz_number[12744567]=101
function c12744567.filter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsCanOverlay()
end
......
......@@ -35,7 +35,7 @@ function c1426714.initial_effect(c)
e3:SetValue(c1426714.atkval)
c:RegisterEffect(e3)
end
c1426714.xyz_number=48
aux.xyz_number[1426714]=48
function c1426714.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
......
......@@ -21,7 +21,7 @@ function c15232745.initial_effect(c)
e2:SetOperation(c15232745.atkop)
c:RegisterEffect(e2)
end
c15232745.xyz_number=1
aux.xyz_number[15232745]=1
function c15232745.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -24,7 +24,7 @@ function c15862758.initial_effect(c)
e2:SetOperation(c15862758.naop)
c:RegisterEffect(e2)
end
c15862758.xyz_number=1000
aux.xyz_number[15862758]=1000
function c15862758.condition(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(89477759)
end
......
......@@ -17,7 +17,7 @@ function c16037007.initial_effect(c)
e1:SetOperation(c16037007.disop)
c:RegisterEffect(e1)
end
c16037007.xyz_number=74
aux.xyz_number[16037007]=74
function c16037007.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
......
......@@ -45,7 +45,7 @@ function c16259549.initial_effect(c)
e4:SetOperation(c16259549.tdop)
c:RegisterEffect(e4)
end
c16259549.xyz_number=49
aux.xyz_number[16259549]=49
function c16259549.reccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
......
......@@ -14,7 +14,7 @@ function c19333131.initial_effect(c)
e1:SetOperation(c19333131.operation)
c:RegisterEffect(e1)
end
c19333131.xyz_number=12
aux.xyz_number[19333131]=12
function c19333131.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -35,7 +35,7 @@ function c1992816.initial_effect(c)
e3:SetOperation(c1992816.daop)
c:RegisterEffect(e3)
end
c1992816.xyz_number=9
aux.xyz_number[1992816]=9
function c1992816.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler()==Duel.GetAttackTarget() and e:GetHandler():GetOverlayCount()~=0
end
......
......@@ -26,7 +26,7 @@ function c20563387.initial_effect(c)
e2:SetOperation(c20563387.rmop)
c:RegisterEffect(e2)
end
c20563387.xyz_number=80
aux.xyz_number[20563387]=80
function c20563387.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
......
......@@ -27,7 +27,7 @@ function c2061963.initial_effect(c)
e2:SetOperation(c2061963.deckop)
c:RegisterEffect(e2)
end
c2061963.xyz_number=104
aux.xyz_number[2061963]=104
function c2061963.condition(e,tp,eg,ep,ev,re,r,rp,chk)
local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp
......
......@@ -28,7 +28,7 @@ function c20785975.initial_effect(c)
e2:SetOperation(c20785975.spop)
c:RegisterEffect(e2)
end
c20785975.xyz_number=103
aux.xyz_number[20785975]=103
function c20785975.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -18,10 +18,7 @@ function c20994205.condition(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(c20994205.cfilter,tp,0,LOCATION_MZONE,1,nil)
end
function c20994205.nofilter(c)
local m=_G["c"..c:GetCode()]
if not m then return c.xyz_number end
local no=m.xyz_number
return no
return aux.GetXyzNumber(c)
end
function c20994205.spfilter(c,e,tp)
if not c20994205.nofilter(c) then return end
......@@ -30,7 +27,7 @@ function c20994205.spfilter(c,e,tp)
and g:CheckSubGroup(c20994205.fselect,4,4,c)
end
function c20994205.fselect(sg,c)
return sg:GetSum(c20994205.nofilter)==c.xyz_number and sg:GetClassCount(Card.GetRank)==4
return sg:GetSum(aux.GetXyzNumber)==aux.GetXyzNumber(c) and sg:GetClassCount(Card.GetRank)==4
and sg:Filter(Card.IsCanBeXyzMaterial,nil,c):GetCount()==4
end
function c20994205.target(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -43,7 +40,7 @@ function c20994205.gselect(sg,e,tp)
return g:IsExists(c20994205.spfilter2,1,nil,sg,e,tp)
end
function c20994205.spfilter2(c,sg,e,tp)
return sg:GetSum(c20994205.nofilter)==c.xyz_number and sg:GetClassCount(Card.GetRank)==4
return sg:GetSum(aux.GetXyzNumber)==aux.GetXyzNumber(c) and sg:GetClassCount(Card.GetRank)==4
and sg:Filter(Card.IsCanBeXyzMaterial,nil,c):GetCount()==4
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
......
......@@ -23,7 +23,7 @@ function c21313376.initial_effect(c)
e2:SetOperation(c21313376.desop)
c:RegisterEffect(e2)
end
c21313376.xyz_number=14
aux.xyz_number[21313376]=14
function c21313376.refcon(e,re,val,r,rp,rc)
return bit.band(r,REASON_EFFECT)~=0 and rp==1-e:GetHandlerPlayer()
end
......
......@@ -26,7 +26,7 @@ function c21521304.initial_effect(c)
e2:SetOperation(c21521304.spop)
c:RegisterEffect(e2)
end
c21521304.xyz_number=39
aux.xyz_number[21521304]=39
function c21521304.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
......
......@@ -24,7 +24,7 @@ function c23085002.initial_effect(c)
e3:SetOperation(c23085002.operation)
c:RegisterEffect(e3)
end
c23085002.xyz_number=68
aux.xyz_number[23085002]=68
function c23085002.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)*100
end
......
......@@ -26,7 +26,7 @@ function c23187256.initial_effect(c)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
end
c23187256.xyz_number=93
aux.xyz_number[23187256]=93
function c23187256.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ) and c:IsSetCard(0x48) and c:GetOverlayCount()>0
end
......
......@@ -26,7 +26,7 @@ function c23649496.initial_effect(c)
e2:SetOperation(c23649496.tgop)
c:RegisterEffect(e2)
end
c23649496.xyz_number=18
aux.xyz_number[23649496]=18
function c23649496.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(23649496)==0 end
......
......@@ -31,7 +31,7 @@ function c23998625.initial_effect(c)
e3:SetOperation(c23998625.spop)
c:RegisterEffect(e3)
end
c23998625.xyz_number=53
aux.xyz_number[23998625]=53
function c23998625.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(Duel.GetAttacker())
......
......@@ -21,7 +21,7 @@ function c2407234.initial_effect(c)
e2:SetOperation(c2407234.operation)
c:RegisterEffect(e2)
end
c2407234.xyz_number=69
aux.xyz_number[2407234]=69
function c2407234.negfilter(c)
return aux.NegateMonsterFilter(c) and c:IsType(TYPE_XYZ)
end
......
......@@ -38,7 +38,7 @@ function c26556950.initial_effect(c)
e4:SetOperation(c26556950.desop)
c:RegisterEffect(e4)
end
c26556950.xyz_number=84
aux.xyz_number[26556950]=84
function c26556950.ovfilter(c)
local rk=c:GetRank()
return c:IsFaceup() and c:GetOverlayCount()>=2 and c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK) and rk>=8 and rk<=10
......
......@@ -29,7 +29,7 @@ function c26973555.initial_effect(c)
e3:SetOperation(c26973555.disop)
c:RegisterEffect(e3)
end
c26973555.xyz_number=0
aux.xyz_number[26973555]=0
function c26973555.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ) and not c:IsSetCard(0x48)
end
......
......@@ -23,7 +23,7 @@ function c28400508.initial_effect(c)
e2:SetOperation(c28400508.spop)
c:RegisterEffect(e2)
end
c28400508.xyz_number=97
aux.xyz_number[28400508]=97
function c28400508.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -16,13 +16,13 @@ function c29085954.initial_effect(c)
e1:SetOperation(c29085954.spop)
c:RegisterEffect(e1)
end
c29085954.xyz_number=78
aux.xyz_number[29085954]=78
function c29085954.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c29085954.filter(c,e,tp,mc)
local no=c.xyz_number
local no=aux.GetXyzNumber(c)
return no and no>=1 and no<=99 and c:IsSetCard(0x48)
and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
......
......@@ -26,7 +26,7 @@ function c29208536.initial_effect(c)
e3:SetValue(c29208536.aclimit)
c:RegisterEffect(e3)
end
c29208536.xyz_number=45
aux.xyz_number[29208536]=45
function c29208536.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -16,7 +16,7 @@ function c29669359.initial_effect(c)
e1:SetOperation(c29669359.operation)
c:RegisterEffect(e1)
end
c29669359.xyz_number=61
aux.xyz_number[29669359]=61
function c29669359.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and not e:GetHandler():IsDirectAttacked() end
......
......@@ -39,7 +39,7 @@ function c2978414.initial_effect(c)
e3:SetOperation(c2978414.efop)
c:RegisterEffect(e3)
end
c2978414.xyz_number=46
aux.xyz_number[2978414]=46
function c2978414.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1
end
......
......@@ -36,10 +36,8 @@ function s.initial_effect(c)
end
function s.immtg(e,c)
if c:IsSetCard(0x1073,0x1048) then return true end
local m=_G["c"..c:GetCode()]
if not c:IsSetCard(0x48) or not m then return false end
local no=m.xyz_number
return no and no>=101 and no<=107
local no=aux.GetXyzNumber(c)
return c:IsSetCard(0x48) and no and no>=101 and no<=107
end
function s.cfilter(c,tp)
return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsType(TYPE_XYZ)
......
......@@ -24,7 +24,7 @@ function c31320433.initial_effect(c)
e2:SetOperation(c31320433.daop)
c:RegisterEffect(e2)
end
c31320433.xyz_number=47
aux.xyz_number[31320433]=47
function c31320433.matfilter(c,e)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsLevel(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end
......
......@@ -23,7 +23,7 @@ function c31437713.initial_effect(c)
e2:SetOperation(c31437713.operation)
c:RegisterEffect(e2)
end
c31437713.xyz_number=82
aux.xyz_number[31437713]=82
function c31437713.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL)
end
......
......@@ -31,7 +31,7 @@ function c31801517.initial_effect(c)
e3:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE))
c:RegisterEffect(e3)
end
c31801517.xyz_number=62
aux.xyz_number[31801517]=62
function c31801517.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c==Duel.GetAttacker() or c==Duel.GetAttackTarget()
......
......@@ -16,7 +16,7 @@ function c32003338.initial_effect(c)
e1:SetOperation(c32003338.operation)
c:RegisterEffect(e1)
end
c32003338.xyz_number=34
aux.xyz_number[32003338]=34
function c32003338.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -25,7 +25,7 @@ function c32446630.initial_effect(c)
e2:SetOperation(c32446630.operation)
c:RegisterEffect(e2)
end
c32446630.xyz_number=43
aux.xyz_number[32446630]=43
function c32446630.atktg(e,c)
return c:IsType(TYPE_TOKEN)
end
......
......@@ -36,7 +36,7 @@ function c32559361.initial_effect(c)
e3:SetOperation(c32559361.damop2)
c:RegisterEffect(e3)
end
c32559361.xyz_number=9
aux.xyz_number[32559361]=9
function c32559361.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
......
......@@ -11,13 +11,13 @@ function c33252803.initial_effect(c)
c:RegisterEffect(e1)
end
function c33252803.filter1(c,e,tp)
local m=_G["c"..c:GetCode()]
return c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) and m
local no=aux.GetXyzNumber(c)
return c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) and no
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c33252803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1,m.xyz_number)
and Duel.IsExistingMatchingCard(c33252803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1,no)
end
function c33252803.filter2(c,e,tp,mc,rk,no)
return c:IsRank(rk) and c:IsSetCard(0x1048) and c.xyz_number==no and mc:IsCanBeXyzMaterial(c)
return c:IsRank(rk) and c:IsSetCard(0x1048) and aux.GetXyzNumber(c)==no and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c33252803.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......@@ -29,11 +29,11 @@ function c33252803.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c33252803.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local m=_G["c"..tc:GetCode()]
local no=aux.GetXyzNumber(tc)
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL)
or tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or not m then return end
or tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or not no then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33252803.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,m.xyz_number)
local g=Duel.SelectMatchingCard(tp,c33252803.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,no)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
......
......@@ -16,7 +16,7 @@ function c33776843.initial_effect(c)
e1:SetOperation(c33776843.operation)
c:RegisterEffect(e1)
end
c33776843.xyz_number=15
aux.xyz_number[33776843]=15
function c33776843.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -38,9 +38,7 @@ function c34876719.ovcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c34876719.ovfilter(c,sc)
local m=_G["c"..c:GetCode()]
if not m then return false end
local no=m.xyz_number
local no=aux.GetXyzNumber(c)
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and c:IsCanBeXyzMaterial(sc)
end
function c34876719.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -24,7 +24,7 @@ function c35772782.initial_effect(c)
e2:SetOperation(c35772782.diceop)
c:RegisterEffect(e2)
end
c35772782.xyz_number=67
aux.xyz_number[35772782]=67
c35772782.toss_dice=true
function c35772782.dccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
......
......@@ -18,7 +18,7 @@ function c36076683.initial_effect(c)
e1:SetOperation(c36076683.atkop)
c:RegisterEffect(e1)
end
c36076683.xyz_number=73
aux.xyz_number[36076683]=73
function c36076683.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -28,7 +28,7 @@ function c37279508.initial_effect(c)
e2:SetOperation(c37279508.spop)
c:RegisterEffect(e2)
end
c37279508.xyz_number=37
aux.xyz_number[37279508]=37
function c37279508.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -17,7 +17,7 @@ function c3790062.initial_effect(c)
e1:SetOperation(c3790062.operation)
c:RegisterEffect(e1)
end
c3790062.xyz_number=65
aux.xyz_number[3790062]=65
function c3790062.condition(e,tp,eg,ep,ev,re,r,rp,chk)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
......
......@@ -16,7 +16,7 @@ function c39139935.initial_effect(c)
e1:SetOperation(c39139935.operation)
c:RegisterEffect(e1)
end
c39139935.xyz_number=33
aux.xyz_number[39139935]=33
function c39139935.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -24,7 +24,7 @@ function c39622156.initial_effect(c)
e2:SetOperation(c39622156.operation)
c:RegisterEffect(e2)
end
c39622156.xyz_number=26
aux.xyz_number[39622156]=26
function c39622156.dacost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -27,7 +27,7 @@ function c39972129.initial_effect(c)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
end
c39972129.xyz_number=64
aux.xyz_number[39972129]=64
function c39972129.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -21,7 +21,7 @@ function c4019153.initial_effect(c)
e2:SetOperation(c4019153.atkop)
c:RegisterEffect(e2)
end
c4019153.xyz_number=4
aux.xyz_number[4019153]=4
function c4019153.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -21,7 +21,7 @@ function c42230449.initial_effect(c)
e2:SetOperation(c42230449.atkop)
c:RegisterEffect(e2)
end
c42230449.xyz_number=2
aux.xyz_number[42230449]=2
function c42230449.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -20,7 +20,7 @@ function c42421606.initial_effect(c)
e2:SetOperation(c42421606.efop)
c:RegisterEffect(e2)
end
c42421606.xyz_number=85
aux.xyz_number[42421606]=85
c42421606.toss_dice=true
function c42421606.efcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
......@@ -29,7 +29,7 @@ function c43490025.initial_effect(c)
e4:SetOperation(c43490025.atkop)
c:RegisterEffect(e4)
end
c43490025.xyz_number=0
aux.xyz_number[43490025]=0
function c43490025.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ) and not c:IsSetCard(0x48)
end
......
......@@ -24,7 +24,7 @@ function c46871387.initial_effect(c)
e2:SetValue(800)
c:RegisterEffect(e2)
end
c46871387.xyz_number=55
aux.xyz_number[46871387]=55
function c46871387.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -35,7 +35,7 @@ function c47017574.initial_effect(c)
e3:SetOperation(c47017574.disop)
c:RegisterEffect(e3)
end
c47017574.xyz_number=92
aux.xyz_number[47017574]=92
function c47017574.reccon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:GetFirst():IsControler(tp)
end
......
......@@ -15,7 +15,7 @@ function c47387961.initial_effect(c)
e1:SetOperation(c47387961.operation)
c:RegisterEffect(e1)
end
c47387961.xyz_number=8
aux.xyz_number[47387961]=8
function c47387961.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
......
......@@ -14,7 +14,7 @@ function c47805931.initial_effect(c)
e1:SetOperation(c47805931.operation)
c:RegisterEffect(e1)
end
c47805931.xyz_number=20
aux.xyz_number[47805931]=20
function c47805931.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -23,7 +23,7 @@ function c48739166.initial_effect(c)
e2:SetTarget(c48739166.reptg)
c:RegisterEffect(e2)
end
c48739166.xyz_number=101
aux.xyz_number[48739166]=101
function c48739166.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
......
......@@ -13,7 +13,7 @@ function c48928529.initial_effect(c)
e1:SetOperation(c48928529.operation)
c:RegisterEffect(e1)
end
c48928529.xyz_number=83
aux.xyz_number[48928529]=83
function c48928529.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -25,7 +25,7 @@ function c48995978.initial_effect(c)
e2:SetOperation(c48995978.winop)
c:RegisterEffect(e2)
end
c48995978.xyz_number=88
aux.xyz_number[48995978]=88
function c48995978.filter(c)
return c:GetSequence()<5
end
......
......@@ -16,7 +16,7 @@ function c49032236.initial_effect(c)
e1:SetOperation(c49032236.operation)
c:RegisterEffect(e1)
end
c49032236.xyz_number=81
aux.xyz_number[49032236]=81
function c49032236.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -23,7 +23,7 @@ function c49195710.initial_effect(c)
e2:SetCondition(c49195710.accon)
c:RegisterEffect(e2)
end
c49195710.xyz_number=65
aux.xyz_number[49195710]=65
function c49195710.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -18,7 +18,7 @@ function c49221191.initial_effect(c)
e1:SetOperation(c49221191.operation)
c:RegisterEffect(e1)
end
c49221191.xyz_number=32
aux.xyz_number[49221191]=32
function c49221191.ovfilter(c)
return c:IsFaceup() and c:IsCode(65676461)
end
......
......@@ -28,7 +28,7 @@ function c49456901.initial_effect(c)
e2:SetOperation(c49456901.operation)
c:RegisterEffect(e2)
end
c49456901.xyz_number=104
aux.xyz_number[49456901]=104
function c49456901.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
......
......@@ -24,7 +24,7 @@ function c49678559.initial_effect(c)
e2:SetTarget(c49678559.reptg)
c:RegisterEffect(e2)
end
c49678559.xyz_number=102
aux.xyz_number[49678559]=102
function c49678559.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -30,7 +30,7 @@ function c4997565.initial_effect(c)
e2:SetOperation(c4997565.disop)
c:RegisterEffect(e2)
end
c4997565.xyz_number=3
aux.xyz_number[4997565]=3
function c4997565.spfilter(c,e,tp)
return c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
......
......@@ -30,7 +30,7 @@ function c50260683.initial_effect(c)
e2:SetOperation(c50260683.desop)
c:RegisterEffect(e2)
end
c50260683.xyz_number=36
aux.xyz_number[50260683]=36
function c50260683.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -28,7 +28,7 @@ function c51543904.initial_effect(c)
e2:SetOperation(c51543904.disop)
c:RegisterEffect(e2)
end
c51543904.xyz_number=99
aux.xyz_number[51543904]=99
function c51543904.cfilter(c)
return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
......
......@@ -16,7 +16,7 @@ function c51735257.initial_effect(c)
e1:SetOperation(c51735257.operation)
c:RegisterEffect(e1)
end
c51735257.xyz_number=50
aux.xyz_number[51735257]=50
function c51735257.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0
and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
......@@ -41,7 +41,7 @@ function c52653092.initial_effect(c)
e6:SetOperation(c52653092.actop)
c:RegisterEffect(e6)
end
c52653092.xyz_number=0
aux.xyz_number[52653092]=0
function c52653092.mfilter(c,xyzc)
return c:IsFaceup() and c:IsXyzType(TYPE_XYZ) and c:IsSetCard(0x48)
end
......
......@@ -23,7 +23,7 @@ function c53244294.initial_effect(c)
e2:SetOperation(c53244294.zop)
c:RegisterEffect(e2)
end
c53244294.xyz_number=57
aux.xyz_number[53244294]=57
function c53244294.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
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -28,7 +28,7 @@ function c53701457.initial_effect(c)
e3:SetOperation(c53701457.damop)
c:RegisterEffect(e3)
end
c53701457.xyz_number=28
aux.xyz_number[53701457]=28
function c53701457.dircon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)<=1
end
......
......@@ -28,7 +28,7 @@ function c54191698.initial_effect(c)
e2:SetOperation(c54191698.spop2)
c:RegisterEffect(e2)
end
c54191698.xyz_number=29
aux.xyz_number[54191698]=29
function c54191698.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -33,7 +33,7 @@ function c54366836.initial_effect(c)
e3:SetOperation(c54366836.damop2)
c:RegisterEffect(e3)
end
c54366836.xyz_number=54
aux.xyz_number[54366836]=54
function c54366836.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==tp and c:IsRelateToBattle()
......
......@@ -14,7 +14,7 @@ function c54719828.initial_effect(c)
e1:SetOperation(c54719828.operation)
c:RegisterEffect(e1)
end
c54719828.xyz_number=16
aux.xyz_number[54719828]=16
function c54719828.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -14,7 +14,7 @@ function c55067058.initial_effect(c)
e1:SetOperation(c55067058.rop)
c:RegisterEffect(e1)
end
c55067058.xyz_number=19
aux.xyz_number[55067058]=19
function c55067058.rcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_COST)~=0 and re:IsActivated() and re:IsActiveType(TYPE_XYZ)
and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
......
......@@ -28,7 +28,7 @@ function c55470553.initial_effect(c)
e2:SetOperation(c55470553.spop)
c:RegisterEffect(e2)
end
c55470553.xyz_number=98
aux.xyz_number[55470553]=98
function c55470553.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -14,7 +14,7 @@ function c55727845.initial_effect(c)
e1:SetOperation(c55727845.atkop)
c:RegisterEffect(e1)
end
c55727845.xyz_number=96
aux.xyz_number[55727845]=96
function c55727845.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -16,7 +16,7 @@ function c55888045.initial_effect(c)
e1:SetOperation(c55888045.negop)
c:RegisterEffect(e1)
end
c55888045.xyz_number=106
aux.xyz_number[55888045]=106
function c55888045.negcon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return bit.band(loc,LOCATION_ONFIELD)~=0 and not e:GetHandler():IsStatus(STATUS_CHAINING)
......
......@@ -15,7 +15,7 @@ function c55935416.initial_effect(c)
e1:SetOperation(c55935416.drop)
c:RegisterEffect(e1)
end
c55935416.xyz_number=56
aux.xyz_number[55935416]=56
function c55935416.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -40,7 +40,7 @@ function c56051086.initial_effect(c)
e4:SetOperation(c56051086.damop)
c:RegisterEffect(e4)
end
c56051086.xyz_number=43
aux.xyz_number[56051086]=43
function c56051086.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -34,7 +34,7 @@ function c56292140.initial_effect(c)
e3:SetOperation(c56292140.desop)
c:RegisterEffect(e3)
end
c56292140.xyz_number=51
aux.xyz_number[56292140]=51
function c56292140.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -32,7 +32,7 @@ function c56832966.initial_effect(c)
e3:SetOperation(c56832966.atkop)
c:RegisterEffect(e3)
end
c56832966.xyz_number=39
aux.xyz_number[56832966]=39
function c56832966.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x107f) and c:IsType(TYPE_XYZ) and c:IsRank(4)
end
......
......@@ -14,7 +14,7 @@ function c56840427.initial_effect(c)
e1:SetOperation(c56840427.operation)
c:RegisterEffect(e1)
end
c56840427.xyz_number=39
aux.xyz_number[56840427]=39
function c56840427.ovfilter(c)
return c:IsFaceup() and c:IsCode(84013237)
end
......
......@@ -36,7 +36,7 @@ function c57314798.initial_effect(c)
e4:SetOperation(c57314798.spop)
c:RegisterEffect(e4)
end
c57314798.xyz_number=100
aux.xyz_number[57314798]=100
function c57314798.mfilter(c,xyzc)
return c:IsSetCard(0x48) and c:IsXyzType(TYPE_XYZ)
end
......
......@@ -11,9 +11,7 @@ function c57499304.initial_effect(c)
c:RegisterEffect(e1)
end
function c57499304.filter(c)
local m=_G["c"..c:GetCode()]
if not m then return false end
local no=m.xyz_number
local no=aux.GetXyzNumber(c)
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ)
end
function c57499304.condition(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -23,7 +23,7 @@ function c57707471.initial_effect(c)
e3:SetOperation(c57707471.desop)
c:RegisterEffect(e3)
end
c57707471.xyz_number=21
aux.xyz_number[57707471]=21
function c57707471.ovfilter(c)
return c:IsFaceup() and c:IsXyzType(TYPE_XYZ) and c:IsRank(5)
end
......
......@@ -39,9 +39,7 @@ function c57734012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(57734012)~=0 end
end
function c57734012.filter1(c,e,tp)
local m=_G["c"..c:GetCode()]
if not m then return false end
local no=m.xyz_number
local no=aux.GetXyzNumber(c)
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and not c:IsSetCard(0x1048)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -49,7 +47,7 @@ function c57734012.filter1(c,e,tp)
and Duel.IsExistingMatchingCard(c57734012.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,no)
end
function c57734012.filter2(c,e,tp,mc,no)
return c.xyz_number==no and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c)
return aux.GetXyzNumber(c)==no and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c57734012.target(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -78,10 +76,9 @@ function c57734012.activate(e,tp,eg,ep,ev,re,r,rp)
local tc1=g1:GetFirst()
if tc1 and Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP)~=0 then
if not aux.MustMaterialCheck(tc1,tp,EFFECT_MUST_BE_XMATERIAL) then return end
local m=_G["c"..tc1:GetCode()]
if not m then return end
local no=aux.GetXyzNumber(tc1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c57734012.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc1,m.xyz_number)
local g2=Duel.SelectMatchingCard(tp,c57734012.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc1,no)
local tc2=g2:GetFirst()
if tc2 then
Duel.BreakEffect()
......
......@@ -31,7 +31,7 @@ function c58820923.initial_effect(c)
e3:SetOperation(c58820923.atkop)
c:RegisterEffect(e3)
end
c58820923.xyz_number=95
aux.xyz_number[58820923]=95
function c58820923.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x107b) and c:IsType(TYPE_XYZ)
end
......
......@@ -24,7 +24,7 @@ function c59479050.initial_effect(c)
e2:SetOperation(c59479050.tdop)
c:RegisterEffect(e2)
end
c59479050.xyz_number=71
aux.xyz_number[59479050]=71
function c59479050.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()>0
end
......
......@@ -16,7 +16,7 @@ function c59627393.initial_effect(c)
e1:SetOperation(c59627393.operation)
c:RegisterEffect(e1)
end
c59627393.xyz_number=105
aux.xyz_number[59627393]=105
function c59627393.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget()
......
......@@ -18,9 +18,7 @@ function c60158866.initial_effect(c)
c:RegisterEffect(e2)
end
function c60158866.filter(c)
local m=_G["c"..c:GetCode()]
if not m then return false end
local no=m.xyz_number
local no=aux.GetXyzNumber(c)
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ)
end
function c60158866.cfilter(c)
......
......@@ -31,9 +31,7 @@ function c61374414.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c61374414.spfilter(c,e,tp,mc)
local m=_G["c"..c:GetCode()]
if not m then return false end
local no=m.xyz_number
local no=aux.GetXyzNumber(c)
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
......
......@@ -38,7 +38,7 @@ function c6165656.initial_effect(c)
e4:SetOperation(c6165656.winop)
c:RegisterEffect(e4)
end
c6165656.xyz_number=88
aux.xyz_number[6165656]=88
--target check is in RUM magic cards
function c6165656.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x95) and se:GetHandler():IsType(TYPE_SPELL)
......
......@@ -18,7 +18,7 @@ function c62070231.initial_effect(c)
e1:SetOperation(c62070231.operation)
c:RegisterEffect(e1)
end
c62070231.xyz_number=94
aux.xyz_number[62070231]=94
function c62070231.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -16,7 +16,7 @@ function c62517849.initial_effect(c)
e1:SetOperation(c62517849.spop)
c:RegisterEffect(e1)
end
c62517849.xyz_number=39
aux.xyz_number[62517849]=39
function c62517849.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
......@@ -23,7 +23,7 @@ function c62541668.initial_effect(c)
e2:SetTarget(c62541668.reptg)
c:RegisterEffect(e2)
end
c62541668.xyz_number=77
aux.xyz_number[62541668]=77
function c62541668.ovfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ) and c:IsRank(10,11)
end
......
......@@ -70,7 +70,7 @@ function c63504681.initial_effect(c)
e8:SetLabel(5)
c:RegisterEffect(e8)
end
c63504681.xyz_number=86
aux.xyz_number[63504681]=86
function c63504681.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
......
......@@ -16,7 +16,7 @@ function c63746411.initial_effect(c)
e1:SetOperation(c63746411.operation)
c:RegisterEffect(e1)
end
c63746411.xyz_number=106
aux.xyz_number[63746411]=106
function c63746411.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE
......
......@@ -38,7 +38,7 @@ function c63767246.initial_effect(c)
e3:SetOperation(c63767246.atkop)
c:RegisterEffect(e3)
end
c63767246.xyz_number=38
aux.xyz_number[63767246]=38
function c63767246.discon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return bit.band(loc,LOCATION_SZONE)~=0
......
......@@ -24,7 +24,7 @@ function c6387204.initial_effect(c)
e2:SetOperation(c6387204.lpop)
c:RegisterEffect(e2)
end
c6387204.xyz_number=6
aux.xyz_number[6387204]=6
function c6387204.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 chkc:IsAbleToChangeControler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
......@@ -18,7 +18,7 @@ function c64554883.initial_effect(c)
e1:SetOperation(c64554883.operation)
c:RegisterEffect(e1)
end
c64554883.xyz_number=25
aux.xyz_number[64554883]=25
function c64554883.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -38,7 +38,7 @@ function c65305468.initial_effect(c)
e7:SetTarget(c65305468.reptg)
c:RegisterEffect(e7)
end
c65305468.xyz_number=0
aux.xyz_number[65305468]=0
function c65305468.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ) and not c:IsSetCard(0x48)
end
......
......@@ -16,7 +16,7 @@ function c65676461.initial_effect(c)
e1:SetOperation(c65676461.atop)
c:RegisterEffect(e1)
end
c65676461.xyz_number=32
aux.xyz_number[65676461]=32
function c65676461.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
......
......@@ -37,7 +37,7 @@ function c66011101.initial_effect(c)
e3:SetOperation(c66011101.operation3)
c:RegisterEffect(e3)
end
c66011101.xyz_number=60
aux.xyz_number[66011101]=60
function c66011101.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
......
......@@ -35,7 +35,7 @@ function c66547759.initial_effect(c)
e3:SetOperation(c66547759.disop)
c:RegisterEffect(e3)
end
c66547759.xyz_number=23
aux.xyz_number[66547759]=23
function c66547759.dacon(e)
return e:GetHandler():GetOverlayCount()>0
end
......
......@@ -28,7 +28,7 @@ function c66970002.initial_effect(c)
e2:SetOperation(c66970002.desop)
c:RegisterEffect(e2)
end
c66970002.xyz_number=39
aux.xyz_number[66970002]=39
function c66970002.tdcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
......
......@@ -35,7 +35,7 @@ function c67173574.initial_effect(c)
e3:SetOperation(c67173574.operation)
c:RegisterEffect(e3)
end
c67173574.xyz_number=102
aux.xyz_number[67173574]=102
function c67173574.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_EFFECT) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
......
......@@ -44,7 +44,7 @@ function c67557908.initial_effect(c)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
c67557908.xyz_number=4
aux.xyz_number[67557908]=4
function c67557908.descon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
......
......@@ -23,10 +23,7 @@ function c67926903.initial_effect(c)
c:RegisterEffect(e2)
end
function c67926903.ovfilter(c)
local code=c:GetCode()
local class=_G["c"..code]
if class==nil then return false end
local no=class.xyz_number
local no=aux.GetXyzNumber(c)
return c:IsFaceup() and no and no>=101 and no<=107 and c:IsSetCard(0x1048)
end
function c67926903.atkval(e,c)
......
......@@ -23,7 +23,7 @@ function c68396121.initial_effect(c)
e2:SetOperation(c68396121.atkop)
c:RegisterEffect(e2)
end
c68396121.xyz_number=107
aux.xyz_number[68396121]=107
function c68396121.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -30,7 +30,8 @@ function c68679595.initial_effect(c)
e2:SetOperation(c68679595.disop)
c:RegisterEffect(e2)
end
c68679595.xyz_number=39
aux.xyz_number[68679595]=39
aux.xyz_number[56840427]=39
function c68679595.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -35,7 +35,7 @@ function c69058960.initial_effect(c)
e4:SetValue(1)
c:RegisterEffect(e4)
end
c69058960.xyz_number=13
aux.xyz_number[69058960]=13
function c69058960.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -24,7 +24,7 @@ function c69170557.initial_effect(c)
e2:SetOperation(c69170557.ctop)
c:RegisterEffect(e2)
end
c69170557.xyz_number=40
aux.xyz_number[69170557]=40
function c69170557.desfilter(c)
return c:GetCounter(0x1024)~=0
end
......
......@@ -20,7 +20,7 @@ function c69610924.initial_effect(c)
e2:SetCondition(c69610924.dircon)
c:RegisterEffect(e2)
end
c69610924.xyz_number=17
aux.xyz_number[69610924]=17
function c69610924.dircon(e)
return e:GetHandler():GetOverlayCount()==0
end
......
......@@ -33,7 +33,7 @@ function c69757518.initial_effect(c)
e3:SetOperation(c69757518.operation)
c:RegisterEffect(e3)
end
c69757518.xyz_number=5
aux.xyz_number[69757518]=5
function c69757518.atkval(e,c)
return c:GetOverlayCount()*1000
end
......
......@@ -26,7 +26,7 @@ function c71166481.initial_effect(c)
e2:SetOperation(c71166481.xop)
c:RegisterEffect(e2)
end
c71166481.xyz_number=75
aux.xyz_number[71166481]=75
function c71166481.chcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and rp==1-tp
end
......
......@@ -32,7 +32,7 @@ function c71921856.initial_effect(c)
e3:SetOperation(c71921856.spop)
c:RegisterEffect(e3)
end
c71921856.xyz_number=79
aux.xyz_number[71921856]=79
function c71921856.filter(c)
return c:IsSetCard(0x84) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end
......
......@@ -30,7 +30,7 @@ function c7194917.initial_effect(c)
e3:SetOperation(c7194917.posop2)
c:RegisterEffect(e3)
end
c7194917.xyz_number=52
aux.xyz_number[7194917]=52
function c7194917.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -25,7 +25,7 @@ function c73445448.initial_effect(c)
e2:SetOperation(c73445448.operation)
c:RegisterEffect(e2)
end
c73445448.xyz_number=22
aux.xyz_number[73445448]=22
function c73445448.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
......
......@@ -16,7 +16,7 @@ function c75253697.initial_effect(c)
e1:SetOperation(c75253697.desop)
c:RegisterEffect(e1)
end
c75253697.xyz_number=72
aux.xyz_number[75253697]=72
function c75253697.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
......
......@@ -33,7 +33,8 @@ function c75402014.initial_effect(c)
e3:SetOperation(c75402014.disop)
c:RegisterEffect(e3)
end
c75402014.xyz_number=39
aux.xyz_number[75402014]=39
aux.xyz_number[56840427]=39
function c75402014.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
......
......@@ -25,7 +25,7 @@ function c75433814.initial_effect(c)
e2:SetOperation(c75433814.desop)
c:RegisterEffect(e2)
end
c75433814.xyz_number=40
aux.xyz_number[75433814]=40
function c75433814.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -30,7 +30,7 @@ function c76067258.initial_effect(c)
e3:SetTarget(c76067258.reptg)
c:RegisterEffect(e3)
end
c76067258.xyz_number=66
aux.xyz_number[76067258]=66
function c76067258.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -28,7 +28,7 @@ function c77205367.initial_effect(c)
e3:SetOperation(c77205367.atkop)
c:RegisterEffect(e3)
end
c77205367.xyz_number=96
aux.xyz_number[77205367]=96
function c77205367.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,55727845)
end
......
......@@ -21,7 +21,7 @@ function c78625448.initial_effect(c)
e2:SetOperation(c78625448.atkop)
c:RegisterEffect(e2)
end
c78625448.xyz_number=3
aux.xyz_number[78625448]=3
function c78625448.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -33,7 +33,7 @@ function c79747096.initial_effect(c)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
c79747096.xyz_number=1
aux.xyz_number[79747096]=1
function c79747096.ovfilter(c)
return c:IsFaceup() and c:IsCode(15232745)
end
......
......@@ -16,7 +16,7 @@ function c80117527.initial_effect(c)
e1:SetOperation(c80117527.operation)
c:RegisterEffect(e1)
end
c80117527.xyz_number=11
aux.xyz_number[80117527]=11
function c80117527.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and e:GetHandler():GetAttackAnnouncedCount()==0 end
......
......@@ -16,7 +16,7 @@ function c80764541.initial_effect(c)
e1:SetOperation(c80764541.desop)
c:RegisterEffect(e1)
end
c80764541.xyz_number=44
aux.xyz_number[80764541]=44
function c80764541.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -25,7 +25,7 @@ function c80796456.initial_effect(c)
e2:SetOperation(c80796456.atkop)
c:RegisterEffect(e2)
end
c80796456.xyz_number=70
aux.xyz_number[80796456]=70
function c80796456.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -30,7 +30,7 @@ function c81330115.initial_effect(c)
e3:SetTargetRange(1,0)
c:RegisterEffect(e3)
end
c81330115.xyz_number=30
aux.xyz_number[81330115]=30
function c81330115.atcon(e)
return e:GetHandler():GetOverlayCount()==0
end
......
......@@ -39,7 +39,7 @@ function c8165596.initial_effect(c)
e3:SetOperation(c8165596.operation)
c:RegisterEffect(e3)
end
c8165596.xyz_number=90
aux.xyz_number[8165596]=90
function c8165596.indcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x55)
end
......
......@@ -14,7 +14,7 @@ function c82308875.initial_effect(c)
e1:SetOperation(c82308875.operation)
c:RegisterEffect(e1)
end
c82308875.xyz_number=7
aux.xyz_number[82308875]=7
c82308875.toss_dice=true
function c82308875.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
......@@ -25,7 +25,7 @@ function c82697249.initial_effect(c)
e2:SetOperation(c82697249.desop)
c:RegisterEffect(e2)
end
c82697249.xyz_number=59
aux.xyz_number[82697249]=59
function c82697249.imcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==1
end
......
......@@ -30,7 +30,7 @@ function c8387138.initial_effect(c)
e3:SetTarget(c8387138.reptg)
c:RegisterEffect(e3)
end
c8387138.xyz_number=27
aux.xyz_number[8387138]=27
function c8387138.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(8387138,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
end
......
......@@ -64,9 +64,7 @@ function c83888009.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c83888009.ovfilter(c)
local m=_G["c"..c:GetCode()]
if not m then return false end
local no=m.xyz_number
local no=aux.GetXyzNumber(c)
return no and no>=101 and no<=107 and c:IsType(TYPE_XYZ) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c83888009.damop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -23,7 +23,7 @@ function c84013237.initial_effect(c)
e2:SetOperation(c84013237.desop)
c:RegisterEffect(e2)
end
c84013237.xyz_number=39
aux.xyz_number[84013237]=39
function c84013237.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -14,7 +14,7 @@ function c84124261.initial_effect(c)
e1:SetOperation(c84124261.atkop)
c:RegisterEffect(e1)
end
c84124261.xyz_number=39
aux.xyz_number[84124261]=39
function c84124261.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -26,7 +26,7 @@ function c84417082.initial_effect(c)
e2:SetOperation(c84417082.operation2)
c:RegisterEffect(e2)
end
c84417082.xyz_number=91
aux.xyz_number[84417082]=91
function c84417082.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
......
......@@ -28,7 +28,7 @@ function c85121942.initial_effect(c)
e2:SetOperation(c85121942.desop)
c:RegisterEffect(e2)
end
c85121942.xyz_number=105
aux.xyz_number[85121942]=105
function c85121942.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
......
......@@ -16,7 +16,7 @@ function c86532744.initial_effect(c)
e1:SetOperation(c86532744.operation)
c:RegisterEffect(e1)
end
c86532744.xyz_number=39
aux.xyz_number[86532744]=39
function c86532744.ovfilter(c)
return c:IsFaceup() and c:IsCode(84013237)
end
......
......@@ -24,7 +24,7 @@ function c87911394.initial_effect(c)
e2:SetOperation(c87911394.atkop)
c:RegisterEffect(e2)
end
c87911394.xyz_number=39
aux.xyz_number[87911394]=39
function c87911394.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
......
......@@ -17,7 +17,7 @@ function c88120966.initial_effect(c)
e1:SetOperation(c88120966.operation)
c:RegisterEffect(e1)
end
c88120966.xyz_number=15
aux.xyz_number[88120966]=15
function c88120966.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
......
......@@ -24,7 +24,7 @@ function c88177324.initial_effect(c)
e2:SetOperation(c88177324.regop)
c:RegisterEffect(e2)
end
c88177324.xyz_number=107
aux.xyz_number[88177324]=107
function c88177324.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
......
......@@ -39,7 +39,7 @@ function c89477759.initial_effect(c)
e3:SetOperation(c89477759.spop)
c:RegisterEffect(e3)
end
c89477759.xyz_number=1000
aux.xyz_number[89477759]=1000
function c89477759.descost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -42,7 +42,7 @@ function c89516305.initial_effect(c)
e3:SetOperation(c89516305.atkop)
c:RegisterEffect(e3)
end
c89516305.xyz_number=87
aux.xyz_number[89516305]=87
function c89516305.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
......
......@@ -14,7 +14,7 @@ function c89642993.initial_effect(c)
e1:SetOperation(c89642993.efop)
c:RegisterEffect(e1)
end
c89642993.xyz_number=63
aux.xyz_number[89642993]=63
function c89642993.efcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -44,7 +44,7 @@ function c90126061.initial_effect(c)
e4:SetOperation(c90126061.retop)
c:RegisterEffect(e4)
end
c90126061.xyz_number=5
aux.xyz_number[90126061]=5
function c90126061.atkval(e,c)
return c:GetOverlayCount()*1000
end
......
......@@ -34,7 +34,7 @@ function c90162951.initial_effect(c)
e4:SetOperation(c90162951.desop)
c:RegisterEffect(e4)
end
c90162951.xyz_number=35
aux.xyz_number[90162951]=35
function c90162951.val(e,c)
return math.abs(Duel.GetLP(0)-Duel.GetLP(1))
end
......
......@@ -45,7 +45,7 @@ function c90590303.initial_effect(c)
e5:SetOperation(c90590303.disop)
c:RegisterEffect(e5)
end
c90590303.xyz_number=41
aux.xyz_number[90590303]=41
function c90590303.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
......
......@@ -24,7 +24,7 @@ function c9161357.initial_effect(c)
e2:SetOperation(c9161357.lpop)
c:RegisterEffect(e2)
end
c9161357.xyz_number=6
aux.xyz_number[9161357]=6
function c9161357.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
......
......@@ -40,7 +40,7 @@ function c92015800.initial_effect(c)
e4:SetOperation(c92015800.xyzop)
c:RegisterEffect(e4)
end
c92015800.xyz_number=76
aux.xyz_number[92015800]=76
function c92015800.effilter(c)
return c:IsType(TYPE_MONSTER)
end
......
......@@ -35,8 +35,8 @@ function c92362073.atkcon(e,tp,eg,ep,ev,re,r,rp)
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c92362073.atkfilter(c)
local m=_G["c"..c:GetCode()]
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) and m and m.xyz_number
local no=aux.GetXyzNumber(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) and no
and c:GetOriginalAttribute()==ATTRIBUTE_LIGHT and c:GetOriginalRace()==RACE_DRAGON
end
function c92362073.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......@@ -48,9 +48,8 @@ end
function c92362073.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local m=_G["c"..tc:GetCode()]
if m and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local no=m.xyz_number
local no=aux.GetXyzNumber(tc)
if no and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......
......@@ -32,7 +32,7 @@ function c93108839.initial_effect(c)
e3:SetOperation(c93108839.damop)
c:RegisterEffect(e3)
end
c93108839.xyz_number=58
aux.xyz_number[93108839]=58
function c93108839.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
......
......@@ -65,14 +65,14 @@ function c93238626.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c93238626.filter(c,e,tp,mc,no)
return c.xyz_number==no and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c)
return aux.GetXyzNumber(c)==no and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c93238626.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local at=Duel.GetAttackTarget()
local m=_G["c"..at:GetCode()]
return m and m.xyz_number and Duel.IsExistingMatchingCard(c93238626.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,at,m.xyz_number)
local no=aux.GetXyzNumber(at)
return no and Duel.IsExistingMatchingCard(c93238626.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,at,no)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
......@@ -80,10 +80,10 @@ function c93238626.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateAttack() then return end
local tc=Duel.GetAttackTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
local m=_G["c"..tc:GetCode()]
if tc:IsFacedown() or not tc:IsRelateToBattle() or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or not m then return end
local no=aux.GetXyzNumber(tc)
if tc:IsFacedown() or not tc:IsRelateToBattle() or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or not no then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c93238626.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,m.xyz_number)
local g=Duel.SelectMatchingCard(tp,c93238626.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,no)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
......
......@@ -26,7 +26,7 @@ function c93568288.initial_effect(c)
e2:SetOperation(c93568288.rmop)
c:RegisterEffect(e2)
end
c93568288.xyz_number=80
aux.xyz_number[93568288]=80
function c93568288.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
......
......@@ -40,7 +40,7 @@ function c93713837.initial_effect(c)
e4:SetOperation(c93713837.tgop)
c:RegisterEffect(e4)
end
c93713837.xyz_number=24
aux.xyz_number[93713837]=24
function c93713837.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -29,7 +29,7 @@ function s.initial_effect(c)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
end
s.xyz_number=39
aux.xyz_number[93777634]=39
function s.spfilter(c,e,tp)
return c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and not c:IsCode(id)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
......
......@@ -18,7 +18,7 @@ function c94380860.initial_effect(c)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e1)
end
c94380860.xyz_number=103
aux.xyz_number[94380860]=103
function c94380860.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -36,7 +36,7 @@ function c95134948.initial_effect(c)
Duel.RegisterEffect(ge1,0)
end
end
c95134948.xyz_number=99
aux.xyz_number[95134948]=99
function c95134948.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_XYZ)
end
......@@ -87,7 +87,7 @@ function c95134948.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
function c95134948.spfilter(c,e,tp)
local no=c.xyz_number
local no=aux.GetXyzNumber(c)
return no and no>=1 and no<=100 and c:IsSetCard(0x48)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
......
......@@ -35,7 +35,7 @@ function c95442074.initial_effect(c)
e4:SetValue(1)
c:RegisterEffect(e4)
end
c95442074.xyz_number=31
aux.xyz_number[95442074]=31
function c95442074.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -47,7 +47,7 @@ function c95474755.initial_effect(c)
e4:SetOperation(c95474755.dkop)
c:RegisterEffect(e4)
end
c95474755.xyz_number=89
aux.xyz_number[95474755]=89
function c95474755.excost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -24,7 +24,7 @@ function c96864105.initial_effect(c)
e2:SetValue(1)
c:RegisterEffect(e2)
end
c96864105.xyz_number=73
aux.xyz_number[96864105]=73
function c96864105.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
......
......@@ -56,7 +56,7 @@ function c97403510.initial_effect(c)
Duel.RegisterEffect(ge1,0)
end
end
c97403510.xyz_number=92
aux.xyz_number[97403510]=92
function c97403510.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
......
......@@ -45,6 +45,15 @@ function bit.replace(r,v,field,width)
return (r&~(m<<f))|((v&m)<< f)
end
--the table of xyz number
Auxiliary.xyz_number={}
function Auxiliary.GetXyzNumber(v)
local id
if Auxiliary.GetValueType(v)=="Card" then id=v:GetCode() end
if Auxiliary.GetValueType(v)=="number" then id=v end
return Auxiliary.xyz_number[id]
end
--the chain id of the results modified by EVENT_TOSS_DICE_NEGATE
Auxiliary.dice_chain_id=0
Auxiliary.idx_table=table.pack(1,2,3,4,5,6,7,8)
......
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