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
......
...@@ -16,7 +16,7 @@ function c65676461.initial_effect(c) ...@@ -16,7 +16,7 @@ function c65676461.initial_effect(c)
e1:SetOperation(c65676461.atop) e1:SetOperation(c65676461.atop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c65676461.xyz_number=32 aux.xyz_number[65676461]=32
function c65676461.atcon(e,tp,eg,ep,ev,re,r,rp) function c65676461.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
......
...@@ -37,7 +37,7 @@ function c66011101.initial_effect(c) ...@@ -37,7 +37,7 @@ function c66011101.initial_effect(c)
e3:SetOperation(c66011101.operation3) e3:SetOperation(c66011101.operation3)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c66011101.xyz_number=60 aux.xyz_number[66011101]=60
function c66011101.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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)
......
...@@ -35,7 +35,7 @@ function c66547759.initial_effect(c) ...@@ -35,7 +35,7 @@ function c66547759.initial_effect(c)
e3:SetOperation(c66547759.disop) e3:SetOperation(c66547759.disop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c66547759.xyz_number=23 aux.xyz_number[66547759]=23
function c66547759.dacon(e) function c66547759.dacon(e)
return e:GetHandler():GetOverlayCount()>0 return e:GetHandler():GetOverlayCount()>0
end end
......
...@@ -28,7 +28,7 @@ function c66970002.initial_effect(c) ...@@ -28,7 +28,7 @@ function c66970002.initial_effect(c)
e2:SetOperation(c66970002.desop) e2:SetOperation(c66970002.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c66970002.xyz_number=39 aux.xyz_number[66970002]=39
function c66970002.tdcon(e,tp,eg,ep,ev,re,r,rp) function c66970002.tdcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp return rp==1-tp
end end
......
...@@ -35,7 +35,7 @@ function c67173574.initial_effect(c) ...@@ -35,7 +35,7 @@ function c67173574.initial_effect(c)
e3:SetOperation(c67173574.operation) e3:SetOperation(c67173574.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c67173574.xyz_number=102 aux.xyz_number[67173574]=102
function c67173574.reptg(e,tp,eg,ep,ev,re,r,rp,chk) 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 chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_EFFECT) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
......
...@@ -44,7 +44,7 @@ function c67557908.initial_effect(c) ...@@ -44,7 +44,7 @@ function c67557908.initial_effect(c)
e4:SetLabelObject(e3) e4:SetLabelObject(e3)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c67557908.xyz_number=4 aux.xyz_number[67557908]=4
function c67557908.descon(e,tp,eg,ep,ev,re,r,rp) function c67557908.descon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
......
...@@ -23,10 +23,7 @@ function c67926903.initial_effect(c) ...@@ -23,10 +23,7 @@ function c67926903.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c67926903.ovfilter(c) function c67926903.ovfilter(c)
local code=c:GetCode() local no=aux.GetXyzNumber(c)
local class=_G["c"..code]
if class==nil then return false end
local no=class.xyz_number
return c:IsFaceup() and no and no>=101 and no<=107 and c:IsSetCard(0x1048) return c:IsFaceup() and no and no>=101 and no<=107 and c:IsSetCard(0x1048)
end end
function c67926903.atkval(e,c) function c67926903.atkval(e,c)
......
...@@ -23,7 +23,7 @@ function c68396121.initial_effect(c) ...@@ -23,7 +23,7 @@ function c68396121.initial_effect(c)
e2:SetOperation(c68396121.atkop) e2:SetOperation(c68396121.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c68396121.xyz_number=107 aux.xyz_number[68396121]=107
function c68396121.negcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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,8 @@ function c68679595.initial_effect(c) ...@@ -30,7 +30,8 @@ function c68679595.initial_effect(c)
e2:SetOperation(c68679595.disop) e2:SetOperation(c68679595.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end 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) 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 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 c69058960.initial_effect(c) ...@@ -35,7 +35,7 @@ function c69058960.initial_effect(c)
e4:SetValue(1) e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c69058960.xyz_number=13 aux.xyz_number[69058960]=13
function c69058960.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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 c69170557.initial_effect(c) ...@@ -24,7 +24,7 @@ function c69170557.initial_effect(c)
e2:SetOperation(c69170557.ctop) e2:SetOperation(c69170557.ctop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c69170557.xyz_number=40 aux.xyz_number[69170557]=40
function c69170557.desfilter(c) function c69170557.desfilter(c)
return c:GetCounter(0x1024)~=0 return c:GetCounter(0x1024)~=0
end end
......
...@@ -20,7 +20,7 @@ function c69610924.initial_effect(c) ...@@ -20,7 +20,7 @@ function c69610924.initial_effect(c)
e2:SetCondition(c69610924.dircon) e2:SetCondition(c69610924.dircon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c69610924.xyz_number=17 aux.xyz_number[69610924]=17
function c69610924.dircon(e) function c69610924.dircon(e)
return e:GetHandler():GetOverlayCount()==0 return e:GetHandler():GetOverlayCount()==0
end end
......
...@@ -33,7 +33,7 @@ function c69757518.initial_effect(c) ...@@ -33,7 +33,7 @@ function c69757518.initial_effect(c)
e3:SetOperation(c69757518.operation) e3:SetOperation(c69757518.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c69757518.xyz_number=5 aux.xyz_number[69757518]=5
function c69757518.atkval(e,c) function c69757518.atkval(e,c)
return c:GetOverlayCount()*1000 return c:GetOverlayCount()*1000
end end
......
...@@ -26,7 +26,7 @@ function c71166481.initial_effect(c) ...@@ -26,7 +26,7 @@ function c71166481.initial_effect(c)
e2:SetOperation(c71166481.xop) e2:SetOperation(c71166481.xop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c71166481.xyz_number=75 aux.xyz_number[71166481]=75
function c71166481.chcon(e,tp,eg,ep,ev,re,r,rp) function c71166481.chcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and rp==1-tp return re:IsActiveType(TYPE_MONSTER) and rp==1-tp
end end
......
...@@ -32,7 +32,7 @@ function c71921856.initial_effect(c) ...@@ -32,7 +32,7 @@ function c71921856.initial_effect(c)
e3:SetOperation(c71921856.spop) e3:SetOperation(c71921856.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c71921856.xyz_number=79 aux.xyz_number[71921856]=79
function c71921856.filter(c) function c71921856.filter(c)
return c:IsSetCard(0x84) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay() return c:IsSetCard(0x84) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
......
...@@ -30,7 +30,7 @@ function c7194917.initial_effect(c) ...@@ -30,7 +30,7 @@ function c7194917.initial_effect(c)
e3:SetOperation(c7194917.posop2) e3:SetOperation(c7194917.posop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c7194917.xyz_number=52 aux.xyz_number[7194917]=52
function c7194917.adcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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 c73445448.initial_effect(c) ...@@ -25,7 +25,7 @@ function c73445448.initial_effect(c)
e2:SetOperation(c73445448.operation) e2:SetOperation(c73445448.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c73445448.xyz_number=22 aux.xyz_number[73445448]=22
function c73445448.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c73445448.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 Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
......
...@@ -16,7 +16,7 @@ function c75253697.initial_effect(c) ...@@ -16,7 +16,7 @@ function c75253697.initial_effect(c)
e1:SetOperation(c75253697.desop) e1:SetOperation(c75253697.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c75253697.xyz_number=72 aux.xyz_number[75253697]=72
function c75253697.descost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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)
......
...@@ -33,7 +33,8 @@ function c75402014.initial_effect(c) ...@@ -33,7 +33,8 @@ function c75402014.initial_effect(c)
e3:SetOperation(c75402014.disop) e3:SetOperation(c75402014.disop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end 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) function c75402014.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler()) return eg:IsContains(e:GetHandler())
end end
......
...@@ -25,7 +25,7 @@ function c75433814.initial_effect(c) ...@@ -25,7 +25,7 @@ function c75433814.initial_effect(c)
e2:SetOperation(c75433814.desop) e2:SetOperation(c75433814.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c75433814.xyz_number=40 aux.xyz_number[75433814]=40
function c75433814.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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 c76067258.initial_effect(c) ...@@ -30,7 +30,7 @@ function c76067258.initial_effect(c)
e3:SetTarget(c76067258.reptg) e3:SetTarget(c76067258.reptg)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c76067258.xyz_number=66 aux.xyz_number[76067258]=66
function c76067258.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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 c77205367.initial_effect(c) ...@@ -28,7 +28,7 @@ function c77205367.initial_effect(c)
e3:SetOperation(c77205367.atkop) e3:SetOperation(c77205367.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c77205367.xyz_number=96 aux.xyz_number[77205367]=96
function c77205367.atkcon(e,tp,eg,ep,ev,re,r,rp) function c77205367.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,55727845) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,55727845)
end end
......
...@@ -21,7 +21,7 @@ function c78625448.initial_effect(c) ...@@ -21,7 +21,7 @@ function c78625448.initial_effect(c)
e2:SetOperation(c78625448.atkop) e2:SetOperation(c78625448.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c78625448.xyz_number=3 aux.xyz_number[78625448]=3
function c78625448.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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 c79747096.initial_effect(c) ...@@ -33,7 +33,7 @@ function c79747096.initial_effect(c)
e3:SetLabelObject(e2) e3:SetLabelObject(e2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c79747096.xyz_number=1 aux.xyz_number[79747096]=1
function c79747096.ovfilter(c) function c79747096.ovfilter(c)
return c:IsFaceup() and c:IsCode(15232745) return c:IsFaceup() and c:IsCode(15232745)
end end
......
...@@ -16,7 +16,7 @@ function c80117527.initial_effect(c) ...@@ -16,7 +16,7 @@ function c80117527.initial_effect(c)
e1:SetOperation(c80117527.operation) e1:SetOperation(c80117527.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c80117527.xyz_number=11 aux.xyz_number[80117527]=11
function c80117527.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c80117527.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 e:GetHandler():GetAttackAnnouncedCount()==0 end and e:GetHandler():GetAttackAnnouncedCount()==0 end
......
...@@ -16,7 +16,7 @@ function c80764541.initial_effect(c) ...@@ -16,7 +16,7 @@ function c80764541.initial_effect(c)
e1:SetOperation(c80764541.desop) e1:SetOperation(c80764541.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c80764541.xyz_number=44 aux.xyz_number[80764541]=44
function c80764541.descost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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 c80796456.initial_effect(c) ...@@ -25,7 +25,7 @@ function c80796456.initial_effect(c)
e2:SetOperation(c80796456.atkop) e2:SetOperation(c80796456.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c80796456.xyz_number=70 aux.xyz_number[80796456]=70
function c80796456.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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 c81330115.initial_effect(c) ...@@ -30,7 +30,7 @@ function c81330115.initial_effect(c)
e3:SetTargetRange(1,0) e3:SetTargetRange(1,0)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c81330115.xyz_number=30 aux.xyz_number[81330115]=30
function c81330115.atcon(e) function c81330115.atcon(e)
return e:GetHandler():GetOverlayCount()==0 return e:GetHandler():GetOverlayCount()==0
end end
......
...@@ -39,7 +39,7 @@ function c8165596.initial_effect(c) ...@@ -39,7 +39,7 @@ function c8165596.initial_effect(c)
e3:SetOperation(c8165596.operation) e3:SetOperation(c8165596.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c8165596.xyz_number=90 aux.xyz_number[8165596]=90
function c8165596.indcon(e) function c8165596.indcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x55) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x55)
end end
......
...@@ -14,7 +14,7 @@ function c82308875.initial_effect(c) ...@@ -14,7 +14,7 @@ function c82308875.initial_effect(c)
e1:SetOperation(c82308875.operation) e1:SetOperation(c82308875.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c82308875.xyz_number=7 aux.xyz_number[82308875]=7
c82308875.toss_dice=true c82308875.toss_dice=true
function c82308875.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
...@@ -25,7 +25,7 @@ function c82697249.initial_effect(c) ...@@ -25,7 +25,7 @@ function c82697249.initial_effect(c)
e2:SetOperation(c82697249.desop) e2:SetOperation(c82697249.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c82697249.xyz_number=59 aux.xyz_number[82697249]=59
function c82697249.imcon(e) function c82697249.imcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==1 return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==1
end end
......
...@@ -30,7 +30,7 @@ function c8387138.initial_effect(c) ...@@ -30,7 +30,7 @@ function c8387138.initial_effect(c)
e3:SetTarget(c8387138.reptg) e3:SetTarget(c8387138.reptg)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c8387138.xyz_number=27 aux.xyz_number[8387138]=27
function c8387138.regop(e,tp,eg,ep,ev,re,r,rp) 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) e:GetHandler():RegisterFlagEffect(8387138,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
end end
......
...@@ -64,9 +64,7 @@ function c83888009.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,9 +64,7 @@ function c83888009.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c83888009.ovfilter(c) function c83888009.ovfilter(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:IsType(TYPE_XYZ) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) return no and no>=101 and no<=107 and c:IsType(TYPE_XYZ) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end end
function c83888009.damop(e,tp,eg,ep,ev,re,r,rp) function c83888009.damop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -23,7 +23,7 @@ function c84013237.initial_effect(c) ...@@ -23,7 +23,7 @@ function c84013237.initial_effect(c)
e2:SetOperation(c84013237.desop) e2:SetOperation(c84013237.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c84013237.xyz_number=39 aux.xyz_number[84013237]=39
function c84013237.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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 c84124261.initial_effect(c) ...@@ -14,7 +14,7 @@ function c84124261.initial_effect(c)
e1:SetOperation(c84124261.atkop) e1:SetOperation(c84124261.atkop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c84124261.xyz_number=39 aux.xyz_number[84124261]=39
function c84124261.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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)
......
...@@ -26,7 +26,7 @@ function c84417082.initial_effect(c) ...@@ -26,7 +26,7 @@ function c84417082.initial_effect(c)
e2:SetOperation(c84417082.operation2) e2:SetOperation(c84417082.operation2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c84417082.xyz_number=91 aux.xyz_number[84417082]=91
function c84417082.cost1(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
......
...@@ -28,7 +28,7 @@ function c85121942.initial_effect(c) ...@@ -28,7 +28,7 @@ function c85121942.initial_effect(c)
e2:SetOperation(c85121942.desop) e2:SetOperation(c85121942.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c85121942.xyz_number=105 aux.xyz_number[85121942]=105
function c85121942.damcon(e,tp,eg,ep,ev,re,r,rp) function c85121942.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
......
...@@ -16,7 +16,7 @@ function c86532744.initial_effect(c) ...@@ -16,7 +16,7 @@ function c86532744.initial_effect(c)
e1:SetOperation(c86532744.operation) e1:SetOperation(c86532744.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c86532744.xyz_number=39 aux.xyz_number[86532744]=39
function c86532744.ovfilter(c) function c86532744.ovfilter(c)
return c:IsFaceup() and c:IsCode(84013237) return c:IsFaceup() and c:IsCode(84013237)
end end
......
...@@ -24,7 +24,7 @@ function c87911394.initial_effect(c) ...@@ -24,7 +24,7 @@ function c87911394.initial_effect(c)
e2:SetOperation(c87911394.atkop) e2:SetOperation(c87911394.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c87911394.xyz_number=39 aux.xyz_number[87911394]=39
function c87911394.aclimit(e,re,tp) function c87911394.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
......
...@@ -17,7 +17,7 @@ function c88120966.initial_effect(c) ...@@ -17,7 +17,7 @@ function c88120966.initial_effect(c)
e1:SetOperation(c88120966.operation) e1:SetOperation(c88120966.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c88120966.xyz_number=15 aux.xyz_number[88120966]=15
function c88120966.condition(e,tp,eg,ep,ev,re,r,rp) function c88120966.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 return Duel.GetCurrentPhase()==PHASE_MAIN1
end end
......
...@@ -24,7 +24,7 @@ function c88177324.initial_effect(c) ...@@ -24,7 +24,7 @@ function c88177324.initial_effect(c)
e2:SetOperation(c88177324.regop) e2:SetOperation(c88177324.regop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c88177324.xyz_number=107 aux.xyz_number[88177324]=107
function c88177324.negcon(e,tp,eg,ep,ev,re,r,rp) function c88177324.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
......
...@@ -39,7 +39,7 @@ function c89477759.initial_effect(c) ...@@ -39,7 +39,7 @@ function c89477759.initial_effect(c)
e3:SetOperation(c89477759.spop) e3:SetOperation(c89477759.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c89477759.xyz_number=1000 aux.xyz_number[89477759]=1000
function c89477759.descost1(e,tp,eg,ep,ev,re,r,rp,chk) 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 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)
......
...@@ -42,7 +42,7 @@ function c89516305.initial_effect(c) ...@@ -42,7 +42,7 @@ function c89516305.initial_effect(c)
e3:SetOperation(c89516305.atkop) e3:SetOperation(c89516305.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c89516305.xyz_number=87 aux.xyz_number[89516305]=87
function c89516305.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
......
...@@ -14,7 +14,7 @@ function c89642993.initial_effect(c) ...@@ -14,7 +14,7 @@ function c89642993.initial_effect(c)
e1:SetOperation(c89642993.efop) e1:SetOperation(c89642993.efop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c89642993.xyz_number=63 aux.xyz_number[89642993]=63
function c89642993.efcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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)
......
...@@ -44,7 +44,7 @@ function c90126061.initial_effect(c) ...@@ -44,7 +44,7 @@ function c90126061.initial_effect(c)
e4:SetOperation(c90126061.retop) e4:SetOperation(c90126061.retop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c90126061.xyz_number=5 aux.xyz_number[90126061]=5
function c90126061.atkval(e,c) function c90126061.atkval(e,c)
return c:GetOverlayCount()*1000 return c:GetOverlayCount()*1000
end end
......
...@@ -34,7 +34,7 @@ function c90162951.initial_effect(c) ...@@ -34,7 +34,7 @@ function c90162951.initial_effect(c)
e4:SetOperation(c90162951.desop) e4:SetOperation(c90162951.desop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c90162951.xyz_number=35 aux.xyz_number[90162951]=35
function c90162951.val(e,c) function c90162951.val(e,c)
return math.abs(Duel.GetLP(0)-Duel.GetLP(1)) return math.abs(Duel.GetLP(0)-Duel.GetLP(1))
end end
......
...@@ -45,7 +45,7 @@ function c90590303.initial_effect(c) ...@@ -45,7 +45,7 @@ function c90590303.initial_effect(c)
e5:SetOperation(c90590303.disop) e5:SetOperation(c90590303.disop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c90590303.xyz_number=41 aux.xyz_number[90590303]=41
function c90590303.mtcon(e,tp,eg,ep,ev,re,r,rp) function c90590303.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
......
...@@ -24,7 +24,7 @@ function c9161357.initial_effect(c) ...@@ -24,7 +24,7 @@ function c9161357.initial_effect(c)
e2:SetOperation(c9161357.lpop) e2:SetOperation(c9161357.lpop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c9161357.xyz_number=6 aux.xyz_number[9161357]=6
function c9161357.eqcon(e,tp,eg,ep,ev,re,r,rp) function c9161357.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
......
...@@ -40,7 +40,7 @@ function c92015800.initial_effect(c) ...@@ -40,7 +40,7 @@ function c92015800.initial_effect(c)
e4:SetOperation(c92015800.xyzop) e4:SetOperation(c92015800.xyzop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c92015800.xyz_number=76 aux.xyz_number[92015800]=76
function c92015800.effilter(c) function c92015800.effilter(c)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER)
end end
......
...@@ -35,8 +35,8 @@ function c92362073.atkcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,8 +35,8 @@ function c92362073.atkcon(e,tp,eg,ep,ev,re,r,rp)
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c92362073.atkfilter(c) function c92362073.atkfilter(c)
local m=_G["c"..c:GetCode()] local no=aux.GetXyzNumber(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) and m and m.xyz_number return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) and no
and c:GetOriginalAttribute()==ATTRIBUTE_LIGHT and c:GetOriginalRace()==RACE_DRAGON and c:GetOriginalAttribute()==ATTRIBUTE_LIGHT and c:GetOriginalRace()==RACE_DRAGON
end end
function c92362073.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c92362073.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -48,9 +48,8 @@ end ...@@ -48,9 +48,8 @@ end
function c92362073.atkop(e,tp,eg,ep,ev,re,r,rp) function c92362073.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local m=_G["c"..tc:GetCode()] local no=aux.GetXyzNumber(tc)
if m and tc:IsFaceup() and tc:IsRelateToEffect(e) then if no and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local no=m.xyz_number
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......
...@@ -32,7 +32,7 @@ function c93108839.initial_effect(c) ...@@ -32,7 +32,7 @@ function c93108839.initial_effect(c)
e3:SetOperation(c93108839.damop) e3:SetOperation(c93108839.damop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c93108839.xyz_number=58 aux.xyz_number[93108839]=58
function c93108839.filter(c) function c93108839.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
end end
......
...@@ -65,14 +65,14 @@ function c93238626.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,14 +65,14 @@ function c93238626.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c93238626.filter(c,e,tp,mc,no) 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 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function c93238626.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c93238626.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
local m=_G["c"..at:GetCode()] local no=aux.GetXyzNumber(at)
return m and m.xyz_number and Duel.IsExistingMatchingCard(c93238626.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,at,m.xyz_number) return no and Duel.IsExistingMatchingCard(c93238626.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,at,no)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
...@@ -80,10 +80,10 @@ function c93238626.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,10 +80,10 @@ function c93238626.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateAttack() then return end if not Duel.NegateAttack() then return end
local tc=Duel.GetAttackTarget() local tc=Duel.GetAttackTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
local m=_G["c"..tc:GetCode()] local no=aux.GetXyzNumber(tc)
if tc:IsFacedown() or not tc:IsRelateToBattle() or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or not m then return end 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) 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() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
......
...@@ -26,7 +26,7 @@ function c93568288.initial_effect(c) ...@@ -26,7 +26,7 @@ function c93568288.initial_effect(c)
e2:SetOperation(c93568288.rmop) e2:SetOperation(c93568288.rmop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c93568288.xyz_number=80 aux.xyz_number[93568288]=80
function c93568288.filter(c) function c93568288.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
end end
......
...@@ -40,7 +40,7 @@ function c93713837.initial_effect(c) ...@@ -40,7 +40,7 @@ function c93713837.initial_effect(c)
e4:SetOperation(c93713837.tgop) e4:SetOperation(c93713837.tgop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c93713837.xyz_number=24 aux.xyz_number[93713837]=24
function c93713837.poscost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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)
......
...@@ -29,7 +29,7 @@ function s.initial_effect(c) ...@@ -29,7 +29,7 @@ function s.initial_effect(c)
e2:SetOperation(s.spop2) e2:SetOperation(s.spop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
s.xyz_number=39 aux.xyz_number[93777634]=39
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and not c:IsCode(id) 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) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -18,7 +18,7 @@ function c94380860.initial_effect(c) ...@@ -18,7 +18,7 @@ function c94380860.initial_effect(c)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c94380860.xyz_number=103 aux.xyz_number[94380860]=103
function c94380860.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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)
......
...@@ -36,7 +36,7 @@ function c95134948.initial_effect(c) ...@@ -36,7 +36,7 @@ function c95134948.initial_effect(c)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
c95134948.xyz_number=99 aux.xyz_number[95134948]=99
function c95134948.counterfilter(c) function c95134948.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_XYZ) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_XYZ)
end end
...@@ -87,7 +87,7 @@ function c95134948.ftarget(e,c) ...@@ -87,7 +87,7 @@ function c95134948.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID() return e:GetLabel()~=c:GetFieldID()
end end
function c95134948.spfilter(c,e,tp) 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) 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 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
......
...@@ -35,7 +35,7 @@ function c95442074.initial_effect(c) ...@@ -35,7 +35,7 @@ function c95442074.initial_effect(c)
e4:SetValue(1) e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c95442074.xyz_number=31 aux.xyz_number[95442074]=31
function c95442074.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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)
......
...@@ -47,7 +47,7 @@ function c95474755.initial_effect(c) ...@@ -47,7 +47,7 @@ function c95474755.initial_effect(c)
e4:SetOperation(c95474755.dkop) e4:SetOperation(c95474755.dkop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c95474755.xyz_number=89 aux.xyz_number[95474755]=89
function c95474755.excost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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 c96864105.initial_effect(c) ...@@ -24,7 +24,7 @@ function c96864105.initial_effect(c)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c96864105.xyz_number=73 aux.xyz_number[96864105]=73
function c96864105.atkcon(e,tp,eg,ep,ev,re,r,rp) function c96864105.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
......
...@@ -56,7 +56,7 @@ function c97403510.initial_effect(c) ...@@ -56,7 +56,7 @@ function c97403510.initial_effect(c)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
c97403510.xyz_number=92 aux.xyz_number[97403510]=92
function c97403510.checkop(e,tp,eg,ep,ev,re,r,rp) function c97403510.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
while tc do while tc do
......
...@@ -45,6 +45,15 @@ function bit.replace(r,v,field,width) ...@@ -45,6 +45,15 @@ function bit.replace(r,v,field,width)
return (r&~(m<<f))|((v&m)<< f) return (r&~(m<<f))|((v&m)<< f)
end 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 --the chain id of the results modified by EVENT_TOSS_DICE_NEGATE
Auxiliary.dice_chain_id=0 Auxiliary.dice_chain_id=0
Auxiliary.idx_table=table.pack(1,2,3,4,5,6,7,8) 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