Commit 778e027d authored by Tachibana's avatar Tachibana

ndyd

parent 7d404290
No preview for this file type
--深土之物的唤醒
if not pcall(function() require("expansions/script/c30000100") end) then require("script/c30000100") end
local m,cm = rscf.DefineCard(30013000)
function cm.initial_effect(c)
local e1 = rsef.I(c,"sp",{75,m},"sp",nil,LOCATION_GRAVE,nil,cm.cost,cm.tg,cm.op)
local e2 = rsef.RegisterOPTurn(c,e1,cm.qcon)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 and c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,2,REASON_COST)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.sumlimit)
Duel.RegisterEffect(e2,tp)
end
function cm.qcon(e,tp)
return Duel.IsPlayerAffectedByEffect(tp,30013020)
end
function cm.sumlimit(e,c)
return not c:IsType(TYPE_FLIP)
end
function cm.counterfilter(c)
return c:IsType(TYPE_FLIP)
end
function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_equal,chk)
if bit.band(c:GetType(),0x81)~=0x81 or (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true,POS_FACEDOWN_DEFENSE) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then
mg:Merge(m2)
end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
local lv=level_function(c)
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(c,lv,greater_or_equal)
local res=mg:CheckSubGroup(Auxiliary.RitualCheck,1,lv,tp,c,lv,greater_or_equal)
Auxiliary.GCheckAdditional=nil
return res
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x93c)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg1=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(cm.RitualUltimateFilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,cm.filter,e,tp,mg1,Group.CreateGroup(),Card.GetLevel,"Equal")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.RitualUltimateFilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,cm.filter,e,tp,mg1,Group.CreateGroup(),Card.GetLevel,"Equal")
local tc=g:GetFirst()
if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Equal")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Equal")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,tc)
tc:CompleteProcedure()
end
end
--深土之物的苏醒
if not pcall(function() require("expansions/script/c30000100") end) then require("script/c30000100") end
local m,cm = rscf.DefineCard(30013005)
function cm.initial_effect(c)
local e1 = rsef.A(c,nil,nil,{1},nil,nil,rscon.excard2(Card.IsSetCard,LOCATION_ONFIELD,0,1,nil,0x93c),nil,cm.tg,cm.act)
local e2 = rsef.QO(c,nil,"pos",{1,m},"pos","tg",LOCATION_GRAVE,nil,rscost.cost({Card.IsAbleToDeckAsCost,"dum"},{cm.tdfilter,{"td",cm.fun},LOCATION_GRAVE }),rstg.target(Card.IsCanChangePosition,"pos",LOCATION_MZONE),cm.posop)
end
function cm.posop(e,tp)
local tc = rscf.GetTargetCard()
if not tc then return end
local pos = 0
if tc:IsFaceup() and tc:IsCanTurnSet() then pos = pos | POS_FACEDOWN_DEFENSE end
if tc:IsFacedown() then pos = pos | POS_FACEUP_ATTACK end
if pos == 0 then return end
Duel.ChangePosition(tc,Duel.SelectPosition(tp,tc,pos))
end
function cm.tdfilter(c)
return c:IsAbleToDeckAsCost() and c:IsType(TYPE_FLIP)
end
function cm.fun(g,e,tp)
g:AddCard(e:GetHandler())
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function cm.pfilter(c)
return c:IsFacedown() and c:IsType(TYPE_FLIP) and c:IsCanChangePosition()
end
function cm.pfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_FLIP) and c:IsCanTurnSet()
end
function cm.afilter(c)
return c:IsFaceup() and c:IsType(TYPE_FLIP)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1 = Duel.IsExistingMatchingCard(cm.pfilter,tp,LOCATION_MZONE,0,1,nil)
local b2 = Duel.IsExistingMatchingCard(cm.pfilter2,tp,LOCATION_MZONE,0,1,nil)
local b3 = Duel.IsExistingMatchingCard(cm.afilter,tp,LOCATION_MZONE,0,1,nil)
if chk == 0 then return b1 or b2 or b3 end
local op = rshint.SelectOption(tp,b1,{m,1},b2,"dpd",b3,"atk")
if op == 1 or op == 2 then
e:SetCategory(CATEGORY_POSITION)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,LOCATION_MZONE)
elseif op == 3 then
e:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
end
e:SetLabel(op)
end
function cm.act(e,tp)
local c = e:GetHandler()
local op = e:GetLabel()
local flist = {cm.pfilter,cm.pfilter2,cm.afilter}
local g,tc = rsop.SelectSolve(HINTMSG_SELF,tp,flist[op],tp,LOCATION_MZONE,0,1,1,nil,{})
if not tc then return end
if op == 1 then
Duel.ChangePosition(tc,Duel.SelectPosition(tp,tc,POS_FACEUP))
elseif op == 2 then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
elseif op == 3 then
local atk = tc:GetBaseAttack() + tc:GetBaseDefense()
local e1,e2 = rscf.QuickBuff({e:GetHandler(),tc},"fatk,fdef",atk,"rst",rsrst.std_ep)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
--深土之物 塔里克丝巨蛭
if not pcall(function() require("expansions/script/c30000100") end) then require("script/c30000100") end
local m,cm = rscf.DefineCard(30013010)
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1 = rsef.QO(c,EVENT_CHAINING,"des",{1,m},"des",nil,LOCATION_HAND,cm.descon,rscost.cost(0,"dh"),rsop.target(aux.TRUE,"des",LOCATION_ONFIELD,LOCATION_ONFIELD),cm.desop)
local e2 = rsef.SC_Easy(c,EVENT_FLIP,"cd",nil,cm.regop)
local e3 = rsef.FC_Easy(c,EVENT_FLIP,nil,LOCATION_MZONE,nil,cm.regop2)
e2:SetLabelObject(e3)
local e4 = rsef.FC(c,EVENT_PHASE+PHASE_END,nil,1,"cd",LOCATION_MZONE,nil,cm.drop)
e4:SetLabelObject(e3)
local e5 = rsef.FTO(c,EVENT_PHASE+PHASE_END,"pos",{1,m+100},"pos,tg",nil,LOCATION_GRAVE,nil,rscost.cost(1,"dh"),rsop.target({cm.pfilter,"pos",LOCATION_MZONE},{cm.tgfilter,"tg",LOCATION_GRAVE}),cm.tgop)
local e6 = rsef.RegisterOPTurn(c,e5,cm.qcon)
e6:SetCode(EVENT_FREE_CHAIN)
end
function cm.qcon(e,tp)
return Duel.IsPlayerAffectedByEffect(tp,30013020)
end
function cm.pfilter(c)
return c:IsType(TYPE_FLIP) and c:IsFaceup() and c:IsCanTurnSet()
end
function cm.tgfilter(c)
return c:IsSetCard(0x93c) and c:IsAbleToGrave()
end
function cm.tgop(e,tp)
local g,tc = rsop.SelectSolve("pos",tp,cm.pfilter,tp,LOCATION_MZONE,0,1,1,nil,{})
if not tc or Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) <= 0 then return end
rsop.SelectOC(nil,true)
rsop.SelectToGrave(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.drop(e,tp)
local c = e:GetHandler()
local ct = e:GetLabelObject():GetLabel()
if ct > 0 and not c:IsDisabled() then
rshint.Card(m)
Duel.Draw(tp,ct,REASON_EFFECT)
end
e:GetLabelObject():SetLabel(0)
end
function cm.regop2(e,tp)
rshint.Card(m)
local ct = (e:GetLabel() or 0) +1
if not Duel.IsPlayerAffectedByEffect(tp,30013020) then
e:SetLabel(ct)
else
Duel.Draw(tp,ct,REASON_EFFECT)
e:SetLabel(0)
end
end
function cm.regop(e,tp)
e:GetLabelObject():SetLabel(0)
e:GetHandler():RegisterFlagEffect(m,rsrst.std,0,1)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_FLIP)
end
function cm.desop(e,tp)
rsop.SelectDestroy(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,{})
end
\ No newline at end of file
--深土之物 塔里克丝贝牛
if not pcall(function() require("expansions/script/c30000100") end) then require("script/c30000100") end
local m,cm = rscf.DefineCard(30013015)
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1 = rsef.QO(c,EVENT_CHAINING,{m,1},{75,m},nil,"dsp,dcal",LOCATION_HAND,cm.imcon,rscost.cost(0,"dh"),rsop.target(cm.cfilter,"dum",LOCATION_MZONE),cm.imop)
local e2 = rsef.STO_Flip(c,"sp",{75,m+100},"sp,pos,dd","de",aux.NOT(cm.qcon),nil,nil,cm.spop)
local e3 = rsef.STO_Flip(c,"sp",{75,m+100},"sp,pos,dd","de",cm.qcon,nil,rsop.target(cm.spfilter,"sp",rsloc.dg),cm.spop3)
local e4 = rsef.FTO(c,EVENT_PHASE+PHASE_END,"pos",{1,m+200},"pos,se,th",nil,LOCATION_GRAVE,nil,rscost.cost(1,"dh"),rsop.target({cm.pfilter,"pos",LOCATION_MZONE},{cm.thfilter,"th",rsloc.dg}),cm.posop)
local e5 = rsef.RegisterOPTurn(c,e4,cm.qcon)
e5:SetCode(EVENT_FREE_CHAIN)
end
function cm.pfilter(c)
return c:IsFacedown() and c:IsCanChangePosition()
end
function cm.thfilter(c)
return c:IsSetCard(0x93c) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function cm.posop(e,tp)
local g,tc = rsop.SelectSolve("pos",tp,cm.pfilter,tp,LOCATION_MZONE,0,1,1,nil,{})
if not tc or Duel.ChangePosition(tc,Duel.SelectPosition(tp,tc,POS_FACEUP)) <= 0 then return end
rsop.SelectOC(nil,true)
rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter),tp,rsloc.dg,0,1,1,nil,{})
end
function cm.qcon(e,tp)
return Duel.IsPlayerAffectedByEffect(tp,30013020)
end
function cm.spop(e,tp)
local c = rscf.GetFaceUpSelf(e)
local e1 = rsef.FC({e:GetHandler(),tp},EVENT_PHASE+PHASE_END,nil,1,nil,nil,cm.spcon2,cm.spop2,rsrst.ep)
if c and c:IsCanTurnSet() and rshint.SelectYesNo(tp,"pos") then
Duel.BreakEffect()
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
end
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_FLIP) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function cm.spcon2(e,tp)
return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.spfilter),tp,rsloc.dg,0,1,nil,e,tp)
end
function cm.spop2(e,tp)
rshint.Card(m)
local ct,og = rsop.SelectSpecialSummon(tp,aux.NecroValleyFilter(cm.spfilter),tp,rsloc.dg,0,1,1,nil,{0,tp,tp,false,false,POS_FACEDOWN_DEFENSE},e,tp)
if ct > 0 then
Duel.ConfirmCards(1-tp,og)
end
end
function cm.spop3(e,tp)
local c = rscf.GetFaceUpSelf(e)
local ct,og = rsop.SelectSpecialSummon(tp,aux.NecroValleyFilter(cm.spfilter),tp,rsloc.dg,0,1,1,nil,{0,tp,tp,false,false,POS_FACEDOWN_DEFENSE},e,tp)
if ct <= 0 then return end
Duel.ConfirmCards(1-tp,og)
if c and c:IsCanTurnSet() and rshint.SelectYesNo(tp,"pos") then
Duel.BreakEffect()
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
end
end
function cm.imcon(e,tp,eg,ep,ev,re,r,rp)
return rp ~= tp
end
function cm.cfilter(c)
return c:IsType(TYPE_FLIP) or c:IsFacedown() or c:IsSetCard(0x93c)
end
function cm.imop(e,tp)
local g = Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local e1 = rscf.QuickBuff({e:GetHandler(),tc},"im",rsval.imoe,"rst",RESET_CHAIN)
end
end
\ No newline at end of file
--深土看守者 花鸟龙 普拉库利
if not pcall(function() require("expansions/script/c30000100") end) then require("script/c30000100") end
local m,cm = rscf.DefineCard(30013020)
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1 = rsef.FC_DestroyReplace(c,nil,LOCATION_HAND,cm.repfilter,rsop.cost(0,"dh"))
local e2 = rsef.STO_Flip(c,{m,0},nil,nil,"de",aux.NOT(cm.qcon),nil,nil,cm.pop)
local e4 = rsef.STO_Flip(c,{m,0},nil,nil,"de",cm.qcon,cm.ptg3,nil,cm.pop3)
local e3 = rsef.FTO(c,EVENT_PHASE+PHASE_END,"sp",1,"sp,td",nil,LOCATION_GRAVE,nil,rscost.reglabel(100),cm.rittg,cm.ritop)
local e5 = rsef.FV_Player(c,m,1,nil,{1,0},nil,LOCATION_SZONE,cm.acon)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_INACTIVATE)
e6:SetRange(LOCATION_SZONE)
e6:SetCondition(cm.acon)
e6:SetValue(cm.effectfilter)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_CANNOT_DISEFFECT)
e7:SetRange(LOCATION_SZONE)
e7:SetCondition(cm.acon)
e7:SetValue(cm.effectfilter)
c:RegisterEffect(e7)
local e8 = rsef.I(c,"sum",1,"sum",nil,LOCATION_SZONE,cm.acon,nil,rsop.target(cm.sumfilter,"sum",LOCATION_HAND),cm.sumop)
local e9 = rsef.RegisterOPTurn(c,e8,cm.qcon)
end
function cm.effectfilter(e,ct)
local p=e:GetHandlerPlayer()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return p==tp and te:IsHasType(EFFECT_TYPE_FLIP)
end
function cm.sumfilter(c)
return c:IsMSetable(true,nil)
end
function cm.sumop(e,tp)
local g,tc = rsop.SelectSolve("sum",tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil,{})
if tc then
Duel.MSet(tp,tc,true,nil)
end
end
function cm.acon(e,tp)
return e:GetHandler():GetFlagEffect(m) > 0
end
function cm.qcon(e,tp)
return Duel.IsPlayerAffectedByEffect(tp,m)
end
function cm.ptg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.GetLocationCount(tp,LOCATION_SZONE) > 0 end
end
function cm.pop3(e,tp)
local c = rscf.GetFaceUpSelf(e)
if not c or Duel.GetLocationCount(tp,LOCATION_SZONE) <= 0 then return end
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1 = rscf.QuickBuff_ND(c,"type",TYPE_SPELL+TYPE_CONTINUOUS,rsrst.std - RESET_TURN_SET)
Duel.BreakEffect()
c:RegisterFlagEffect(m,rsrst.std,0,1)
end
end
function cm.pop(e,tp)
local c = e:GetHandler()
c:RegisterFlagEffect(m,rsrst.std_ep,0,1)
local e1 = rsef.FC({c,tp},EVENT_PHASE+PHASE_END,nil,1,nil,nil,cm.pcon2,cm.pop2,rsrst.ep)
end
function cm.pcon2(e,tp)
return e:GetHandler():GetFlagEffect(m) > 0 and Duel.GetLocationCount(tp,LOCATION_SZONE) > 0
end
function cm.pop2(e,tp)
rshint.Card(m)
local c = e:GetHandler()
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1 = rscf.QuickBuff_ND(c,"type",TYPE_SPELL+TYPE_CONTINUOUS,rsrst.std - RESET_TURN_SET)
Duel.BreakEffect()
c:RegisterFlagEffect(m,rsrst.std,0,1)
end
end
function cm.repfilter(c,e,tp)
return c:IsFaceup() and (c:IsType(TYPE_FLIP) or c:IsSetCard(0x93c)) and c:IsReason(REASON_EFFECT+REASON_BATTLE)
end
function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_equal,chk)
if bit.band(c:GetType(),0x81)~=0x81 or (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true,POS_FACEDOWN_DEFENSE) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then
mg:Merge(m2)
end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
local lv=level_function(c)
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(c,lv,greater_or_equal)
local res=mg:CheckSubGroup(Auxiliary.RitualCheck,1,lv,tp,c,lv,greater_or_equal)
Auxiliary.GCheckAdditional=nil
return res
end
function cm.filter(c,e,tp)
return true
end
function cm.mfilter(c)
return c:GetLevel()>0 and c:IsType(TYPE_FLIP) and c:IsAbleToDeck()
end
function cm.dfilter(c,e,tp)
if not c:IsDiscardable() then return false end
local mg1=Duel.GetRitualMaterial(tp):Filter(aux.TRUE,c)
local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil)
return cm.RitualUltimateFilter(e:GetHandler(),cm.filter,e,tp,mg1,mg2,Card.GetLevel,"Equal")
end
function cm.rittg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel() == 100 then
e:SetLabel(0)
return Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
else
e:SetLabel(0)
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil)
return cm.RitualUltimateFilter(e:GetHandler(),cm.filter,e,tp,mg1,mg2,Card.GetLevel,"Equal")
end
end
if e:GetLabel() == 100 then
e:SetLabel(0)
rsop.SelectToGrave(tp,cm.dfilter,tp,LOCATION_HAND,0,1,1,nil,{REASON_DISCARD+REASON_COST },e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_GRAVE)
end
function cm.ritop(e,tp,eg,ep,ev,re,r,rp)
local tc = rscf.GetSelf(e)
if not tc then return end
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.mfilter),tp,LOCATION_GRAVE,0,nil)
if not cm.RitualUltimateFilter(tc,cm.filter,e,tp,mg1,mg2,Card.GetLevel,"Equal") then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:Merge(mg2)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Equal")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Equal")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
local mat2=mat:Filter(Card.IsLocation,nil,LOCATION_GRAVE):Filter(Card.IsType,nil,TYPE_FLIP)
mat:Sub(mat2)
Duel.ReleaseRitualMaterial(mat)
Duel.SendtoDeck(mat2,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEDOWN_DEFENSE)
tc:CompleteProcedure()
end
end
--深土之下
if not pcall(function() require("expansions/script/c30000100") end) then require("script/c30000100") end
local m,cm = rscf.DefineCard(30013025)
function cm.initial_effect(c)
local e1 = rsef.A(c)
local e2 = rsef.FV_Card(c,"def+",cm.dval,aux.TargetBoolFunction(
Card.IsType,TYPE_FLIP),{LOCATION_MZONE,0},nil,LOCATION_FZONE)
local e3 = rsef.FV_Player(c,"rm~",1,cm.rmtg,{0,1},"sa",
LOCATION_FZONE)
local e4 = rsef.FC(c,EVENT_CHAIN_NEGATED,nil,nil,nil,LOCATION_FZONE,
cm.drcon,cm.drop)
local e5 = rsef.FC(c,EVENT_CHAIN_DISABLED,nil,nil,nil,LOCATION_FZONE,
cm.drcon,cm.drop)
local e6 = rsef.FC(c,EVENT_DESTROYED,nil,nil,nil,LOCATION_FZONE,
cm.drcon2,cm.drop)
local e7 = rsef.QO_NegateEffect(c,nil,{1,m},LOCATION_GRAVE,
cm.discon,rscost.cost(Card.IsAbleToDeckAsCost,"td"),
"pos",nil,nil,cm.exop)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
if rp == tp or ev < 2 then return false end
local re2,rp2 = Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return rp ~= tp and ev >= 2 and rp2 == tp and (re2:GetHandler():IsSetCard(0x93c) or re2:IsActiveType(TYPE_FLIP)) and Duel.IsChainDisablable(ev)
end
function cm.exop(e,tp,eg,ep,ev,re,r,rp,chk)
if chk ~= 1 then return end
rsop.SelectExPara("pos",true)
rsop.SelectOperate("posd",tp,cm.pfilter,tp,LOCATION_MZONE,0,1,1,nil,{})
end
function cm.pfilter(c)
return c:IsCanTurnSet() or (c:IsCanChangePosition() and (c:IsAttackPos() or c:IsFacedown()))
end
function cm.cfilter(c)
return c:FieldPosCheck() and c:IsType(TYPE_FLIP)
end
function cm.dval(e,c)
local g = Duel.GetMatchingGroup(cm.cfilter,0,rsloc.mg,rsloc.mg,nil)
return g:GetClassCount(Card.GetCode) * 200
end
function cm.rmtg(e,c)
return (c:IsFacedown() or c:IsType(TYPE_FLIP) or c == e:GetHandler() or c:IsSetCard(0x93c) ) and c:IsControler(e:GetHandlerPlayer())
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local rc = re:GetHandler()
--local dp=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_PLAYER)
return rc:IsType(TYPE_FLIP) and ep == tp
end
function cm.drop(e,tp)
rshint.Card(m)
Duel.Draw(tp,1,REASON_EFFECT)
end
function cm.drcon2(e,tp,eg)
return eg:IsExists(cm.desfilter,1,nil,tp)
end
function cm.desfilter(c,tp)
return c:IsType(TYPE_FLIP) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE)
end
\ No newline at end of file
--深土之物的统聚
if not pcall(function() require("expansions/script/c30000100") end) then require("script/c30000100") end
local m,cm = rscf.DefineCard(30013030)
function cm.initial_effect(c)
local e1 = rsef.I(c,"sp",{75,m},"sp,fus",nil,LOCATION_GRAVE,
nil,cm.cost,cm.tg,cm.op)
local e2 = rsef.RegisterOPTurn(c,e1,cm.qcon)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.qcon(e,tp)
return Duel.IsPlayerAffectedByEffect(tp,30013020)
end
function cm.counterfilter(c)
return c:IsType(TYPE_FLIP)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 and c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,2,REASON_COST)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.sumlimit)
Duel.RegisterEffect(e2,tp)
end
function cm.sumlimit(e,c)
return not c:IsType(TYPE_FLIP)
end
function cm.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function cm.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,chkf,m2,chk)
local mg1 = m:Clone()
if c:IsSetCard(0x93c) and not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) then
local mg2=Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
end
if chk then return mg1
else
return c:IsType(TYPE_FUSION) and c:IsType(TYPE_FLIP) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEDOWN_DEFENSE) and c:CheckFusionMaterial(mg1,nil,chkf)
end
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
mg1 = cm.filter2(tc,e,tp,mg1,nil,chkf,nil,true)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,tc)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--深土之下的护卫 森之徘徊者
if not pcall(function() require("expansions/script/c30000100") end) then require("script/c30000100") end
local m,cm = rscf.DefineCard(30013035)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunFun(c,aux.FilterBoolFunction(Card.IsFusionType,TYPE_FLIP),aux.FilterBoolFunction(Card.IsFusionSetCard,0x93c),2,true)
local e1 = rsef.I(c,"td",{1},"td,rec",nil,LOCATION_MZONE,nil,
nil,rsop.target(Card.IsAbleToDeck,"td",rsloc.gr,rsloc.gr),cm.tdop)
local e2 = rsef.RegisterOPTurn(c,e1,cm.qcon)
local e3 = rsef.STO_Flip(c,"th",{75,m+100},"se,th,res","de",
aux.NOT(cm.qcon),nil,
rsop.target({cm.thfilter,"th",rsloc.dg},
{Card.IsReleasableByEffect,"res",rsloc.ho}),cm.thop)
local e4 = rsef.STO_Flip(c,"th",{75,m+100},"se,th,res","de",
cm.qcon,nil,
rsop.target({cm.thfilter,"th",rsloc.dg},
{Card.IsReleasableByEffect,"res",rsloc.ho},{Card.IsAbleToHand,"th",LOCATION_ONFIELD,LOCATION_ONFIELD }),cm.thop)
local e5 = rsef.FTO(c,EVENT_PHASE+PHASE_END,"sp",{1,m+200},"sp",nil,
LOCATION_GRAVE,cm.spcon,rscost.cost(1,"dh"),
rsop.target(cm.spfilter,"sp",LOCATION_GRAVE),cm.spop)
local e6 = rsef.RegisterOPTurn(c,e5,cm.qcon)
end
function cm.spcon(e,tp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.spop(e,tp)
local spct = (cm.qcon(e,tp) and not rssf.CheckBlueEyesSpiritDragon(tp)) and 2 or 1
local ft = Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft <= 0 then return end
spct = math.min(spct, ft)
local ct,og = rsop.SelectOperate("sp",tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,spct,nil,{0,tp,tp,false,false,POS_FACEDOWN_DEFENSE },e,tp)
if ct > 0 then
Duel.ConfirmCards(1-tp,og)
end
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_FLIP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE) > 0
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsType(TYPE_FLIP)
end
function cm.thop(e,tp)
if rsop.SelectOperate("th",tp,cm.thfilter,tp,rsloc.dg,0,1,1,nil,{}) > 0 and rsop.CheckOperateCorrectly(LOCATION_HAND) and rsop.SelectOperate("res",tp,Card.IsReleasableByEffect,tp,rsloc.ho,0,1,2,nil,{}) > 0 then
local ct = Duel.GetOperatedGroup():FilterCount(Card.IsType,nil,TYPE_FLIP)
if ct >= 2 then
if not cm.qcon(e,tp) then
local e1 = rsef.FC({e:GetHandler(),tp},EVENT_PHASE+PHASE_END,nil,1,nil,nil,cm.thcon2,cm.thop2,rsrst.ep)
else
cm.thop2(e,tp)
end
end
end
end
function cm.thcon2(e,tp)
return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function cm.thop2(e,tp)
rshint.Card(m)
local ct = cm.qcon(e,tp) and 2 or 1
rsop.SelectOperate("th",tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil,{})
end
function cm.qcon(e,tp)
return Duel.IsPlayerAffectedByEffect(tp,30013020)
end
function cm.tdop(e,tp)
if rsop.SelectOperate("td",tp,Card.IsAbleToDeck,tp,rsloc.gr,rsloc.gr,1,5,nil,{}) <= 0 then return end
local ct = rsop.GetOperatedCorrectlyCount(rsloc.de)
if ct > 0 then
Duel.BreakEffect()
Duel.Recover(tp,ct * 600, REASON_EFFECT)
end
end
--深土之物 来自深谷的侵染
if not pcall(function() require("expansions/script/c30000100") end) then require("script/c30000100") end
local m,cm = rscf.DefineCard(30013040)
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1 = rsef.QO(c,EVENT_CHAINING,"dd",{75,m},"dd","dsp",
LOCATION_HAND,cm.ddcon,rscost.cost(0,"dh"),
rsop.target(5,"dd"),cm.ddop)
local e2 = rsef.STO_Flip(c,"pos",{75,m+100},"pos","de",
nil,nil,rsop.target(cm.posfilter,"pos",
LOCATION_ONFIELD,LOCATION_ONFIELD),cm.posop)
local e3 = rsef.FTO(c,EVENT_PHASE+PHASE_END,"dis",{1,m+200},
"dis,se,th",nil,LOCATION_GRAVE,nil,rscost.cost(1,"dh"),
rsop.target({aux.disfilter1,"dis",
0,LOCATION_ONFIELD },
{cm.thfilter,"th",rsloc.dg}),cm.thop)
local e4 = rsef.RegisterOPTurn(c,e3,cm.qcon)
end
function cm.qcon(e,tp)
return Duel.IsPlayerAffectedByEffect(tp,30013020)
end
function cm.thfilter(c)
return c:IsSetCard(0x93c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thop(e,tp)
local c = e:GetHandler()
local og,tc = rsop.SelectCards("dis",tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
if not tc then return end
local e1,e2 = rscf.QuickBuff({c,tc},"dis,dise","rst",{rsrst.std_ep,2})
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.BreakEffect()
if not tc:IsDisabled() then return end
rsop.SelectOperate("th",tp,cm.thfilter,tp,rsloc.dg,0,1,1,nil,{ })
end
function cm.posfilter(c)
return c:IsCanTurnSet() and not c:IsComplexType(TYPE_SPELL+TYPE_PENDULUM)
end
function cm.posop(e,tp)
local e1 = rscf.GetSelf(e)
if rsop.SelectOperate("dpd",tp,cm.posfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil,{ }) <= 0 then return end
local sg = Duel.GetOperatedGroup():Filter(Card.IsFacedown,nil)
local sg2 = sg:Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP)
if #sg2 > 0 then
for tc in aux.Next(sg2) do
local e1 = rscf.QuickBuff({c,tc},"tri~","rst",{RESET_EVENT+0x17a0000+RESET_PHASE+PHASE_END,2})
end
Duel.RaiseEvent(sg2,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function cm.ddop(e,tp)
Duel.DiscardDeck(tp,5,REASON_EFFECT)
end
function cm.ddcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_FLIP)
end
--深土之物 斜纹刃刺龙
if not pcall(function() require("expansions/script/c30000100") end) then require("script/c30000100") end
local m,cm = rscf.DefineCard(30013045)
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1 = rsef.FTO(c,EVENT_LEAVE_FIELD,"sp",{75,m},"sp","dsp",
LOCATION_HAND,nil,rscost.cost(0,"dh"),
rsop.target3(cm.check,cm.spfilter,"sp",true,true,true),
cm.spop)
local e2 = rsef.STO_Flip(c,"sset",{75,m+100},"pos","de",
aux.NOT(cm.qcon),nil,nil,cm.setop)
local e3 = rsef.STO_Flip(c,"sset",{75,m+100},"pos","de",
cm.qcon,nil,
rsop.target(cm.setfilter,"sset",LOCATION_GRAVE,LOCATION_GRAVE),
cm.setop)
local e4 = rsef.FTO(c,EVENT_PHASE+PHASE_END,"th",{1,m+200},"th",
nil,LOCATION_GRAVE,nil,rscost.cost(1,"dh"),
rsop.target(cm.thfilter,"th",LOCATION_GRAVE),cm.thop)
local e5 = rsef.RegisterOPTurn(c,e4,cm.qcon)
end
function cm.thfilter(c)
return c:IsSetCard(0x93c) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectOperate("th",tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,2,nil,{})
end
function cm.setfilter(c,e,tp)
return c:IsSSetable() and c:IsType(TYPE_SPELL+TYPE_TRAP) and Duel.GetLocationCount(tp,LOCATION_SZONE) > 0
end
function cm.setop(e,tp)
local c = e:GetHandler()
if c:IsRelateToEffect(e) and c:IsCanTurnSet() and rshint.SelectYesNo(tp,"pos") then
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
end
if not cm.qcon(e,tp) then
local e1 = rsef.FC({c,tp},EVENT_PHASE+PHASE_END,nil,1,nil,nil,cm.setcon2,cm.setop2,rsrst.ep)
else
cm.setop2(e,tp)
end
end
function cm.setcon2(e,tp)
return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp)
end
function cm.setop2(e,tp)
rshint.Card(m)
local ct, og ,tc = rsop.SelectOperate("sset",tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,{},e,tp)
if not tc or not tc:IsSetCard(0x93c) or not tc:IsType(TYPE_TRAP) then return end
local e1 = rscf.QuickBuff({e:GetHandler(),tc},"tas")
end
function cm.qcon(e,tp)
return Duel.IsPlayerAffectedByEffect(tp,30013020)
end
function cm.check(e,tp,eg)
local ct = eg:FilterCount(cm.spfilter,nil,e,tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE) >= ct and (ct <= 1 or not rssf.CheckBlueEyesSpiritDragon(tp))
end
function cm.spfilter(c,e,tp)
return c:GetReasonPlayer() ~= tp and (c:IsPreviousComplexType(TYPE_FLIP) or c:IsPreviousPosition(POS_FACEDOWN)) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and not c:IsLocation(LOCATION_DECK) and (not c:IsLocation(LOCATION_EXTRA) or c:IsFaceup())
end
function cm.spop(e,tp,eg)
local sg = eg:Filter(Card.IsRelateToEffect,nil,e):Filter(cm.spfilter,nil,e,tp)
if #sg <= 0 then return end
local ft = Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft < #sg or (#sg >= 2 and rssf.CheckBlueEyesSpiritDragon(tp)) then return end
Duel.HintSelection(sg)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) > 0 then
Duel.ConfirmCards(1-tp,sg)
end
end
\ No newline at end of file
--vivy
local m=33502900
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,33502900)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.descon)
c:RegisterEffect(e2)
--activate from hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(cm.mfilter))
e1:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e1)
end
function cm.mfilter(c,g)
return aux.IsCodeListed(c,33502900)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return re and aux.IsCodeListed(re:GetHandler(),33502900)
end
function cm.thfilter(c)
return aux.IsCodeListed(c,33502900) and c:IsType(TYPE_TRAP)
and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--奇点计划
local m=33502902
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,33502900)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+1)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
end
function cm.filter(c,e,tp)
return c:IsCode(33502900) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(cm.efilter)
e4:SetOwnerPlayer(tp)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.thfilter(c)
return c:IsAbleToDeck() and c:IsCode(33502900)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToHand() and Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--使命的破灭
local m=33502904
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,33502900)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(33502900) and c:IsReleasable()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not re:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SendtoGrave(eg,REASON_RULE)
end
Duel.NegateActivation(ev)
end
function cm.thfilter(c)
return c:IsAbleToDeck() and aux.IsCodeListed(c,33502900)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) and c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local g=Group.FromCards(c,tc)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--情感的思索
local m=33502906
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,33502900)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
--act limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1)
e3:SetCondition(cm.con)
e3:SetValue(cm.aclimit)
c:RegisterEffect(e3)
end
function cm.tdfilter(c)
return aux.IsCodeListed(c,33502900) and c:IsAbleToGrave() and c:IsFaceup()
end
function cm.thfilter(c)
return aux.IsCodeListed(c,33502900) and c:IsAbleToHand()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
if #sg>0 then Duel.SendtoHand(sg,nil,REASON_EFFECT) end
end
end
function cm.ccfilter(c)
return c:IsFaceup() and c:IsCode(33502900)
end
function cm.con(e)
return Duel.IsExistingMatchingCard(cm.ccfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsLocation(LOCATION_HAND) and re:GetHandler():IsType(TYPE_MONSTER)
end
--DIVA
local m=33502908
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,33502900)
--code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetRange(LOCATION_GRAVE+LOCATION_MZONE)
e0:SetValue(33502900)
c:RegisterEffect(e0)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
--activate from hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTarget(aux.TargetBoolFunction(cm.filter))
e1:SetTargetRange(LOCATION_SZONE,0)
c:RegisterEffect(e1)
end
function cm.filter(c)
return aux.IsCodeListed(c,33502900)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,nil,nil)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if #cg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=cg:Select(tp,1,1,nil)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
local sg=Duel.GetMatchingGroup(cm.thfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if #sg<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local zg=sg:Select(tp,1,1,nil)
if Duel.SSet(tp,zg)~=0 then
Duel.ConfirmCards(1-tp,zg)
end
end
end
function cm.thfilter1(c)
return c:IsType(TYPE_TRAP) and aux.IsCodeListed(c,33502900) and c:IsSSetable()
end
\ No newline at end of file
--银河之歌
local m=33502910
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,33502900)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.spfilter(c,e,tp,mc)
if Duel.GetMZoneCount(tp,mc,tp)<1 then return false end
if c:IsCode(33502900) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
return true
elseif c:IsCode(33502908) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then
return true
else
return false
end
end
function cm.thfilter(c,e,tp)
return aux.IsCodeListed(c,33502900) and c:IsAbleToGrave() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp,c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp)
if g2:GetCount()>0 then
if Duel.SendtoGrave(g2,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp,g2)
if g1:GetCount()>0 then
local tc=g1:GetFirst()
local stp=0
if tc:IsCode(33502908) then
stp=SUMMON_TYPE_RITUAL
end
if Duel.SpecialSummonStep(tc,stp,tp,tp,false,true,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end
Duel.SpecialSummonComplete()
end
end
end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and re:GetHandler():IsLocation(LOCATION_ONFIELD) and aux.IsCodeListed(re:GetHandler(),33502900)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--终焉世界变奏曲
local m=33502912
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,33502900)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsCode(33502900)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)>0 end
local g=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local atk=0
local tc=g:GetFirst()
while tc do
atk=atk+tc:GetTextAttack()
tc=g:GetNext()
end
if atk<0 then atk=0 end
e:SetLabel(atk)
Duel.Release(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local res=e:GetLabel()~=0
e:SetLabel(0)
return res
end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(e:GetLabel())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel())
e:SetLabel(0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
Duel.Damage(1-p,d,REASON_EFFECT)
end
\ No newline at end of file
--萤石眼之歌
local m=33502914
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,33502900)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.rmcon)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)>0
end
function cm.filter(c)
return c:IsCode(33502900)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil)
if g:GetCount()==0 then return end
local ctf=Duel.GetTurnCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,ctf,nil)
local ct=Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
if ct>0 then
Duel.BreakEffect()
Duel.Recover(tp,ct*500,REASON_EFFECT)
end
end
\ No newline at end of file
--命运的馈赠-茉芳
local m=33591001
local cm=_G["c"..m]
function cm.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetCondition(aux.exccon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
if c:IsLocation(LOCATION_HAND) then
return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,TYPE_TRAP)
else
return true
end
end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local dg=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c,TYPE_TRAP)
Duel.Release(dg,REASON_COST)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCurrentChain()
if ct<2 then return end
local te=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te and te:GetHandlerPlayer()==tp and rp==1-tp and re:IsActiveType(TYPE_TRAP)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ng=Group.CreateGroup()
local dg=Group.CreateGroup()
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(i) then
local tc=te:GetHandler()
ng:AddCard(tc)
end
end
Duel.SetTargetCard(ng)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local dg=Group.CreateGroup()
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
Duel.NegateActivation(i)
end
end
function cm.thfilter(c)
return c:IsSSetable() and c:GetType()==TYPE_TRAP
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--天上人间音何在
function c37901000.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c37901000.spcost)
e1:SetTarget(c37901000.target)
e1:SetOperation(c37901000.operation)
c:RegisterEffect(e1)
--spsummon
local e11=Effect.CreateEffect(c)
e11:SetCategory(CATEGORY_TOHAND)
e11:SetProperty(EFFECT_FLAG_CARD_TARGET)
e11:SetType(EFFECT_TYPE_QUICK_O)
e11:SetCode(EVENT_FREE_CHAIN)
e11:SetRange(LOCATION_GRAVE)
e11:SetCountLimit(1,37901000)
e11:SetCondition(c37901000.spcon)
e11:SetTarget(c37901000.thtg)
e11:SetOperation(c37901000.thop)
c:RegisterEffect(e11)
end
function c37901000.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c37901000.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
Duel.SetTargetParam(Duel.SelectOption(tp,1076,1056,1063,1073))
end
function c37901000.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local opt=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local ct=nil
if opt==0 then ct=TYPE_LINK end
if opt==1 then ct=TYPE_FUSION end
if opt==2 then ct=TYPE_SYNCHRO end
if opt==3 then ct=TYPE_XYZ end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetLabel(ct)
e1:SetTargetRange(1,1)
e1:SetTarget(c37901000.sumlimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c37901000.distg)
e2:SetLabel(ct)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
function c37901000.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsType(e:GetLabel())
end
function c37901000.distg(e,c)
return c:IsType(e:GetLabel())
end
function c37901000.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0
end
function c37901000.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c37901000.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--机娘·「太虚」
local m=37901001
local cm=_G["c"..m]
function cm.initial_effect(c)
--e1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cf11,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.cf12,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end)
c:RegisterEffect(e1)
--e2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,m+13)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tf2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tf2),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--e4
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CHANGE_DAMAGE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetCondition(function(e)
return Duel.IsExistingMatchingCard(cm.cf11,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.cf12,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end)
e4:SetValue(function(e,re,dam,r,rp,rc)
if dam-800<0 then return 0 end
return dam-800
end)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_UPDATE_DEFENSE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x388))
e5:SetCondition(function(e)
return Duel.IsExistingMatchingCard(cm.cf11,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.cf12,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end)
e5:SetValue(800)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_DISABLE)
e6:SetValue(1)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e7)
end
--e1
function cm.cf11(c)
return c:IsCode(m+1) and c:IsFaceup()
end
function cm.cf12(c)
return c:IsCode(m+2) and c:IsFaceup()
end
--e2
function cm.tf2(c)
return c:IsSetCard(0x388) and c:IsAbleToHand()
end
\ No newline at end of file
--机娘·「蓝瞳」
local m=37901002
local cm=_G["c"..m]
function cm.initial_effect(c)
--e1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(function(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.cf1,c:GetControler(),LOCATION_MZONE,0,1,nil)
end)
c:RegisterEffect(e1)
--e2
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetCondition(function(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end)
e2:SetValue(function(e,re,dam,r,rp,rc)
local dam=dam-Duel.GetMatchingGroupCount(cm.cf1,e:GetHandler():GetControler(),LOCATION_MZONE,0,nil)*500/Duel.GetMatchingGroupCount(cm.cf12,e:GetHandler():GetControler(),LOCATION_MZONE,0,nil)
if dam<0 then return 0 end
return dam
end)
c:RegisterEffect(e2)
--e3
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cf3,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end)
e3:SetValue(500)
c:RegisterEffect(e3)
end
--e1
function cm.cf1(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x388)
end
function cm.cf12(c)
return c:IsFaceup() and c:IsCode(m) and not c:IsDisabled()
end
--e3
function cm.cf3(c)
return c:IsCode(m+1) and c:IsFaceup()
end
\ No newline at end of file
--机娘·「赤红」
local m=37901003
local cm=_G["c"..m]
function cm.initial_effect(c)
--e1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(function(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.cf1,c:GetControler(),LOCATION_MZONE,0,1,nil)
end)
c:RegisterEffect(e1)
--e2
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetCondition(function(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end)
e2:SetValue(function(e,re,dam,r,rp,rc)
return dam+Duel.GetMatchingGroupCount(cm.cf11,e:GetHandler():GetControler(),LOCATION_MZONE,0,nil)*500/Duel.GetMatchingGroupCount(cm.cf12,e:GetHandler():GetControler(),LOCATION_MZONE,0,nil)
end)
c:RegisterEffect(e2)
--e3
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cf3,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end)
e3:SetValue(500)
c:RegisterEffect(e3)
end
--e1
function cm.cf11(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x388)
end
function cm.cf12(c)
return c:IsFaceup() and c:IsCode(m) and not c:IsDisabled()
end
--e3
function cm.cf3(c)
return c:IsCode(m-1) and c:IsFaceup()
end
\ No newline at end of file
--机娘·「夜刃」
local m=37901004
local cm=_G["c"..m]
function cm.initial_effect(c)
--e1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
(not Duel.IsExistingMatchingCard(cm.cf1,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
or Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0)
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end)
c:RegisterEffect(e1)
--e2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,m+11)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tf2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.tf2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--e4
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m+12)
e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsType(TYPE_MONSTER) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_MONSTER) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_MONSTER)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end)
c:RegisterEffect(e4)
end
--e1
function cm.cf1(c)
return c:IsFacedown() or not c:IsSetCard(0x388)
end
--e2
function cm.tf2(c)
return c:IsSetCard(0x388) and c:IsAbleToHand() and not c:IsCode(m)
end
\ No newline at end of file
--机娘·「破山」
local m=37901005
local cm=_G["c"..m]
function cm.initial_effect(c)
--e1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tf1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.tf1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--e3
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+12)
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,e:GetHandler(),0x388)
end)
e3:SetTarget(function(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:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end)
c:RegisterEffect(e3)
--e4
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,m+13)
e4:SetCondition(aux.exccon)
e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tf4,tp,LOCATION_REMOVED,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.tf4,tp,LOCATION_REMOVED,0,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,LOCATION_REMOVED)
end)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tf4,tp,LOCATION_REMOVED,0,e:GetHandler())
if e:GetHandler():IsRelateToEffect(e) and Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)~=0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end)
c:RegisterEffect(e4)
end
--e1
function cm.tf1(c)
return c:IsSetCard(0x388) and c:IsAbleToHand() and not c:IsCode(m)
end
--e4
function cm.tf4(c)
return c:IsSetCard(0x388) and c:IsAbleToHand() and c:IsFaceup()
end
\ No newline at end of file
--机娘·「猎手」
local m=37901006
local cm=_G["c"..m]
function cm.initial_effect(c)
--e1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tf1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.tf1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--e3
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+13)
e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsType(TYPE_SPELL+TYPE_TRAP) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end)
c:RegisterEffect(e3)
--e4
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,m+14)
e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
if c==nil then return true end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.cf4,tp,LOCATION_MZONE,0,1,nil)
end)
e4:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end)
e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
end
end)
c:RegisterEffect(e4)
end
--e1
function cm.tf1(c)
return c:IsSetCard(0x388) and c:IsAbleToHand() and not c:IsCode(m)
end
--e4
function cm.cf4(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x388)
end
\ No newline at end of file
--虚拟未来世界
local m=37901007
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--e2
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(function(e)
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget()
end)
e2:SetTarget(function(e,c)
return c==Duel.GetAttacker() and c:IsSetCard(0x388)
end)
e2:SetValue(function(e,c)
local d=Duel.GetAttackTarget()
if c:GetAttack()<d:GetAttack() then
return 1000
else return 0 end
end)
c:RegisterEffect(e2)
--e3
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,m)
e3:SetTarget(function(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 cm.tf3(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(cm.tf3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tf3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==3 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end)
c:RegisterEffect(e3)
--e4
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCountLimit(1,m+1)
e4:SetRange(LOCATION_FZONE)
e4:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cof4,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.cof4,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
e:SetLabelObject(g:GetFirst())
end)
e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(cm.tf4,tp,LOCATION_HAND,0,1,e:GetLabelObject(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.tf4,tp,LOCATION_HAND,0,1,1,e:GetLabelObject(),e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end)
c:RegisterEffect(e4)
end
--e3
function cm.tf3(c)
return c:IsSetCard(0x388) and c:IsAbleToDeck() and c:IsFaceup()
end
--e4
function cm.cof4(c)
return c:IsSetCard(0x388) and c:IsAbleToHandAsCost() and c:IsType(TYPE_MONSTER)
end
function cm.tf4(c,e,tp)
return c:IsSetCard(0x388) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
\ No newline at end of file
--虚拟未来
local m=37901008
local cm=_G["c"..m]
function cm.initial_effect(c)
--e1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.of1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,cm.of1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end)
c:RegisterEffect(e1)
--e2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cof2,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.cof2,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,2,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local c=g:GetFirst()
if g:GetCount()>0 then
if c:IsSetCard(0x388) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)~=0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else
Duel.DiscardDeck(tp,1,REASON_EFFECT+REASON_REVEAL)
end
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
Duel.ShuffleDeck(tp)
end
end)
c:RegisterEffect(e2)
--e3
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x388))
e3:SetValue(200)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
end
--e1
function cm.of1(c)
return c:IsSetCard(0x388) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
--e2
function cm.cof2(c)
return c:IsSetCard(0x388) and c:IsAbleToDeckOrExtraAsCost() and c:IsType(TYPE_MONSTER)
end
\ No newline at end of file
--远古与未来的接触
local m=37901009
local cm=_G["c"..m]
function cm.initial_effect(c)
--e1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tf1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local tn=eg:GetFirst()
while tn do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tn:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tn:RegisterEffect(e2)
tn=eg:GetNext()
end
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(cm.tf1,tp,LOCATION_DECK,0,1,nil)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tf1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end)
c:RegisterEffect(e3)
--e4
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tf2,tp,LOCATION_REMOVED,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.tf2,tp,LOCATION_REMOVED,0,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,LOCATION_REMOVED)
end)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tf2,tp,LOCATION_REMOVED,0,e:GetHandler())
if e:GetHandler():IsRelateToEffect(e) and Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)~=0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,nil,REASON_EFFECT)
end
end)
c:RegisterEffect(e4)
end
--e1
function cm.tf1(c,e,tp)
return c:IsSetCard(0x388) and c:IsAbleToGrave() and c:IsType(TYPE_MONSTER)
end
--e2
function cm.tf2(c,e,tp)
return c:IsSetCard(0x388) and c:IsAbleToGrave() and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
\ No newline at end of file
--机娘·「天切」
local m=37901010
local cm=_G["c"..m]
function cm.initial_effect(c)
--e1
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x388),2,2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tf1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.tf1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
end
end)
c:RegisterEffect(e1)
--e2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(cm.cf2,1,nil,lg)
end)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,0)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end)
c:RegisterEffect(e2)
--e3
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.tf3,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tf3),tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end)
c:RegisterEffect(e3)
end
--e1
function cm.tf1(c)
return c:IsSetCard(0x388) and c:IsType(TYPE_SPELL)
end
--e2
function cm.cf2(c,lg)
return lg:IsContains(c)
end
--e3
function cm.tf3(c,e,tp)
return c:IsSetCard(0x388) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
--机娘·「刃甲」
local m=37901011
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x388),4,2)
c:EnableReviveLimit()
--e1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_CONFIRM)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc and bc:IsFaceup() and bc:IsRelateToBattle()
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local bc=e:GetHandler():GetBattleTarget()
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,bc:GetAttack()/2)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if c:IsFaceup() and c:IsRelateToBattle() and bc:IsFaceup() and bc:IsRelateToBattle() then
local dam=bc:GetAttack()/2
if dam>0 then Duel.Damage(p,dam,REASON_EFFECT) end
end
end)
c:RegisterEffect(e1)
--e2
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
if Duel.SelectEffectYesNo(tp,c,96) then
c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
return true
else return false end
end)
c:RegisterEffect(e2)
--e3
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1,m)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tf3,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
end)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tf3),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
local tc=g:GetFirst()
if c:IsType(TYPE_XYZ) and tc:IsCanOverlay() then
Duel.Overlay(c,Group.FromCards(tc))
end
end)
c:RegisterEffect(e3)
end
--e3
function cm.tf3(c,mc)
return c:IsSetCard(0x388) and mc:IsType(TYPE_XYZ) and c:IsCanOverlay() and c:IsType(TYPE_MONSTER)
end
\ No newline at end of file
--机娘·「虚渊」
local m=37901012
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x388),4,2)
c:EnableReviveLimit()
--e1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e2)
--e3
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e3:SetValue(function(e,c)
return c~=e:GetHandler()
end)
c:RegisterEffect(e3)
--e4
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end)
e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsType(TYPE_MONSTER) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_MONSTER) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_MONSTER)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end)
c:RegisterEffect(e4)
end
--机娘·「破灭」
local m=37901013
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ff,5,false)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_MATERIAL):SetValue(SUMMON_VALUE_SELF)
--e1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and ep==1-tp
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end)
c:RegisterEffect(e1)
--e2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SUMMON)
e1:SetCountLimit(1,m-1)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and Duel.GetCurrentChain()==0
end)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,eg:GetCount(),0,0)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end)
c:RegisterEffect(e2)
--e3
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+8)
e3:SetHintTiming(0,0x1e0)
e3:SetTarget(cm.t3)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if not cm.t3(e,tp,eg,ep,ev,re,r,rp,0) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsControler(tp) then
local seq=c:GetSequence()
if seq>4 then return end
if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then
local flag=0xff
if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=flag & ~(0x1 << seq-1) end
if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=flag & ~(0x1 << seq+1) end
Duel.Hint(HINT_SELECTMSG,tp,571)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local nseq=math.log(s,2)
Duel.MoveSequence(c,nseq)
end
local g=c:GetColumnGroup():Filter(function(c) return c:IsControler(1-tp) end,nil)
if #g>0 then
Duel.BreakEffect()
for tc in aux.Next(g) do
if tc:IsFaceup() and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
end
end
Duel.AdjustInstantly()
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end)
c:RegisterEffect(e3)
end
function cm.ff(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x388) and c:IsLevel(4)
and (not sg or not sg:Filter(Card.IsFusionSetCard,nil,0x388):IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute()))
end
--e3
function cm.t3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local seq=e:GetHandler():GetSequence()
if seq>4 then return false end
return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1))
end
end
\ No newline at end of file
--神装机龙·巴哈姆特
local m=52500001
local cm=_G["c"..m]
Duel.LoadScript("c52500000.lua")
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,cm.mfilter,5,2,cm.ovfilter,aux.Stringid(m,0),3,cm.xyzop)
c:EnableReviveLimit()
--equip
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,1))
e0:SetCategory(CATEGORY_EQUIP)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetTarget(cm.eqtg)
e0:SetOperation(cm.eqop)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m+900+EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(cm.con1)
e2:SetCost(cm.cost)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(cm.con2)
c:RegisterEffect(e3)
end
function cm.mfilter(c)
return c:IsSetCard(0x3be0)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(m+10)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.eqfilter(c,ec)
return c:IsCode(m+6) and c:CheckEquipTarget(ec)
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),c)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION)
and (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousPosition(POS_FACEUP)
end
function cm.spfilter(c,e,tp)
return c:IsCode(m+10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--------------------
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,m+10)
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,m+10)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.filter(c)
return c:GetAttack()>0 and c:IsType(TYPE_MONSTER)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(tc:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
--神装机龙·提玛亚特
local m=52500002
local cm=_G["c"..m]
Duel.LoadScript("c52500000.lua")
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x3be0),3,3)
--
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.linkcon)
e0:SetOperation(cm.linkop)
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--cannot be link material
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetValue(1)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ATTACK_ALL)
e3:SetValue(1)
c:RegisterEffect(e3)
--swap
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.target)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
end
function cm.lmfilter(c,lc)
local tp=lc:GetControler()
return c:IsFaceup() and c:IsCanBeLinkMaterial(lc) and c:IsLinkCode(m+10) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_LMATERIAL) and Duel.GetLocationCountFromEx(tp,tp,c)>0
end
function cm.linkcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.lmfilter,tp,LOCATION_MZONE,0,1,nil,c)
end
function cm.linkop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local mg=Duel.SelectMatchingCard(tp,cm.lmfilter,tp,LOCATION_MZONE,0,1,1,nil,c)
c:SetMaterial(mg)
Duel.SendtoGrave(mg,REASON_LINK)
end
function cm.eqfilter(c,ec)
return c:IsCode(m+6) and c:CheckEquipTarget(ec)
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),c)
end
end
--------------------
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local atk=tc:GetAttack()
local def=tc:GetDefense()
if atk<0 then atk=0 end
if def<0 then def=0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(def)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(atk)
tc:RegisterEffect(e2)
end
end
--神装机龙·法夫纳
local m=52500003
local cm=_G["c"..m]
Duel.LoadScript("c52500000.lua")
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x3be0),3,3)
--
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.linkcon)
e0:SetOperation(cm.linkop)
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--cannot be link material
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetValue(1)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.indtg)
e3:SetOperation(cm.indop)
c:RegisterEffect(e3)
--confirm
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCountLimit(1,m+900)
e4:SetCondition(cm.condition)
e4:SetTarget(cm.target)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
end
function cm.lmfilter(c,lc)
local tp=lc:GetControler()
return c:IsFaceup() and c:IsCanBeLinkMaterial(lc) and c:IsLinkCode(m+10) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_LMATERIAL) and Duel.GetLocationCountFromEx(tp,tp,c)>0
end
function cm.linkcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.lmfilter,tp,LOCATION_MZONE,0,1,nil,c)
end
function cm.linkop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local mg=Duel.SelectMatchingCard(tp,cm.lmfilter,tp,LOCATION_MZONE,0,1,1,nil,c)
c:SetMaterial(mg)
Duel.SendtoGrave(mg,REASON_LINK)
end
function cm.eqfilter(c,ec)
return c:IsCode(m+6) and c:CheckEquipTarget(ec)
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),c)
end
end
--------------------
function cm.indfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5be0)
end
function cm.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.indfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.indfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.indfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e2)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetChainLimit(cm.chlimit)
end
function cm.chlimit(e,ep,tp)
return tp==ep
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)
Duel.ConfirmCards(tp,g)
end
--神装机龙·林德沃姆
local m=52500004
local cm=_G["c"..m]
Duel.LoadScript("c52500000.lua")
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x3be0),3,3)
--
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.linkcon)
e0:SetOperation(cm.linkop)
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--cannot be link material
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetValue(1)
c:RegisterEffect(e2)
--move
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.seqtg)
e3:SetOperation(cm.seqop)
c:RegisterEffect(e3)
--double
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e4:SetCondition(cm.damcon)
e4:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e4)
end
function cm.lmfilter(c,lc)
local tp=lc:GetControler()
return c:IsFaceup() and c:IsCanBeLinkMaterial(lc) and c:IsLinkCode(m+10) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_LMATERIAL) and Duel.GetLocationCountFromEx(tp,tp,c)>0
end
function cm.linkcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.lmfilter,tp,LOCATION_MZONE,0,1,nil,c)
end
function cm.linkop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local mg=Duel.SelectMatchingCard(tp,cm.lmfilter,tp,LOCATION_MZONE,0,1,1,nil,c)
c:SetMaterial(mg)
Duel.SendtoGrave(mg,REASON_LINK)
end
function cm.eqfilter(c,ec)
return c:IsCode(m+6) and c:CheckEquipTarget(ec)
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),c)
end
end
--------------------
function cm.damcon(e)
return e:GetHandler():GetBattleTarget()~=nil
end
function cm.seqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5be0)
end
function cm.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.seqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.seqfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
Duel.SelectTarget(tp,cm.seqfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.tgfilter(c)
return c:IsAbleToGrave()
end
function cm.seqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
if Duel.IsExistingMatchingCard(cm.tgfilter,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--神装机龙·夜刀神
local m=52500005
local cm=_G["c"..m]
Duel.LoadScript("c52500000.lua")
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,cm.mfilter,5,2,cm.ovfilter,aux.Stringid(m,0),3,cm.xyzop)
c:EnableReviveLimit()
--special summon
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e0:SetCode(EVENT_LEAVE_FIELD)
e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e0:SetCountLimit(1,m)
e0:SetCondition(cm.spcon)
e0:SetTarget(cm.sptg)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(cm.incon)
e1:SetValue(1)
c:RegisterEffect(e1)
--attack up
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+900+EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(cm.con1)
e2:SetCost(cm.cost)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(cm.con2)
c:RegisterEffect(e3)
end
function cm.mfilter(c)
return c:IsSetCard(0x3be0)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(m+10)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION)
and (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousPosition(POS_FACEUP)
end
function cm.spfilter(c,e,tp)
return c:IsCode(m+10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--------------------
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,m+10)
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,m+10)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local tct=1
if Duel.GetTurnPlayer()~=tp then tct=2
elseif Duel.GetCurrentPhase()==PHASE_END then tct=3 end
if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp,PHASE_END,tct)
end
end
function cm.incon(e)
return e:GetHandler():GetOverlayCount()>0
end
--神装机龙·堤丰
local m=52500006
local cm=_G["c"..m]
Duel.LoadScript("c52500000.lua")
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,cm.mfilter,5,2,cm.ovfilter,aux.Stringid(m,0),3,cm.xyzop)
c:EnableReviveLimit()
--special summon
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e0:SetCode(EVENT_LEAVE_FIELD)
e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e0:SetCountLimit(1,m)
e0:SetCondition(cm.spcon)
e0:SetTarget(cm.sptg)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--damage
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(aux.bdcon)
e1:SetTarget(cm.damtg)
e1:SetOperation(cm.damop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+900+EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(cm.con1)
e2:SetCost(cm.cost)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(cm.con2)
c:RegisterEffect(e3)
end
function cm.mfilter(c)
return c:IsSetCard(0x3be0)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(m+10)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION)
and (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousPosition(POS_FACEUP)
end
function cm.spfilter(c,e,tp)
return c:IsCode(m+10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--------------------
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local dam=e:GetHandler():GetBattleTarget():GetBaseAttack()
if dam<0 then dam=0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,m+10)
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,m+10)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
--特殊武装·烙印剑
local m=52500007
local cm=_G["c"..m]
Duel.LoadScript("c52500000.lua")
function cm.initial_effect(c)
Chiyuki.ChronicleEquip(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(cm.eqlimit)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--Pierce
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e4)
--remove overlay replace
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE)
e6:SetRange(LOCATION_SZONE)
e6:SetCondition(cm.rcon)
e6:SetOperation(cm.rop)
c:RegisterEffect(e6)
end
function cm.eqlimit(e,c)
return c:IsCode(m-6)
end
function cm.filter(c)
return c:IsFaceup() and c:IsCode(m-6)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--------------------
function cm.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():GetEquipTarget()==re:GetHandler() and re:GetHandler():GetOverlayCount()>=ev-1
end
function cm.rop(e,tp,eg,ep,ev,re,r,rp)
return Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
--特殊武装·七头龙首
local m=52500008
local cm=_G["c"..m]
Duel.LoadScript("c52500000.lua")
function cm.initial_effect(c)
Chiyuki.ChronicleEquip(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(cm.eqlimit)
c:RegisterEffect(e2)
--banish
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.rmcon)
e4:SetTarget(cm.rmtg)
e4:SetOperation(cm.rmop)
c:RegisterEffect(e4)
end
function cm.eqlimit(e,c)
return c:IsCode(m-6)
end
function cm.filter(c)
return c:IsFaceup() and c:IsCode(m-6)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--------------------
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler():GetEquipTarget()
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=eg:GetFirst():GetBattleTarget()
e:SetLabelObject(bc)
if chk==0 then return bc:IsAbleToRemove()
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,bc) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,bc:GetControler(),LOCATION_GRAVE)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc:IsAbleToRemove() then
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,bc)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
sg:AddCard(bc)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
--特殊武装·冻息投射
local m=52500009
local cm=_G["c"..m]
Duel.LoadScript("c52500000.lua")
function cm.initial_effect(c)
Chiyuki.ChronicleEquip(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(cm.eqlimit)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.atktg)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
end
function cm.eqlimit(e,c)
return c:IsCode(m-6)
end
function cm.filter(c)
return c:IsFaceup() and c:IsCode(m-6)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--------------------
function cm.atktg(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:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
--特殊武装·雷光穿枪
local m=52500010
local cm=_G["c"..m]
Duel.LoadScript("c52500000.lua")
function cm.initial_effect(c)
Chiyuki.ChronicleEquip(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(cm.eqlimit)
c:RegisterEffect(e2)
--position
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(cm.settg)
e3:SetOperation(cm.setop)
c:RegisterEffect(e3)
end
function cm.eqlimit(e,c)
return c:IsCode(m-6)
end
function cm.filter(c)
return c:IsFaceup() and c:IsCode(m-6)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--------------------
function cm.setfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.setfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,cm.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
--机龙使·路克斯
local m=52500011
local cm=_G["c"..m]
Duel.LoadScript("c52500000.lua")
function cm.initial_effect(c)
--self ss
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.sscon)
e1:SetTarget(cm.sstg)
e1:SetOperation(cm.ssop)
c:RegisterEffect(e1)
--effect gain
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e4:SetCountLimit(1,m+900)
e4:SetCondition(cm.effcon)
e4:SetOperation(cm.effop)
c:RegisterEffect(e4)
end
function cm.ssfilter(c)
return c:IsSetCard(0x3be0,0x5be0) and c:IsFaceup() and not c:IsCode(m)
end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.ssfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsSetCard(0x5be0) and c:IsLocation(LOCATION_EXTRA)
end
function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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