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) ...@@ -15,7 +15,7 @@ function c10389142.initial_effect(c)
e1:SetOperation(c10389142.spop) e1:SetOperation(c10389142.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c10389142.xyz_number=42 aux.xyz_number[10389142]=42
function c10389142.spcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
......
...@@ -15,7 +15,7 @@ function c11411223.initial_effect(c) ...@@ -15,7 +15,7 @@ function c11411223.initial_effect(c)
e1:SetOperation(c11411223.operation) e1:SetOperation(c11411223.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c11411223.xyz_number=10 aux.xyz_number[11411223]=10
function c11411223.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -27,7 +27,7 @@ function c11522979.initial_effect(c) ...@@ -27,7 +27,7 @@ function c11522979.initial_effect(c)
e2:SetOperation(c11522979.operation) e2:SetOperation(c11522979.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c11522979.xyz_number=69 aux.xyz_number[11522979]=69
function c11522979.descon(e,tp,eg,ep,ev,re,r,rp) function c11522979.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) return Duel.GetAttacker():IsControler(1-tp)
end end
......
...@@ -25,7 +25,7 @@ function c12744567.initial_effect(c) ...@@ -25,7 +25,7 @@ function c12744567.initial_effect(c)
e2:SetOperation(c12744567.spop) e2:SetOperation(c12744567.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c12744567.xyz_number=101 aux.xyz_number[12744567]=101
function c12744567.filter(c) function c12744567.filter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsCanOverlay() return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsCanOverlay()
end end
......
...@@ -35,7 +35,7 @@ function c1426714.initial_effect(c) ...@@ -35,7 +35,7 @@ function c1426714.initial_effect(c)
e3:SetValue(c1426714.atkval) e3:SetValue(c1426714.atkval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c1426714.xyz_number=48 aux.xyz_number[1426714]=48
function c1426714.spcon(e,tp,eg,ep,ev,re,r,rp) function c1426714.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
......
...@@ -21,7 +21,7 @@ function c15232745.initial_effect(c) ...@@ -21,7 +21,7 @@ function c15232745.initial_effect(c)
e2:SetOperation(c15232745.atkop) e2:SetOperation(c15232745.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c15232745.xyz_number=1 aux.xyz_number[15232745]=1
function c15232745.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -24,7 +24,7 @@ function c15862758.initial_effect(c) ...@@ -24,7 +24,7 @@ function c15862758.initial_effect(c)
e2:SetOperation(c15862758.naop) e2:SetOperation(c15862758.naop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c15862758.xyz_number=1000 aux.xyz_number[15862758]=1000
function c15862758.condition(e,tp,eg,ep,ev,re,r,rp) function c15862758.condition(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(89477759) return re and re:GetHandler():IsCode(89477759)
end end
......
...@@ -17,7 +17,7 @@ function c16037007.initial_effect(c) ...@@ -17,7 +17,7 @@ function c16037007.initial_effect(c)
e1:SetOperation(c16037007.disop) e1:SetOperation(c16037007.disop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c16037007.xyz_number=74 aux.xyz_number[16037007]=74
function c16037007.discon(e,tp,eg,ep,ev,re,r,rp) function c16037007.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) 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) ...@@ -45,7 +45,7 @@ function c16259549.initial_effect(c)
e4:SetOperation(c16259549.tdop) e4:SetOperation(c16259549.tdop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c16259549.xyz_number=49 aux.xyz_number[16259549]=49
function c16259549.reccon(e,tp,eg,ep,ev,re,r,rp) function c16259549.reccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
......
...@@ -14,7 +14,7 @@ function c19333131.initial_effect(c) ...@@ -14,7 +14,7 @@ function c19333131.initial_effect(c)
e1:SetOperation(c19333131.operation) e1:SetOperation(c19333131.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c19333131.xyz_number=12 aux.xyz_number[19333131]=12
function c19333131.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -35,7 +35,7 @@ function c1992816.initial_effect(c) ...@@ -35,7 +35,7 @@ function c1992816.initial_effect(c)
e3:SetOperation(c1992816.daop) e3:SetOperation(c1992816.daop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c1992816.xyz_number=9 aux.xyz_number[1992816]=9
function c1992816.atkcon(e,tp,eg,ep,ev,re,r,rp) function c1992816.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler()==Duel.GetAttackTarget() and e:GetHandler():GetOverlayCount()~=0 return e:GetHandler()==Duel.GetAttackTarget() and e:GetHandler():GetOverlayCount()~=0
end end
......
...@@ -26,7 +26,7 @@ function c20563387.initial_effect(c) ...@@ -26,7 +26,7 @@ function c20563387.initial_effect(c)
e2:SetOperation(c20563387.rmop) e2:SetOperation(c20563387.rmop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c20563387.xyz_number=80 aux.xyz_number[20563387]=80
function c20563387.filter(c) function c20563387.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
end end
......
...@@ -27,7 +27,7 @@ function c2061963.initial_effect(c) ...@@ -27,7 +27,7 @@ function c2061963.initial_effect(c)
e2:SetOperation(c2061963.deckop) e2:SetOperation(c2061963.deckop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c2061963.xyz_number=104 aux.xyz_number[2061963]=104
function c2061963.condition(e,tp,eg,ep,ev,re,r,rp,chk) function c2061963.condition(e,tp,eg,ep,ev,re,r,rp,chk)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp
......
...@@ -28,7 +28,7 @@ function c20785975.initial_effect(c) ...@@ -28,7 +28,7 @@ function c20785975.initial_effect(c)
e2:SetOperation(c20785975.spop) e2:SetOperation(c20785975.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c20785975.xyz_number=103 aux.xyz_number[20785975]=103
function c20785975.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -18,10 +18,7 @@ function c20994205.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -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) and Duel.IsExistingMatchingCard(c20994205.cfilter,tp,0,LOCATION_MZONE,1,nil)
end end
function c20994205.nofilter(c) function c20994205.nofilter(c)
local m=_G["c"..c:GetCode()] return aux.GetXyzNumber(c)
if not m then return c.xyz_number end
local no=m.xyz_number
return no
end end
function c20994205.spfilter(c,e,tp) function c20994205.spfilter(c,e,tp)
if not c20994205.nofilter(c) then return end if not c20994205.nofilter(c) then return end
...@@ -30,7 +27,7 @@ function c20994205.spfilter(c,e,tp) ...@@ -30,7 +27,7 @@ function c20994205.spfilter(c,e,tp)
and g:CheckSubGroup(c20994205.fselect,4,4,c) and g:CheckSubGroup(c20994205.fselect,4,4,c)
end end
function c20994205.fselect(sg,c) 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 and sg:Filter(Card.IsCanBeXyzMaterial,nil,c):GetCount()==4
end end
function c20994205.target(e,tp,eg,ep,ev,re,r,rp,chk) function c20994205.target(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -43,7 +40,7 @@ function c20994205.gselect(sg,e,tp) ...@@ -43,7 +40,7 @@ function c20994205.gselect(sg,e,tp)
return g:IsExists(c20994205.spfilter2,1,nil,sg,e,tp) return g:IsExists(c20994205.spfilter2,1,nil,sg,e,tp)
end end
function c20994205.spfilter2(c,sg,e,tp) 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 sg:Filter(Card.IsCanBeXyzMaterial,nil,c):GetCount()==4
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
......
...@@ -23,7 +23,7 @@ function c21313376.initial_effect(c) ...@@ -23,7 +23,7 @@ function c21313376.initial_effect(c)
e2:SetOperation(c21313376.desop) e2:SetOperation(c21313376.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c21313376.xyz_number=14 aux.xyz_number[21313376]=14
function c21313376.refcon(e,re,val,r,rp,rc) function c21313376.refcon(e,re,val,r,rp,rc)
return bit.band(r,REASON_EFFECT)~=0 and rp==1-e:GetHandlerPlayer() return bit.band(r,REASON_EFFECT)~=0 and rp==1-e:GetHandlerPlayer()
end end
......
...@@ -26,7 +26,7 @@ function c21521304.initial_effect(c) ...@@ -26,7 +26,7 @@ function c21521304.initial_effect(c)
e2:SetOperation(c21521304.spop) e2:SetOperation(c21521304.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c21521304.xyz_number=39 aux.xyz_number[21521304]=39
function c21521304.atkcon(e,tp,eg,ep,ev,re,r,rp) function c21521304.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
......
...@@ -24,7 +24,7 @@ function c23085002.initial_effect(c) ...@@ -24,7 +24,7 @@ function c23085002.initial_effect(c)
e3:SetOperation(c23085002.operation) e3:SetOperation(c23085002.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c23085002.xyz_number=68 aux.xyz_number[23085002]=68
function c23085002.value(e,c) function c23085002.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)*100 return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)*100
end end
......
...@@ -26,7 +26,7 @@ function c23187256.initial_effect(c) ...@@ -26,7 +26,7 @@ function c23187256.initial_effect(c)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c23187256.xyz_number=93 aux.xyz_number[23187256]=93
function c23187256.mfilter(c,xyzc) function c23187256.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ) and c:IsSetCard(0x48) and c:GetOverlayCount()>0 return c:IsXyzType(TYPE_XYZ) and c:IsSetCard(0x48) and c:GetOverlayCount()>0
end end
......
...@@ -26,7 +26,7 @@ function c23649496.initial_effect(c) ...@@ -26,7 +26,7 @@ function c23649496.initial_effect(c)
e2:SetOperation(c23649496.tgop) e2:SetOperation(c23649496.tgop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c23649496.xyz_number=18 aux.xyz_number[23649496]=18
function c23649496.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c23649496.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(23649496)==0 end 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) ...@@ -31,7 +31,7 @@ function c23998625.initial_effect(c)
e3:SetOperation(c23998625.spop) e3:SetOperation(c23998625.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c23998625.xyz_number=53 aux.xyz_number[23998625]=53
function c23998625.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function c23998625.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetCard(Duel.GetAttacker()) Duel.SetTargetCard(Duel.GetAttacker())
......
...@@ -21,7 +21,7 @@ function c2407234.initial_effect(c) ...@@ -21,7 +21,7 @@ function c2407234.initial_effect(c)
e2:SetOperation(c2407234.operation) e2:SetOperation(c2407234.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c2407234.xyz_number=69 aux.xyz_number[2407234]=69
function c2407234.negfilter(c) function c2407234.negfilter(c)
return aux.NegateMonsterFilter(c) and c:IsType(TYPE_XYZ) return aux.NegateMonsterFilter(c) and c:IsType(TYPE_XYZ)
end end
......
...@@ -38,7 +38,7 @@ function c26556950.initial_effect(c) ...@@ -38,7 +38,7 @@ function c26556950.initial_effect(c)
e4:SetOperation(c26556950.desop) e4:SetOperation(c26556950.desop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c26556950.xyz_number=84 aux.xyz_number[26556950]=84
function c26556950.ovfilter(c) function c26556950.ovfilter(c)
local rk=c:GetRank() 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 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) ...@@ -29,7 +29,7 @@ function c26973555.initial_effect(c)
e3:SetOperation(c26973555.disop) e3:SetOperation(c26973555.disop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c26973555.xyz_number=0 aux.xyz_number[26973555]=0
function c26973555.mfilter(c,xyzc) function c26973555.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ) and not c:IsSetCard(0x48) return c:IsXyzType(TYPE_XYZ) and not c:IsSetCard(0x48)
end end
......
...@@ -23,7 +23,7 @@ function c28400508.initial_effect(c) ...@@ -23,7 +23,7 @@ function c28400508.initial_effect(c)
e2:SetOperation(c28400508.spop) e2:SetOperation(c28400508.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c28400508.xyz_number=97 aux.xyz_number[28400508]=97
function c28400508.spcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -16,13 +16,13 @@ function c29085954.initial_effect(c) ...@@ -16,13 +16,13 @@ function c29085954.initial_effect(c)
e1:SetOperation(c29085954.spop) e1:SetOperation(c29085954.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c29085954.xyz_number=78 aux.xyz_number[29085954]=78
function c29085954.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c29085954.filter(c,e,tp,mc) 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) return no and no>=1 and no<=99 and c:IsSetCard(0x48)
and mc:IsCanBeXyzMaterial(c) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 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) ...@@ -26,7 +26,7 @@ function c29208536.initial_effect(c)
e3:SetValue(c29208536.aclimit) e3:SetValue(c29208536.aclimit)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c29208536.xyz_number=45 aux.xyz_number[29208536]=45
function c29208536.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -16,7 +16,7 @@ function c29669359.initial_effect(c) ...@@ -16,7 +16,7 @@ function c29669359.initial_effect(c)
e1:SetOperation(c29669359.operation) e1:SetOperation(c29669359.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c29669359.xyz_number=61 aux.xyz_number[29669359]=61
function c29669359.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c29669359.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and not e:GetHandler():IsDirectAttacked() end and not e:GetHandler():IsDirectAttacked() end
......
...@@ -39,7 +39,7 @@ function c2978414.initial_effect(c) ...@@ -39,7 +39,7 @@ function c2978414.initial_effect(c)
e3:SetOperation(c2978414.efop) e3:SetOperation(c2978414.efop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c2978414.xyz_number=46 aux.xyz_number[2978414]=46
function c2978414.condition(e,tp,eg,ep,ev,re,r,rp) function c2978414.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1
end end
......
...@@ -36,10 +36,8 @@ function s.initial_effect(c) ...@@ -36,10 +36,8 @@ function s.initial_effect(c)
end end
function s.immtg(e,c) function s.immtg(e,c)
if c:IsSetCard(0x1073,0x1048) then return true end if c:IsSetCard(0x1073,0x1048) then return true end
local m=_G["c"..c:GetCode()] local no=aux.GetXyzNumber(c)
if not c:IsSetCard(0x48) or not m then return false end return c:IsSetCard(0x48) and no and no>=101 and no<=107
local no=m.xyz_number
return no and no>=101 and no<=107
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsType(TYPE_XYZ)
......
...@@ -24,7 +24,7 @@ function c31320433.initial_effect(c) ...@@ -24,7 +24,7 @@ function c31320433.initial_effect(c)
e2:SetOperation(c31320433.daop) e2:SetOperation(c31320433.daop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c31320433.xyz_number=47 aux.xyz_number[31320433]=47
function c31320433.matfilter(c,e) 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)) 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 end
......
...@@ -23,7 +23,7 @@ function c31437713.initial_effect(c) ...@@ -23,7 +23,7 @@ function c31437713.initial_effect(c)
e2:SetOperation(c31437713.operation) e2:SetOperation(c31437713.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c31437713.xyz_number=82 aux.xyz_number[31437713]=82
function c31437713.filter(c) function c31437713.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL) return c:IsFaceup() and c:IsType(TYPE_SPELL)
end end
......
...@@ -31,7 +31,7 @@ function c31801517.initial_effect(c) ...@@ -31,7 +31,7 @@ function c31801517.initial_effect(c)
e3:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE)) e3:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE))
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c31801517.xyz_number=62 aux.xyz_number[31801517]=62
function c31801517.atkcon(e,tp,eg,ep,ev,re,r,rp) function c31801517.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c==Duel.GetAttacker() or c==Duel.GetAttackTarget() return c==Duel.GetAttacker() or c==Duel.GetAttackTarget()
......
...@@ -16,7 +16,7 @@ function c32003338.initial_effect(c) ...@@ -16,7 +16,7 @@ function c32003338.initial_effect(c)
e1:SetOperation(c32003338.operation) e1:SetOperation(c32003338.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c32003338.xyz_number=34 aux.xyz_number[32003338]=34
function c32003338.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -25,7 +25,7 @@ function c32446630.initial_effect(c) ...@@ -25,7 +25,7 @@ function c32446630.initial_effect(c)
e2:SetOperation(c32446630.operation) e2:SetOperation(c32446630.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c32446630.xyz_number=43 aux.xyz_number[32446630]=43
function c32446630.atktg(e,c) function c32446630.atktg(e,c)
return c:IsType(TYPE_TOKEN) return c:IsType(TYPE_TOKEN)
end end
......
...@@ -36,7 +36,7 @@ function c32559361.initial_effect(c) ...@@ -36,7 +36,7 @@ function c32559361.initial_effect(c)
e3:SetOperation(c32559361.damop2) e3:SetOperation(c32559361.damop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c32559361.xyz_number=9 aux.xyz_number[32559361]=9
function c32559361.target(e,tp,eg,ep,ev,re,r,rp,chk) function c32559361.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetBattleTarget() local tc=c:GetBattleTarget()
......
...@@ -11,13 +11,13 @@ function c33252803.initial_effect(c) ...@@ -11,13 +11,13 @@ function c33252803.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c33252803.filter1(c,e,tp) function c33252803.filter1(c,e,tp)
local m=_G["c"..c:GetCode()] local no=aux.GetXyzNumber(c)
return c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) and m return c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) and no
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) 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 end
function c33252803.filter2(c,e,tp,mc,rk,no) 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 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c33252803.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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) ...@@ -29,11 +29,11 @@ function c33252803.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c33252803.activate(e,tp,eg,ep,ev,re,r,rp) function c33252803.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() 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) 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) 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() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
......
...@@ -16,7 +16,7 @@ function c33776843.initial_effect(c) ...@@ -16,7 +16,7 @@ function c33776843.initial_effect(c)
e1:SetOperation(c33776843.operation) e1:SetOperation(c33776843.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c33776843.xyz_number=15 aux.xyz_number[33776843]=15
function c33776843.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -38,9 +38,7 @@ function c34876719.ovcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,9 +38,7 @@ function c34876719.ovcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end end
function c34876719.ovfilter(c,sc) function c34876719.ovfilter(c,sc)
local m=_G["c"..c:GetCode()] local no=aux.GetXyzNumber(c)
if not m then return false end
local no=m.xyz_number
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and c:IsCanBeXyzMaterial(sc) return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and c:IsCanBeXyzMaterial(sc)
end end
function c34876719.ovtg(e,tp,eg,ep,ev,re,r,rp,chk) function c34876719.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -24,7 +24,7 @@ function c35772782.initial_effect(c) ...@@ -24,7 +24,7 @@ function c35772782.initial_effect(c)
e2:SetOperation(c35772782.diceop) e2:SetOperation(c35772782.diceop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c35772782.xyz_number=67 aux.xyz_number[35772782]=67
c35772782.toss_dice=true c35772782.toss_dice=true
function c35772782.dccon(e,tp,eg,ep,ev,re,r,rp) function c35772782.dccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 return Duel.GetCurrentPhase()==PHASE_MAIN1
......
...@@ -18,7 +18,7 @@ function c36076683.initial_effect(c) ...@@ -18,7 +18,7 @@ function c36076683.initial_effect(c)
e1:SetOperation(c36076683.atkop) e1:SetOperation(c36076683.atkop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c36076683.xyz_number=73 aux.xyz_number[36076683]=73
function c36076683.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -28,7 +28,7 @@ function c37279508.initial_effect(c) ...@@ -28,7 +28,7 @@ function c37279508.initial_effect(c)
e2:SetOperation(c37279508.spop) e2:SetOperation(c37279508.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c37279508.xyz_number=37 aux.xyz_number[37279508]=37
function c37279508.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -17,7 +17,7 @@ function c3790062.initial_effect(c) ...@@ -17,7 +17,7 @@ function c3790062.initial_effect(c)
e1:SetOperation(c3790062.operation) e1:SetOperation(c3790062.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c3790062.xyz_number=65 aux.xyz_number[3790062]=65
function c3790062.condition(e,tp,eg,ep,ev,re,r,rp,chk) function c3790062.condition(e,tp,eg,ep,ev,re,r,rp,chk)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
......
...@@ -16,7 +16,7 @@ function c39139935.initial_effect(c) ...@@ -16,7 +16,7 @@ function c39139935.initial_effect(c)
e1:SetOperation(c39139935.operation) e1:SetOperation(c39139935.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c39139935.xyz_number=33 aux.xyz_number[39139935]=33
function c39139935.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -24,7 +24,7 @@ function c39622156.initial_effect(c) ...@@ -24,7 +24,7 @@ function c39622156.initial_effect(c)
e2:SetOperation(c39622156.operation) e2:SetOperation(c39622156.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c39622156.xyz_number=26 aux.xyz_number[39622156]=26
function c39622156.dacost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -27,7 +27,7 @@ function c39972129.initial_effect(c) ...@@ -27,7 +27,7 @@ function c39972129.initial_effect(c)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c39972129.xyz_number=64 aux.xyz_number[39972129]=64
function c39972129.spcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -21,7 +21,7 @@ function c4019153.initial_effect(c) ...@@ -21,7 +21,7 @@ function c4019153.initial_effect(c)
e2:SetOperation(c4019153.atkop) e2:SetOperation(c4019153.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c4019153.xyz_number=4 aux.xyz_number[4019153]=4
function c4019153.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -21,7 +21,7 @@ function c42230449.initial_effect(c) ...@@ -21,7 +21,7 @@ function c42230449.initial_effect(c)
e2:SetOperation(c42230449.atkop) e2:SetOperation(c42230449.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c42230449.xyz_number=2 aux.xyz_number[42230449]=2
function c42230449.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -20,7 +20,7 @@ function c42421606.initial_effect(c) ...@@ -20,7 +20,7 @@ function c42421606.initial_effect(c)
e2:SetOperation(c42421606.efop) e2:SetOperation(c42421606.efop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c42421606.xyz_number=85 aux.xyz_number[42421606]=85
c42421606.toss_dice=true c42421606.toss_dice=true
function c42421606.efcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
...@@ -29,7 +29,7 @@ function c43490025.initial_effect(c) ...@@ -29,7 +29,7 @@ function c43490025.initial_effect(c)
e4:SetOperation(c43490025.atkop) e4:SetOperation(c43490025.atkop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c43490025.xyz_number=0 aux.xyz_number[43490025]=0
function c43490025.mfilter(c,xyzc) function c43490025.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ) and not c:IsSetCard(0x48) return c:IsXyzType(TYPE_XYZ) and not c:IsSetCard(0x48)
end end
......
...@@ -24,7 +24,7 @@ function c46871387.initial_effect(c) ...@@ -24,7 +24,7 @@ function c46871387.initial_effect(c)
e2:SetValue(800) e2:SetValue(800)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c46871387.xyz_number=55 aux.xyz_number[46871387]=55
function c46871387.thcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -35,7 +35,7 @@ function c47017574.initial_effect(c) ...@@ -35,7 +35,7 @@ function c47017574.initial_effect(c)
e3:SetOperation(c47017574.disop) e3:SetOperation(c47017574.disop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c47017574.xyz_number=92 aux.xyz_number[47017574]=92
function c47017574.reccon(e,tp,eg,ep,ev,re,r,rp) function c47017574.reccon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:GetFirst():IsControler(tp) return ep~=tp and eg:GetFirst():IsControler(tp)
end end
......
...@@ -15,7 +15,7 @@ function c47387961.initial_effect(c) ...@@ -15,7 +15,7 @@ function c47387961.initial_effect(c)
e1:SetOperation(c47387961.operation) e1:SetOperation(c47387961.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c47387961.xyz_number=8 aux.xyz_number[47387961]=8
function c47387961.filter(c) function c47387961.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
end end
......
...@@ -14,7 +14,7 @@ function c47805931.initial_effect(c) ...@@ -14,7 +14,7 @@ function c47805931.initial_effect(c)
e1:SetOperation(c47805931.operation) e1:SetOperation(c47805931.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c47805931.xyz_number=20 aux.xyz_number[47805931]=20
function c47805931.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -23,7 +23,7 @@ function c48739166.initial_effect(c) ...@@ -23,7 +23,7 @@ function c48739166.initial_effect(c)
e2:SetTarget(c48739166.reptg) e2:SetTarget(c48739166.reptg)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c48739166.xyz_number=101 aux.xyz_number[48739166]=101
function c48739166.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
......
...@@ -13,7 +13,7 @@ function c48928529.initial_effect(c) ...@@ -13,7 +13,7 @@ function c48928529.initial_effect(c)
e1:SetOperation(c48928529.operation) e1:SetOperation(c48928529.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c48928529.xyz_number=83 aux.xyz_number[48928529]=83
function c48928529.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -25,7 +25,7 @@ function c48995978.initial_effect(c) ...@@ -25,7 +25,7 @@ function c48995978.initial_effect(c)
e2:SetOperation(c48995978.winop) e2:SetOperation(c48995978.winop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c48995978.xyz_number=88 aux.xyz_number[48995978]=88
function c48995978.filter(c) function c48995978.filter(c)
return c:GetSequence()<5 return c:GetSequence()<5
end end
......
...@@ -16,7 +16,7 @@ function c49032236.initial_effect(c) ...@@ -16,7 +16,7 @@ function c49032236.initial_effect(c)
e1:SetOperation(c49032236.operation) e1:SetOperation(c49032236.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c49032236.xyz_number=81 aux.xyz_number[49032236]=81
function c49032236.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -23,7 +23,7 @@ function c49195710.initial_effect(c) ...@@ -23,7 +23,7 @@ function c49195710.initial_effect(c)
e2:SetCondition(c49195710.accon) e2:SetCondition(c49195710.accon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c49195710.xyz_number=65 aux.xyz_number[49195710]=65
function c49195710.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -18,7 +18,7 @@ function c49221191.initial_effect(c) ...@@ -18,7 +18,7 @@ function c49221191.initial_effect(c)
e1:SetOperation(c49221191.operation) e1:SetOperation(c49221191.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c49221191.xyz_number=32 aux.xyz_number[49221191]=32
function c49221191.ovfilter(c) function c49221191.ovfilter(c)
return c:IsFaceup() and c:IsCode(65676461) return c:IsFaceup() and c:IsCode(65676461)
end end
......
...@@ -28,7 +28,7 @@ function c49456901.initial_effect(c) ...@@ -28,7 +28,7 @@ function c49456901.initial_effect(c)
e2:SetOperation(c49456901.operation) e2:SetOperation(c49456901.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c49456901.xyz_number=104 aux.xyz_number[49456901]=104
function c49456901.desfilter(c) function c49456901.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
......
...@@ -24,7 +24,7 @@ function c49678559.initial_effect(c) ...@@ -24,7 +24,7 @@ function c49678559.initial_effect(c)
e2:SetTarget(c49678559.reptg) e2:SetTarget(c49678559.reptg)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c49678559.xyz_number=102 aux.xyz_number[49678559]=102
function c49678559.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -30,7 +30,7 @@ function c4997565.initial_effect(c) ...@@ -30,7 +30,7 @@ function c4997565.initial_effect(c)
e2:SetOperation(c4997565.disop) e2:SetOperation(c4997565.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c4997565.xyz_number=3 aux.xyz_number[4997565]=3
function c4997565.spfilter(c,e,tp) function c4997565.spfilter(c,e,tp)
return c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
......
...@@ -30,7 +30,7 @@ function c50260683.initial_effect(c) ...@@ -30,7 +30,7 @@ function c50260683.initial_effect(c)
e2:SetOperation(c50260683.desop) e2:SetOperation(c50260683.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c50260683.xyz_number=36 aux.xyz_number[50260683]=36
function c50260683.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -28,7 +28,7 @@ function c51543904.initial_effect(c) ...@@ -28,7 +28,7 @@ function c51543904.initial_effect(c)
e2:SetOperation(c51543904.disop) e2:SetOperation(c51543904.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c51543904.xyz_number=99 aux.xyz_number[51543904]=99
function c51543904.cfilter(c) function c51543904.cfilter(c)
return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and c:IsDiscardable() return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and c:IsDiscardable()
end end
......
...@@ -16,7 +16,7 @@ function c51735257.initial_effect(c) ...@@ -16,7 +16,7 @@ function c51735257.initial_effect(c)
e1:SetOperation(c51735257.operation) e1:SetOperation(c51735257.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c51735257.xyz_number=50 aux.xyz_number[51735257]=50
function c51735257.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c51735257.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0
and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
...@@ -41,7 +41,7 @@ function c52653092.initial_effect(c) ...@@ -41,7 +41,7 @@ function c52653092.initial_effect(c)
e6:SetOperation(c52653092.actop) e6:SetOperation(c52653092.actop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
c52653092.xyz_number=0 aux.xyz_number[52653092]=0
function c52653092.mfilter(c,xyzc) function c52653092.mfilter(c,xyzc)
return c:IsFaceup() and c:IsXyzType(TYPE_XYZ) and c:IsSetCard(0x48) return c:IsFaceup() and c:IsXyzType(TYPE_XYZ) and c:IsSetCard(0x48)
end end
......
...@@ -23,7 +23,7 @@ function c53244294.initial_effect(c) ...@@ -23,7 +23,7 @@ function c53244294.initial_effect(c)
e2:SetOperation(c53244294.zop) e2:SetOperation(c53244294.zop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c53244294.xyz_number=57 aux.xyz_number[53244294]=57
function c53244294.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 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 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) ...@@ -28,7 +28,7 @@ function c53701457.initial_effect(c)
e3:SetOperation(c53701457.damop) e3:SetOperation(c53701457.damop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c53701457.xyz_number=28 aux.xyz_number[53701457]=28
function c53701457.dircon(e) function c53701457.dircon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)<=1 return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)<=1
end end
......
...@@ -28,7 +28,7 @@ function c54191698.initial_effect(c) ...@@ -28,7 +28,7 @@ function c54191698.initial_effect(c)
e2:SetOperation(c54191698.spop2) e2:SetOperation(c54191698.spop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c54191698.xyz_number=29 aux.xyz_number[54191698]=29
function c54191698.spcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -33,7 +33,7 @@ function c54366836.initial_effect(c) ...@@ -33,7 +33,7 @@ function c54366836.initial_effect(c)
e3:SetOperation(c54366836.damop2) e3:SetOperation(c54366836.damop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c54366836.xyz_number=54 aux.xyz_number[54366836]=54
function c54366836.damcon(e,tp,eg,ep,ev,re,r,rp) function c54366836.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return ep==tp and c:IsRelateToBattle() return ep==tp and c:IsRelateToBattle()
......
...@@ -14,7 +14,7 @@ function c54719828.initial_effect(c) ...@@ -14,7 +14,7 @@ function c54719828.initial_effect(c)
e1:SetOperation(c54719828.operation) e1:SetOperation(c54719828.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c54719828.xyz_number=16 aux.xyz_number[54719828]=16
function c54719828.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -14,7 +14,7 @@ function c55067058.initial_effect(c) ...@@ -14,7 +14,7 @@ function c55067058.initial_effect(c)
e1:SetOperation(c55067058.rop) e1:SetOperation(c55067058.rop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c55067058.xyz_number=19 aux.xyz_number[55067058]=19
function c55067058.rcon(e,tp,eg,ep,ev,re,r,rp) 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) return bit.band(r,REASON_COST)~=0 and re:IsActivated() and re:IsActiveType(TYPE_XYZ)
and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
......
...@@ -28,7 +28,7 @@ function c55470553.initial_effect(c) ...@@ -28,7 +28,7 @@ function c55470553.initial_effect(c)
e2:SetOperation(c55470553.spop) e2:SetOperation(c55470553.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c55470553.xyz_number=98 aux.xyz_number[55470553]=98
function c55470553.poscost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -14,7 +14,7 @@ function c55727845.initial_effect(c) ...@@ -14,7 +14,7 @@ function c55727845.initial_effect(c)
e1:SetOperation(c55727845.atkop) e1:SetOperation(c55727845.atkop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c55727845.xyz_number=96 aux.xyz_number[55727845]=96
function c55727845.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -16,7 +16,7 @@ function c55888045.initial_effect(c) ...@@ -16,7 +16,7 @@ function c55888045.initial_effect(c)
e1:SetOperation(c55888045.negop) e1:SetOperation(c55888045.negop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c55888045.xyz_number=106 aux.xyz_number[55888045]=106
function c55888045.negcon(e,tp,eg,ep,ev,re,r,rp) function c55888045.negcon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return bit.band(loc,LOCATION_ONFIELD)~=0 and not e:GetHandler():IsStatus(STATUS_CHAINING) return bit.band(loc,LOCATION_ONFIELD)~=0 and not e:GetHandler():IsStatus(STATUS_CHAINING)
......
...@@ -15,7 +15,7 @@ function c55935416.initial_effect(c) ...@@ -15,7 +15,7 @@ function c55935416.initial_effect(c)
e1:SetOperation(c55935416.drop) e1:SetOperation(c55935416.drop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c55935416.xyz_number=56 aux.xyz_number[55935416]=56
function c55935416.drcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -40,7 +40,7 @@ function c56051086.initial_effect(c) ...@@ -40,7 +40,7 @@ function c56051086.initial_effect(c)
e4:SetOperation(c56051086.damop) e4:SetOperation(c56051086.damop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c56051086.xyz_number=43 aux.xyz_number[56051086]=43
function c56051086.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -34,7 +34,7 @@ function c56292140.initial_effect(c) ...@@ -34,7 +34,7 @@ function c56292140.initial_effect(c)
e3:SetOperation(c56292140.desop) e3:SetOperation(c56292140.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c56292140.xyz_number=51 aux.xyz_number[56292140]=51
function c56292140.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -32,7 +32,7 @@ function c56832966.initial_effect(c) ...@@ -32,7 +32,7 @@ function c56832966.initial_effect(c)
e3:SetOperation(c56832966.atkop) e3:SetOperation(c56832966.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c56832966.xyz_number=39 aux.xyz_number[56832966]=39
function c56832966.ovfilter(c) function c56832966.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x107f) and c:IsType(TYPE_XYZ) and c:IsRank(4) return c:IsFaceup() and c:IsSetCard(0x107f) and c:IsType(TYPE_XYZ) and c:IsRank(4)
end end
......
...@@ -14,7 +14,7 @@ function c56840427.initial_effect(c) ...@@ -14,7 +14,7 @@ function c56840427.initial_effect(c)
e1:SetOperation(c56840427.operation) e1:SetOperation(c56840427.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c56840427.xyz_number=39 aux.xyz_number[56840427]=39
function c56840427.ovfilter(c) function c56840427.ovfilter(c)
return c:IsFaceup() and c:IsCode(84013237) return c:IsFaceup() and c:IsCode(84013237)
end end
......
...@@ -36,7 +36,7 @@ function c57314798.initial_effect(c) ...@@ -36,7 +36,7 @@ function c57314798.initial_effect(c)
e4:SetOperation(c57314798.spop) e4:SetOperation(c57314798.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c57314798.xyz_number=100 aux.xyz_number[57314798]=100
function c57314798.mfilter(c,xyzc) function c57314798.mfilter(c,xyzc)
return c:IsSetCard(0x48) and c:IsXyzType(TYPE_XYZ) return c:IsSetCard(0x48) and c:IsXyzType(TYPE_XYZ)
end end
......
...@@ -11,9 +11,7 @@ function c57499304.initial_effect(c) ...@@ -11,9 +11,7 @@ function c57499304.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c57499304.filter(c) function c57499304.filter(c)
local m=_G["c"..c:GetCode()] local no=aux.GetXyzNumber(c)
if not m then return false end
local no=m.xyz_number
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ)
end end
function c57499304.condition(e,tp,eg,ep,ev,re,r,rp) function c57499304.condition(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -23,7 +23,7 @@ function c57707471.initial_effect(c) ...@@ -23,7 +23,7 @@ function c57707471.initial_effect(c)
e3:SetOperation(c57707471.desop) e3:SetOperation(c57707471.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c57707471.xyz_number=21 aux.xyz_number[57707471]=21
function c57707471.ovfilter(c) function c57707471.ovfilter(c)
return c:IsFaceup() and c:IsXyzType(TYPE_XYZ) and c:IsRank(5) return c:IsFaceup() and c:IsXyzType(TYPE_XYZ) and c:IsRank(5)
end end
......
...@@ -39,9 +39,7 @@ function c57734012.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -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 if chk==0 then return e:GetHandler():GetFlagEffect(57734012)~=0 end
end end
function c57734012.filter1(c,e,tp) function c57734012.filter1(c,e,tp)
local m=_G["c"..c:GetCode()] local no=aux.GetXyzNumber(c)
if not m then return false end
local no=m.xyz_number
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp] 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) 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) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -49,7 +47,7 @@ function c57734012.filter1(c,e,tp) ...@@ -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) and Duel.IsExistingMatchingCard(c57734012.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,no)
end end
function c57734012.filter2(c,e,tp,mc,no) 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 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c57734012.target(e,tp,eg,ep,ev,re,r,rp,chk) 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) ...@@ -78,10 +76,9 @@ function c57734012.activate(e,tp,eg,ep,ev,re,r,rp)
local tc1=g1:GetFirst() local tc1=g1:GetFirst()
if tc1 and Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP)~=0 then 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 if not aux.MustMaterialCheck(tc1,tp,EFFECT_MUST_BE_XMATERIAL) then return end
local m=_G["c"..tc1:GetCode()] local no=aux.GetXyzNumber(tc1)
if not m then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) 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() local tc2=g2:GetFirst()
if tc2 then if tc2 then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -31,7 +31,7 @@ function c58820923.initial_effect(c) ...@@ -31,7 +31,7 @@ function c58820923.initial_effect(c)
e3:SetOperation(c58820923.atkop) e3:SetOperation(c58820923.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c58820923.xyz_number=95 aux.xyz_number[58820923]=95
function c58820923.ovfilter(c) function c58820923.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x107b) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsSetCard(0x107b) and c:IsType(TYPE_XYZ)
end end
......
...@@ -24,7 +24,7 @@ function c59479050.initial_effect(c) ...@@ -24,7 +24,7 @@ function c59479050.initial_effect(c)
e2:SetOperation(c59479050.tdop) e2:SetOperation(c59479050.tdop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c59479050.xyz_number=71 aux.xyz_number[59479050]=71
function c59479050.spcon(e,tp,eg,ep,ev,re,r,rp) function c59479050.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()>0 return e:GetHandler():GetOverlayCount()>0
end end
......
...@@ -16,7 +16,7 @@ function c59627393.initial_effect(c) ...@@ -16,7 +16,7 @@ function c59627393.initial_effect(c)
e1:SetOperation(c59627393.operation) e1:SetOperation(c59627393.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c59627393.xyz_number=105 aux.xyz_number[59627393]=105
function c59627393.condition(e,tp,eg,ep,ev,re,r,rp) function c59627393.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
......
...@@ -18,9 +18,7 @@ function c60158866.initial_effect(c) ...@@ -18,9 +18,7 @@ function c60158866.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c60158866.filter(c) function c60158866.filter(c)
local m=_G["c"..c:GetCode()] local no=aux.GetXyzNumber(c)
if not m then return false end
local no=m.xyz_number
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ)
end end
function c60158866.cfilter(c) function c60158866.cfilter(c)
......
...@@ -31,9 +31,7 @@ function c61374414.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,9 +31,7 @@ function c61374414.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c61374414.spfilter(c,e,tp,mc) function c61374414.spfilter(c,e,tp,mc)
local m=_G["c"..c:GetCode()] local no=aux.GetXyzNumber(c)
if not m then return false end
local no=m.xyz_number
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(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 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
......
...@@ -38,7 +38,7 @@ function c6165656.initial_effect(c) ...@@ -38,7 +38,7 @@ function c6165656.initial_effect(c)
e4:SetOperation(c6165656.winop) e4:SetOperation(c6165656.winop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c6165656.xyz_number=88 aux.xyz_number[6165656]=88
--target check is in RUM magic cards --target check is in RUM magic cards
function c6165656.splimit(e,se,sp,st) function c6165656.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x95) and se:GetHandler():IsType(TYPE_SPELL) return se:GetHandler():IsSetCard(0x95) and se:GetHandler():IsType(TYPE_SPELL)
......
...@@ -18,7 +18,7 @@ function c62070231.initial_effect(c) ...@@ -18,7 +18,7 @@ function c62070231.initial_effect(c)
e1:SetOperation(c62070231.operation) e1:SetOperation(c62070231.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c62070231.xyz_number=94 aux.xyz_number[62070231]=94
function c62070231.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -16,7 +16,7 @@ function c62517849.initial_effect(c) ...@@ -16,7 +16,7 @@ function c62517849.initial_effect(c)
e1:SetOperation(c62517849.spop) e1:SetOperation(c62517849.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c62517849.xyz_number=39 aux.xyz_number[62517849]=39
function c62517849.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c62517849.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
...@@ -23,7 +23,7 @@ function c62541668.initial_effect(c) ...@@ -23,7 +23,7 @@ function c62541668.initial_effect(c)
e2:SetTarget(c62541668.reptg) e2:SetTarget(c62541668.reptg)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c62541668.xyz_number=77 aux.xyz_number[62541668]=77
function c62541668.ovfilter(c) function c62541668.ovfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ) and c:IsRank(10,11) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ) and c:IsRank(10,11)
end end
......
...@@ -70,7 +70,7 @@ function c63504681.initial_effect(c) ...@@ -70,7 +70,7 @@ function c63504681.initial_effect(c)
e8:SetLabel(5) e8:SetLabel(5)
c:RegisterEffect(e8) c:RegisterEffect(e8)
end end
c63504681.xyz_number=86 aux.xyz_number[63504681]=86
function c63504681.rmcon(e,tp,eg,ep,ev,re,r,rp) function c63504681.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
......
...@@ -16,7 +16,7 @@ function c63746411.initial_effect(c) ...@@ -16,7 +16,7 @@ function c63746411.initial_effect(c)
e1:SetOperation(c63746411.operation) e1:SetOperation(c63746411.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c63746411.xyz_number=106 aux.xyz_number[63746411]=106
function c63746411.condition(e,tp,eg,ep,ev,re,r,rp) function c63746411.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE
......
...@@ -38,7 +38,7 @@ function c63767246.initial_effect(c) ...@@ -38,7 +38,7 @@ function c63767246.initial_effect(c)
e3:SetOperation(c63767246.atkop) e3:SetOperation(c63767246.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c63767246.xyz_number=38 aux.xyz_number[63767246]=38
function c63767246.discon(e,tp,eg,ep,ev,re,r,rp) function c63767246.discon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return bit.band(loc,LOCATION_SZONE)~=0 return bit.band(loc,LOCATION_SZONE)~=0
......
...@@ -24,7 +24,7 @@ function c6387204.initial_effect(c) ...@@ -24,7 +24,7 @@ function c6387204.initial_effect(c)
e2:SetOperation(c6387204.lpop) e2:SetOperation(c6387204.lpop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c6387204.xyz_number=6 aux.xyz_number[6387204]=6
function c6387204.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 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 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
...@@ -18,7 +18,7 @@ function c64554883.initial_effect(c) ...@@ -18,7 +18,7 @@ function c64554883.initial_effect(c)
e1:SetOperation(c64554883.operation) e1:SetOperation(c64554883.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c64554883.xyz_number=25 aux.xyz_number[64554883]=25
function c64554883.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
...@@ -38,7 +38,7 @@ function c65305468.initial_effect(c) ...@@ -38,7 +38,7 @@ function c65305468.initial_effect(c)
e7:SetTarget(c65305468.reptg) e7:SetTarget(c65305468.reptg)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
c65305468.xyz_number=0 aux.xyz_number[65305468]=0
function c65305468.mfilter(c,xyzc) function c65305468.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ) and not c:IsSetCard(0x48) return c:IsXyzType(TYPE_XYZ) and not c:IsSetCard(0x48)
end end
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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