Commit e1d1bd13 authored by VanillaSalt's avatar VanillaSalt

new

parent 78e397cf
......@@ -15,6 +15,7 @@ function c10389142.initial_effect(c)
e1:SetOperation(c10389142.spop)
c:RegisterEffect(e1)
end
c10389142.xyz_number=42
function c10389142.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
......
......@@ -15,6 +15,7 @@ function c11411223.initial_effect(c)
e1:SetOperation(c11411223.operation)
c:RegisterEffect(e1)
end
c11411223.xyz_number=10
function c11411223.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -27,6 +27,7 @@ function c11522979.initial_effect(c)
e2:SetOperation(c11522979.operation)
c:RegisterEffect(e2)
end
c11522979.xyz_number=69
function c11522979.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
......
......@@ -25,6 +25,7 @@ function c12744567.initial_effect(c)
e2:SetOperation(c12744567.spop)
c:RegisterEffect(e2)
end
c12744567.xyz_number=101
function c12744567.filter(c)
return not c:IsType(TYPE_TOKEN) and c:IsAbleToChangeControler()
and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
......
......@@ -34,6 +34,7 @@ function c1426714.initial_effect(c)
e3:SetValue(c1426714.atkval)
c:RegisterEffect(e3)
end
c1426714.xyz_number=48
function c1426714.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
......
......@@ -17,6 +17,7 @@ function c16037007.initial_effect(c)
e1:SetOperation(c16037007.disop)
c:RegisterEffect(e1)
end
c16037007.xyz_number=74
function c16037007.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
......
......@@ -44,6 +44,7 @@ function c16259549.initial_effect(c)
e4:SetOperation(c16259549.tdop)
c:RegisterEffect(e4)
end
c16259549.xyz_number=49
function c16259549.reccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
......
......@@ -14,6 +14,7 @@ function c19333131.initial_effect(c)
e1:SetOperation(c19333131.operation)
c:RegisterEffect(e1)
end
c19333131.xyz_number=12
function c19333131.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -35,6 +35,7 @@ function c1992816.initial_effect(c)
e3:SetOperation(c1992816.daop)
c:RegisterEffect(e3)
end
c1992816.xyz_number=9
function c1992816.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler()==Duel.GetAttackTarget() and e:GetHandler():GetOverlayCount()~=0
end
......
......@@ -26,6 +26,7 @@ function c20563387.initial_effect(c)
e2:SetOperation(c20563387.rmop)
c:RegisterEffect(e2)
end
c20563387.xyz_number=80
function c20563387.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
......
......@@ -27,6 +27,7 @@ function c2061963.initial_effect(c)
e2:SetOperation(c2061963.deckop)
c:RegisterEffect(e2)
end
c2061963.xyz_number=104
function c2061963.condition(e,tp,eg,ep,ev,re,r,rp,chk)
local ph=Duel.GetCurrentPhase()
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp
......
......@@ -28,6 +28,7 @@ function c20785975.initial_effect(c)
e2:SetOperation(c20785975.spop)
c:RegisterEffect(e2)
end
c20785975.xyz_number=103
function c20785975.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -26,6 +26,7 @@ function c23649496.initial_effect(c)
e2:SetOperation(c23649496.tgop)
c:RegisterEffect(e2)
end
c23649496.xyz_number=18
function c23649496.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -31,6 +31,7 @@ function c23998625.initial_effect(c)
e3:SetOperation(c23998625.spop)
c:RegisterEffect(e3)
end
c23998625.xyz_number=53
function c23998625.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(Duel.GetAttacker())
......
......@@ -21,6 +21,7 @@ function c2407234.initial_effect(c)
e2:SetOperation(c2407234.operation)
c:RegisterEffect(e2)
end
c2407234.xyz_number=69
function c2407234.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
......
......@@ -16,6 +16,7 @@ function c29669359.initial_effect(c)
e1:SetOperation(c29669359.operation)
c:RegisterEffect(e1)
end
c29669359.xyz_number=61
function c29669359.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and not e:GetHandler():IsDirectAttacked() end
......
......@@ -36,6 +36,7 @@ function c2978414.initial_effect(c)
e3:SetOperation(c2978414.efop)
c:RegisterEffect(e3)
end
c2978414.xyz_number=46
function c2978414.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1
end
......
......@@ -24,6 +24,7 @@ function c31320433.initial_effect(c)
e2:SetOperation(c31320433.daop)
c:RegisterEffect(e2)
end
c31320433.xyz_number=47
function c31320433.matfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsType(TYPE_TOKEN) and c:GetLevel()==3 and c:IsAttribute(ATTRIBUTE_WATER)
end
......
......@@ -22,6 +22,7 @@ function c31437713.initial_effect(c)
e2:SetOperation(c31437713.operation)
c:RegisterEffect(e2)
end
c31437713.xyz_number=82
function c31437713.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL)
end
......
......@@ -33,6 +33,7 @@ function c31801517.initial_effect(c)
e3:SetOperation(c31801517.rdop)
c:RegisterEffect(e3)
end
c31801517.xyz_number=62
function c31801517.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c==Duel.GetAttacker() or c==Duel.GetAttackTarget()) and Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL
......
......@@ -16,6 +16,7 @@ function c32003338.initial_effect(c)
e1:SetOperation(c32003338.operation)
c:RegisterEffect(e1)
end
c32003338.xyz_number=34
function c32003338.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -25,6 +25,7 @@ function c32446630.initial_effect(c)
e2:SetOperation(c32446630.operation)
c:RegisterEffect(e2)
end
c32446630.xyz_number=43
function c32446630.atktg(e,c)
return c:IsType(TYPE_TOKEN)
end
......
......@@ -36,6 +36,7 @@ function c32559361.initial_effect(c)
e3:SetOperation(c32559361.damop2)
c:RegisterEffect(e3)
end
c32559361.xyz_number=9
function c32559361.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
......
......@@ -16,6 +16,7 @@ function c33776843.initial_effect(c)
e1:SetOperation(c33776843.operation)
c:RegisterEffect(e1)
end
c33776843.xyz_number=15
function c33776843.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -18,6 +18,7 @@ function c36076683.initial_effect(c)
e1:SetOperation(c36076683.atkop)
c:RegisterEffect(e1)
end
c36076683.xyz_number=73
function c36076683.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
......
--No.65 裁断魔人ジャッジ?バスター
--No.65 裁断魔人ジャッジ・バスター
function c3790062.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),2),2)
......@@ -17,6 +17,7 @@ function c3790062.initial_effect(c)
e1:SetOperation(c3790062.operation)
c:RegisterEffect(e1)
end
c3790062.xyz_number=65
function c3790062.condition(e,tp,eg,ep,ev,re,r,rp,chk)
return rp~=tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
......
......@@ -16,6 +16,7 @@ function c39139935.initial_effect(c)
e1:SetOperation(c39139935.operation)
c:RegisterEffect(e1)
end
c39139935.xyz_number=33
function c39139935.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -27,6 +27,7 @@ function c39972129.initial_effect(c)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
end
c39972129.xyz_number=64
function c39972129.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -20,6 +20,7 @@ function c42421606.initial_effect(c)
e2:SetOperation(c42421606.efop)
c:RegisterEffect(e2)
end
c42421606.xyz_number=85
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
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -23,6 +23,7 @@ function c46871387.initial_effect(c)
e2:SetValue(800)
c:RegisterEffect(e2)
end
c46871387.xyz_number=55
function c46871387.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,46871387)==0 end
Duel.RegisterFlagEffect(tp,46871387,RESET_PHASE+PHASE_END,0,1)
......
......@@ -35,6 +35,7 @@ function c47017574.initial_effect(c)
e3:SetOperation(c47017574.disop)
c:RegisterEffect(e3)
end
c47017574.xyz_number=92
function c47017574.reccon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:GetFirst():IsControler(tp)
end
......
......@@ -15,6 +15,7 @@ function c47387961.initial_effect(c)
e1:SetOperation(c47387961.operation)
c:RegisterEffect(e1)
end
c47387961.xyz_number=8
function c47387961.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
......
......@@ -14,6 +14,7 @@ function c47805931.initial_effect(c)
e1:SetOperation(c47805931.operation)
c:RegisterEffect(e1)
end
c47805931.xyz_number=20
function c47805931.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -22,6 +22,7 @@ function c48739166.initial_effect(c)
e2:SetTarget(c48739166.reptg)
c:RegisterEffect(e2)
end
c48739166.xyz_number=101
function c48739166.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,48739166)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
......
......@@ -13,6 +13,7 @@ function c48928529.initial_effect(c)
e1:SetOperation(c48928529.operation)
c:RegisterEffect(e1)
end
c48928529.xyz_number=83
function c48928529.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -17,6 +17,7 @@ function c48995978.initial_effect(c)
e1:SetOperation(c48995978.operation)
c:RegisterEffect(e1)
end
c48995978.xyz_number=88
function c48995978.filter(c)
return c:GetSequence()~=5
end
......
......@@ -23,6 +23,7 @@ function c49195710.initial_effect(c)
e2:SetCondition(c49195710.accon)
c:RegisterEffect(e2)
end
c49195710.xyz_number=65
function c49195710.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -18,6 +18,7 @@ function c49221191.initial_effect(c)
e1:SetOperation(c49221191.operation)
c:RegisterEffect(e1)
end
c49221191.xyz_number=32
function c49221191.ovfilter(c)
return c:IsFaceup() and c:IsCode(65676461)
end
......
......@@ -28,6 +28,7 @@ function c49456901.initial_effect(c)
e2:SetOperation(c49456901.operation)
c:RegisterEffect(e2)
end
c49456901.xyz_number=104
function c49456901.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
......
......@@ -24,6 +24,7 @@ function c49678559.initial_effect(c)
e1:SetTarget(c49678559.reptg)
c:RegisterEffect(e1)
end
c49678559.xyz_number=102
function c49678559.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -30,6 +30,7 @@ function c50260683.initial_effect(c)
e2:SetOperation(c50260683.desop)
c:RegisterEffect(e2)
end
c50260683.xyz_number=36
function c50260683.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
......
......@@ -16,6 +16,7 @@ function c51735257.initial_effect(c)
e1:SetOperation(c51735257.operation)
c:RegisterEffect(e1)
end
c51735257.xyz_number=50
function c51735257.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0
and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
......@@ -23,6 +23,7 @@ function c53244294.initial_effect(c)
e2:SetOperation(c53244294.zop)
c:RegisterEffect(e2)
end
c53244294.xyz_number=57
function c53244294.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -31,6 +31,7 @@ function c54366836.initial_effect(c)
e3:SetOperation(c54366836.damop2)
c:RegisterEffect(e3)
end
c54366836.xyz_number=54
function c54366836.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==tp and c:IsRelateToBattle()
......
......@@ -14,6 +14,7 @@ function c54719828.initial_effect(c)
e1:SetOperation(c54719828.operation)
c:RegisterEffect(e1)
end
c54719828.xyz_number=16
function c54719828.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -14,6 +14,7 @@ function c55067058.initial_effect(c)
e1:SetOperation(c55067058.rop)
c:RegisterEffect(e1)
end
c55067058.xyz_number=19
function c55067058.rcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_COST)~=0 and re:GetHandler():IsType(TYPE_XYZ)
and ep==e:GetOwnerPlayer() and e:GetHandler():GetOverlayCount()>0 and re:GetHandler():GetOverlayCount()>=ev-1
......
......@@ -14,6 +14,7 @@ function c55727845.initial_effect(c)
e1:SetOperation(c55727845.atkop)
c:RegisterEffect(e1)
end
c55727845.xyz_number=96
function c55727845.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -16,6 +16,7 @@ function c55888045.initial_effect(c)
e1:SetOperation(c55888045.negop)
c:RegisterEffect(e1)
end
c55888045.xyz_number=106
function c55888045.negcon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return (loc==LOCATION_SZONE or loc==LOCATION_MZONE) and not e:GetHandler():IsStatus(STATUS_CHAINING)
......
......@@ -15,6 +15,7 @@ function c55935416.initial_effect(c)
e1:SetOperation(c55935416.drop)
c:RegisterEffect(e1)
end
c55935416.xyz_number=56
function c55935416.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -39,6 +39,7 @@ function c56051086.initial_effect(c)
e4:SetOperation(c56051086.damop)
c:RegisterEffect(e4)
end
c56051086.xyz_number=43
function c56051086.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -14,6 +14,7 @@ function c56840427.initial_effect(c)
e1:SetOperation(c56840427.operation)
c:RegisterEffect(e1)
end
c56840427.xyz_number=39
function c56840427.ovfilter(c)
return c:IsFaceup() and c:IsCode(84013237)
end
......
--RUM-七皇の剣
function c57734012.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_DRAW)
e1:SetCondition(c57734012.regcon)
e1:SetOperation(c57734012.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c57734012.condition)
e2:SetCost(c57734012.cost)
e2:SetTarget(c57734012.target)
e2:SetOperation(c57734012.activate)
c:RegisterEffect(e2)
end
function c57734012.regcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,57734012)==0 and Duel.GetCurrentPhase()==PHASE_DRAW
and e:GetHandler():IsReason(REASON_RULE) and not e:GetHandler():IsPublic()
end
function c57734012.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(57734012,0)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
c:RegisterFlagEffect(57734012,RESET_PHASE+PHASE_MAIN1,0,1)
end
end
function c57734012.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() and e:GetHandler():GetFlagEffect(57734012)~=0
end
function c57734012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,57734012)==0 end
Duel.RegisterFlagEffect(tp,57734012,0,0,0)
end
function c57734012.filter1(c,e,tp)
local no=c.xyz_number
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 not c:IsHasEffect(EFFECT_NECRO_VALLEY)
and Duel.IsExistingMatchingCard(c57734012.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,no)
end
function c57734012.filter2(c,e,tp,no)
return c.xyz_number==no and c:IsSetCard(0x1048) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c57734012.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (not Duel.IsPlayerAffectedByEffect(tp,23516703) or c23516703[tp]==0)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c57734012.filter1,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
end
function c57734012.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,23516703) and c23516703[tp]>0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c57734012.filter1,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc1=g1:GetFirst()
if tc1 and Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c57734012.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc1.xyz_number)
local tc2=g2:GetFirst()
if tc2 then
Duel.Overlay(tc2,g1)
Duel.SpecialSummon(tc2,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
tc2:CompleteProcedure()
end
end
end
......@@ -16,6 +16,7 @@ function c59627393.initial_effect(c)
e1:SetOperation(c59627393.operation)
c:RegisterEffect(e1)
end
c59627393.xyz_number=105
function c59627393.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget()
......
......@@ -40,6 +40,7 @@ function c6165656.initial_effect(c)
e4:SetOperation(c6165656.winop)
c:RegisterEffect(e4)
end
c6165656.xyz_number=88
function c6165656.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x95)
end
......
......@@ -18,6 +18,7 @@ function c62070231.initial_effect(c)
e1:SetOperation(c62070231.operation)
c:RegisterEffect(e1)
end
c62070231.xyz_number=94
function c62070231.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
......
......@@ -16,6 +16,7 @@ function c63746411.initial_effect(c)
e1:SetOperation(c63746411.operation)
c:RegisterEffect(e1)
end
c63746411.xyz_number=106
function c63746411.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:IsActiveType(TYPE_MONSTER)
and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE
......
......@@ -24,6 +24,7 @@ function c6387204.initial_effect(c)
e2:SetOperation(c6387204.lpop)
c:RegisterEffect(e2)
end
c6387204.xyz_number=6
function c6387204.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
......@@ -18,6 +18,7 @@ function c64554883.initial_effect(c)
e1:SetOperation(c64554883.operation)
c:RegisterEffect(e1)
end
c64554883.xyz_number=25
function c64554883.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -16,6 +16,7 @@ function c65676461.initial_effect(c)
e1:SetOperation(c65676461.atop)
c:RegisterEffect(e1)
end
c65676461.xyz_number=32
function c65676461.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
......
......@@ -28,6 +28,7 @@ function c66970002.initial_effect(c)
e2:SetOperation(c66970002.desop)
c:RegisterEffect(e2)
end
c66970002.xyz_number=39
function c66970002.tdcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp
end
......
......@@ -34,6 +34,7 @@ function c67173574.initial_effect(c)
e3:SetOperation(c67173574.operation)
c:RegisterEffect(e3)
end
c67173574.xyz_number=102
function c67173574.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_EFFECT) end
if Duel.SelectYesNo(tp,aux.Stringid(67173574,0)) then
......
......@@ -24,6 +24,7 @@ function c68396121.initial_effect(c)
e2:SetOperation(c68396121.atkop)
c:RegisterEffect(e2)
end
c68396121.xyz_number=107
function c68396121.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -35,6 +35,7 @@ function c69058960.initial_effect(c)
e4:SetValue(1)
c:RegisterEffect(e4)
end
c69058960.xyz_number=13
function c69058960.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -24,6 +24,7 @@ function c69170557.initial_effect(c)
e2:SetOperation(c69170557.ctop)
c:RegisterEffect(e2)
end
c69170557.xyz_number=40
function c69170557.desfilter(c)
return c:GetCounter(0x24)~=0 and c:IsDestructable()
end
......
......@@ -20,6 +20,7 @@ function c69610924.initial_effect(c)
e2:SetCondition(c69610924.dircon)
c:RegisterEffect(e2)
end
c69610924.xyz_number=17
function c69610924.dircon(e)
return e:GetHandler():GetOverlayCount()==0
end
......
......@@ -31,6 +31,7 @@ function c71921856.initial_effect(c)
e3:SetOperation(c71921856.spop)
c:RegisterEffect(e3)
end
c71921856.xyz_number=79
function c71921856.filter(c)
return c:IsSetCard(0x85)
end
......
......@@ -30,6 +30,7 @@ function c7194917.initial_effect(c)
e3:SetOperation(c7194917.posop2)
c:RegisterEffect(e3)
end
c7194917.xyz_number=52
function c7194917.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -24,6 +24,7 @@ function c73445448.initial_effect(c)
e2:SetOperation(c73445448.operation)
c:RegisterEffect(e2)
end
c73445448.xyz_number=22
function c73445448.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
......
......@@ -16,6 +16,7 @@ function c75253697.initial_effect(c)
e1:SetOperation(c75253697.desop)
c:RegisterEffect(e1)
end
c75253697.xyz_number=72
function c75253697.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
......
......@@ -25,6 +25,7 @@ function c75433814.initial_effect(c)
e2:SetOperation(c75433814.desop)
c:RegisterEffect(e2)
end
c75433814.xyz_number=40
function c75433814.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -33,6 +33,7 @@ function c76067258.initial_effect(c)
e3:SetTarget(c76067258.reptg)
c:RegisterEffect(e3)
end
c76067258.xyz_number=66
function c76067258.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -30,6 +30,7 @@ function c77205367.initial_effect(c)
e3:SetOperation(c77205367.atkop)
c:RegisterEffect(e3)
end
c77205367.xyz_number=96
function c77205367.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==tp and c:IsRelateToBattle() and eg:GetFirst()==c:GetBattleTarget()
......
......@@ -16,6 +16,7 @@ function c80117527.initial_effect(c)
e1:SetOperation(c80117527.operation)
c:RegisterEffect(e1)
end
c80117527.xyz_number=11
function c80117527.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and e:GetHandler():GetAttackAnnouncedCount()==0 end
......
......@@ -16,6 +16,7 @@ function c80764541.initial_effect(c)
e1:SetOperation(c80764541.desop)
c:RegisterEffect(e1)
end
c80764541.xyz_number=44
function c80764541.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -31,6 +31,7 @@ function c81330115.initial_effect(c)
e3:SetTargetRange(1,0)
c:RegisterEffect(e3)
end
c81330115.xyz_number=30
function c81330115.atcon(e)
return e:GetHandler():GetOverlayCount()==0
end
......
......@@ -14,6 +14,7 @@ function c82308875.initial_effect(c)
e1:SetOperation(c82308875.operation)
c:RegisterEffect(e1)
end
c82308875.xyz_number=7
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
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -23,6 +23,7 @@ function c84013237.initial_effect(c)
e2:SetOperation(c84013237.desop)
c:RegisterEffect(e2)
end
c84013237.xyz_number=39
function c84013237.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -14,6 +14,7 @@ function c84124261.initial_effect(c)
e1:SetOperation(c84124261.atkop)
c:RegisterEffect(e1)
end
c84124261.xyz_number=39
function c84124261.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -26,6 +26,7 @@ function c84417082.initial_effect(c)
e2:SetOperation(c84417082.operation2)
c:RegisterEffect(e2)
end
c84417082.xyz_number=91
function c84417082.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
......
......@@ -28,6 +28,7 @@ function c85121942.initial_effect(c)
e2:SetOperation(c85121942.desop)
c:RegisterEffect(e2)
end
c85121942.xyz_number=105
function c85121942.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
......
......@@ -16,6 +16,7 @@ function c86532744.initial_effect(c)
e1:SetOperation(c86532744.operation)
c:RegisterEffect(e1)
end
c86532744.xyz_number=39
function c86532744.ovfilter(c)
return c:IsFaceup() and c:IsCode(84013237)
end
......
......@@ -20,6 +20,7 @@ function c87911394.initial_effect(c)
e2:SetOperation(c87911394.atkop)
c:RegisterEffect(e2)
end
c87911394.xyz_number=39
function c87911394.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -17,6 +17,7 @@ function c88120966.initial_effect(c)
e1:SetOperation(c88120966.operation)
c:RegisterEffect(e1)
end
c88120966.xyz_number=15
function c88120966.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
......
......@@ -24,6 +24,7 @@ function c88177324.initial_effect(c)
e2:SetOperation(c88177324.regop)
c:RegisterEffect(e2)
end
c88177324.xyz_number=107
function c88177324.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE and not Duel.CheckPhaseActivity() and Duel.GetCurrentChain()==0
end
......
......@@ -37,6 +37,7 @@ function c89516305.initial_effect(c)
e3:SetOperation(c89516305.atkop)
c:RegisterEffect(e3)
end
c89516305.xyz_number=87
function c89516305.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(89516305)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
......
......@@ -13,6 +13,7 @@ function c89642993.initial_effect(c)
e1:SetOperation(c89642993.efop)
c:RegisterEffect(e1)
end
c89642993.xyz_number=63
function c89642993.efcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,89642993)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -25,6 +25,7 @@ function c9161357.initial_effect(c)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
c9161357.xyz_number=6
function c9161357.eqcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ
end
......
......@@ -32,6 +32,7 @@ function c93108839.initial_effect(c)
e3:SetOperation(c93108839.damop)
c:RegisterEffect(e3)
end
c93108839.xyz_number=58
function c93108839.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
......
--ドン・サウザンドの玉座
function c93238626.initial_effect(c)
c:SetUniqueOnField(1,0,93238626)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(93238626,0))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c93238626.reccon)
e2:SetTarget(c93238626.rectg)
e2:SetOperation(c93238626.recop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(93238626,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetCondition(c93238626.spcon)
e3:SetCost(c93238626.spcost)
e3:SetTarget(c93238626.sptg)
e3:SetOperation(c93238626.spop)
c:RegisterEffect(e3)
if not c93238626.global_check then
c93238626.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLE_DAMAGE)
ge1:SetOperation(c93238626.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c93238626.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(ep,93238626,RESET_PHASE+PHASE_END,0,1)
end
function c93238626.reccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c93238626.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetFlagEffect(tp,93238626)
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*500)
end
function c93238626.recop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=Duel.GetFlagEffect(tp,93238626)
Duel.Recover(p,ct*500,REASON_EFFECT)
end
function c93238626.spcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return at:IsFaceup() and at:IsControler(tp) and at:IsSetCard(0x48) and not at:IsSetCard(0x1048)
end
function c93238626.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c93238626.filter(c,e,tp,no)
return c.xyz_number==no and c:IsSetCard(0x1048) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c93238626.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local no=Duel.GetAttackTarget().xyz_number
return no and Duel.IsExistingMatchingCard(c93238626.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,no)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c93238626.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateAttack() then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end
local tc=Duel.GetAttackTarget()
if tc:IsFacedown() or not tc:IsRelateToBattle() or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c93238626.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc.xyz_number)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
......@@ -25,6 +25,7 @@ function c93568288.initial_effect(c)
e2:SetOperation(c93568288.rmop)
c:RegisterEffect(e2)
end
c93568288.xyz_number=80
function c93568288.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
......
......@@ -17,6 +17,7 @@ function c94380860.initial_effect(c)
e1:SetOperation(c94380860.operation)
c:RegisterEffect(e1)
end
c94380860.xyz_number=103
function c94380860.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -35,6 +35,7 @@ function c95442074.initial_effect(c)
e4:SetValue(1)
c:RegisterEffect(e4)
end
c95442074.xyz_number=31
function c95442074.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
......@@ -56,6 +56,7 @@ function c97403510.initial_effect(c)
Duel.RegisterEffect(ge1,0)
end
end
c97403510.xyz_number=92
function c97403510.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
......
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