Commit 51ce317e authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

update setcode Battlin' Box (#2069)

parent 655ad739
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c23232295.initial_effect(c) function c23232295.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT) Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x84),4,2) aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x1084),4,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--destroy replace --destroy replace
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -23,7 +23,7 @@ function c23232295.initial_effect(c) ...@@ -23,7 +23,7 @@ function c23232295.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c23232295.repfilter(c,tp) function c23232295.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x84) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x1084)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end end
function c23232295.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c23232295.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -18,7 +18,7 @@ function c24184846.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,7 +18,7 @@ function c24184846.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c24184846.filter(c) function c24184846.filter(c)
return c:IsFaceup() and c:IsSetCard(0x84) and c:IsAbleToRemove() return c:IsFaceup() and c:IsSetCard(0x1084) and c:IsAbleToRemove()
end end
function c24184846.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c24184846.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c24184846.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c24184846.filter(chkc) end
......
...@@ -11,7 +11,7 @@ function c32750341.initial_effect(c) ...@@ -11,7 +11,7 @@ function c32750341.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c32750341.filter(c) function c32750341.filter(c)
return c:IsFaceup() and c:IsSetCard(0x84) return c:IsFaceup() and c:IsSetCard(0x1084)
end end
function c32750341.spcon(e,c) function c32750341.spcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -12,7 +12,7 @@ function c35537251.initial_effect(c) ...@@ -12,7 +12,7 @@ function c35537251.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c35537251.cfilter(c) function c35537251.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x84) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsSetCard(0x1084) and c:IsType(TYPE_XYZ)
end end
function c35537251.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c35537251.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -17,7 +17,7 @@ function c36916401.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,7 +17,7 @@ function c36916401.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardDeck(tp,1,REASON_COST) Duel.DiscardDeck(tp,1,REASON_COST)
end end
function c36916401.filter(c,e,tp) function c36916401.filter(c,e,tp)
return c:IsSetCard(0x84) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsSetCard(0x1084) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c36916401.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c36916401.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c36916401.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c36916401.filter(chkc,e,tp) end
......
...@@ -20,8 +20,8 @@ function c4549095.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,8 +20,8 @@ function c4549095.condition(e,tp,eg,ep,ev,re,r,rp)
if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
return (a:IsControler(tp) and a:IsSetCard(0x84) and a:IsRelateToBattle()) return (a:IsControler(tp) and a:IsSetCard(0x1084) and a:IsRelateToBattle())
or (d and d:IsControler(tp) and d:IsSetCard(0x84) and d:IsRelateToBattle()) or (d and d:IsControler(tp) and d:IsSetCard(0x1084) and d:IsRelateToBattle())
end end
function c4549095.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c4549095.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
...@@ -34,7 +34,7 @@ function c5361647.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function c5361647.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) return e:GetHandler():IsReason(REASON_EFFECT)
end end
function c5361647.filter(c) function c5361647.filter(c)
return c:IsSetCard(0x84) and not c:IsCode(5361647) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x1084) and not c:IsCode(5361647) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c5361647.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c5361647.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c5361647.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c5361647.filter(chkc) end
......
...@@ -20,8 +20,8 @@ aux.xyz_number[59627393]=105 ...@@ -20,8 +20,8 @@ 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()
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and at and ((a:IsControler(tp) and a:IsOnField() and a:IsSetCard(0x84)) return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and at and ((a:IsControler(tp) and a:IsOnField() and a:IsSetCard(0x1084))
or (at:IsControler(tp) and at:IsOnField() and at:IsFaceup() and at:IsSetCard(0x84))) or (at:IsControler(tp) and at:IsOnField() and at:IsFaceup() and at:IsSetCard(0x1084)))
end end
function c59627393.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c59627393.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,59627393)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return Duel.GetFlagEffect(tp,59627393)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
...@@ -14,7 +14,7 @@ function c68144350.initial_effect(c) ...@@ -14,7 +14,7 @@ function c68144350.initial_effect(c)
Duel.AddCustomActivityCounter(68144350,ACTIVITY_SPSUMMON,c68144350.counterfilter) Duel.AddCustomActivityCounter(68144350,ACTIVITY_SPSUMMON,c68144350.counterfilter)
end end
function c68144350.counterfilter(c) function c68144350.counterfilter(c)
return c:IsSetCard(0x84) return c:IsSetCard(0x1084)
end end
function c68144350.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c68144350.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(68144350,tp,ACTIVITY_SPSUMMON)==0 end if chk==0 then return Duel.GetCustomActivityCount(68144350,tp,ACTIVITY_SPSUMMON)==0 end
...@@ -29,10 +29,10 @@ function c68144350.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,10 +29,10 @@ function c68144350.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c68144350.splimit(e,c,sump,sumtype,sumpos,targetp,se) function c68144350.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x84) return not c:IsSetCard(0x1084)
end end
function c68144350.filter(c,e,tp) function c68144350.filter(c,e,tp)
return c:IsSetCard(0x84) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x1084) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c68144350.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c68144350.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c68144350.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c68144350.filter(chkc,e,tp) end
......
...@@ -34,7 +34,7 @@ function c71921856.initial_effect(c) ...@@ -34,7 +34,7 @@ function c71921856.initial_effect(c)
end end
aux.xyz_number[71921856]=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(0x1084) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end end
function c71921856.target(e,tp,eg,ep,ev,re,r,rp,chk) function c71921856.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
...@@ -60,7 +60,7 @@ function c71921856.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function c71921856.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and ct>0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and ct>0
end end
function c71921856.spfilter(c,e,tp) function c71921856.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x84) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsSetCard(0x1084) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c71921856.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71921856.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71921856.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71921856.spfilter(chkc,e,tp) end
......
...@@ -29,7 +29,7 @@ function c76589815.initial_effect(c) ...@@ -29,7 +29,7 @@ function c76589815.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c76589815.atfilter(c) function c76589815.atfilter(c)
return c:IsFaceup() and c:IsSetCard(0x84) return c:IsFaceup() and c:IsSetCard(0x1084)
end end
function c76589815.atcon(e) function c76589815.atcon(e)
return Duel.IsExistingMatchingCard(c76589815.atfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) return Duel.IsExistingMatchingCard(c76589815.atfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
...@@ -37,7 +37,7 @@ end ...@@ -37,7 +37,7 @@ end
function c76589815.cfcon(e,tp,eg,ep,ev,re,r,rp) function c76589815.cfcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
return (a:IsControler(tp) and a~=e:GetHandler() and a:IsSetCard(0x84)) return (a:IsControler(tp) and a~=e:GetHandler() and a:IsSetCard(0x1084))
or (at and at:IsControler(tp) and at:IsFaceup() and at~=e:GetHandler() and at:IsSetCard(0x84)) or (at and at:IsControler(tp) and at:IsFaceup() and at~=e:GetHandler() and at:IsSetCard(0x84))
end end
function c76589815.cfcost(e,tp,eg,ep,ev,re,r,rp,chk) function c76589815.cfcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -21,7 +21,7 @@ function c79867938.initial_effect(c) ...@@ -21,7 +21,7 @@ function c79867938.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c79867938.tgfilter(c) function c79867938.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x84) and c:IsAbleToGrave() return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1084) and c:IsAbleToGrave()
end end
function c79867938.target(e,tp,eg,ep,ev,re,r,rp,chk) function c79867938.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79867938.tgfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c79867938.tgfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -11,7 +11,7 @@ function c8316565.initial_effect(c) ...@@ -11,7 +11,7 @@ function c8316565.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c8316565.cfilter(c) function c8316565.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x84) return c:IsFaceup() and c:IsSetCard(0x1084)
end end
function c8316565.condition(e,tp,eg,ep,ev,re,r,rp) function c8316565.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
......
...@@ -15,10 +15,10 @@ function c86049351.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,10 +15,10 @@ function c86049351.condition(e,tp,eg,ep,ev,re,r,rp)
if not at or tc:IsFacedown() or at:IsFacedown() then return false end if not at or tc:IsFacedown() or at:IsFacedown() then return false end
if not tc:IsControler(tp) then tc=at end if not tc:IsControler(tp) then tc=at end
e:SetLabelObject(tc) e:SetLabelObject(tc)
return tc:IsControler(tp) and tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(0x84) return tc:IsControler(tp) and tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(0x1084)
end end
function c86049351.filter(c,pos) function c86049351.filter(c,pos)
return c:IsPosition(pos) and c:IsSetCard(0x84) return c:IsPosition(pos) and c:IsSetCard(0x1084)
end end
function c86049351.target(e,tp,eg,ep,ev,re,r,rp,chk) function c86049351.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -24,10 +24,10 @@ function c86325573.valcon(e,re,r,rp) ...@@ -24,10 +24,10 @@ function c86325573.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 return bit.band(r,REASON_BATTLE)~=0
end end
function c86325573.filter(c) function c86325573.filter(c)
return c:GetLevel()>0 and c:IsSetCard(0x84) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) return c:GetLevel()>0 and c:IsSetCard(0x1084) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end end
function c86325573.lvfilter(c) function c86325573.lvfilter(c)
return c:IsFaceup() and c:IsSetCard(0x84) and c:GetLevel()>0 return c:IsFaceup() and c:IsSetCard(0x1084) and c:GetLevel()>0
end end
function c86325573.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86325573.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c86325573.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c86325573.filter(chkc) end
......
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