Commit 1a139391 authored by Nemo Ma's avatar Nemo Ma

removing cards by Akashic

parent 3713f616
No preview for this file type
No preview for this file type
--根源性破灭招来体
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000000)
if rszg then return end
rszg=cm
function rszg.XyzFun(c,code,rk,limit)
local e1=rsef.ACT(c,nil,nil,limit,"sp",nil,nil,nil,rsop.target({cm.xyzfilter(rk),"sp",LOCATION_EXTRA},{rszg.matfilter,nil,LOCATION_HAND+LOCATION_DECK+LOCATION_REMOVED }),cm.act(code,rk))
return e1
end
function cm.xyzfilter(rk)
return function(c,e,tp)
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL) and c:IsRank(rk) and c:IsSetCard(0xaf1)
end
end
function rszg.matfilter(c)
return (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsSetCard(0xaf1) and c:IsCanOverlay()
end
function cm.act(code,rk)
return function(e,tp)
local c=aux.ExceptThisCard(e)
if not c then return end
c:RegisterFlagEffect(code,rsreset.est_pend,0,1)
local ct,og,tc=rsop.SelectSpecialSummon(tp,cm.xyzfilter(rk),tp,LOCATION_EXTRA,0,1,1,nil,{SUMMON_TYPE_XYZ},e,tp)
if ct<=0 then return end
tc:CompleteProcedure()
rszg.OverlayFun(tc)
end
end
function rszg.OverlayFun(tc)
rsop.SelectSolve(HINTMSG_XMATERIAL,tc:GetControler(),rszg.matfilter,tc:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil,{cm.matfun,tc})
end
function cm.matfun(g,tc)
Duel.Overlay(tc,g)
end
function rszg.ToGraveFun(c)
--local e1=rsef.SV_REDIRECT(c,"tg",LOCATION_REMOVED,cm.tgcon,nil,"sa,ii")
--e1:SetRange(0xff)
--return e1
end
function cm.tgcon(e)
return not e:GetHandler():IsLocation(LOCATION_OVERLAY)
end
function rszg.SpSummonFun(c,code,event,con)
local e1=rsef.FTO(c,event,{m,2},{1,code},"sp","de",LOCATION_HAND,con,nil,rsop.target(rscf.spfilter2(),"sp"),cm.handspop)
return e1
end
function cm.handspop(e,tp)
local c=aux.ExceptThisCard(e)
if c then rssf.SpecialSummon(c) end
end
function rszg.SSSucessFun(c,code,cate,flag,tg,op)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{code,0},{1,code+100},cate,flag,nil,nil,tg,op)
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,3},{1,code+100},"sp","de,dsp",nil,nil,rsop.target(cm.ssspfilter,"sp",LOCATION_EXTRA),cm.ssspop)
return e1,e2
end
function cm.ssspfilter(c,e,tp)
return c:IsRank(4) and c:IsType(TYPE_XYZ) and c:IsSetCard(0xaf1) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.IsExistingMatchingCard(cm.ssmatfilter,tp,LOCATION_MZONE,0,1,nil,c,e,tp)
end
function cm.ssmatfilter(c,sc,e,tp)
return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 and c:IsCanBeXyzMaterial(sc) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function cm.ssspop(e,tp)
rshint.Select(tp,"sp")
local sc=Duel.SelectMatchingCard(tp,cm.ssspfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if not sc then return end
rshint.Select(tp,HINTMSG_XMATERIAL)
local tc=Duel.SelectMatchingCard(tp,cm.ssmatfilter,tp,LOCATION_MZONE,0,1,1,nil,sc,e,tp):GetFirst()
local mg=tc:GetOverlayGroup()
if #mg>0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
function rszg.XyzSumFun(c,code,lv,spfilter)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,lv,3)
if spfilter then
local e1=rsef.STO(c,EVENT_LEAVE_FIELD,{m,2},{1,code+300},"sp","de,dsp",cm.xyzleavecon,nil,rsop.target({cm.xyzleavefilter(spfilter),"sp",LOCATION_EXTRA },{Card.IsCanOverlay,nil}),cm.xyzleaveop(spfilter))
return e1
end
end
function cm.xyzleavecon(e,tp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function cm.xyzleavefilter(spfilter)
return function(c,e,tp)
if not c:IsType(TYPE_XYZ) then return false end
return ((type(spfilter)=="number" and c:IsCode(spfilter)) or (type(spfilter)~="number"and spfilter(c,e,tp))) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL)
end
end
function cm.xyzleaveop(spfilter)
return function(e,tp)
local c=aux.ExceptThisCard(e)
local ct,og,tc=rsop.SelectSpecialSummon(tp,cm.xyzleavefilter(spfilter),tp,LOCATION_EXTRA,0,1,1,nil,{ SUMMON_TYPE_XYZ },e,tp)
if ct>0 then
tc:CompleteProcedure()
if c and c:IsCanOverlay() then
Duel.Overlay(tc,Group.FromCards(c))
end
end
end
end
-------------------
function cm.initial_effect(c)
local e1=rszg.XyzFun(c,m,4,{1,m})
local e2=rsef.I(c,{m,0},{1,m+100},"se,th",nil,LOCATION_FZONE,nil,rscost.cost(Card.IsDiscardable,"dish",LOCATION_HAND),rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e3=rsef.I(c,{m,1},{1,m+100},"td",nil,LOCATION_FZONE,nil,rscost.cost(Card.IsDiscardable,"dish",LOCATION_HAND),rsop.target(cm.tdfilter,"td",LOCATION_REMOVED),cm.tdop)
local e4=rsef.FV_REDIRECT(c,"tg",LOCATION_REMOVED,nil,{0xff,0xff})
local e5=rszg.ToGraveFun(c)
local e6=rsef.STO(c,EVENT_LEAVE_FIELD,{m,2},nil,"sp",nil,cm.flspcon,nil,rsop.target(cm.flspfilter,"sp",LOCATION_REMOVED),cm.flspop)
end
function cm.thfilter(c)
return c:IsSetCard(0xaf1) and c:IsAbleToHand()
end
function cm.thop(e,tp)
if not aux.ExceptThisCard(e) then return end
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.tdfilter(c)
return c:IsSetCard(0xaf1) and c:IsAbleToDeck() and c:IsFaceup()
end
function cm.tdop(e,tp)
if not aux.ExceptThisCard(e) then return end
rsop.SelectToDeck(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil,{})
end
function cm.flspcon(e,tp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function cm.flspfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xaf1) and c:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.flspop(e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
rsop.SelectSpecialSummon(tp,cm.flspfilter,tp,LOCATION_REMOVED,0,1,math.min(ft,99),nil,{},e,tp)
end
\ No newline at end of file
--破灭的危机
if not pcall(function() require("expansions/script/c25000000") end) then require("script/c25000000") end
local m,cm=rscf.DefineCard(25000001)
function cm.initial_effect(c)
local e1=rszg.XyzFun(c,m,4,{1,m,1})
local e2=rszg.ToGraveFun(c)
local e3=rsef.FC(c,EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.hgcon)
e3:SetOperation(cm.hgop)
--local e3=rsef.QO(c,nil,{m,0},1,nil,"tg",LOCATION_SZONE,cm.matcon,nil,rstg.target({cm.tgfilter,nil,LOCATION_MZONE},rsop.list(rszg.matfilter,nil,LOCATION_HAND+LOCATION_DECK+LOCATION_REMOVED)),cm.matop)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e4:SetCondition(cm.handcon)
c:RegisterEffect(e4)
end
function cm.hfilter(c)
return c:GetSummonLocation()&LOCATION_EXTRA ~=0
end
function cm.handcon(e)
return Duel.IsExistingMatchingCard(cm.hfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function cm.matcon(e,tp)
return rscon.phmp(e,tp) and e:GetHandler():GetFlagEffect(m)==0
end
function cm.tgfilter(c)
return c:IsType(TYPE_XYZ) and c:IsSetCard(0xaf1)
end
function cm.matop(e,tp)
if not aux.ExceptThisCard(e) then return end
local tc=rscf.GetTargetCard(Card.IsCanOverlay)
if not tc then return end
rszg.OverlayFun(tc)
end
function cm.hfilter(c,tp)
return c:GetSummonPlayer()~=tp and c:GetSummonLocation()&LOCATION_EXTRA ~=0
end
function cm.hgcon(e,tp,eg)
return eg:IsExists(cm.hfilter,1,nil,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil)
end
function cm.hgop(e,tp)
Duel.Hint(HINT_CARD,0,m)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
local tc=g:RandomSelect(tp,1)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--巨兽 佐利姆
if not pcall(function() require("expansions/script/c25000000") end) then require("script/c25000000") end
local m,cm=rscf.DefineCard(25000002)
function cm.initial_effect(c)
local e1=rszg.SpSummonFun(c,m,EVENT_TO_HAND,cm.con)
local e3=rszg.ToGraveFun(c)
local e4,e5=rszg.SSSucessFun(c,m,"se,th","de,dsp",rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
end
function cm.con(e,tp,eg)
return Duel.GetCurrentPhase()~=PHASE_DRAW and eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function cm.thfilter(c)
return c:IsSetCard(0xaf1) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
\ No newline at end of file
--超巨大天体生物 迪格罗布
if not pcall(function() require("expansions/script/c25000000") end) then require("script/c25000000") end
local m,cm=rscf.DefineCard(25000003)
function cm.initial_effect(c)
local e1=rszg.SpSummonFun(c,m,EVENT_SUMMON_SUCCESS,cm.con)
local e2=rsef.RegisterClone(c,e1,"code",EVENT_SPSUMMON_SUCCESS)
local e6=rsef.RegisterClone(c,e1,"code",EVENT_FLIP_SUMMON_SUCCESS)
local e3=rszg.ToGraveFun(c)
local e4,e5=rszg.SSSucessFun(c,m,"sp","de,dsp",rsop.target(rscf.spfilter2(Card.IsSetCard,0xaf1),"sp",LOCATION_DECK),cm.spop)
end
function cm.cfilter(c,tp)
return c:GetSummonPlayer()~=tp
end
function cm.con(e,tp,eg)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.spop(e,tp)
rsop.SelectSpecialSummon(tp,rscf.spfilter2(Card.IsSetCard,0xaf1),tp,LOCATION_DECK,0,1,1,nil,{},e,tp)
end
\ No newline at end of file
--超巨大单极子生物 莫基安
if not pcall(function() require("expansions/script/c25000000") end) then require("script/c25000000") end
local m,cm=rscf.DefineCard(25000004)
function cm.initial_effect(c)
local e1=rszg.SpSummonFun(c,m,EVENT_CHAIN_SOLVING,cm.con)
local e2=rszg.ToGraveFun(c)
local e3,e4=rszg.SSSucessFun(c,m,"sp","de,dsp",rsop.target(rscf.spfilter2(cm.spfilter),"sp",LOCATION_REMOVED),cm.spop)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xaf1) and c:IsFaceup()
end
function cm.spop(e,tp)
rsop.SelectSpecialSummon(tp,rscf.spfilter2(cm.spfilter),tp,LOCATION_REMOVED,0,1,1,nil,{},e,tp)
end
\ No newline at end of file
--根源破灭尖兵 X沙巴加
if not pcall(function() require("expansions/script/c25000000") end) then require("script/c25000000") end
local m,cm=rscf.DefineCard(25000005)
function cm.initial_effect(c)
local e1=rszg.XyzSumFun(c,m,4,cm.spfilter)
local e2=rsef.QO(c,nil,{m,0},{1,m+600},"des","tg",LOCATION_MZONE,nil,rscost.rmxyz(1),rstg.target(aux.TRUE,"des",0,LOCATION_ONFIELD),cm.desop)
end
function cm.spfilter(c)
return c:IsRank(6) and c:IsSetCard(0xaf1)
end
function cm.desop(e,tp)
local tc=rscf.GetTargetCard()
if tc then Duel.Destroy(tc,REASON_EFFECT) end
end
\ No newline at end of file
--根源破灭尖兵 ∑茨奇古尔
if not pcall(function() require("expansions/script/c25000000") end) then require("script/c25000000") end
local m,cm=rscf.DefineCard(25000006)
function cm.initial_effect(c)
local e1=rszg.XyzSumFun(c,m,4,cm.spfilter)
--local e2=rsef.FTO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m+600},"eq","tg",LOCATION_MZONE,cm.eqcon,rscost.rmxyz(1),rstg.target(cm.eqfilter,"des",0,LOCATION_MZONE),cm.eqop)
local e2=rsef.QO_NEGATE(c,"neg",{1,m+600},nil,LOCATION_MZONE,cm.negcon,rscost.rmxyz(1))
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(49275969,0))
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_SPSUMMON)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+600)
e3:SetCondition(cm.discon)
e3:SetCost(rscost.rmxyz(1))
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
end
function cm.spfilter(c)
return c:IsRank(8) and c:IsSetCard(0xaf1)
end
function cm.eqcon(e,tp)
local ec=e:GetLabelObject()
return ec==nil or ec:GetFlagEffect(m)==0
end
function cm.eqfilter(c,e,tp,eg)
return eg:IsContains(c) and c:IsPreviousLocation(LOCATION_EXTRA) and c:GetSummonPlayer()~=tp and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsAbleToChangeControler()
end
function cm.eqop(e,tp)
local c,tc=rscf.GetFaceUpSelf(e),rscf.GetTargetCard()
if not c or not tc or not rsop.eqop(e,tc,c) then return end
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0)
e:SetLabelObject(tc)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainNegatable(ev) then return false end
return re:IsHasCategory(CATEGORY_SPECIAL_SUMMON)
end
function cm.discfilter(c,tp)
return c:GetSummonPlayer()==tp and c:IsPreviousLocation(LOCATION_EXTRA)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and eg:IsExists(cm.discfilter,1,nil,1-tp) and Duel.GetCurrentChain()==0
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>=#eg end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,eg,#eg,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
local c=rscf.GetFaceUpSelf(e)
if #eg<=Duel.GetLocationCount(tp,LOCATION_SZONE) and c then
for tc in aux.Next(eg) do
rsop.eqop(e,tc,c)
end
end
end
\ No newline at end of file
--根源破灭魔人 基布普
if not pcall(function() require("expansions/script/c25000000") end) then require("script/c25000000") end
local m,cm=rscf.DefineCard(25000007)
function cm.initial_effect(c)
local e1=rszg.XyzSumFun(c,m,6,25000009)
local e2=rsef.SV_INDESTRUCTABLE(c,"effect",aux.indoval)
local e3=rsef.QO(c,nil,{m,0},{1,m+600},"atk,def,dis",nil,LOCATION_MZONE,nil,rscost.rmxyz(1),rsop.target(cm.disfilter,"dis",0,LOCATION_MZONE),cm.disop)
end
function cm.disfilter(c,e,tp)
return c:IsFaceup() and (c:IsAttackAbove(1) or c:IsDefenseAbove(1) or aux.disfilter1(c))
end
function cm.disop(e,tp)
rsop.SelectSolve(HINTMSG_FACEUP,tp,cm.disfilter,tp,0,LOCATION_MZONE,1,1,nil,{cm.disfun,e:GetHandler()})
end
function cm.disfun(g,c)
local e1,e2,e3,e4=rscf.QuickBuff({c,g:GetFirst()},"dis,dise",true,"atkf,deff",0)
end
\ No newline at end of file
--根源破灭魔人 布里兹布罗兹
if not pcall(function() require("expansions/script/c25000000") end) then require("script/c25000000") end
local m,cm=rscf.DefineCard(25000008)
function cm.initial_effect(c)
local e1=rszg.XyzSumFun(c,m,6,25000009)
local e2=rsef.SC(c,EVENT_ATTACK_ANNOUNCE,nil,nil,nil,nil,cm.regop)
local e3=rsef.QO(c,EVENT_CHAINING,{m,0},{1,m+600},"neg,des,dam",nil,LOCATION_MZONE,rscon.negcon(0,true),rscost.rmxyz(1),aux.AND(rstg.negtg("des"),cm.damtg),cm.negop)
end
function cm.discon(e)
return e:GetHandler():GetFlagEffect(m)~=0
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if not tc then return end
tc:RegisterFlagEffect(m,rsreset.est+RESET_PHASE+PHASE_BATTLE,0,1)
local e1=rsef.SV_LIMIT({e:GetHandler(),tc,true},"dis",nil,cm.discon,rsreset.est+RESET_PHASE+PHASE_BATTLE,"cd")
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function cm.negop(e,tp,...)
if rsop.negop("des")(e,tp,...)>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
\ No newline at end of file
--根源破灭天使 佐格
if not pcall(function() require("expansions/script/c25000000") end) then require("script/c25000000") end
local m,cm=rscf.DefineCard(25000009)
function cm.initial_effect(c)
local e1=rszg.XyzSumFun(c,m,11,25000010)
local e2=rsef.SV_CANNOT_BE_TARGET(c,"effect")
local e3=rsef.QO(c,nil,{m,0},{1,m+600},"dis,des,dam",nil,LOCATION_MZONE,nil,rscost.rmxyz(1),rsop.target2(cm.fun,aux.disfilter1,"dis",LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c),cm.disop)
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_ALL,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500)
end
function cm.disop(e,tp)
local tc,ct=rsop.SelectSolve(HINTMSG_FACEUP,tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e),{cm.disfun,e:GetHandler(),tp})
if ct and ct>0 then
Duel.BreakEffect()
Duel.Destroy(tc,REASON_EFFECT)
end
end
function cm.disfun(g,c,tp)
local tc=g:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1,e2=rscf.QuickBuff({c,tc},"dis,dise",true)
Duel.AdjustInstantly(tc)
if tc:IsDisabled() and not tc:IsImmuneToEffect(e1) then
local ct=Duel.Damage(1-tp,1500,REASON_EFFECT)
return tc,ct
else return
end
end
\ No newline at end of file
--根源破灭天使 佐格II
if not pcall(function() require("expansions/script/c25000000") end) then require("script/c25000000") end
local m,cm=rscf.DefineCard(25000010)
function cm.initial_effect(c)
rszg.XyzSumFun(c,12)
--local e1=rsef.SV_IMMUNE_EFFECT(c,cm.imval)
local e7=rsef.SV_CANNOT_BE_TARGET(c,"effect")
local e8=rsef.SV_INDESTRUCTABLE(c,"effect")
local e2,e3=rsef.SV_UPDATE(c,"atk,def",cm.adval)
--local e4=rsef.FV_LIMIT_PLAYER(c,"act",1,nil,{0,1},cm.alcon)
local e5=rsef.QO(c,nil,{m,0},1,"dis,des,dam",nil,LOCATION_MZONE,nil,rscost.rmxyz(1),rsop.target2(cm.fun,cm.disfilter,"dis",LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c),cm.disop)
--local e6=rsef.FTO(c,EVENT_PHASE+PHASE_END,{m,1},1,nil,nil,LOCATION_MZONE,cm.matcon,nil,rsop.target(rszg.matfilter,nil,LOCATION_HAND+LOCATION_DECK+LOCATION_REMOVED),cm.matop)
end
function cm.imval(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer() and re:IsActiveType(TYPE_MONSTER)
end
function cm.adval(e,c)
return e:GetHandler():GetOverlayCount()*1000
end
function cm.alcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_ALL,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetHandler():GetAttack()/2)
end
function cm.disfilter(c,e,tp)
return aux.disfilter1(c) and e:GetHandler():IsAttackAbove(1)
end
function cm.disop(e,tp)
local tc,ct=rsop.SelectSolve(HINTMSG_FACEUP,tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e),{cm.disfun,e:GetHandler(),tp})
if ct and ct>0 then
Duel.BreakEffect()
Duel.Destroy(tc,REASON_EFFECT)
end
end
function cm.disfun(g,c,tp)
local tc=g:GetFirst()
local dam=c:GetAttack()/2
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1,e2=rscf.QuickBuff({c,tc},"dis,dise",true)
Duel.AdjustInstantly(tc)
if tc:IsDisabled() and not tc:IsImmuneToEffect(e1) and dam>0 then
local ct=Duel.Damage(1-tp,dam,REASON_EFFECT)
return tc,ct
else return
end
end
function cm.matcon(e,tp)
return e:GetHandler():IsType(TYPE_XYZ)
end
function cm.matop(e,tp)
local c=aux.ExceptThisCard(e)
if not c or not c:IsType(TYPE_XYZ) then return end
rszg.OverlayFun(c)
end
--暗黑行星 斯菲亚之祖
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000011)
if rsgs then return end
rsgs=cm
function rsgs.isfus(c)
return c:IsSetCard(0xaf2) and c:IsType(TYPE_FUSION)
end
function rsgs.isfusf(c)
return c:IsSetCard(0xaf2) and c:IsType(TYPE_FUSION) and c:IsFaceup()
end
function rsgs.ToDeckCost(c)
return function(...)
return rscost.cost(cm.ctypecfilter,"td",rsloc.hg,0,1,1,c)(...)
end
end
function rsgs.FusTypeFun(c,code,ctype)
local e1=rsef.I(c,{code,0},{1,code+100},nil,"tg",LOCATION_MZONE,nil,nil,rstg.target(cm.ctypefilter,nil,LOCATION_MZONE,LOCATION_MZONE),cm.ctypeop)
e1:SetLabel(ctype)
e1:SetValue(code)
return e1
end
function cm.ctypecfilter(c)
return (c:IsSetCard(0xaf2) or c:IsLevel(1)) and c:IsAbleToDeckAsCost()
end
function cm.ctypefilter(c,e)
return c:IsFaceup() and not c:IsType(e:GetLabel())
end
function cm.ctypeop(e,tp)
local tc=rscf.GetTargetCard(Card.IsFaceup)
if not tc then return end
tc:RegisterFlagEffect(m,rsreset.est_pend,EFFECT_FLAG_CLIENT_HINT,1,e:GetLabel(),aux.Stringid(e:GetValue(),0))
end
function rsgs.FusProcFun(c,code,ctype,cate,flag,tg,op)
local e1=rssf.SetSummonCondition(c,false,rsval.spconfe)
aux.AddFusionProcCodeFun(c,25000014,cm.fumatfilter(ctype),1,true,false)
local e2=aux.AddContactFusionProcedure(c,cm.fumatfilter2,LOCATION_ONFIELD,LOCATION_ONFIELD,Duel.SendtoGrave,REASON_COST+REASON_MATERIAL+REASON_FUSION)
local e3=rsef.SV_INDESTRUCTABLE(c,"effect",aux.indoval)
local e4=rsef.STO(c,EVENT_LEAVE_FIELD,{code,1},nil,cate,flag,cm.fusleavecon,nil,tg,op)
return e1,e2,e3,e4
end
function cm.fumatfilter(ctype)
return function(c,fc)
local flaglist={c:GetFlagEffectLabel(m)}
return (c:IsFusionType(ctype) or (#flaglist>0 and rsof.Table_List(flaglist,ctype))) and (c:IsControler(fc:GetControler()) or c:IsFaceup()) and (c:IsCode(25000014) or c:IsLocation(LOCATION_MZONE))
end
end
function cm.fumatfilter2(c,fc)
return c:IsAbleToGraveAsCost() and (c:IsControler(fc:GetControler()) or c:IsFaceup()) and c:IsCanBeFusionMaterial(fc)
end
function cm.fusleavecon(e,tp,eg)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT)))
end
------------------------
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m},"se,th",nil,nil,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.act)
local e2=rsef.I(c,{m,0},{1,m+100},"sp","tg",LOCATION_SZONE,nil,rscost.cost(Card.IsDiscardable,"dish",LOCATION_HAND),rstg.target(rscf.spfilter2(Card.IsLevel,1),"sp",LOCATION_GRAVE),cm.spop)
local e3=rsef.QO(c,EVENT_CHAINING,{m,0},{1,m+200},"sp","de",LOCATION_SZONE,cm.spcon2,rscost.cost(Card.IsAbleToGraveAsCost,"tg"),rsop.target(cm.spfilter2,"sp",LOCATION_EXTRA+LOCATION_GRAVE),cm.spop2)
end
function cm.thfilter(c)
return c:IsSetCard(0xaf2) and c:IsAbleToHand()
end
function cm.act(e,tp)
if not aux.ExceptThisCard(e) then return end
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.spop(e,tp)
local tc=rscf.GetTargetCard()
if tc and aux.ExceptThisCard(e) then rssf.SpecialSummon(tc) end
end
function cm.cfilter2(c,tp)
return c:GetSummonPlayer()==tp and c:GetSummonLocation()&LOCATION_EXTRA ~=0
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return rp~=tp and loc&LOCATION_MZONE ~=0 and re:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) and re:GetHandler():GetSummonLocation()&LOCATION_EXTRA ~=0
end
function cm.spfilter2(c,e,tp)
return rsgs.isfus(c) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and ((c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0))
end
function cm.spop2(e,tp)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter2),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,e,tp)
if #sg<=0 then return end
local og=Group.CreateGroup()
repeat
rshint.Select(tp,"sp")
local tc=sg:Select(tp,1,1,nil):GetFirst()
if rssf.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP,nil,{"dis,dise",true}) then
og:AddCard(tc)
end
sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter2),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,e,tp)
until #sg==0 or not Duel.SelectYesNo(tp,aux.Stringid(m,1))
Duel.SpecialSummonComplete()
rsef.FC_PHASELEAVE({e:GetHandler(),tp},og,nil,nil,PHASE_END,"rm")
end
\ No newline at end of file
--灭亡的微笑
if not pcall(function() require("expansions/script/c25000011") end) then require("script/c25000011") end
local m,cm=rscf.DefineCard(25000012)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,nil,"sp,an",nil,nil,nil,rsop.target2(cm.fun,cm.spfilter,"sp",0,LOCATION_EXTRA),cm.spop)
local e3=rsef.QO(c,nil,{m,1},nil,"dr","ptg",LOCATION_GRAVE,aux.exccon,aux.bfgcost,rsop.target(cm.drct,"dr"),cm.drop)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(aux.NOT(rscon.excard(cm.cfilter,LOCATION_MZONE,0,1)))
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:GetSummonLocation()&LOCATION_EXTRA ~=0
end
function cm.fun(g,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
local op=Duel.SelectOption(tp,aux.Stringid(73988674,0),aux.Stringid(73988674,1),aux.Stringid(73988674,2),aux.Stringid(m,0))+1
e:SetLabel(op)
end
function cm.spfilter(c,e,tp)
return Duel.GetLocationCountFromEx(1-tp,1-tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,1-tp,true,false,POS_FACEUP,1-tp)
end
function cm.spop(e,tp)
local g1=Duel.GetMatchingGroup(cm.spfilter,tp,0,LOCATION_EXTRA,nil,e,tp)
if #g1<=0 then return end
Duel.ConfirmCards(tp,g1)
local ctypelist={ TYPE_FUSION,TYPE_SYNCHRO,TYPE_XYZ,TYPE_LINK }
local ctype=ctypelist[e:GetLabel()]
if g1:IsExists(Card.IsType,1,nil,ctype) then
rshint.Select(tp,"sp")
local sc=g1:FilterSelect(1-tp,Card.IsType,1,1,nil,ctype):GetFirst()
rssf.SpecialSummon(sc,0,1-tp,1-tp,true,false,POS_FACEUP,nil,{"tri",true},"td")
end
end
function cm.drct(e,tp)
local g=Duel.GetMatchingGroup(rsgs.isfusf,tp,rsloc.mg,0,nil)
return g:GetClassCount(Card.GetCode)
end
function cm.drop(e,tp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(rsgs.isfusf,p,rsloc.mg,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if ct<=0 then return end
Duel.Draw(p,ct,REASON_EFFECT)
end
\ No newline at end of file
--斯菲亚之眼
if not pcall(function() require("expansions/script/c25000011") end) then require("script/c25000011") end
local m,cm=rscf.DefineCard(25000013,nil)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m},"tg,se,th","tg",nil,nil,rstg.target(cm.tgfilter,"tg",LOCATION_MZONE),cm.tgop)
local e3=rsef.I(c,{m,3},{1,m+100},"sp","tg",LOCATION_GRAVE,aux.exccon,aux.bfgcost,rstg.target(rscf.spfilter2(rsgs.isfus),"sp",LOCATION_GRAVE),cm.spop)
end
function cm.tgfilter(c,e,tp)
return c:IsAbleToGrave() and rsgs.isfusf(c)
end
function cm.tgop(e,tp)
local tc=rscf.GetTargetCard()
if not tc or Duel.SendtoGrave(tc,REASON_EFFECT)<=0 or not tc:IsLocation(LOCATION_GRAVE) then return end
local g1=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_DECK,0,nil)
if #g1<=0 and #g2<=0 then return end
local opt=rsop.SelectOption(tp,true,{m,1},#g1>0,{m,2},#g2>0,{m,0},true)
if opt==1 then return end
Duel.BreakEffect()
local sg=opt==2 and g1 or g2
local fun=opt==2 and rsgf.SelectToHand or rsgf.SelectToGrave
fun(sg,tp,aux.TRUE,1,1,nil,{})
end
function cm.thfilter(c)
return c:IsLevel(1) and c:IsAbleToHand()
end
function cm.tdfilter(c)
return c:IsLevel(1) and c:IsAbleToGrave()
end
function cm.spop(e,tp)
local tc=rscf.GetTargetCard()
if tc then rssf.SpecialSummon(tc) end
end
\ No newline at end of file
--宇宙球体 斯菲亚
if not pcall(function() require("expansions/script/c25000011") end) then require("script/c25000011") end
local m,cm=rscf.DefineCard(25000014)
function cm.initial_effect(c)
local e1=rscf.SetSpecialSummonProduce(c,LOCATION_HAND,cm.sprcon,cm.sprop,nil,{1,m})
local e2=rsgs.FusTypeFun(c,m,TYPE_FUSION)
local e3=rsef.I(c,{m,1},{1,m+200},"tg",nil,LOCATION_GRAVE,nil,aux.bfgcost,rsop.target(cm.tdfilter,"td",LOCATION_DECK),cm.tdop)
end
function cm.sprcon(e,c)
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,c)
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function cm.tdfilter(c)
return (c:IsLevel(1) or c:IsSetCard(0xaf2)) and c:IsAbleToGrave()
end
function cm.tdop(e,tp)
rsop.SelectToGrave(tp,cm.tdfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
\ No newline at end of file
--灼热斯菲亚
if not pcall(function() require("expansions/script/c25000011") end) then require("script/c25000011") end
local m,cm=rscf.DefineCard(25000015)
function cm.initial_effect(c)
local e1=rsef.SV_CHANGE(c,"code",25000014)
e1:SetRange(LOCATION_MZONE)
local e2=rsgs.FusTypeFun(c,m,TYPE_SYNCHRO)
local e3=rsef.FTO(c,EVENT_LEAVE_FIELD,{m,1},{1,m+200},"sp,dr","de",LOCATION_HAND+LOCATION_GRAVE,cm.spcon,rsgs.ToDeckCost(c),rsop.target(rscf.spfilter2(),"sp"),cm.spop)
end
function cm.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetSummonLocation()==LOCATION_EXTRA and c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:GetPreviousControler()~=tp
end
function cm.spcon(e,tp,eg)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.spop(e,tp)
local c=aux.ExceptThisCard(e)
if rssf.SpecialSummon(c)>0 and Duel.IsPlayerCanDraw(tp,2) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
end
\ No newline at end of file
--寄生斯菲亚
if not pcall(function() require("expansions/script/c25000011") end) then require("script/c25000011") end
local m,cm=rscf.DefineCard(25000016)
function cm.initial_effect(c)
local e1=rsef.SV_CHANGE(c,"code",25000014)
e1:SetRange(LOCATION_MZONE)
local e2=rsgs.FusTypeFun(c,m,TYPE_XYZ)
local e3=rsef.FTO(c,EVENT_SPSUMMON_SUCCESS,{m,1},{1,m+200},"ctrl,sp","de",LOCATION_HAND+LOCATION_GRAVE,cm.eqcon,rsgs.ToDeckCost(c),rsop.target2(cm.fun,cm.eqfilter,"ctrl",0,LOCATION_MZONE),cm.eqop)
end
function cm.eqcon(e,tp,eg)
local tc=eg:GetFirst()
return #eg==1 and tc:GetSummonLocation()&LOCATION_EXTRA ~=0 and tc:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function cm.fun(g,e,tp,eg)
Duel.SetTargetCard(eg:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.eqfilter(c,e,tp,eg)
return eg:IsContains(c) and c:IsControler(1-tp) and c:IsControlerCanBeChanged() and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2
end
function cm.eqop(e,tp)
local c,tc=aux.ExceptThisCard(e),rscf.GetTargetCard()
if tc and Duel.GetControl(tc,tp,0,1) and c then
rssf.SpecialSummon(c)
end
end
\ No newline at end of file
--双子斯菲亚
if not pcall(function() require("expansions/script/c25000011") end) then require("script/c25000011") end
local m,cm=rscf.DefineCard(25000017)
function cm.initial_effect(c)
local e1=rsef.SV_CHANGE(c,"code",25000014)
e1:SetRange(LOCATION_MZONE)
local e2=rsgs.FusTypeFun(c,m,TYPE_LINK)
local e3=rsef.QO(c,EVENT_CHAINING,{m,1},{1,m+200},"neg,des,sp","dsp,dcal",LOCATION_HAND+LOCATION_GRAVE,rscon.negcon(cm.cfilter,true),rsgs.ToDeckCost(c),cm.negtg,cm.negop)
end
function cm.cfilter(e,tp,re,rp,tg,loc,seq)
return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER)
and re:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) and re:GetHandler():GetSummonLocation()&LOCATION_EXTRA ~=0
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local c=aux.ExceptThisCard(e)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 and c then
rssf.SpecialSummon(c)
end
end
\ No newline at end of file
--斯菲亚合成兽 新达兰比尔
if not pcall(function() require("expansions/script/c25000011") end) then require("script/c25000011") end
local m,cm=rscf.DefineCard(25000018)
function cm.initial_effect(c)
local e1,e2,e3,e4=rsgs.FusProcFun(c,m,TYPE_XYZ,"tg",nil,rsop.target(cm.tgfilter,"tg",LOCATION_DECK),cm.tgop)
local e5=rsef.QO(c,EVENT_CHAINING,{m,0},{1,m},"neg,pos","dcal,dsp",LOCATION_MZONE,rscon.negcon(2,true),nil,rstg.negtg("nil"),cm.disop)
end
function cm.tgfilter(c)
return c:IsSetCard(0xaf2) and c:IsAbleToGrave()
end
function cm.tgop(e,tp)
rsop.SelectToGrave(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.posfilter(c)
return not c:IsPosition(POS_FACEUP_DEFENSE) and c:IsCanChangePosition()
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateActivation(ev) then return end
local g=Duel.GetMatchingGroup(cm.posfilter,tp,0,LOCATION_MZONE,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
rshint.Select(tp,"pos")
local tg=g:Select(tp,1,1,nil)
Duel.HintSelection(tg)
Duel.ChangePosition(tg,POS_FACEUP_DEFENSE)
end
end
\ No newline at end of file
--斯菲亚合成兽 新乔莫斯
if not pcall(function() require("expansions/script/c25000011") end) then require("script/c25000011") end
local m,cm=rscf.DefineCard(25000019)
function cm.initial_effect(c)
local e1,e2,e3,e4=rsgs.FusProcFun(c,m,TYPE_FUSION,"se,th",nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e5=rsef.QO(c,nil,{m,0},{1,m},"des,dam","tg",LOCATION_MZONE,nil,nil,rstg.target({aux.TRUE,"des",0,LOCATION_ONFIELD},rsop.list(1000,"dam",0,1)),cm.desop)
end
function cm.thfilter(c)
return c:IsSetCard(0xaf2) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.desop(e,tp)
local tc=rscf.GetTargetCard()
if tc and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
--斯菲亚合成兽 吉尔伽诺伊德
if not pcall(function() require("expansions/script/c25000011") end) then require("script/c25000011") end
local m,cm=rscf.DefineCard(25000020)
function cm.initial_effect(c)
local e1,e2,e3,e4=rsgs.FusProcFun(c,m,TYPE_SYNCHRO,"ga,th",nil,rsop.target(cm.thfilter,"th",LOCATION_GRAVE),cm.thop)
local e5=rsef.SV_IMMUNE_EFFECT(c,cm.imval)
local e6=rsef.SV_INDESTRUCTABLE(c,"battle",cm.indval)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e7:SetRange(LOCATION_MZONE)
e7:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e7:SetValue(1)
c:RegisterEffect(e7)
end
function cm.thfilter(c)
return c:IsSetCard(0xaf2) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,{})
end
function cm.imval(e,re)
return rsval.imoe(e,re) and re:IsActiveType(TYPE_MONSTER)
end
function cm.indval(e,c)
return c:GetSummonLocation()&LOCATION_EXTRA ~=0 and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
--斯菲亚合成兽 新盖加雷德
if not pcall(function() require("expansions/script/c25000011") end) then require("script/c25000011") end
local m,cm=rscf.DefineCard(25000021)
function cm.initial_effect(c)
local e1,e2,e3,e4=rsgs.FusProcFun(c,m,TYPE_LINK,"dish","ptg",rsop.target(1,"dish",0,LOCATION_HAND),cm.disop)
local e5=rsef.STO(c,EVENT_BATTLE_CONFIRM,{m,0},nil,"des,atk",nil,nil,nil,rsop.target(aux.TRUE,"des",0,LOCATION_MZONE),cm.desop)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetFieldGroup(p,LOCATION_HAND,0)
if #g==0 then return end
local sg=g:RandomSelect(1-p,1)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
end
function cm.desop(e,tp)
local c=rscf.GetFaceUpSelf(e)
local ct,og,tc=rsop.SelectDestroy(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil,{})
if ct>0 and c then
local atk=c:GetBaseAttack()
local e1=rsef.SV_UPDATE(c,"atk",atk,nil,rsreset.est_pend+RESET_DISABLE)
end
end
\ No newline at end of file
--根源破灭海神 伽库佐姆
if not pcall(function() require("expansions/script/c25000000") end) then require("script/c25000000") end
local m,cm=rscf.DefineCard(25000022)
function cm.initial_effect(c)
local e1=rscf.SetSummonCondition(c,true)
e1:SetRange(LOCATION_DECK)
local e2=rsef.QO(c,nil,{m,0},{1,m},"sp",nil,LOCATION_HAND,nil,rscost.cost(cm.tdfilter,"td",rsloc.gr,0,3),rsop.target(rscf.spfilter2(),"sp"),cm.spop)
local e3=rsef.QO_NEGATE(c,"neg",{1,m+100},"des",LOCATION_MZONE,rscon.negcon(2,true))
e3:SetOperation(cm.negop)
local e5=rsef.QO(c,EVENT_CHAINING,{m,1},{1,m+100},"neg,se,th,ga","dcal,dsp",LOCATION_MZONE,rscon.negcon(4,true),nil,rsop.target2(cm.negfun,cm.thfilter,"th",rsloc.dgr),cm.negop2)
--local e4=rsef.STO(c,EVENT_LEAVE_FIELD,{m,1},{1,m+200},"des","de,dsp",cm.descon,nil,rsop.target(cm.desfilter,"des",0,LOCATION_ONFIELD,true),cm.desop)
end
function cm.tdfilter(c)
return c:IsAbleToDeckOrExtraAsCost() and c:IsFaceup() and c:IsSetCard(0xaf1)
end
function cm.spop(e,tp)
local c=aux.ExceptThisCard(e)
if c then rssf.SpecialSummon(c) end
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then
Duel.Damage(1-tp,re:GetHandler():GetAttack(),REASON_EFFECT)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousPosition(POS_FACEUP)
end
function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.desop(e,tp)
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
function cm.negfun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0xaf1) and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function cm.negop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) then
rsop.SelectToHand(tp,cm.thfilter,tp,rsloc.dgr,0,1,1,nil,{})
end
end
\ No newline at end of file
--根源破灭魔虫 凯撒德比西
if not pcall(function() require("expansions/script/c25000000") end) then require("script/c25000000") end
local m,cm=rscf.DefineCard(25000023)
function cm.initial_effect(c)
local e1=rsef.QO(c,nil,{m,0},{1,m},"sp",nil,LOCATION_HAND,nil,rscost.cost(cm.tdfilter,"td",rsloc.og),rsop.target(rscf.spfilter2(),"sp"),cm.spop)
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,1},{1,m+100},"dish,des","de,dsp",nil,nil,rsop.target({1,"dish",0,LOCATION_HAND},{aux.TRUE,"des"}),cm.dishop)
local e5=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,2},{1,m+100},"se,th,des","de,dsp",nil,nil,rsop.target({cm.thfilter,"th",LOCATION_DECK},{aux.TRUE,"des"}),cm.thop)
local e6=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m+100},"sp,des","de,dsp",nil,nil,rsop.target({rscf.spfilter2(Card.IsSetCard,0xaf1),"sp",LOCATION_HAND},{aux.TRUE,"des"}),cm.spop2)
local e8=rsef.RegisterClone(c,e2,"code",EVENT_SUMMON_SUCCESS)
local e9=rsef.RegisterClone(c,e5,"code",EVENT_SUMMON_SUCCESS)
local e10=rsef.RegisterClone(c,e6,"code",EVENT_SUMMON_SUCCESS)
--local e3=rsef.STO(c,EVENT_LEAVE_FIELD,{m,2},{1,m+300},"se,th","de,dsp",cm.lcon,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
--local e4=rsef.STO(c,EVENT_LEAVE_FIELD,{m,0},{1,m+300},"sp","de,dsp",cm.lcon,nil,rsop.target(rscf.spfilter2(Card.IsSetCard,0xaf1),"sp",LOCATION_HAND),cm.spop2)
end
function cm.tdfilter(c)
return c:IsAbleToDeckAsCost() and c:IsSetCard(0xaf1) and Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.spop(e,tp)
local c=aux.ExceptThisCard(e)
if c then rssf.SpecialSummon(c) end
end
function cm.dishop(e,tp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if #g>0 then
local sg=g:RandomSelect(1-tp,1)
if Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)>0 and aux.ExceptThisCard(e) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
end
function cm.lcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousPosition(POS_FACEUP)
end
function cm.thfilter(c)
return c:IsSetCard(0xaf1) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function cm.thop(e,tp)
if rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})>0 and aux.ExceptThisCard(e) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
function cm.spop2(e,tp)
if rsop.SelectSpecialSummon(tp,rscf.spfilter2(Card.IsSetCard,0xaf1),tp,LOCATION_HAND,0,1,1,nil,{},e,tp)>0 and aux.ExceptThisCard(e) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
\ No newline at end of file
--超古代遗迹 露露耶
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000024)
if rsoc then return end
rsoc=cm
rscf.DefineSet(rsoc,0xaf3)
function rsoc.SpSummonFun(c,code,stype,cate,flag,tg,op)
local e1=rscf.SetSpecialSummonProduce(c,LOCATION_HAND,stype==1 and cm.sprcon1 or cm.sprcon2,stype==1 and aux.TRUE or cm.sprop,nil,{1,code})
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{code,0},{1,code+100},cate,{flag,"de","dsp"},nil,nil,tg,cm.ssop(op))
local e3=rsef.RegisterClone(c,e2,"code",EVENT_SUMMON_SUCCESS)
return e1,e2,e3
end
function cm.spcfilter(c)
return c:IsFaceup() and rsoc.IsSet(c)
end
function cm.sprcon1(e,c,tp)
return not Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.sprcon2(e,c,tp)
return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,c) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function cm.ssop(op)
return function(e,tp,...)
local e1=rsef.FV_LIMIT_PLAYER({e:GetHandler(),tp},"sp",nil,cm.limitsptg,{1,0},nil,rsreset.pend)
op(e,tp,...)
end
end
function cm.limitsptg(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
function rsoc.TributeFun(c,code,cate,flag,tg,op)
local e1=rsef.STO(c,EVENT_RELEASE,{code,0},{1,code+200},cate,{flag,"de","dsp"},cm.rescon,nil,tg,op)
return e1
end
function cm.rescon(e,tp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
-----------------------
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,nil,"se,th",nil,nil,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e2=rsef.SV_INDESTRUCTABLE(c,"effect",aux.indoval,rscon.excard2(rsoc.IsSet,LOCATION_MZONE))
local e3=rsef.FV_LIMIT_PLAYER(c,"cp",nil,nil,{1,1})
local e4=rsef.FV_LIMIT_PLAYER(c,"sp",nil,cm.sptg,{1,1})
local e5=rsef.FV_LIMIT_PLAYER(c,"act",cm.aclimit,nil,{1,1})
local e6=rsef.FTF(c,EVENT_PHASE+PHASE_END,{m,0},1,"des",nil,LOCATION_FZONE,cm.descon,nil,rsop.target(aux.TRUE,"des"),cm.desop)
end
function cm.thfilter(c)
return c:IsCode(25000031,25000032) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.sptg(e,c)
return c:IsLocation(LOCATION_GRAVE)
end
function cm.aclimit(e,re,tp)
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local c=re:GetHandler()
return c:IsLocation(LOCATION_SZONE) and c:IsFacedown()
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(25000031,25000032)
end
function cm.descon(e,tp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.desop(e,tp)
local c=aux.ExceptThisCard(e)
if c then
Duel.Destroy(c,REASON_EFFECT)
end
end
\ No newline at end of file
--黑暗的支配者
if not pcall(function() require("expansions/script/c25000024") end) then require("script/c25000024") end
local m,cm=rscf.DefineCard(25000025)
function cm.initial_effect(c)
local e1=aux.AddRitualProcGreater2Code2(c,25000031,25000032,nil,nil,aux.TRUE)
e1:SetDescription(aux.Stringid(m,0))
e1:SetOperation(cm.ritop(e1:GetOperation()))
local e2=rsef.I(c,{m,1},{1,m},"se,th,dish",nil,LOCATION_HAND,nil,cm.thcost,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
end
function cm.ritop(op)
return function(e,tp,...)
op(e,tp,...)
local tc=Duel.GetOperatedGroup():GetFirst()
if tc and tc:GetReasonEffect() and tc:GetReasonEffect()==e then
local e1=rsef.SV_CANNOT_BE_TARGET({e:GetHandler(),tc},"effect",aux.tgoval,nil,rsreset.est_pend)
end
end
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsCode(m-1)
end
function cm.thop(e,tp)
if rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})>0 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
rsop.SelectToGrave(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil,{REASON_EFFECT+REASON_DISCARD })
end
end
--来自三千万年前的讯息
if not pcall(function() require("expansions/script/c25000024") end) then require("script/c25000024") end
local m,cm=rscf.DefineCard(25000026)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,{m,0},{1,m},"sp,se,th",nil,nil,nil,cm.contg,cm.conop)
--local e1=rsef.ACT(c,nil,{m,0},{1,m},"sp",nil,nil,nil,rsop.target(rscf.spfilter2(rsoc.IsSet),"sp",LOCATION_DECK),cm.spop)
--local e2=rsef.ACT(c,nil,{m,1},{1,m},"se,th",nil,nil,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e3=aux.AddRitualProcGreater2Code2(c,25000031,25000032,nil,nil,aux.TRUE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCost(aux.bfgcost)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m+100)
e3:SetDescription(aux.Stringid(m,0))
--act in hand
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e4:SetCondition(cm.handcon)
c:RegisterEffect(e4)
end
function cm.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==0
end
function cm.spop(e,tp)
rsop.SelectSpecialSummon(tp,rscf.spfilter2(rsoc.IsSet),tp,LOCATION_DECK,0,1,1,nil,{},e,tp)
end
function cm.thfilter(c)
return rsoc.IsSetST(c) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.contg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function cm.confilter(c,e,tp)
if not c:IsSetCard(0xaf3) then return false end
return (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()) or (c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function cm.conop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,5)
if g:GetCount()>0 then
if g:IsExists(cm.confilter,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local tc=g:FilterSelect(tp,cm.confilter,1,1,nil,e,tp):GetFirst()
if tc:IsType(TYPE_SPELL+TYPE_TRAP) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
else
rssf.SpecialSummon(tc)
end
end
Duel.ShuffleDeck(tp)
end
end
\ No newline at end of file
--超古代生物 哥尔赞
if not pcall(function() require("expansions/script/c25000024") end) then require("script/c25000024") end
local m,cm=rscf.DefineCard(25000027)
function cm.initial_effect(c)
local e1,e2,e3=rsoc.SpSummonFun(c,m,1,"sp",nil,rsop.target(rscf.spfilter2(rsoc.IsSet),"sp",LOCATION_DECK),cm.spop)
local e4=rsoc.TributeFun(c,m,"tg","tg",rstg.target(Card.IsAbleToGrave,"tg",0,LOCATION_MZONE),cm.tgop)
end
function cm.spop(e,tp)
rsop.SelectSpecialSummon(tp,rscf.spfilter2(rsoc.IsSet),tp,LOCATION_DECK,0,1,1,nil,{},e,tp)
end
function cm.tgop(e,tp)
local tc=rscf.GetTargetCard()
if tc then Duel.SendtoGrave(tc,REASON_EFFECT) end
end
--超古代生物 美尔巴
if not pcall(function() require("expansions/script/c25000024") end) then require("script/c25000024") end
local m,cm=rscf.DefineCard(25000028)
function cm.initial_effect(c)
local e1,e2,e3=rsoc.SpSummonFun(c,m,1,"dr","ptg",rsop.target(cm.drct,"dr"),cm.drop)
local e4=rsoc.TributeFun(c,m,"tg","tg",rstg.target(cm.tgfilter,"tg",0,LOCATION_ONFIELD),cm.tgop)
end
function cm.drct(e,tp)
return Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
end
function cm.drop(e,tp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local ct=Duel.GetMatchingGroupCount(Card.IsType,p,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
if ct>0 then
Duel.Draw(p,ct,REASON_EFFECT)
end
end
function cm.tgfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function cm.tgop(e,tp)
local tc=rscf.GetTargetCard()
if tc then Duel.SendtoGrave(tc,REASON_EFFECT) end
end
--超古代生物 加鲁拉
if not pcall(function() require("expansions/script/c25000024") end) then require("script/c25000024") end
local m,cm=rscf.DefineCard(25000029)
function cm.initial_effect(c)
local e1,e2,e3=rsoc.SpSummonFun(c,m,2,"th",nil,rsop.target(cm.thfilter,"th",LOCATION_GRAVE),cm.thop)
local e4=rsoc.TributeFun(c,m,"dish","ptg",cm.dishtg,cm.dishop)
end
function cm.thfilter(c)
return c:IsAbleToHand() and rsoc.IsSet(c)
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,2,nil,{})
end
function cm.dishtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,LOCATION_HAND)
end
function cm.dishop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetFieldGroup(p,0,LOCATION_HAND)
if #g>0 then
Duel.ConfirmCards(p,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
Duel.ShuffleHand(1-tp)
end
end
\ No newline at end of file
--超古代生物 齐杰拉
if not pcall(function() require("expansions/script/c25000024") end) then require("script/c25000024") end
local m,cm=rscf.DefineCard(25000030)
function cm.initial_effect(c)
local e1,e2,e3=rsoc.SpSummonFun(c,m,2,"ctrl","tg",rstg.target(Card.IsControlerCanBeChanged,"ctrl",0,LOCATION_MZONE),cm.conop)
local e4=rsoc.TributeFun(c,m,"sp",nil,rsop.target(cm.spfilter,"sp",0,LOCATION_EXTRA),cm.spop)
end
function cm.conop(e,tp,eg,ep,ev,re,r,rp)
local tc=rscf.GetTargetCard()
if tc then
Duel.GetControl(tc,tp,0,1)
end
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.spop(e,tp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if #g<=0 then return end
Duel.ConfirmCards(tp,g)
rsgf.SelectSpecialSummon(g,tp,cm.spfilter,1,1,nil,{0,tp,tp,true,false,POS_FACEUP,nil,{"dis,dise",true}},e,tp)
--rsop.SelectSpecialSummon(tp,cm.spfilter,tp,0,LOCATION_EXTRA,1,1,nil,{0,tp,tp,true,false,POS_FACEUP,nil,{"dis,dise",true}},e,tp)
end
--超古代眷族 佐伽
if not pcall(function() require("expansions/script/c25000024") end) then require("script/c25000024") end
local m,cm=rscf.DefineCard(25000031)
function cm.initial_effect(c)
c:EnableReviveLimit()
local e0=rscf.SetSummonCondition(c,false,aux.ritlimit)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,0x1},"tg","tg,de,dsp",rscon.sumtype("rit"),nil,rstg.target(Card.IsAbleToGrave,"tg",0,LOCATION_ONFIELD),cm.tgop)
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,1},{1,0x1},"dish","ptg,de,dsp",rscon.sumtype("rit"),nil,rsop.target(1,"dish",0,LOCATION_HAND),cm.dishop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.reptg)
e3:SetOperation(cm.repop)
c:RegisterEffect(e3)
local e4=rsef.QO(c,nil,{m,2},{1,m+100},"se,th,dish",nil,LOCATION_HAND,nil,cm.thcost,rsop.target2(cm.fun,cm.thfilter,"th",LOCATION_DECK),cm.thop)
end
function cm.mat_filter(c)
return not c:IsLevel(6)
end
function cm.tgop(e,tp)
local tc=rscf.GetTargetCard()
if tc then Duel.SendtoGrave(tc,REASON_EFFECT) end
end
function cm.dishop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetFieldGroup(p,LOCATION_HAND,0)
if #g>0 then
local sg=g:RandomSelect(p,1)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
end
function cm.repfilter(c)
return rsoc.IsSet(c) and c:IsAbleToGrave()
end
function cm.reptg(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 Duel.IsPlayerCanDiscardDeck(tp,3) end
if Duel.SelectEffectYesNo(tp,c,96) then
return true
else return false end
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,1)
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsCode(25000025)
end
function cm.thop(e,tp)
if rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})>0 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD,nil)
end
end
--超古代邪神 加坦杰厄
if not pcall(function() require("expansions/script/c25000024") end) then require("script/c25000024") end
local m,cm=rscf.DefineCard(25000032)
function cm.initial_effect(c)
c:EnableReviveLimit()
local e0=rscf.SetSummonCondition(c,false,aux.ritlimit)
local e1,e2=rsef.SV_INDESTRUCTABLE(c,"battle,effect")
local e3=rsef.QO(c,EVENT_CHAINING,{m,0},{1,m},"neg,pos,dish","dsp,dcal",LOCATION_MZONE,rscon.negcon(2,true),nil,cm.negtg,cm.negop)
local e4=rsef.FV_LIMIT_PLAYER(c,"act",cm.actval,nil,{0,1})
local e5=rsef.FV_LIMIT_PLAYER(c,"act",cm.actval2,nil,{0,1})
local e6,e7=rsef.FV_UPDATE(c,"atk,def",cm.atkval,nil,{0,LOCATION_MZONE })
end
function cm.mat_filter(c)
return not c:IsLevel(12)
end
function cm.negtg(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)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateActivation(ev) then return end
if Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
rsop.SelectSolve(HINTMSG_POSCHANGE,tp,Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,1,nil,cm.solvefun)
end
end
function cm.solvefun(g,e,tp)
return Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
function cm.actval(e,re)
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local rc=re:GetHandler()
return not rc:IsLocation(LOCATION_SZONE)
end
function cm.actval(e,re)
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_GRAVE)
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.afilter,tp,rsloc.og,rsloc.og,nil)*-100
end
function cm.afilter(c)
return c:IsFacedown() or c:IsLocation(LOCATION_GRAVE)
end
\ No newline at end of file
--液态型异生兽 佩德隆
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000033)
if rssb then return end
rssb=cm
rscf.DefineSet(rssb,0xaf4)
function rssb.SummonCondition(c)
--[[
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
return e1]]--
end
function cm.splimit(e,se,sp,st)
return se:IsActiveType(TYPE_MONSTER) and rssb.IsSet(se:GetHandler())
end
function rssb.rmdcost(ct)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,ct)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==ct end
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
end
rssb.sstg=rsop.target(rscf.spfilter2(),"sp")
function rssb.ssop(e,tp)
local c=aux.ExceptThisCard(e)
if c then return rssf.SpecialSummon(c)
else return 0
end
end
function rssb.rmcfilter(c)
return c:IsAbleToRemoveAsCost(POS_FACEDOWN)
end
function rssb.rmfilter(c)
return c:IsAbleToRemove(POS_FACEDOWN)
end
function rssb.rmtdcost(ct)
return function(...)
return rscost.cost(cm.rmtdcfilter,"td",LOCATION_REMOVED,0,ct)(...)
end
end
function cm.rmtdcfilter(c)
return c:IsAbleToDeckOrExtraAsCost() and c:IsFacedown()
end
function rssb.cfcon(e,tp)
return not e:GetHandler():IsPublic()
end
function rssb.lfucon(e)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function rssb.LinkSummonFun(c,maxlink,minlink)
c:EnableReviveLimit()
if maxlink==1 then
aux.AddLinkProcedure(c,rssb.IsSet,1)
else
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_DARK),minlink or 2,maxlink,cm.gf)
end
end
function cm.gf(g)
return g:IsExists(rssb.IsSet,1,nil)
end
function rssb.ssfilter(checkzone)
return function(c,e,tp)
return Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP,tp,c) and c:IsFacedown() and rssb.IsSetM(c) and (not checkzone or Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
end
end
-----------------------------------
function cm.initial_effect(c)
rssb.SummonCondition(c)
local e1=rsef.I(c,{m,0},{1,m},"sp",nil,LOCATION_HAND,nil,rssb.rmdcost(3),rssb.sstg,rssb.ssop)
local e2=rsef.QO(c,nil,{m,1},1,"sp",nil,LOCATION_MZONE,rscon.phase("mp_o,bp_o"),rscost.regflag(),rsop.target(cm.lfilter,"sp",LOCATION_EXTRA),cm.lkop)
end
function cm.lfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_WARRIOR+RACE_FIEND) and c:IsLinkSummonable(nil,e:GetHandler())
end
function cm.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(cm.lfilter,tp,LOCATION_EXTRA,0,nil,e)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
--昆虫型异生兽 拜格巴尊
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000034)
function cm.initial_effect(c)
rssb.SummonCondition(c)
local e1=rsef.I(c,{m,0},{1,m},"sp",nil,LOCATION_HAND,nil,rscost.cost(rssb.rmcfilter,"rm_d",LOCATION_HAND,0,1,1,c),rssb.sstg,rssb.ssop)
local e2=rsef.QO(c,nil,{m,1},nil,"sp",nil,LOCATION_MZONE,rscon.phmp,rscost.releaseself(true),rsop.target(rssb.ssfilter(),"sp",LOCATION_REMOVED),cm.spop)
end
function cm.spop(e,tp)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
if #g>0 then
Duel.ConfirmCards(1-tp,g)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
rsop.SelectSpecialSummon(tp,rssb.ssfilter(true),tp,LOCATION_REMOVED,0,1,1,nil,{},e,tp)
end
end
end
\ No newline at end of file
--花型异生兽 莱芙丽雅
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000035)
function cm.initial_effect(c)
rssb.SummonCondition(c)
local e1=rsef.I(c,{m,0},{1,m},"rm,td,dr",nil,LOCATION_HAND,rssb.cfcon,nil,rsop.target({Card.IsAbleToDeck,"td",LOCATION_HAND,0,true,true,c},{cm.fun,"dr"},{rssb.rmfilter,"rm"}),cm.drop)
local e2=rsef.FC(c,EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(cm.addop)
end
function cm.fun(e,tp)
return Duel.GetMatchingGroupCount(Card.IsAbleToDeck,tp,LOCATION_HAND,0,e:GetHandler())
end
function cm.drop(e,tp)
local c=aux.ExceptThisCard(e)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,c)
if #g>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_EXTRA+LOCATION_DECK)
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel.ShuffleDeck(tp)
end
if Duel.Draw(tp,#og,REASON_EFFECT)>0 and c then
Duel.Remove(c,POS_FACEDOWN,REASON_EFFECT)
end
end
end
function cm.addop(e,tp,eg)
local c=e:GetHandler()
if eg:IsContains(c) then return end
for tc in aux.Next(eg) do
tc:AddCounter(0x104f,1)
local e1=rsef.SC({c,tc},EVENT_LEAVE_FIELD_P)
e1:SetOperation(cm.lop)
end
end
function cm.lop(e,tp)
local c=e:GetHandler()
if c:GetCounter(0x104f)>0 then
Duel.Damage(c:GetControler(),500,REASON_EFFECT)
end
end
--节肢型异生兽 班匹拉
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000036)
function cm.initial_effect(c)
rssb.SummonCondition(c)
local e1=rsef.I(c,{m,0},{1,m},"rm,th,se",nil,LOCATION_HAND,rssb.cfcon,nil,cm.tg,cm.op)
local e2=rsef.QO(c,nil,{m,2},{1,m+100},"pos",nil,LOCATION_MZONE,nil,rssb.rmtdcost(1),rsop.target(cm.posfilter,"pos",0,LOCATION_MZONE,true,true),cm.posop)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetDecktopGroup(tp,3)
if chk==0 then return #g==3 and g:FilterCount(Card.IsAbleToRemove,nil,POS_FACEDOWN)==3 and c:IsAbleToRemove(POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
end
function cm.filter(c)
return c:IsAbleToHand() and rssb.IsSetM(c)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,3)
if #g~=3 or g:FilterCount(Card.IsAbleToRemove,nil,POS_FACEDOWN)~=3 then return end
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
if #g>0 then
Duel.DisableShuffleCheck()
if g:IsExists(cm.filter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,cm.filter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
g:Sub(sg)
end
local c=aux.ExceptThisCard(e)
if c then g:AddCard(c) end
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT+REASON_REVEAL)
end
end
function cm.posfilter(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function cm.posop(e,tp)
local g=Duel.GetMatchingGroup(cm.posfilter,tp,0,LOCATION_MZONE,nil)
if #g>0 then
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end
end
--鳍盘型异生兽 诺斯菲尔
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000037)
function cm.initial_effect(c)
rssb.SummonCondition(c)
local e1=rsef.I(c,{m,0},{1,m},"sp",nil,LOCATION_HAND,rscon.excard2(cm.cfilter,LOCATION_MZONE),nil,rssb.sstg,rssb.ssop)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetCondition(rscon.excard2(Card.IsDefensePos,0,LOCATION_MZONE))
c:RegisterEffect(e2)
--damage reduce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e3:SetCondition(cm.rdcon)
e3:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE))
--c:RegisterEffect(e3)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_DRAW)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_BATTLE_DAMAGE)
e4:SetCondition(cm.condition)
e4:SetTarget(cm.target)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
end
function cm.cfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_WARRIOR+RACE_FIEND)
end
function cm.rdcon(e)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
return Duel.GetAttackTarget()==nil
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--触手型异生兽 库土拉
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000038)
function cm.initial_effect(c)
rssb.SummonCondition(c)
local e1=rsef.I(c,{m,0},{1,m},"rm,sp,se",nil,LOCATION_HAND,rssb.cfcon,nil,cm.tg,cm.op)
local e2=rsef.I(c,{m,1},{1,m+100},"rm",nil,LOCATION_MZONE,nil,rssb.rmtdcost(1),cm.hdtg,cm.hdop)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetDecktopGroup(tp,3)
if chk==0 then return #g==3 and g:FilterCount(rssb.rmfilter,nil)==3 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=aux.ExceptThisCard(e)
local g=Duel.GetDecktopGroup(tp,3)
if #g~=3 or g:FilterCount(rssb.rmfilter,nil)~=3 then return end
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
if #g>0 then
Duel.DisableShuffleCheck()
if g:IsExists(rssb.IsSetM,1,nil) then
if Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)>0 and c then
rssf.SpecialSummon(c)
end
else
Duel.ShuffleDeck(tp)
end
end
end
function cm.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end
function cm.hdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end
end
\ No newline at end of file
--恶魔型异生兽 伽汝贝洛斯
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000039)
function cm.initial_effect(c)
rssb.SummonCondition(c)
local e1=rsef.I(c,{m,0},{1,m},"sp",nil,LOCATION_HAND,nil,rssb.rmtdcost(3),rssb.sstg,rssb.ssop)
local e2=rsef.QO(c,EVENT_CHAINING,{m,1},{1,m+100},"sp,tk,neg","dsp,dcal",LOCATION_MZONE,rscon.negcon(cm.filter),rssb.rmtdcost(1),cm.negtg,cm.negop)
end
function cm.filter(e,tp,re,rp,tg,loc)
return loc&LOCATION_ONFIELD ~=0 and rp~=tp and re:IsActiveType(TYPE_MONSTER)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
for p=0,1 do
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0xaf4,0x4011,800,800,4,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,p) then return false end
end
return not Duel.IsPlayerAffectedByEffect(tp,59822133)
end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateActivation(ev) then return end
for p=0,1 do
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0xaf4,0x4011,800,800,4,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,p) then return end
end
for p=0,1 do
local token=Duel.CreateToken(tp,m+1)
if Duel.SpecialSummonStep(token,0,tp,p,false,false,POS_FACEUP_DEFENSE) then
local e1=rsef.SV_CANNOT_BE_MATERIAL({e:GetHandler(),token,true},"link",nil,nil,rsreset.est_pend)
end
end
Duel.SpecialSummonComplete()
end
--隐身型异生兽 格鲁格莱姆
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000041)
function cm.initial_effect(c)
rssb.SummonCondition(c)
local e1=rsef.I(c,{m,0},{1,m},"sp,rm",nil,LOCATION_HAND,rssb.cfcon,nil,rsop.target({rssb.ssfilter(true),"sp",LOCATION_REMOVED},{rssb.rmfilter,"rm"}),cm.spop)
local e2=rsef.QO(c,nil,{m,1},{1,m+100},"rm","tg",LOCATION_MZONE,rscon.phmp,rssb.rmtdcost(1),rstg.target({rssb.rmfilter,"rm",0,LOCATION_ONFIELD},rsop.list(rssb.rmfilter,"rm")),cm.rmop)
end
function cm.spop(e,tp)
local c=aux.ExceptThisCard(e)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
if #g>0 then
Duel.ConfirmCards(tp,g)
if rsop.SelectSpecialSummon(tp,rssb.ssfilter(true),tp,LOCATION_REMOVED,0,1,1,nil,{},e,tp)>0 and c then
Duel.Remove(c,POS_FACEDOWN,REASON_EFFECT)
end
end
end
function cm.rmop(e,tp)
local c=aux.ExceptThisCard(e)
local tc=rscf.GetTargetCard()
if c and tc then
Duel.Remove(rsgf.Mix2(c,tc),POS_FACEDOWN,REASON_EFFECT)
end
end
\ No newline at end of file
--肉盾型异生兽 古兰特拉
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000042)
function cm.initial_effect(c)
rssb.SummonCondition(c)
local e1=rsef.I(c,{m,0},{1,m},"sp",nil,LOCATION_HAND,rscon.excard(Card.IsFacedown,LOCATION_REMOVED,0,5),nil,rssb.sstg,rssb.ssop)
local e2=rsef.FV_CANNOT_BE_TARGET(c,"effect",aux.tgoval,cm.tg,{LOCATION_MZONE,0})
local e3=rsef.FV_INDESTRUCTABLE(c,"effect",aux.indoval,cm.tg,{LOCATION_MZONE,0})
end
function cm.tg(e,c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND+RACE_WARRIOR)
end
--原始异生兽 The One
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000043)
function cm.initial_effect(c)
rssb.LinkSummonFun(c,1)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},"rm,se,th","de,dsp",rscon.sumtype("link"),nil,cm.rmtg,cm.rmop)
local e2=rsef.STO(c,EVENT_LEAVE_FIELD,{m,1},{1,m+100},"se,th","de,dsp",rssb.lfucon,nil,rsop.target(cm.setfilter,nil,LOCATION_DECK),cm.setop)
end
function cm.setfilter(c)
return c:IsCode(25000052) and (c:IsAbleToHand() or c:IsSSetable())
end
function cm.setop(e,tp)
rshint.Select(tp,HINTMSG_SELF)
local tc=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if not tc then return end
local b1=tc:IsSSetable()
local b2=tc:IsAbleToHand()
local op=rsop.SelectOption(tp,b1,{m,1},b2,{m,2})
if op==1 then
Duel.SSet(tp,tc)
else
rsop.SendtoHand(tc)
end
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,3)
if chk==0 then return g:FilterCount(rssb.rmfilter,nil)==3 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
function cm.thfilter(c)
return rssb.IsSetM(c) and c:IsAbleToHand()
end
function cm.rmop(e,tp)
local g=Duel.GetDecktopGroup(tp,3)
local tg=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,g)
if #g>0 and Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)>0 and #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
rsgf.SelectToHand(tg,tp,aux.TRUE,1,1,nil,{})
end
end
\ No newline at end of file
--鹦鹉螺型异生兽 梅嘎福拉什
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000044)
function cm.initial_effect(c)
rssb.LinkSummonFun(c,2)
local e2=rsef.FV_LIMIT(c,"dis",nil,cm.tg,{LOCATION_MZONE,LOCATION_MZONE })
local e3=rsef.STO(c,EVENT_LEAVE_FIELD,{m,1},nil,"rm","de,dsp",rssb.lfucon,nil,rsop.target(cm.rmfilter,"rm",LOCATION_DECK),cm.rmop)
--force mzone
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_MUST_USE_MZONE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_EXTRA,LOCATION_EXTRA)
e1:SetCondition(cm.frccon)
e1:SetValue(cm.frcval)
c:RegisterEffect(e1)
end
function cm.frccon(e)
return e:GetHandler():GetSequence()>4 and not Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function cm.cfilter(c)
return c:GetSummonLocation()&LOCATION_EXTRA ~=0
end
function cm.frcval(e,c,fp,rp,r)
return e:GetHandler():GetLinkedZone() | 0x600060
end
function cm.tg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function cm.rmfilter(c)
return rssb.rmfilter(c) and rssb.IsSetM(c)
end
function cm.rmop(e,tp)
rsop.SelectRemove(tp,cm.rmfilter,tp,LOCATION_DECK,0,1,1,nil,{POS_FACEDOWN,REASON_EFFECT })
end
\ No newline at end of file
--爬虫型异生兽 理扎理阿苏古罗拉
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000045)
function cm.initial_effect(c)
rssb.LinkSummonFun(c,3)
local e1=rsef.QO(c,nil,{m,0},{1,m},"des,dam","tg",LOCATION_MZONE,nil,rssb.rmtdcost(1),rstg.target({Card.IsFaceup,"des",0,LOCATION_MZONE},rsop.list(1000,"dam",0,1)),cm.desop)
local e2=rsef.STO(c,EVENT_LEAVE_FIELD,{m,1},{1,m+100},"sp","de,dsp",rssb.lfucon,nil,rsop.target(rssb.ssfilter(true),"sp",LOCATION_REMOVED),cm.spop)
end
function cm.desop(e,tp)
local tc=rscf.GetTargetCard()
if tc and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
function cm.spop(e,tp)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
if #g>0 then
Duel.ConfirmCards(1-tp,g)
rsop.SelectSpecialSummon(tp,rssb.ssfilter(true),tp,LOCATION_REMOVED,0,1,1,nil,{},e,tp)
end
end
\ No newline at end of file
--合成异生兽 依组麦儒
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000046)
function cm.initial_effect(c)
c:EnableReviveLimit()
rssb.LinkSummonFun(c,4)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},nil,"dam","ptg,de,dsp",cm.linkcon(2),nil,rsop.target(cm.damval,"dam",0,1),cm.damop)
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,1},nil,"des","de,dsp",cm.linkcon(3),nil,rsop.target(aux.TRUE,"des",0,LOCATION_ONFIELD),cm.desop)
local e3=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,2},nil,"rm","de,dsp",cm.linkcon(4),nil,cm.rmtg,cm.rmop)
local e4=rsef.QO(c,nil,{m,3},1,nil,nil,LOCATION_MZONE,nil,cm.cpcost,nil,cm.cpop)
end
function cm.linkcon(ct)
return function(e)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK) and c:GetMaterial() and c:GetMaterialCount()>=ct
end
end
function cm.damval(e,tp)
return Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)*200
end
function cm.damop(e,tp)
local dam=Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)*200
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,dam,REASON_EFFECT)
end
function cm.desop(e,tp)
rsop.SelectDestroy(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil,{})
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(1-tp,5)
if chk==0 then return g:FilterCount(rssb.rmfilter,nil)==5 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
function cm.rmop(e,tp)
local g=Duel.GetDecktopGroup(1-tp,5)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
function cm.cpfilter(c)
return rssb.IsSetM(c) and not c:IsCode(m)
end
function cm.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
if chk==0 then return #g>0 and g:IsExists(cm.cpfilter,1,nil) end
Duel.ConfirmCards(1-tp,g)
local tc=g:FilterSelect(tp,cm.cpfilter,1,1,nil):GetFirst()
Duel.ConfirmCards(1-tp,tc)
Duel.SendtoDeck(tc,nil,2,REASON_COST)
e:SetLabelObject(tc)
end
function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local code=tc:GetOriginalCodeRule()
local cid=0
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
c:RegisterEffect(e1)
if not tc:IsType(TYPE_TRAPMONSTER) then
cid=c:CopyEffect(code, RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END, 1)
end
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,4))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetLabelObject(e1)
e2:SetLabel(cid)
e2:SetOperation(cm.rstop)
c:RegisterEffect(e2)
end
end
function cm.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
if cid~=0 then c:ResetEffect(cid,RESET_COPY) end
local e1=e:GetLabelObject()
e1:Reset()
Duel.HintSelection(Group.FromCards(c))
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
--赤色的死之巨人 黑暗浮士德
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000047)
function cm.initial_effect(c)
rssb.LinkSummonFun(c,2)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},nil,"de,dsp",rscon.sumtype("link"),nil,rsop.target(cm.actfilter,nil,LOCATION_DECK),cm.actop)
local e2=rsef.I(c,{m,1},{1,m+100},"des","tg",LOCATION_MZONE,nil,rssb.rmtdcost(1),rstg.target(aux.FilterBoolFunction(Card.IsType,TYPE_SPELL+TYPE_TRAP),"des",0,LOCATION_ONFIELD),cm.desop)
local e3=rsef.STO(c,EVENT_LEAVE_FIELD,{m,2},{1,m+200},"th,ga","de,dsp",rssb.lfucon,nil,rsop.target(cm.thfilter,"th",LOCATION_GRAVE),cm.thop)
end
function cm.actfilter(c,e,tp)
return c:IsCode(25000050) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,cm.actfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if not tc then return end
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
function cm.desop(e,tp)
local tc=rscf.GetTargetCard()
Duel.Destroy(tc,REASON_EFFECT)
end
function cm.thfilter(c)
return rssb.IsSetM(c) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,{})
end
\ No newline at end of file
--漆黑之恶魔 黑暗梅菲斯特
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000048)
function cm.initial_effect(c)
rssb.LinkSummonFun(c,3)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},"se,th","de,dsp",rscon.sumtype("link"),nil,rsop.target(cm.actfilter,nil,LOCATION_DECK),cm.actop)
local e2=rsef.QO(c,nil,{m,3},{1,m+100},"rm",nil,LOCATION_MZONE,nil,rssb.rmtdcost(1),rsop.target(rssb.rmfilter,"rm",0,LOCATION_GRAVE),cm.rmop)
local e3=rsef.STO(c,EVENT_LEAVE_FIELD,{m,0},{1,m+200},"se,th","de,dsp",rssb.lfucon,nil,rsop.target(cm.thfilter,nil,LOCATION_DECK),cm.thop)
end
function cm.actfilter(c,e,tp)
return c:IsCode(25000050) and ((c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)) or (c:IsAbleToHand()))
end
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,cm.actfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if not tc then return end
local b1=tc:IsAbleToHand()
local b2=tc:GetActivateEffect() and tc:GetActivateEffect():IsActivatable(tp,true,true)
local op=rsop.SelectOption(tp,b1,{m,1},b2,{m,2})
if op==1 then
rsop.SendtoHand(tc)
else
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
function cm.rmop(e,tp)
rsop.SelectRemove(tp,aux.NecroValleyFilter(rssb.rmfilter),tp,0,LOCATION_GRAVE,1,1,nil,{POS_FACEDOWN,REASON_EFFECT })
end
function cm.thfilter(c)
return c:IsCode(25000051) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
\ No newline at end of file
--邪恶的暗黑破坏神 黑暗扎基
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000049)
function cm.initial_effect(c)
rssb.LinkSummonFun(c,5,3)
rscf.SetSummonCondition(c,false,aux.linklimit)
local e1=rscf.SetSpecialSummonProduce(c,LOCATION_EXTRA,cm.sprcon,cm.sprop,{m,0})
local e2,e3=rsef.SV_INDESTRUCTABLE(c,"battle,effect")
local e4=rsef.QO(c,nil,{m,1},1,"des,dam",nil,LOCATION_MZONE,rscon.phmp,nil,rsop.target2(cm.fun,aux.TRUE,"des",0,LOCATION_ONFIELD,true,true),cm.desop)
end
function cm.sprcon(e,c,tp)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
local fg=g:Filter(cm.cfilter,nil)
return fg:GetClassCount(Card.GetCode)>=12 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.cfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.sprop(e,tp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
Duel.ConfirmCards(1-tp,g)
local fg=g:Filter(cm.cfilter,nil)
rshint.Select(tp,"rm")
--local rg=fg:SelectSubGroup(tp,aux.dncheck,false,12,12)
local rg=Group.CreateGroup()
for i=1,12 do
local tc=fg:Select(tp,1,1,nil):GetFirst()
rg:AddCard(tc)
fg:Remove(Card.IsCode,nil,tc:GetCode())
end
Duel.SendtoDeck(rg,nil,2,REASON_COST)
local e1=rsef.SV_IMMUNE_EFFECT(c,rsval.imes,nil,rsreset.est-RESET_TOFIELD)
local e2,e3=rsef.SV_LIMIT(c,"ress,resns",nil,nil,rsreset.est-RESET_TOFIELD)
end
function cm.fun(g,e,tp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*800)
end
function cm.desop(e,tp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if #g>0 then
local ct=Duel.Destroy(g,REASON_EFFECT)
if ct>0 then
Duel.Damage(1-tp,ct*800,REASON_EFFECT)
end
end
end
\ No newline at end of file
--黑暗领域
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000050)
function cm.initial_effect(c)
local e2=rsef.I(c,{m,0},{1,m+100},"sp",nil,LOCATION_FZONE,nil,cm.spcost,rsop.target(rssb.ssfilter(true),"sp",LOCATION_REMOVED),cm.spop)
local e3,e4=rsef.FV_UPDATE(c,"atk,def",300,cm.tg,{LOCATION_MZONE,LOCATION_MZONE })
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
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)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_FZONE)
e5:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e5:SetCondition(cm.btcon)
e5:SetOperation(cm.btop)
c:RegisterEffect(e5)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,5)
if chk==0 then return g:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)==5 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ct==0 then return end
if ct>5 then ct=5 end
local g=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
if chk==0 then return #g>0 end
Duel.ConfirmCards(1-tp,g)
Duel.SetTargetCard(g)
end
function cm.spop(e,tp)
local g=rsgf.GetTargetGroup()
rsgf.SelectSpecialSummon(g,tp,rssb.ssfilter(true),1,1,nil,{0,tp,tp,false,false,POS_FACEUP },e,tp)
end
function cm.tg(e,c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_WARRIOR+RACE_FIEND)
end
function cm.cfilter(c)
if not c then return false end
return not c:IsAttribute(ATTRIBUTE_DARK) or not c:IsRace(RACE_FIEND+RACE_WARRIOR)
end
function cm.btcon(e,tp,eg,ep,ev,re,r,rp)
local ac,bc=Duel.GetAttacker(),Duel.GetAttackTarget()
return cm.cfilter(ac) or cm.cfilter(bc)
end
function cm.btop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
local g=Group.CreateGroup()
if cm.cfilter(a) then
g:AddCard(a)
end
if cm.cfilter(d) then
g:AddCard(d)
end
for tc in aux.Next(g) do
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_BATTLE_ATTACK)
e4:SetReset(RESET_PHASE+PHASE_DAMAGE)
e4:SetValue(tc:GetBaseAttack())
tc:RegisterEffect(e4,true)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SET_BATTLE_DEFENSE)
e5:SetReset(RESET_PHASE+PHASE_DAMAGE)
e5:SetValue(tc:GetBaseDefense())
tc:RegisterEffect(e5,true)
end
end
\ No newline at end of file
--未知之手
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000051)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m,1},"sp",nil,nil,rscost.cost(cm.cfilter,"rm_d",LOCATION_HAND+LOCATION_MZONE),rsop.target(rssb.ssfilter(),"sp",LOCATION_REMOVED),cm.spop)
local e2=rsef.I(c,{m,0},nil,"dr,rm",nil,LOCATION_GRAVE,nil,rscost.cost(cm.cfilter2,"td",LOCATION_GRAVE,0,1,3),rsop.target({1,"dr"},{rssb.rmfilter,"rm"}),cm.drop)
end
function cm.cfilter(c)
return rssb.rmcfilter(c) and Duel.GetMZoneCount(tp,c,tp)>0 and rssb.IsSetM(c)
end
function cm.spop(e,tp)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
if #g<=0 then return end
Duel.ConfirmCards(1-tp,g)
rsop.SelectSpecialSummon(tp,rssb.ssfilter(true),tp,LOCATION_REMOVED,0,1,1,nil,{0,tp,tp,false,false,POS_FACEUP},e,tp)
end
function cm.cfilter2(c)
return c:IsAbleToDeckOrExtraAsCost() and rssb.IsSetM(c)
end
function cm.drop(e,tp)
local c=aux.ExceptThisCard(e)
if Duel.Draw(tp,1,REASON_EFFECT)>0 and c then
Duel.Remove(c,POS_FACEDOWN,REASON_EFFECT)
end
end
\ No newline at end of file
--忘却之海
if not pcall(function() require("expansions/script/c25000033") end) then require("script/c25000033") end
local m,cm=rscf.DefineCard(25000052)
function cm.initial_effect(c)
c:EnableCounterPermit(0x34)
local e1=rsef.ACT(c,nil,nil,{1,m})
e1:SetCondition(rscon.excard(Card.IsFacedown,LOCATION_REMOVED))
e1:SetOperation(cm.act)
local e4=rsef.QO(c,nil,{m,0},{1,m+100},"rm",nil,LOCATION_SZONE,nil,rscost.rmct(0x34,3),cm.rmtg,cm.rmop)
local e5=rsef.QO(c,nil,{m,1},{1,m+100},"sp",nil,LOCATION_SZONE,nil,rscost.rmct(0x34,3),rsop.target(rssb.ssfilter(true),"sp",LOCATION_REMOVED),cm.spop)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(cm.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function cm.act(e,tp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ct=Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
if ct>0 then
c:AddCounter(0x34,ct)
end
end
function cm.ctfilter(c,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_WARRIOR+RACE_FIEND) and c:GetSummonPlayer()==tp
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(cm.ctfilter,1,nil,tp) then
e:GetHandler():AddCounter(0x34,1)
end
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,5)
if chk==0 then return g:FilterCount(rssb.rmfilter,nil)==5 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
function cm.rmop(e,tp)
local g=Duel.GetDecktopGroup(tp,5)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
function cm.spop(e,tp)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil)
if #g<=0 then return end
Duel.ConfirmCards(1-tp,g)
rsop.SelectSpecialSummon(tp,rssb.ssfilter(true),tp,LOCATION_REMOVED,0,1,1,nil,{0,tp,tp,false,false,POS_FACEUP},e,tp)
end
\ No newline at end of file
--黯堕龙 凄厉空我
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000053)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcMixRep(c,true,true,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),1,1,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_DARK),aux.FilterBoolFunction(Card.IsFusionType,TYPE_RITUAL))
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,0,Duel.SendtoGrave,REASON_COST)
local e1=rsef.FV_LIMIT(c,"dis",nil,nil,{0,LOCATION_MZONE },nil,nil,"cd")
local e2=rsef.FTO(c,EVENT_SUMMON_SUCCESS,{m,0},{1,m},"rm","cd,cn",LOCATION_MZONE,cm.rmcon,nil,cm.rmtg,cm.rmop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(cm.splimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EFFECT_CANNOT_DISABLE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function cm.cfilter(c,tp)
return c:GetSummonPlayer()~=tp
end
function cm.rmcon(e,tp,eg)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil,1-tp,POS_FACEDOWN,REASON_RULE)
if chk==0 then return Duel.IsPlayerCanRemove(1-tp)
and #g>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanRemove(1-tp) then return end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil,1-tp,POS_FACEDOWN,REASON_RULE)
Duel.Remove(g,POS_FACEDOWN,REASON_RULE)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--颚门龙 闪耀进化
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000054)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcMixRep(c,true,true,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),1,1,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_LIGHT),aux.FilterBoolFunction(Card.IsFusionType,TYPE_NORMAL))
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST)
local e1=rsef.QO(c,EVENT_CHAINING,{m,0},{1,m},"neg","dsp,dcal",LOCATION_MZONE,rscon.negcon(4,true),nil,rstg.negtg(),cm.negop)
local e2=rsef.FTO(c,EVENT_PHASE+PHASE_END,{m,1},{1,m+100},"sp",nil,LOCATION_GRAVE+LOCATION_REMOVED,rscon.turns,nil,rsop.target(rscf.spfilter2(),"sp"),cm.spop)
local e4=rsef.RegisterClone(c,e2,"code",EVENT_PHASE+PHASE_STANDBY)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(cm.splimit)
c:RegisterEffect(e3)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateActivation(ev) then return end
local rc=re:GetHandler()
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(cm.distg)
e1:SetLabelObject(rc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(cm.discon)
e2:SetOperation(cm.disop)
e2:SetLabelObject(rc)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.distg(e,c)
local tc=e:GetLabelObject()
return c:IsCode(tc:GetCode())
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode())
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function cm.spop(e,tp)
local c=aux.ExceptThisCard(e)
if not c or rssf.SpecialSummon(c)<=0 then return end
Duel.RegisterFlagEffect(tp,m,0,0,1)
local ct=Duel.GetFlagEffect(tp,m)
local e1=rscf.QuickBuff({c,nil,true},"atk+,def+",1000*ct)
end
--镜中龙 生存烈火
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000055)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,cm.sfilter,1)
local e1=rsef.QO(c,nil,{m,0},{1,m},"tg,dis",nil,LOCATION_MZONE,rscon.phmp,nil,rsop.target(Card.IsAbleToGrave,"tg",0,LOCATION_ONFIELD),cm.tgop)
local e2=rsef.SV_UPDATE(c,"atk",cm.val)
end
function cm.sfilter(c)
return c:IsRace(RACE_WARRIOR) or c:IsAttribute(ATTRIBUTE_FIRE)
end
function cm.tgop(e,tp)
local ct,og,tc=rsop.SelectToGrave(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil,{})
if not tc then return end
if tc:IsPreviousLocation(LOCATION_MZONE) then
Duel.BreakEffect()
Duel.Damage(1-tp,tc:GetPreviousAttackOnField(),REASON_EFFECT)
end
tc:RegisterFlagEffect(m,rsreset.est_pend,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(cm.discon)
e1:SetOperation(cm.disop)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
--Duel.RegisterEffect(e1,tp)
local e1,e2=rscf.QuickBuff({e:GetHandler(),tc},"dis,dise","reset",rsreset.est_pend)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:GetHandler()==tc and tc:GetFlagEffect(m)>0
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function cm.val(e,c)
return Duel.GetMatchingGroupCount(rscf.fufilter(cm.sfilter),e:GetHandlerPlayer(),LOCATION_MZONE+LOCATION_GRAVE,0,nil)*500
end
\ No newline at end of file
--光子龙 深红爆裂
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000056)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,9,2,cm.ovfilter,aux.Stringid(m,0))
local e1=rsef.STO(c,EVENT_BATTLE_START,{m,1},{1,m},"dis",nil,nil,rscost.rmxyz(1),cm.distg,cm.disop)
local e2=rsef.STO(c,EVENT_BATTLED,{m,0},{1,m+100},"des,dam",nil,nil,nil,rsop.target2(cm.fun,aux.TRUE,"des",0,LOCATION_ONFIELD,true,true),cm.desop)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE+RACE_WARRIOR) and c:IsType(TYPE_XYZ)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(0,LOCATION_ONFIELD)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsOnField()
end
function cm.fun(g,e,tp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*500)
end
function cm.desop(e,tp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if #g>0 then
local ct=Duel.Destroy(g,REASON_EFFECT)
if ct>0 then
Duel.Damage(1-tp,ct*500,REASON_EFFECT)
end
end
end
\ No newline at end of file
--重醒龙 帝王剑斩
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000057)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,3,true)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_MATERIAL+REASON_FUSION)
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
local e2=rsef.QO(c,nil,{m,0},{1,m},"des","tg",LOCATION_MZONE,nil,nil,rstg.target2(cm.fun,cm.cfilter,nil,LOCATION_ONFIELD,LOCATION_ONFIELD),cm.desop)
local e3=rsef.SV_CANNOT_BE_TARGET(c,"effect",aux.tgoval)
local e4=rsef.SV_INDESTRUCTABLE(c,"all")
local e5,e6=rsef.SV_UPDATE(c,"atk,def",cm.val)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_ATTACK_ALL)
e7:SetValue(1)
c:RegisterEffect(e7)
end
function cm.ffilter(c,fc,sub,mg,sg)
return not sg or not sg:IsExists(Card.IsRace,1,c,c:GetRace())
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function cm.cfilter(c,e,tp)
return c:GetColumnGroup():FilterCount(Card.IsControler,nil,1-tp)>0
end
function cm.fun(g,e,tp)
local tc=g:GetFirst()
local dg=tc:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,#dg,0,0)
end
function cm.desop(e,tp)
local tc=rscf.GetTargetCard()
if not tc then return end
local dg=tc:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
Duel.Destroy(dg,REASON_EFFECT)
end
function cm.val(e,c)
return e:GetHandler():GetMaterialCount()*500
end
\ No newline at end of file
--音击龙 舞甲响鬼
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000058)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcMixRep(c,true,true,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR+RACE_ZOMBIE),1,1,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_DARK),aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_FIRE))
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
local e2=rsef.QO(c,EVENT_CHAINING,{m,0},{1,m},"neg,rm,dam","dsp,dcal",LOCATION_MZONE,rscon.negcon(2,true),nil,rstg.negtg("rm"),cm.negop)
local e3=rsef.STO(c,EVENT_PRE_DAMAGE_CALCULATE,{m,2},{1,m+100},"rm,dis",nil,cm.rmcon,nil,cm.rmtg,cm.rmop)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)>0 and rc:IsLocation(LOCATION_REMOVED) then
Duel.Damage(1-tp,2000,REASON_EFFECT)
end
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
local atk=e:GetHandler():GetAttack()
local bc=e:GetHandler():GetBattleTarget()
return bc~=nil and (bc:IsDefenseAbove(atk) or bc:IsAttackAbove(atk))
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetHandler():GetBattleTarget()
if chk==0 then return bc and bc:IsAbleToRemove() and aux.disfilter1(bc) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,bc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0)
end
function cm.rmop(e,tp)
local bc=e:GetHandler():GetBattleTarget()
if bc:IsRelateToBattle() then
local e1,e2=rscf.QuickBuff({e:GetHandler(),bc},"dis,dise")
Duel.NegateRelatedChain(bc,RESET_TURN_SET)
if not bc:IsImmuneToEffect(e1) then
Duel.BreakEffect()
Duel.Remove(bc,POS_FACEUP,REASON_EFFECT)
end
end
end
\ No newline at end of file
--超甲龙 迅虹辉翼
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000059)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,9,2)
local e1=rsef.I(c,{m,0},{1,m},"des",nil,LOCATION_MZONE,cm.descon,rscost.cost2(cm.fun,Card.IsDiscardable,"dish",LOCATION_HAND),rsop.target(aux.TRUE,"des",0,LOCATION_MZONE),cm.desop)
local e2=rsef.RegisterClone(c,e1,"desc",{m,1},"tg",rsop.target(cm.desfilter2,"des",0,LOCATION_ONFIELD),"op",cm.desop2)
local e3=rsef.QO(c,EVENT_CHAINING,{m,2},{1,m+100},nil,nil,LOCATION_MZONE,cm.skipcon,rscost.rmxyz(1),nil,cm.skipop)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():GetAttackAnnouncedCount()==0
end
function cm.fun(g,e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function cm.desop(e,tp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
function cm.desfilter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.desop2(e,tp)
local g=Duel.GetMatchingGroup(cm.desfilter2,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
function cm.skipcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetTurnPlayer()~=tp or Duel.GetCurrentPhase()==PHASE_MAIN1) and rp~=tp and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_SKIP_M1)
end
function cm.skipop(e,p)
local c=e:GetHandler()
local tp=Duel.GetTurnPlayer()
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_END,RESET_PHASE+PHASE_END,1)
if tp==p then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_TURN)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
local skipct=tp==p and 2 or 1
Duel.SkipPhase(p,PHASE_DRAW,RESET_PHASE+PHASE_END,skipct)
Duel.SkipPhase(p,PHASE_STANDBY,RESET_PHASE+PHASE_END,skipct)
--if tp==p then
--Duel.SkipPhase(p,PHASE_MAIN1,RESET_PHASE+PHASE_END,skipct)
--end
end
\ No newline at end of file
--铠武龙 什锦将军
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000061)
function cm.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_PENDULUM),aux.NonTuner(Card.IsSynchroType,TYPE_PENDULUM),1)
local e1=rsef.I(c,{m,0},{1,m},"sp",nil,LOCATION_PZONE,nil,nil,rsop.target(rscf.spfilter2(cm.spfilter),"sp",rsloc.de),cm.spop)
local e2=rsef.I(c,{m,1},{1,m},nil,nil,LOCATION_PZONE,nil,nil,rsop.target(cm.setfilter,nil,rsloc.de),cm.setop)
local e3=rsef.I(c,{m,2},{1,m+100},"des,sp","tg",LOCATION_PZONE,nil,nil,rstg.target({cm.desfilter,"des",LOCATION_ONFIELD,0,1,1,c },rsop.list(rscf.spfilter2(),"sp")),cm.spop2)
local e4=rsef.QO(c,nil,{m,3},{1,m+200},nil,nil,LOCATION_MZONE,nil,cm.cpcost,nil,cm.cpop)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,5))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(cm.pencon)
e5:SetTarget(cm.pentg)
e5:SetOperation(cm.penop)
c:RegisterEffect(e5)
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_DECK) or c:IsFaceup())
end
function cm.spop(e,tp)
if not aux.ExceptThisCard(e) then return end
rsop.SelectSpecialSummon(tp,rscf.spfilter2(cm.spfilter),tp,rsloc.de,0,1,1,nil,{},e,tp)
end
function cm.setfilter(c,e,tp)
return c:IsType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and not c:IsForbidden() and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
end
function cm.setop(e,tp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,cm.setfilter,tp,rsloc.de,0,1,1,nil):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function cm.desfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.spop2(e,tp)
local c,tc=aux.ExceptThisCard(e),rscf.GetTargetCard()
if tc and Duel.Destroy(tc,REASON_EFFECT)>0 and c then
rssf.SpecialSummon(c)
end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function cm.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tefilter,tp,LOCATION_DECK,0,1,nil) end
rshint.Select(tp,"td")
local tc=Duel.SelectMatchingCard(tp,cm.tefilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
Duel.SendtoExtraP(tc,nil,REASON_COST)
e:SetLabelObject(tc)
end
function cm.cpop(e,tp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
local code=tc:GetOriginalCodeRule()
local atk,def=tc:GetAttack()/2,tc:GetDefense()/2
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
if not tc:IsType(TYPE_TRAPMONSTER) then
local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
end
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,4))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetLabelObject(e1)
e3:SetLabel(cid)
e3:SetOperation(cm.rstop)
c:RegisterEffect(e3)
local e4,e5=rscf.QuickBuff(c,"atk+,def+",{atk,def},"reset",rsreset.est_pend)
end
end
function cm.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
if cid~=0 then c:ResetEffect(cid,RESET_COPY) end
local e1=e:GetLabelObject()
e1:Reset()
Duel.HintSelection(Group.FromCards(c))
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--一位青年艺术家的画像
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000062)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m},"des,sp",nil,nil,nil,cm.tg,cm.act)
local e2=rsef.I(c,{m,0},nil,"des",nil,LOCATION_GRAVE,nil,aux.bfgcost,rsop.target(cm.desfilter,"des",LOCATION_ONFIELD,LOCATION_ONFIELD),cm.desop)
end
function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.cfilter(c,p)
return c:GetPreviousControler()==p
end
function cm.setfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true)
end
function cm.desop(e,tp)
local ct,og=rsop.SelectDestroy(tp,cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,99,nil,{})
if ct<=0 then return end
for p=0,1 do
local dg=og:Filter(cm.cfilter,nil,p)
local ft=Duel.GetLocationCount(p,LOCATION_SZONE)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.setfilter),p,LOCATION_GRAVE,0,nil)
if #dg>0 and ft>0 and #sg>0 and rsop.SelectOC({m,1},true) then
rsgf.SelectSSet(sg,p,aux.TRUE,1,math.min(ft,#dg),nil,{})
end
end
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local dg1=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
local dg2=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
local sg1=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_SZONE,0,nil,e,tp)
local sg2=Duel.GetMatchingGroup(cm.spfilter,tp,0,LOCATION_SZONE,nil,e,tp)
local dct=#dg1+#dg2
local sct=#sg1+#sg2
if chk==0 then return dct>0 and sct>0 and (sct<2 or not Duel.IsPlayerAffectedByEffect(tp,59822133)) and (#sg1==0 or Duel.GetMZoneCount(tp,dg1,tp)>0) and (#sg2==0 or Duel.GetMZoneCount(tp,dg2,1-tp)>0) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,(dg1+dg2),dct,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,(sg1+sg2),sct,0,0)
end
function cm.spfilter(c,e,tp)
local code=c:GetOriginalCode()
return c:IsType(TYPE_SPELL+TYPE_TRAP) and Duel.IsPlayerCanSpecialSummonMonster(tp,code,nil,0x11,0,0,1,RACE_SPELLCASTER,ATTRIBUTE_DARK)
end
function cm.act(e,tp)
local dg1=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
local dg2=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
local sg1=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_SZONE,0,nil,e,tp)
local sg2=Duel.GetMatchingGroup(cm.spfilter,tp,0,LOCATION_SZONE,nil,e,tp)
local ct=Duel.Destroy(dg1+dg2,REASON_EFFECT)
if ct<=0 then return end
local sg=Group.CreateGroup()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>=#sg1 then
sg:Merge(sg1)
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>=#sg1 then
sg:Merge(sg2)
end
if #sg<=0 or (#sg>=2 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end
for tc in aux.Next(sg) do
tc:AddMonsterAttribute(0x11,ATTRIBUTE_DARK,RACE_SPELLCASTER,1,0,0)
Duel.HintSelection(Group.FromCards(tc))
rssf.SpecialSummonStep(tc,0,tp,tc:GetControler(),true,true,POS_FACEUP,nil,{"ress,ressns","syn,xyz,link","fus",cm.fusval})
end
Duel.SpecialSummonComplete()
end
function cm.fuslimit(e,c,sumtype)
return sumtype & SUMMON_TYPE_FUSION ~=0
end
\ No newline at end of file
--尤利西斯
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000063)
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SSET)
c:RegisterEffect(e1)
local e2=rsef.FC(c,EVENT_PHASE_START+PHASE_DRAW,nil,nil,nil,LOCATION_HAND+LOCATION_DECK,cm.con,cm.op)
end
function cm.con(e,tp)
return Duel.GetFlagEffect(tp,m)==0
end
function cm.op(e,tp)
local c=e:GetHandler()
rshint.Card(m)
Duel.ConfirmCards(1-tp,c)
Duel.RegisterFlagEffect(tp,m,0,0,1)
local e1=rsef.FC({c,0},EVENT_ADJUST)
e1:SetOperation(cm.hapeop)
end
function cm.hapeop(e,tp)
for p=0,1 do
local elist1={Duel.IsPlayerAffectedByEffect(p,EFFECT_CANNOT_SPECIAL_SUMMON)}
local elist2={Duel.IsPlayerAffectedByEffect(p,EFFECT_CANNOT_SUMMON)}
local elist3={Duel.IsPlayerAffectedByEffect(p,EFFECT_CANNOT_FLIP_SUMMON)}
local elist4={Duel.IsPlayerAffectedByEffect(p,EFFECT_CANNOT_ACTIVATE)}
local elistx=rsof.Table_Mix(elist1,elist2,elist3,elist4)
for _,ae in pairs(elistx) do
ae:SetCondition(aux.FALSE)
end
end
EFFECT_DISABLE_FIELD = 0
end
\ No newline at end of file
--芬尼根的守灵夜
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000064)
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SSET)
c:RegisterEffect(e1)
local e2=rsef.FC(c,EVENT_PHASE_START+PHASE_DRAW,nil,nil,nil,LOCATION_HAND+LOCATION_DECK,cm.con,cm.op)
end
function cm.con(e,tp)
return Duel.GetFlagEffect(tp,m)==0
end
function cm.op(e,tp)
local c=e:GetHandler()
rshint.Card(m)
Duel.ConfirmCards(1-tp,c)
Duel.RegisterFlagEffect(tp,m,0,0,1)
local e1=rsef.FC({c,0},EVENT_ADJUST)
e1:SetOperation(cm.codeop)
local e2=rsef.FV_LIMIT_PLAYER({c,0},"act",cm.aclimit,nil,{1,1})
local e3=rsef.FC({c,0},EVENT_MOVE)
e3:SetOperation(cm.mvop)
end
function cm.codeop(e,tp)
local g=Duel.GetMatchingGroup(aux.TRUE,0,0xff,0xff,nil)
for tc in aux.Next(g) do
local telist={tc:IsHasEffect(EFFECT_CHANGE_CODE)}
local telist2={tc:IsHasEffect(EFFECT_ADD_CODE)}
for _,te in pairs(telist) do
te:SetCondition(aux.FALSE)
end
for _,te in pairs(telist2) do
te:SetCondition(aux.FALSE)
end
end
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsLocation(LOCATION_EXTRA+LOCATION_DECK)
end
function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
local dg=Group.CreateGroup()
for tc in aux.Next(eg) do
local p=tc:GetPreviousControler()
if tc:IsPreviousLocation(LOCATION_DECK+LOCATION_EXTRA) and p~=rp then
dg:AddCard(tc)
end
end
if #dg>0 then
rshint.Card(m)
Duel.SendtoDeck(dg,1-rp,2,REASON_RULE)
end
end
\ No newline at end of file
--未完成的极意
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000065)
function cm.initial_effect(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)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
local e3,e4,e5=rsef.FV_LIMIT_PLAYER(c,"sum,sp,fp",nil,nil,{1,0})
local e6=rsef.SC(c,EVENT_TO_GRAVE)
e6:SetOperation(cm.spop)
local e7=rsef.STO(c,EVENT_LEAVE_FIELD,{m,1},nil,"se,th,ga","de,dsp",cm.thcon,nil,rsop.target(cm.thfilter,"th",rsloc.dg),cm.thop)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,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 c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
--target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(1)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(cm.eqlimit)
e3:SetLabelObject(tc)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
--immue
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetValue(cm.efilter)
c:RegisterEffect(e4)
--release
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_UNRELEASABLE_SUM)
e5:SetValue(1)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e6)
else
c:CancelToGrave(false)
end
end
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner() and te:GetOwner()~=e:GetOwner():GetEquipTarget()
end
function cm.spop(e,tp)
--ec:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA) and ec:IsFaceup()
local c=e:GetHandler()
local ec=c:GetPreviousEquipTarget()
if c and c:IsReason(REASON_LOST_TARGET) and ec and rscf.spfilter2()(ec,e,tp) and rsop.SelectYesNo(tp,{m,0}) then
Duel.Hint(HINT_CARD,0,m)
rssf.SpecialSummon(ec,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.thcon(e,tp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.thfilter(c)
return c:IsCode(m+1,m+2,m+3) and c:IsAbleToHand()
end
function cm.thop(e,tp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.thfilter),tp,rsloc.dg,0,nil)
if #g<=0 then return end
local tg=g:SelectSubGroup(tp,aux.dncheck,false,1,3)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
\ No newline at end of file
--宇宙重置机器 葛洛卡•卒
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000069)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),2)
local e1=rsef.QO(c,nil,{m,0},{1,m},"des,sp","tg",LOCATION_MZONE,nil,nil,rstg.target(aux.TRUE,"des",LOCATION_MZONE,LOCATION_MZONE),cm.desop)
local e3=rsef.I(c,{m,1},{1,m+100},"sp",nil,LOCATION_GRAVE,nil,nil,rsop.target(cm.linkfilter,"sp",LOCATION_EXTRA),cm.linkop)
end
function cm.desop(e,tp)
local tc=rscf.GetTargetCard()
if tc and Duel.Destroy(tc,REASON_EFFECT)>0 then
rsop.SelectOC({m,2},true)
rsop.SelectSpecialSummon(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,{SUMMON_TYPE_LINK,tp,tp,true,false,POS_FACEUP,nil,{"mat",Group.CreateGroup(),"cp"}},e,tp)
end
end
function cm.spfilter(c,e,tp)
return c:IsCode(m) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_LMATERIAL)
end
function cm.getmat(c,e,tp,bool)
local g1=rscf.GetLinkMaterials2(tp,nil,c)
local tc=e:GetHandler()
if tc:IsAbleToExtraAsCost() and tc:IsCanBeLinkMaterial(c) and not cm.check then
g1:AddCard(tc)
end
return g1
end
function cm.linkfilter(c,e,tp)
local matg=cm.getmat(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_LINK) and c:IsLinkSummonable(matg)
end
function cm.linkop(e,tp)
local c=rscf.GetSelf(e)
if not c then
cm.check=true
end
rshint.Select(tp,"sp")
local lc=Duel.SelectMatchingCard(tp,cm.linkfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
local matg=cm.getmat(lc,e,tp)
rssf.LinkMaterialAction=cm.fun(c)
Duel.LinkSummon(tp,lc,matg)
cm.check=false
end
function cm.fun(c)
return function(g,lc)
if g:IsContains(c) then
Duel.SendtoDeck(c,nil,2,REASON_COST+REASON_MATERIAL+REASON_LINK)
g:RemoveCard(c)
end
Duel.SendtoGrave(g,REASON_COST+REASON_MATERIAL+REASON_LINK)
end
end
\ No newline at end of file
--宇宙重置机器 葛洛卡•车
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000070)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),2)
local e1=rsef.QO(c,nil,{m,0},{1,m},"des,dam",nil,LOCATION_MZONE,nil,rscost.cost(1,"dish"),rsop.target(aux.TRUE,"des",0,LOCATION_HAND),cm.desop)
local e2=rsef.SC(c,EVENT_BATTLE_START)
e2:SetOperation(cm.desop2)
local e3=rsef.I(c,{m,1},{1,m+100},"sp",nil,LOCATION_GRAVE,nil,nil,rsop.target(cm.linkfilter,"sp",LOCATION_EXTRA),cm.linkop)
end
function cm.desop(e,tp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if #g>0 then
local dg=g:RandomSelect(tp,1)
if Duel.Destroy(dg,REASON_EFFECT)>0 and dg:GetFirst():IsType(TYPE_MONSTER) then
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
end
function cm.desop2(e,tp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if not bc or not bc:IsRelateToBattle() then return end
rshint.Card(m)
Duel.Destroy(bc,REASON_EFFECT)
end
function cm.getmat(c,e,tp,bool)
local g1=rscf.GetLinkMaterials2(tp,nil,c)
local tc=e:GetHandler()
if tc:IsAbleToExtraAsCost() and tc:IsCanBeLinkMaterial(c) and not cm.check then
g1:AddCard(tc)
end
return g1
end
function cm.linkfilter(c,e,tp)
local matg=cm.getmat(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_LINK) and c:IsLinkSummonable(matg)
end
function cm.linkop(e,tp)
local c=rscf.GetSelf(e)
if not c then
cm.check=true
end
rshint.Select(tp,"sp")
local lc=Duel.SelectMatchingCard(tp,cm.linkfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
local matg=cm.getmat(lc,e,tp)
rssf.LinkMaterialAction=cm.fun(c)
Duel.LinkSummon(tp,lc,matg)
cm.check=false
end
function cm.fun(c)
return function(g,lc)
if g:IsContains(c) then
Duel.SendtoDeck(c,nil,2,REASON_COST+REASON_MATERIAL+REASON_LINK)
g:RemoveCard(c)
end
Duel.SendtoGrave(g,REASON_COST+REASON_MATERIAL+REASON_LINK)
end
end
\ No newline at end of file
--宇宙重置机器 葛洛卡•主教
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000071)
function cm.initial_effect(c)
rscf.SetSummonCondition(c,false,aux.linklimit)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),3)
local e1=rsef.SV_CANNOT_BE_TARGET(c,"effect",aux.tgoval)
local e2=rsef.SV_INDESTRUCTABLE(c,"effect",aux.indoval)
local e3=rsef.QO(c,EVENT_CHAINING,{m,0},1,"dam","ptg",LOCATION_MZONE,cm.con,cm.cost,rsop.target(1500,"dam",0,1),cm.op)
local e4=rsef.QO(c,nil,{m,1},{1,m},"se,th",nil,LOCATION_MZONE,nil,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e5=rsef.QO(c,nil,{m,2},{1,m},"sp",nil,LOCATION_MZONE,nil,nil,rsop.target(cm.spfilter,"sp",LOCATION_EXTRA),cm.spop)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) and rp~=tp and re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsAbleToRemoveAsCost()
end
function cm.cost(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,nil)
Duel.NegateActivation(ev)
Duel.Remove(re:GetHandler(),POS_FACEUP,REASON_COST)
end
function cm.op(e,tp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsCode(25000072)
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.spfilter(c,e,tp)
return c:IsCode(m-1,m-2) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_LMATERIAL)
end
function cm.spop(e,tp)
rsop.SelectSpecialSummon(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,{SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP,nil,{"mat",Group.CreateGroup(),"cp"}},e,tp)
end
\ No newline at end of file
--千兆恩多拉•最终重置光
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000072)
function cm.initial_effect(c)
local e1=rsef.SV_ACTIVATE_IMMEDIATELY(c,"hand")
local e2=rsef.ACT(c,EVENT_LEAVE_FIELD,nil,nil,"tg","de",cm.con,nil,cm.tg,cm.act)
if cm.switch then return end
cm.switch = {[0]={},[1]={}}
local ge1=rsef.FC({c,0},EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(cm.regop)
end
function cm.regop(e,tp,eg)
for tc in aux.Next(eg) do
local sp=tc:GetSummonPlayer()
local code=tc:GetCode()
if tc:IsType(TYPE_LINK) and tc:IsRace(RACE_MACHINE) and not rsof.Table_List(cm.switch[sp],code) then
table.insert(cm.switch[sp],code)
end
end
end
function cm.cfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:GetPreviousRaceOnField() & RACE_MACHINE ~=0 and c:GetPreviousTypeOnField() & TYPE_LINK ~=0
end
function cm.con(e,tp,eg)
local ph=Duel.GetCurrentPhase()
return eg:IsExists(cm.cfilter,1,nil,tp) and #(cm.switch[tp])>=3 and Duel.GetTurnPlayer()~=tp and (ph>=PHASE_DRAW and ph<=PHASE_MAIN1 )
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function cm.act(e,tp)
local e1=rsef.FC({e:GetHandler(),tp},EVENT_PHASE+PHASE_BATTLE_START,nil,1,nil,nil,nil,cm.tdop,rsreset.pend)
end
function cm.tdfilter(c)
return Duel.IsPlayerCanSendtoDeck(tp,c)
end
function cm.tdop(e,tp)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,0,rsloc.hog,nil)
rshint.Card(m)
Duel.SendtoDeck(g,nil,2,REASON_RULE)
end
\ No newline at end of file
--超机械兽 百万巴萨库
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000073)
function cm.initial_effect(c)
rscf.SetSummonCondition(c,false,aux.FALSE)
rscf.SetSpecialSummonProduce(c,LOCATION_HAND+LOCATION_GRAVE,cm.spcon,cm.spop)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},nil,"an","de,dsp",nil,nil,cm.antg,cm.anop)
local e2=rsef.SV_CANNOT_BE_TARGET(c,"effect")
local e3=rsef.SV_INDESTRUCTABLE(c,"effect")
local e4,e5=rsef.SV_LIMIT(c,"ress,ressns")
local e6=rsef.QO(c,nil,{m,1},1,"eq",nil,LOCATION_MZONE,rscon.phmp,nil,rsop.target(cm.eqfilter,"eq",0,LOCATION_MZONE),cm.eqop)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e7:SetOperation(cm.btop)
c:RegisterEffect(e7)
end
function cm.spcon(e,c,tp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,3,c)
end
function cm.cfilter(c)
return c:IsAbleToGraveAsCost() and c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
function cm.spop(e,tp)
rsop.SelectToGrave(tp,cm.cfilter,tp,LOCATION_MZONE,0,3,3,nil,{REASON_COST })
end
function cm.antg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function cm.anop(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
e:GetHandler():SetHint(CHINT_CARD,ac)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_FORBIDDEN)
e1:SetTargetRange(0,0x7f)
e1:SetTarget(cm.bantg)
e1:SetLabel(ac)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function cm.bantg(e,c)
return c:IsCode(e:GetLabel())
end
function cm.eqfilter(c,e,tp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function cm.eqop(e,tp)
local c=rscf.GetFaceUpSelf(e)
if not c then return end
rsop.SelectSolve(HINTMSG_EQUIP,tp,cm.eqfilter,tp,0,LOCATION_MZONE,1,1,nil,cm.solvefun,e,tp)
end
function cm.solvefun(g,e,tp)
local tc=g:GetFirst()
local c=e:GetHandler()
rsop.eqop(e,tc,c)
end
function cm.btop(e,tp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not a or not d then return end
cm.adop(a==c and d or a,e)
end
function cm.adop(tc,e)
if not tc or not tc:IsRelateToBattle() then return end
local atk=math.max(0,tc:GetBaseAttack()/2)
local def=math.max(0,tc:GetBaseDefense()/2)
--local e1,e2=rsef.SV_SET({e:GetHandler(),tc,true},"atkf,deff",{atk,def},nil,nil,"sr,ii")
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BATTLE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
e1:SetValue(atk)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BATTLE_DEFENSE)
e2:SetReset(RESET_PHASE+PHASE_DAMAGE)
e2:SetValue(def)
tc:RegisterEffect(e2,true)
end
\ No newline at end of file
--机械兽 侦查巴萨库
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000074)
function cm.initial_effect(c)
aux.AddCodeList(c,25000073)
local e1=rsef.QO(c,nil,{m,0},{1,m},"sp",nil,LOCATION_HAND,nil,rscost.cost(cm.tgfilter,"tg",LOCATION_DECK),rsop.target(rscf.spfilter2(),"sp"),cm.spop)
local e2=rsef.FV_LIMIT_PLAYER(c,"sp",nil,aux.TargetBoolFunction(Card.IsLocation,LOCATION_EXTRA),{0,1},cm.limitcon)
local e3=rsef.STO(c,EVENT_TO_GRAVE,{m,1},{1,m+100},nil,"de,dsp",cm.lkcon,nil,nil,cm.lkop)
end
function cm.tgfilter(c)
return (c:IsCode(m-1) or (aux.IsCodeListed(c,m-1) and c:IsType(TYPE_SPELL+TYPE_TRAP))) and c:IsAbleToGraveAsCost()
end
function cm.spop(e,tp)
local c=rscf.GetSelf(e)
if c then rssf.SpecialSummon(c) end
end
function cm.cfilter(c)
return c:GetSummonLocation() & LOCATION_EXTRA ~=0
end
function cm.limitcon(e)
return not Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function cm.lkcon(e,tp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND)
end
function cm.setfilter(c)
return not c:IsOnField() or c:IsFacedown()
end
function cm.lkop(e,tp)
local g=Duel.GetMatchingGroup(cm.setfilter,tp,0,LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_DECK,nil)
Duel.ConfirmCards(tp,g)
Duel.ShuffleDeck(1-tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_PUBLIC)
e1:SetTargetRange(0,LOCATION_HAND)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--巴萨库系统启动
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000075)
function cm.initial_effect(c)
aux.AddCodeList(c,25000073)
local e1=rsef.ACT(c,nil,nil,{1,m},"se,th",nil,nil,nil,rsop.target(cm.thfilter0,"th",LOCATION_DECK),cm.act)
local e2=rsef.QO(c,nil,{m,0},{1,m+100},"sp",nil,LOCATION_SZONE,nil,rscost.cost(cm.cfilter,"tg",LOCATION_HAND+LOCATION_ONFIELD),rsop.target(rscf.spfilter(Card.IsRace,RACE_MACHINE),"sp",LOCATION_GRAVE),cm.spop)
local e3=rsef.QO(c,nil,{m,1},{1,m+100},"se,th",nil,LOCATION_SZONE,nil,rscost.cost(cm.cfilter2,"tg",LOCATION_HAND+LOCATION_ONFIELD),rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e4=rsef.I(c,{m,2},{1,m+200},"th,ga",nil,LOCATION_GRAVE,rscon.excard2(cm.rtcfilter,LOCATION_ONFIELD),nil,rsop.target(cm.rtfilter,nil),cm.rtop)
end
function cm.thfilter0(c)
return c:IsAbleToHand() and c:IsCode(m+1)
end
function cm.act(e,tp)
if not rscf.GetSelf(e) then return end
rsop.SelectToHand(tp,cm.thfilter0,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.cfilter(c,e,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.spop(e,tp)
if not rscf.GetSelf(e) then return end
rsop.SelectSpecialSummon(tp,aux.NecroValleyFilter(rscf.spfilter2(Card.IsRace,RACE_MACHINE)),tp,LOCATION_GRAVE,0,1,1,nil,{},e,tp)
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsCode(m-1)
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.rtcfilter(c,e,tp)
return c:IsCode(25000073) or aux.IsCodeListed(c,25000073)
end
function cm.rtfilter(c,e,tp)
return c:IsAbleToHand() or Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function cm.rtop(e,tp)
local c=rscf.GetSelf(e)
if not c then return end
local b1=c:IsAbleToHand()
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
if not b1 and not b2 then return end
local op=rsop.SelectOption(tp,b1,{m,1},b2,{m,3})
if op==1 then
Duel.SendtoHand(c,nil,REASON_EFFECT)
else
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--莫霍面地底文明 迪罗斯
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000076)
function cm.initial_effect(c)
aux.AddCodeList(c,25000073)
local e1=rsef.ACT(c,nil,nil,{1,m,1},"se,th",nil,nil,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.act)
local e2=rsef.QO(c,nil,{m,1},nil,nil,nil,LOCATILOCATION_SZONEON_MZONE,rscon.phmp,rscost.cost(cm.cfilter,"tg",LOCATION_ONFIELD),nil,cm.tfop)
local e3=rsef.QO(c,nil,{m,2},nil,"sp",nil,LOCATION_SZONE,rscon.phmp,rscost.cost(cm.cfilter2,"tg",LOCATION_ONFIELD),nil,cm.spop)
local e4=rsef.I(c,{m,3},1,"disd",nil,LOCATION_SZONE,nil,rscost.cost2(cm.regfun,Card.IsAbleToDeckOrExtraAsCost,"td",LOCATION_GRAVE,0,1,cm.ctfun),rsop.target(1,"disd",1,0),cm.disdop)
end
function cm.regfun(g,e)
e:SetLabel(#g)
end
function cm.ctfun(e,tp)
return math.min(8,Duel.GetFieldGroupCount(tp,LOCATION_DECK,0))
end
function cm.disdop(e,tp)
Duel.DiscardDeck(tp,e:GetLabel(),REASON_EFFECT)
end
function cm.cfilter2(c,e,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_SZONE,0,1,c,e,tp) and Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsComplexType(TYPE_SPELL+TYPE_CONTINUOUS) and c:GetOriginalType() & TYPE_MONSTER ~=0
end
function cm.spop(e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
rsop.SelectSpecialSummon(tp,cm.spfilter,tp,LOCATION_SZONE,1,ft,nil,{ 0,tp,tp,true,false,POS_FACEUP },e,tp)
end
function cm.cfilter(c,e,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_MZONE,0,1,c) and (c:IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
end
function cm.tffilter(c)
return c:GetOriginalRace() & RACE_MACHINE ~=0 and c:IsFaceup()
end
function cm.tfop(e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end
local ct,og,tc=rsop.SelectMoveToField_Activate(tp,cm.tffilter,tp,LOCATION_MZONE,1,ft,nil,{ tp,tp,LOCATION_SZONE })
for tc in aux.Next(og) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
function cm.thfilter(c,e,tp)
if not c:IsType(TYPE_TRAP) or not aux.IsCodeListed(c,25000073) then return false end
return c:IsAbleToHand() or Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function cm.act(e,tp)
local c=rscf.GetSelf(e)
if not c then return end
rsop.SelectSolve(HINTMSG_SELF,tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,cm.sfun,e,tp)
end
function cm.sfun(g,e,tp)
local tc=g:GetFirst()
local b1=tc:IsAbleToHand()
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
local op=rsop.SelectOption(tp,b1,{m,0},b2,{m,1})
if op==1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
return true
end
\ No newline at end of file
--地上毁灭序曲
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000077)
function cm.initial_effect(c)
aux.AddCodeList(c,25000073)
local e1=rsef.SV_ACTIVATE_IMMEDIATELY(c,"hand",cm.con)
local e2=rsef.ACT(c,nil,nil,{1,m,1},'se,th,tg',nil,nil,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.act)
local e3=rsef.FV_LIMIT_PLAYER(c,"act",cm.val,nil,{1,1})
local e4=rsef.STO(c,EVENT_TO_GRAVE,{m,1},nil,"th","de,dsp",nil,nil,rsop.target(cm.thfilter2,"th",LOCATION_GRAVE),cm.thop)
end
function cm.con(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==0
end
function cm.thfilter(c)
return c:IsCode(25000073) and c:IsAbleToHand()
end
function cm.act(e,tp)
if not rscf.GetSelf(e) then return end
if rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})>0 then
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,nil)
if #g>0 and rsop.SelectYesNo(tp,{m,0}) then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function cm.val(e,re)
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_GRAVE) and rc:IsType(TYPE_SPELL+TYPE_TRAP) and rc:IsControler(1-e:GetHandlerPlayer())
end
function cm.thfilter2(c)
return c:IsRace(RACE_MACHINE) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE,0,1,1,nil,{})
end
\ No newline at end of file
--黄昏的狂战士
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000078)
function cm.initial_effect(c)
aux.AddCodeList(c,25000073)
local e1=rsef.SV_ACTIVATE_IMMEDIATELY(c,"hand",rscon.excard2(Card.IsRace,LOCATION_MZONE,0,1,nil,RACE_MACHINE))
local e2=rsef.ACT(c,EVENT_SPSUMMON_SUCCESS,nil,{1,m,1},nil,nil,nil,nil,rsop.target2(cm.fun,cm.filter,nil,LOCATION_MZONE,LOCATION_MZONE),cm.act)
local e3=rsef.QO(c,nil,{m,0},nil,"th",nil,LOCATION_GRAVE,rscon.excard2(cm.rtcfilter,LOCATION_ONFIELD),rscost.cost(Card.IsAbleToDeckAsCost,"td"),rsop.target(cm.thfilter,"th",LOCATION_GRAVE,0,1,1,c),cm.thop)
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,{})
end
function cm.rtcfilter(c,e,tp)
return c:IsCode(25000073) or aux.IsCodeListed(c,25000073)
end
function cm.fun(g,e,tp,eg)
Duel.SetTargetCard(eg)
end
function cm.filter(c,e,tp,eg)
return eg:IsContains(c) and c:GetSummonPlayer()~=tp and Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp)>0
end
function cm.cfilter(c,tp)
return c:GetSummonPlayer()~=tp
end
function cm.act(e,tp,eg)
local c=e:GetHandler()
local tg=rsgf.GetTargetGroup():Filter(cm.cfilter,nil,tp)
local ft=Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp)
if #tg<=0 or ft<=0 then return end
local ct,og=rsgf.SelectMoveToField(tg,tp,aux.TRUE,1,ft,nil,{tp,1-tp,LOCATION_SZONE,POS_FACEUP,true})
for tc in aux.Next(og) do
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
if ct>0 and rscon.excard2(Card.IsCode,LOCATION_ONFIELD,0,1,nil,25000073)(e,tp) then
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_FORBIDDEN)
e1:SetTargetRange(0,0x7f)
e1:SetTarget(cm.bantg)
e1:SetLabelObject(og)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
function cm.bantg(e,c)
local og=e:GetLabelObject()
return og:IsExists(Card.IsCode,1,nil,c:GetCode())
end
--神话幻兽 尤尼金
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000079)
function cm.initial_effect(c)
local e0=rscf.SetSummonCondition(c,false,aux.FALSE)
local e1=rsef.FC(c,EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_REMOVED)
rsef.RegisterSolve(e1,cm.spcon,nil,nil,cm.spop)
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,1},{1,m,2},"an",nil,cm.con,nil,cm.tg,cm.op)
end
function cm.spcon(e,tp)
return Duel.GetTurnPlayer()==tp and Duel.GetFlagEffect(tp,m)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function cm.spop(e,tp)
local c=e:GetHandler()
if Duel.SelectEffectYesNo(tp,c,aux.Stringid(m,0)) then
rshint.Card(m)
if Duel.SpecialSummon(c,100,tp,tp,true,true,POS_FACEUP)>0 then
c:CompleteProcedure()
end
Duel.RegisterFlagEffect(tp,m,0,0,1)
end
end
function cm.con(e,tp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL+100)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_MONSTER,OPCODE_ISTYPE,m,OPCODE_ISCODE,OPCODE_NOT,OPCODE_AND}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local c=e:GetHandler()
local e1=rsef.FC({c,tp},EVENT_PHASE+PHASE_END,{m,2},1,nil,nil,cm.rmcon,cm.rmop,{rsreset.pend+RESET_SELF_TURN,2})
e1:SetLabel(Duel.GetTurnCount())
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetValue(ac)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
c:CopyEffect(ac,RESET_EVENT+RESETS_STANDARD,1)
end
function cm.rmcon(e,tp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,nil)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()==tp and #g>0
end
function cm.rmop(e,tp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_CARD,0,m)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--超科学星人 黑暗巴尔坦
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000080)
function cm.initial_effect(c)
rscf.SetSummonCondition(c,false,aux.FALSE)
rscf.SetSpecialSummonProduce(c,LOCATION_HAND,cm.spcon)
local e1=rsef.QO(c,nil,{m,0},nil,"tk,sp","cd,cn",LOCATION_MZONE,rscon.phmp,nil,cm.tktg,cm.tkop)
local e2=rsef.QO(c,EVENT_CHAINING,{m,1},nil,"neg,rm","dsp,dcal,cd,cn",LOCATION_MZONE,cm.negcon,nil,cm.negtg,rsop.negop("rm"))
local e3=rsef.FTO(c,EVENT_SPSUMMON_SUCCESS,{m,2},nil,"rm","de,dsp,cd,cn",LOCATION_MZONE,rscon.phmp,nil,cm.rmtg,cm.rmop)
local e4=rsef.QO(c,nil,{m,3},nil,"rm","cd,cn",LOCATION_MZONE,rscon.phmp,nil,cm.rmtg2,cm.rmop2)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EFFECT_SET_BATTLE_ATTACK)
e5:SetCondition(cm.acon)
e5:SetValue(cm.aval)
e5:SetRange(LOCATION_MZONE)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetCode(EFFECT_SET_BATTLE_DEFENSE)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(cm.acon)
e6:SetValue(cm.dval)
c:RegisterEffect(e6)
end
function cm.spcon(e,c,tp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function cm.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0,0x4011,1800,1800,4,RACE_INSECT,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0,0x4011,1800,1800,4,RACE_INSECT,ATTRIBUTE_DARK) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local spct=Duel.IsPlayerAffectedByEffect(tp,59822133) and 1 or ft
for i=1,ft do
local token=Duel.CreateToken(tp,m+1)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=rsef.SV_CHANGE({c,token},"type",TYPE_EFFECT+TYPE_MONSTER,nil,rsreset.est)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetValue(m)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2)
token:CopyEffect(m,RESET_EVENT+RESETS_STANDARD,1)
end
Duel.SpecialSummonComplete()
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and rp~=tp and c:GetFlagEffect(m)<Duel.GetMatchingGroupCount(rscf.fufilter(Card.IsCode,m),tp,LOCATION_ONFIELD,0,nil) and rscon.phmp(e,tp)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
c:RegisterFlagEffect(m,rsreset.est_pend,0,1)
end
function cm.rmfilter(c,tp)
return c:IsAbleToRemove() and c:GetSummonPlayer()~=tp
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rg=eg:Filter(cm.rmfilter,nil,tp)
if chk==0 then return #rg>0 and c:GetFlagEffect(m)<Duel.GetMatchingGroupCount(rscf.fufilter(Card.IsCode,m),tp,LOCATION_ONFIELD,0,nil) end
c:RegisterFlagEffect(m,rsreset.est_pend,0,1)
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,#rg,0,0)
end
function cm.rmop(e,tp)
local tg=rsgf.GetTargetGroup()
local rg=tg:Filter(cm.rmfilter,nil,tp)
if #rg>0 then
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
function cm.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) and c:GetFlagEffect(m)<Duel.GetMatchingGroupCount(rscf.fufilter(Card.IsCode,m),tp,LOCATION_ONFIELD,0,nil) end
c:RegisterFlagEffect(m,rsreset.est_pend,0,1)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function cm.rmop2(e,tp)
rsop.SelectRemove(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil,{})
end
function cm.acon(e)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
local bc=c:GetBattleTarget()
return bc and bc:IsControler(1-tp) and Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL
end
function cm.aval(e,c)
return e:GetHandler():GetBattleTarget():GetAttack()+100
end
function cm.dval(e,c)
return e:GetHandler():GetBattleTarget():GetDefense()+100
end
\ No newline at end of file
--白色的物体
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000082)
function cm.initial_effect(c)
--cannot material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1:SetValue(cm.fuslimit)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_UNRELEASABLE_SUM)
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e7:SetRange(LOCATION_MZONE)
e7:SetCode(EFFECT_CANNOT_CHANGE_CONTROL)
c:RegisterEffect(e7)
local e8=rsef.FC(c,EVENT_ADJUST)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e8:SetOperation(cm.damop)
local e9=rsef.FC(c,EVENT_RECOVER)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e9:SetOperation(cm.rmop)
local e10=rsef.SC(c,EVENT_LEAVE_FIELD)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e10:SetOperation(cm.spop)
e10:SetLabel(e9)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_SET_BATTLE_ATTACK)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetCondition(cm.acon)
e11:SetValue(cm.aval)
e11:SetRange(LOCATION_MZONE)
c:RegisterEffect(e11)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e12:SetCode(EFFECT_SET_BATTLE_DEFENSE)
e12:SetRange(LOCATION_MZONE)
e12:SetCondition(cm.acon)
e12:SetValue(cm.dval)
c:RegisterEffect(e12)
local e13=rsef.SV_IMMUNE_EFFECT(c,rsval.imoe,cm.ctcon(2))
local e14=rsef.QO(c,nil,{m,0},1,"tg","cd",LOCATION_MZONE,cm.ctcon(3),nil,rsop.target(cm.tgfilter,"tg",0,LOCATION_ONFIELD,true),cm.tgop)
local e15=Effect.CreateEffect(c)
e15:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e15:SetCode(EVENT_CHAINING)
e15:SetRange(LOCATION_MZONE)
e15:SetCondition(cm.chcon1)
e15:SetOperation(cm.chop1)
c:RegisterEffect(e15)
local e16=Effect.CreateEffect(c)
e16:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e16:SetCode(EVENT_CHAIN_SOLVING)
e16:SetRange(LOCATION_MZONE)
e16:SetCondition(cm.chcon2)
e16:SetOperation(cm.chop2)
c:RegisterEffect(e16)
local e19=rsef.SV_LIMIT(c,"atk",nil,cm.atklimitcon,nil,"cd")
local e20=rsef.SV_IMMUNE_EFFECT(c,cm.imval2)
end
function cm.imval2(e,re)
return not rsval.imoe(e,re) and rsval.imes(e,re)
end
function cm.atklimitcon(e)
return not e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL+11)
end
function cm.ctcon(ct)
return function(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),m)>=ct
end
end
function cm.chcon1(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and cm.ctcon(2)(e,tp)
end
function cm.chop1(e,tp,eg,ep,ev,re,r,rp)
re:GetHandler():RegisterFlagEffect(m+900,RESET_CHAIN,0,1)
end
function cm.chcon2(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():GetFlagEffect(m+900)>0
end
function cm.chop2(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.rep_op)
end
function cm.rep_op(e,tp,eg,ep,ev,re,r,rp)
local c=rscf.GetSelf(e)
if c then
Duel.Hint(HINT_CARD,0,m)
Duel.Destroy(c,REASON_EFFECT)
end
end
function cm.tgfilter(c,e,tp)
return Duel.IsPlayerCanSendtoGrave(tp,c)
end
function cm.tgop(e,tp)
local tg=Duel.GetMatchingGroup(cm.tgfilter,tp,0,LOCATION_ONFIELD,nil,e,tp)
Duel.SendtoGrave(tg,REASON_RULE)
end
function cm.acon(e)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
local bc=c:GetBattleTarget()
return bc and bc:IsControler(1-tp) and Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetFlagEffect(e:GetHandlerPlayer(),m)>=1
end
function cm.aval(e,c)
return e:GetHandler():GetBattleTarget():GetAttack()*2
end
function cm.dval(e,c)
return e:GetHandler():GetBattleTarget():GetDefense()*2
end
function cm.spop(e,tp)
local c=e:GetHandler()
local re=c:GetReasonEffect()
if re and re==e:GetLabel() then return end
rshint.Card(m)
Duel.ConfirmCards(1-tp,c)
if rscf.spfilter2()(c,e,tp) and Duel.SpecialSummon(c,11,tp,tp,false,false,POS_FACEUP)>0 then
Duel.RegisterFlagEffect(tp,m,0,0,1)
end
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if ep==tp and rp~=tp and r & REASON_EFFECT ~=0 and c:IsAbleToRemove() then
rshint.Card(m)
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
end
end
function cm.fuslimit(e,c,sumtype)
return sumtype & SUMMON_TYPE_FUSION ~=0
end
function cm.damop(e,tp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,m+100)<=0 then
Duel.Hint(HINT_CARD,0,m)
Duel.RegisterFlagEffect(tp,m+100,rsreset.pend,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_REFLECT_DAMAGE)
e1:SetTargetRange(1,0)
e1:SetValue(aux.TRUE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
--第三行星的奇迹
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000083)
function cm.initial_effect(c)
local e1=rsef.FC(c,EVENT_PHASE_START+PHASE_DRAW,nil,nil,nil,LOCATION_DECK,cm.thcon,cm.thop)
local e2=rsef.ACT(c,nil,nil,nil,"rec","cd,cn,tg",nil,nil,rstg.target(cm.cfilter,nil,LOCATION_MZONE,LOCATION_MZONE),cm.act)
end
function cm.cfilter(c)
return c:IsFaceup() and c:GetBaseAttack()==0 and c:GetBaseDefense()==0
end
function cm.act(e,tp)
local c=e:GetHandler()
local tc=rscf.GetTargetCard()
if not tc then return end
Duel.Recover(tc:GetControler(),1000,REASON_EFFECT)
local e1=rsef.FC({c,tp},EVENT_PHASE+PHASE_END,nil,nil,nil,nil,cm.damcon,cm.damop,{rsreset.pend,2})
e1:SetLabelObject(tc)
e1:SetLabel(c:GetFieldID())
e1:SetValue(Duel.GetTurnCount())
tc:RegisterFlagEffect(m,rsreset.est,0,2,c:GetFieldID())
end
function cm.damcon(e,tp)
return Duel.GetTurnCount()~=e:GetValue() and e:GetLabelObject():GetFlagEffectLabel(m)==e:GetLabel()
end
function cm.damop(e,tp)
rshint.Card(m)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
Duel.RegisterEffect(e2,tp)
end
function cm.thcon(e,tp)
return Duel.GetFlagEffect(tp,m)==0 and Duel.IsExistingMatchingCard(rscf.fufilter(Card.IsOriginalCodeRule,25010012),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsPlayerCanSendtoHand(tp,e:GetHandler())
end
function cm.thop(e,tp)
local c=e:GetHandler()
if rsop.SelectYesNo(tp,{m,0},m) and aux.TRUE(Duel.RegisterFlagEffect(tp,m,0,0,1)) and Duel.SendtoHand(c,nil,REASON_RULE)>0 then
Duel.ConfirmCards(1-tp,c)
end
end
\ No newline at end of file
--梦的极致
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000084)
function cm.initial_effect(c)
local e1=rsef.FC(c,EVENT_PHASE_START+PHASE_DRAW,nil,{1,m,2},nil,LOCATION_HAND+LOCATION_DECK,cm.tdcon,cm.tdop)
local e2=rsef.FC(c,EVENT_ADJUST)
e2:SetOperation(cm.tdop2)
end
function cm.tdop2(e,tp)
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
local c=e:GetHandler()
if not Duel.IsPlayerCanSendtoDeck(tp,c) then return end
rshint.Card(m)
Duel.SendtoDeck(c,nil,2,REASON_RULE)
end
function cm.tdcon(e,tp)
local c=e:GetHandler()
return not c:IsPublic() and not c:IsFaceup() and (not c:IsLocation(LOCATION_HAND) or Duel.IsPlayerCanSendtoDeck(tp,c))
end
function cm.tdop(e,tp)
local c=e:GetHandler()
rshint.Card(m)
Duel.ConfirmCards(1-tp,c)
if c:IsLocation(LOCATION_HAND) then
Duel.SendtoDeck(c,nil,2,REASON_RULE)
end
c:ReverseInDeck()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(cm.distg)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(cm.discon)
e2:SetOperation(cm.disop)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
e3:SetValue(cm.aclimit)
Duel.RegisterEffect(e3,tp)
for p=0,1 do
local e5=rsef.FC({c,p},EVENT_PHASE+PHASE_STANDBY,nil,1)
rsef.RegisterSolve(e5,cm.ncon,nil,nil,cm.nop)
e5:SetLabel(p)
end
end
function cm.distg(e,c)
return c:IsOriginalCodeRule(25010013)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOriginalCodeRule(25010013)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsOriginalCodeRule(25010013)
end
function cm.ncon(e,tp)
return Duel.GetTurnPlayer()==e:GetLabel()
end
function cm.cfilter(c)
return c:IsFacedown()
end
function cm.nop(e,tp)
local c=e:GetHandler()
rshint.Card(m)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_DECK,0,nil)
if #g<=1 then return end
Duel.ConfirmCards(1-tp,g)
rshint.Select(1-tp,HINTMSG_OPPO)
local hg=g:Select(1-tp,1,1,nil)
Duel.ConfirmCards(tp,hg)
hg:ForEach(cm.nfun,c)
local e1=rsef.FC({c,0},EVENT_ADJUST)
e1:SetOperation(cm.winop)
end
function cm.nfun(tc,c)
tc:ReverseInDeck()
tc:RegisterFlagEffect(m,rsreset.est,0,1)
local e1=rsef.SV_ADD({c,tc,true},"code",25010013,nil,rsreset.est)
end
function cm.cfilter2(c)
return c:GetFlagEffect(m)>0 and c:IsFaceup()
end
function cm.winop(e,tp)
local g1=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
local ct1=g1:FilterCount(cm.cfilter2,nil)
local ct2=g2:FilterCount(cm.cfilter2,nil)
local b1=#g1>0 and #g1==ct1
local b2=#g2>0 and #g2==ct2
if not b1 and not b2 then return end
rshint.Card(m)
local winp=0
if b1 and b2 then
winp=PLAYER_NONE
elseif b1 then
winp=tp
else
winp=1-tp
end
Duel.Win(winp,0x4)
end
\ No newline at end of file
--蝴蝶梦
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000085)
function cm.initial_effect(c)
c:SetUniqueOnField(1,1,m)
local e0=rsef.ACT(c)
local e1=rsef.FC(c,EVENT_PHASE+PHASE_STANDBY,nil,{1,m},nil,LOCATION_DECK,cm.thcon,cm.thop)
local e2=rsef.FTF(c,EVENT_PHASE+PHASE_STANDBY,{m,3},1,"rm,td",nil,LOCATION_SZONE,nil,nil,cm.rmtg,cm.rmop)
local e3=rsef.QO(c,nil,{m,4},nil,nil,nil,LOCATION_SZONE,nil,rscost.cost(Card.IsAbleToGrave,"tg"),nil,cm.damop)
end
function cm.damop(e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(aux.FALSE)
end
function cm.rmop(e,tp)
local c=e:GetHandler()
local plist={Duel.GetTurnPlayer(),1-Duel.GetTurnPlayer()}
for index=1,2 do
local p=plist[index]
local dg=Duel.GetMatchingGroup(Card.IsAbleToRemove,p,LOCATION_DECK,0,nil)
if #dg>=5 then
local rg=dg:RandomSelect(p,5)
if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup()
if #og>0 and Duel.SendtoDeck(og,1-p,2,REASON_EFFECT)>0 then
og=Duel.GetOperatedGroup()
Duel.ShuffleDeck(1-p)
--og:ForEach(cm.nfun,c)
local dg2=Duel.GetMatchingGroup(Card.IsAbleToRemove,p,LOCATION_EXTRA,0,nil,POS_FACEDOWN,REASON_RULE)
if og:IsExists(Card.IsCode,1,nil,m-1) and #dg2>=3 then
local rg2=dg2:RandomSelect(p,3)
if Duel.Remove(rg2,POS_FACEDOWN,REASON_RULE)>0 then
local og2=Duel.GetOperatedGroup()
Duel.SendtoDeck(og2,1-p,2,REASON_EFFECT)
end
end
end
end
end
end
end
function cm.nfun(tc,c)
tc:ReverseInDeck()
tc:RegisterFlagEffect(m,rsreset.est,0,1)
local e1=rsef.SV_ADD({c,tc,true},"code",25010013,nil,rsreset.est)
end
function cm.tdfilter(c)
return Duel.IsPlayerCanSendtoDeck(c:GetControler(),c)
end
function cm.thcon(e,tp)
local c=e:GetHandler()
local b1=Duel.IsPlayerCanSendtoHand(tp,c)
local b2=not c:IsForbidden() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:CheckUniqueOnField(tp)
return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_HAND,0,2,nil) and (b1 or b2) and Duel.IsExistingMatchingCard(rscf.fufilter(Card.IsCode,25010013),tp,LOCATION_DECK,0,1,nil)
end
function cm.thop(e,tp)
rshint.Card(m)
local c=e:GetHandler()
local b1=Duel.IsPlayerCanSendtoHand(tp,c)
local b2=not c:IsForbidden() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:CheckUniqueOnField(tp)
local op=rsop.SelectOption(tp,true,{m,0},b1,{m,1},b2,{m,2})
if op==1 then return end
rsop.SelectToDeck(tp,cm.tdfilter,tp,LOCATION_HAND,0,2,2,nil,{nil,2,REASON_RULE })
if op==2 then
Duel.SendtoHand(c,nil,REASON_RULE)
Duel.ConfirmCards(1-tp,c)
elseif op==3 then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--都柏林人
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000086)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m})
e1:SetOperation(cm.act)
end
function cm.act(e,tp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_SEND_REPLACE)
e1:SetTarget(cm.reptg)
e1:SetValue(cm.repval)
e1:SetReset(rsreset.pend)
Duel.RegisterEffect(e1,tp)
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.SendtoHand(c,1-tp,REASON_EFFECT)
end
end
function cm.repfilter(c,tp)
return c:IsFaceup() and c:IsOnField() and c:GetDestination()&LOCATION_GRAVE+LOCATION_REMOVED ~=0 and c:GetLeaveFieldDest()==0 and c:GetReasonPlayer()~=tp and c:GetOwner()~=tp
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp) end
local rg=eg:Filter(cm.repfilter,1,nil,tp)
local exg=rg:Filter(Card.IsType,nil,rscf.extype)
if #exg>0 then
Duel.SendtoDeck(rg,tp,2,REASON_EFFECT)
end
Duel.SendtoHand(rg-exg,tp,REASON_EFFECT+REASON_REDIRECT)
end
function cm.repval(e,c)
return true
end
\ No newline at end of file
--阿克西斯的奇迹
local m=25000087
local cm=_G["c"..m]
function cm.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c,rlv)
return c:IsFaceup() and c:GetLevel()<rlv
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local rlv=rc:GetLevel()
return rc:IsType(TYPE_MONSTER) and rlv>0 and Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil,rlv)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local rc=re:GetHandler()
local rlv=rc:GetLevel()
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,0,1,nil,rlv) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,rlv)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(cm.imfilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
--cannot be target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(aux.imval1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(0,1)
e2:SetLabel(tc:GetLevel())
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTarget(cm.val)
Duel.RegisterEffect(e2,tp)
end
end
function cm.imfilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.val(e,c)
return c:IsLevelAbove(e:GetLabel()+1)
end
\ No newline at end of file
--雪之圆舞曲
local m=25000088
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetCondition(cm.handcon)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVING)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.chainfilter(re,tp,cid)
return not re:IsActiveType(TYPE_MONSTER)
end
function cm.handcon(e)
return Duel.GetTurnPlayer()==tp and Duel.GetCustomActivityCount(m,1-e:GetHandlerPlayer(),ACTIVITY_CHAIN)~=0
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local dg=Duel.GetDecktopGroup(tp,8)
if chk==0 then return e:GetHandler():IsAbleToDeck() and dg:GetCount()==8 and Duel.IsPlayerCanDraw(tp,3) end
local ect=Duel.GetChainInfo(ev,CHAININFO_CHAIN_COUNT)
if Duel.GetFlagEffect(tp,m)==0 then
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1,ect)
Duel.RegisterFlagEffect(1-tp,m,RESET_CHAIN,0,1,ect)
end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c or not aux.TRUE(c:CancelToGrave()) or Duel.SendtoDeck(c,nil,2,REASON_EFFECT)<=0 or not c:IsLocation(LOCATION_DECK) then return end
Duel.ShuffleDeck(tp)
Duel.ConfirmDecktop(tp,8)
local g=Duel.GetDecktopGroup(tp,8)
if #g<=0 then return end
local ct=g:FilterCount(Card.IsCode,nil,m)
Duel.BreakEffect()
if ct==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
elseif ct==2 then
Duel.Draw(tp,3,REASON_EFFECT)
elseif ct==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g3,nil,REASON_EFFECT)
end
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsCode(m)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local lab=Duel.GetFlagEffectLabel(tp,m)
if not lab then return end
local ect=Duel.GetChainInfo(ev,CHAININFO_CHAIN_COUNT)
if ect>lab then
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.rep_op)
end
end
function cm.rep_op(e,tp)
Duel.Hint(HINT_CARD,0,m)
Duel.Draw(tp,1,REASON_EFFECT)
end
--文明裁决者 加拉特隆
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000089)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),2)
local e1=rscf.SetSpecialSummonProduce(c,LOCATION_EXTRA,cm.linkcon,cm.linkop,{m,0})
e1:SetValue(SUMMON_TYPE_LINK)
local e2=rsef.QO(c,nil,{m,1},{1,m},"des,dam",nil,LOCATION_MZONE,nil,rscost.cost(cm.rmfilter,"rm",LOCATION_GRAVE),rsop.target2(cm.fun,aux.TRUE,"des",0,LOCATION_MZONE),cm.desop)
--Negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m+100)
e4:SetCondition(rscon.negcon(4,true))
e4:SetCost(rscost.cost(cm.rmfilter2,"rm",LOCATION_GRAVE))
e4:SetTarget(cm.negtg)
e4:SetOperation(cm.negop)
c:RegisterEffect(e4)
end
function cm.negtg(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)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT)
end
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
Duel.Destroy(g,REASON_EFFECT)
end
function cm.rmfilter2(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
function cm.desop(e,tp)
local ct,og,tc=rsop.SelectDestroy(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil,{})
if tc then
Duel.Damage(1-tp,tc:GetAttack(),REASON_EFFECT)
end
end
function cm.rmfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsRace(RACE_MACHINE)
end
function cm.lmfilter(c,lc,tp,og,lmat)
return c:IsFaceup() and c:IsCanBeLinkMaterial(lc) and c:IsLinkRace(RACE_MACHINE) and c:IsLinkType(TYPE_LINK) and c:IsLevelAbove(lc:GetLink())
and Duel.GetLocationCountFromEx(tp,tp,c,lc)>0 and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_LMATERIAL)
and (not og or og:IsContains(c)) and (not lmat or lmat==c)
end
function cm.linkcon(e,c,og,lmat,min,max)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.lmfilter,tp,LOCATION_MZONE,0,1,nil,c,tp,og,lmat)
end
function cm.linkop(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max)
local mg=Duel.SelectMatchingCard(tp,cm.lmfilter,tp,LOCATION_MZONE,0,1,1,nil,c,tp,og,lmat)
c:SetMaterial(mg)
Duel.SendtoGrave(mg,REASON_MATERIAL+REASON_LINK)
end
\ No newline at end of file
--文明裁决者 加拉特隆二型
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000090)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),2)
local e1=rsef.FC(c,EVENT_CHAINING,nil,nil,"cd,uc,sa,ir",nil,cm.chainop)
local e2=rsef.QO(c,nil,{m,0},{1,m},nil,nil,LOCATION_MZONE,cm.damcon,rscost.cost(Card.IsAbleToRemoveAsCost,"rm",LOCATION_GRAVE),rsop.target(Card.IsFaceup,nil,0,LOCATION_MZONE),cm.damop)
local e3=rsef.FV_LIMIT(c,"dis",nil,nil,{ 0,LOCATION_ONFIELD },cm.dccon)
local e4=rsef.SV_UPDATE(c,"atk",cm.val,cm.dccon)
--extra material
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetCode(EFFECT_SPSUMMON_PROC)
e5:SetRange(LOCATION_EXTRA)
e5:SetCondition(cm.linkcon)
e5:SetOperation(cm.linkop)
e5:SetValue(SUMMON_TYPE_LINK)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(LOCATION_EXTRA,0)
e6:SetTarget(cm.mattg)
e6:SetLabelObject(e5)
c:RegisterEffect(e6)
end
function cm.lmfilter(c,lc,tp,og,lmat)
return c:IsFaceup() and c:IsCanBeLinkMaterial(lc) and Duel.GetLocationCountFromEx(tp,tp,c,lc)>0 and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_LMATERIAL)
and (not og or og:IsContains(c)) and (not lmat or lmat==c)
end
function cm.linkcon(e,c,og,lmat,min,max)
if c==nil then return true end
local tp=c:GetControler()
return cm.lmfilter(e:GetHandler(),c,tp,og,lmat)
end
function cm.linkop(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max)
c:SetMaterial(e:GetHandler())
Duel.SendtoGrave(e:GetHandler(),REASON_MATERIAL+REASON_LINK)
end
function cm.mattg(e,c)
return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_LINK) and c:IsLevelBelow(e:GetHandler():GetLink())
end
function cm.dccon(e)
local c=e:GetHandler()
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE)
end
function cm.val(e,c)
local bc=c:GetBattleTarget()
local atk,def=bc:GetAttack(),bc:GetDefense()
atk = atk or 0
def = def or 0
if atk<0 then atk =0 end
if def<0 then def =0 end
return math.min(atk,def)
end
function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler()==e:GetHandler() then
Duel.SetChainLimit(cm.chainlm)
end
end
function cm.chainlm(e,rp,tp)
return tp==rp
end
function cm.damcon(e,tp)
return e:GetHandler():IsAttackPos()
end
function cm.damop(e,tp)
local c=rscf.GetFaceUpSelf(e)
if not c or not c:IsAttackPos() then return end
rsop.SelectSolve(HINTMSG_OPPO,tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,cm.solvefun,c)
end
function cm.solvefun(g,c)
Duel.CalculateDamage(c,g:GetFirst())
return true
end
\ No newline at end of file
--文明审判者 吉尔巴利斯
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000091)
function cm.initial_effect(c)
rscf.SetSummonCondition(c,false,aux.linklimit)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),3)
local e1=rsef.SV_IMMUNE_EFFECT(c,cm.val)
local e2=rsef.SV_INDESTRUCTABLE(c,"battle")
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=rsef.QO(c,nil,{m,0},1,"rm,dam",nil,LOCATION_MZONE,nil,rscost.cost(Card.IsAbleToRemoveAsCost,"rm",LOCATION_GRAVE),rsop.target(cm.rmfilter,"rm",0,LOCATION_GRAVE+LOCATION_MZONE,true),cm.rmop)
local e5=rsef.QO(c,nil,{m,3},{1,m},"td",nil,LOCATION_MZONE,nil,nil,rsop.target(aux.TRUE,"tg",LOCATION_REMOVED),cm.tgop)
local e6=rsef.QO(c,nil,{m,4},{1,m},"sp",nil,LOCATION_MZONE,nil,nil,rsop.target(cm.spfilter,"sp",LOCATION_GRAVE),cm.spop)
end
function cm.spfilter(c,e,tp)
return c:IsCode(m-1,m-2) and rscf.spfilter2()(c,e,tp)
end
function cm.spop(e,tp)
rsop.SelectSpecialSummon(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,{},e,tp)
end
function cm.tgop(e,tp)
rsop.SelectToGrave(tp,aux.TRUE,tp,LOCATION_REMOVED,0,1,3,nil,{ REASON_EFFECT+REASON_RETURN })
end
function cm.val(e,re)
return rsval.imntg2(e,re) and re:IsActiveType(TYPE_MONSTER)
end
function cm.rmfilter(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function cm.rmop(e,tp)
local g1=Duel.GetMatchingGroup(cm.rmfilter,tp,0,LOCATION_MZONE,nil)
local g2=Duel.GetMatchingGroup(cm.rmfilter,tp,0,LOCATION_GRAVE,nil)
if #g1<=0 and #g2<=0 then return end
local op=rsop.SelectOption(tp,#g1>0,{m,1},#g2>0,{m,2})
local ct=0
if op==1 then
ct=Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
else
ct=Duel.Remove(g2,POS_FACEUP,REASON_EFFECT)
end
Duel.Damage(1-tp,ct*500,REASON_EFFECT)
end
\ No newline at end of file
--杀手比特星
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000092)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.lfilter,1)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},"se,th","de,dsp",rscon.sumtype("link"),rscost.cost(1,"dish"),rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e2=rsef.I(c,{m,1},{1,m+100},"dr","ptg",LOCATION_MZONE,nil,rscost.cost(cm.cfilter,"td",LOCATION_GRAVE+LOCATION_REMOVED),rsop.target(1,"dr"),cm.drop)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(cm.matcon)
e3:SetOperation(cm.matop)
c:RegisterEffect(e3)
end
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_LINK
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetOperation(cm.disop)
e4:SetReset(rsreset.est)
rc:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_BE_BATTLE_TARGET)
rc:RegisterEffect(e5)
local e6=rsef.FV_LIMIT_PLAYER({c,rc},"act",cm.limitval,nil,{1,1},nil,rsreset.est)
end
function cm.limitval(e,re)
return re:GetHandler():GetFlagEffect(m)~=0
end
function cm.cfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAbleToDeckAsCost()
end
function cm.drop(e,tp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.lfilter(c)
if not c:IsLinkRace(RACE_MACHINE) then return false end
if c:IsLinkType(TYPE_LINK) and c:IsLink(1) then return false end
return true
end
function cm.thfilter(c)
return c:IsCode(m+1) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc and not bc:IsRace(RACE_MACHINE) then
bc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
end
end
\ No newline at end of file
--钢铁的宇宙•有机生命抹杀计划
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000093)
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.I(c,{m,0},{1,m},"sp",nil,LOCATION_SZONE,nil,nil,rsop.target(rscf.spfilter2(Card.IsRace,RACE_MACHINE),"sp",LOCATION_DECK),cm.spop)
local e3=rsef.FV_ADD(c,"race",RACE_MACHINE)
local e4=rsef.FV_LIMIT_PLAYER(c,"sp",nil,cm.tg,{0,1},cm.con)
local e5=rsef.FV_LIMIT_PLAYER(c,"act",cm.val,nil,{0,1},cm.con)
local e6=rsef.I(c,{m,6},{1,m+100},"th,ga",nil,LOCATION_GRAVE,nil,rscost.cost(cm.tgfilter,"tg",LOCATION_ONFIELD),rsop.target(cm.thfilter,nil),cm.thop)
end
function cm.tgfilter(c)
if not c:IsAbleToGraveAsCost() then return false end
return (c:IsRace(RACE_MACHINE) and c:IsFaceup()) or c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.thfilter(c,e,tp)
return c:IsAbleToHand() or Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function cm.thop(e,tp)
local c=rscf.GetSelf(e)
if not c then return end
local b1=c:IsAbleToHand()
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
if not b1 and not b2 then return end
local op=rsop.SelectOption(tp,b1,{m,1},b2,{m,2})
if op==1 then Duel.SendtoHand(c,nil,REASON_EFFECT)
else
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function cm.spop(e,tp)
if not rscf.GetSelf(e) then return end
rsop.SelectSpecialSummon(tp,rscf.spfilter2(Card.IsRace,RACE_MACHINE),tp,LOCATION_DECK,0,1,1,nil,{0,tp,tp,false,false,POS_FACEUP,nil,{"dis,dise"}},e,tp)
end
function cm.tg(e,c)
return not c:IsRace(RACE_MACHINE)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttackAbove(2500)
end
function cm.con(e)
local g=Duel.GetMatchingGroup(cm.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
return g:GetClassCount(Card.GetCode)>=6
end
function cm.val(e,re)
return not re:GetHandler():IsRace(RACE_MACHINE)
end
\ No newline at end of file
--天球之月
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000094)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m},nil,nil,nil,nil,cm.tg,cm.act)
local e2=rsef.I(c,{m,0},{1,m+100},nil,nil,LOCATION_GRAVE,rscon.excard2(cm.exfilter,LOCATION_ONFIELD),aux.bfgcost,nil,cm.limitop)
end
function cm.limitop(e,tp)
local c=e:GetHandler()
local e1,e2,e3,e4=rsef.FV_LIMIT_PLAYER({c,tp},"rm,res,th",nil,aux.TargetBoolFunction(Card.IsRace,RACE_MACHINE),{1,1},nil,{rsreset.pend,2})
end
function cm.exfilter(c)
return c:IsComplexType(TYPE_SPELL,true,TYPE_CONTINUOUS,TYPE_FIELD)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.thfilter,tp,rsloc.gr+LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end
local op=rsop.SelectOption(tp,b1,{m,0},b2,{m,1})
if op==1 then
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,rsloc.gr+LOCATION_DECK)
else
e:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,rsloc.hg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,rsloc.hg)
end
e:SetLabel(op)
end
function cm.thfilter(c,e,tp)
local g=Duel.GetMatchingGroup(rscf.fufilter(Card.IsRace,RACE_MACHINE),tp,rsloc.mg,0,nil)
if g:GetClassCount(Card.GetCode)<4 and c:IsLocation(LOCATION_DECK) then return false end
return (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and c:IsAbleToHand() and c:IsComplexType(TYPE_SPELL,true,TYPE_CONTINUOUS,TYPE_FIELD)
end
function cm.rmfilter(c,e,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove() and Duel.GetMZoneCount(tp,c,tp)>0 and Duel.IsExistingMatchingCard(rscf.spfilter(Card.IsRace,RACE_MACHINE),tp,rsloc.hg,0,1,nil,e,tp)
end
function cm.act(e,tp)
local op=e:GetLabel()
if op==1 then
rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter),tp,rsloc.gr+LOCATION_DECK,0,1,1,nil,{},e,tp)
elseif op==2 then
if rsop.SelectRemove(tp,cm.rmfilter,tp,rsloc.hg,0,1,1,nil,{},e,tp)>0 then
rsop.SelectSpecialSummon(tp,aux.NecroValleyFilter(rscf.spfilter(Card.IsRace,RACE_MACHINE)),tp,rsloc.hg,0,1,1,nil,{},e,tp)
end
end
end
\ No newline at end of file
--钢铁的杀手 詹杀手
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000095)
function cm.initial_effect(c)
local e2=rsef.SV_INDESTRUCTABLE(c,"effect")
local e3=rsef.SV_CANNOT_BE_TARGET(c,"effect",aux.tgoval)
local e4=rsef.QO(c,nil,{m,1},{1,m},nil,nil,LOCATION_MZONE,nil,rscost.cost2(cm.fun,cm.tgfilter,"tg",rsloc.de),nil,cm.cpop)
--summon with 1 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(cm.otcon)
e1:SetOperation(cm.otop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
end
function cm.fun(g,e,tp)
e:SetLabel(g:GetFirst():GetOriginalCode())
end
function cm.tgfilter(c)
return c:IsAbleToGraveAsCost() and c:IsRace(RACE_MACHINE)
end
function cm.cpop(e,tp)
local c=e:GetHandler()
local e1=rsef.FV_LIMIT_PLAYER({c,tp},"sp",nil,nil,{1,0},nil,{rsreset.pend,2})
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local code=e:GetLabel()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetValue(code)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1)
end
function cm.otfilter(c)
return c:IsReleasable() and c:IsRace(RACE_MACHINE)
end
function cm.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(cm.otfilter,tp,rsloc.de,0,nil)
return c:IsLevelAbove(5) and minc<=1 and #mg>0 and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.cfilter(c)
return c:IsComplexType(TYPE_SPELL,true,TYPE_CONTINUOUS,TYPE_FIELD)
end
function cm.otop(e,tp,eg,ep,ev,re,r,rp,c)
rsop.SelectToGrave(tp,cm.otfilter,tp,rsloc.de,0,1,1,nil,{REASON_RELEASE+REASON_SUMMON+REASON_MATERIAL })
end
--钢铁的兄弟 詹伯特
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000096)
function cm.initial_effect(c)
local e1=rsef.QO(c,nil,{m,0},{1,m},"sp",nil,LOCATION_HAND,nil,rscost.cost(Card.IsAbleToDeckAsCost,"td"),rsop.target(rscf.spfilter2(Card.IsCode,m+1),"sp",LOCATION_DECK),cm.spop)
local e2=rsef.QO(c,nil,{m,1},{1,m+100},"td,se,th",nil,LOCATION_MZONE,nil,rscost.cost(cm.tdfilter,{"td",cm.fun},rsloc.hog+LOCATION_REMOVED),rsop.target(Card.IsAbleToDeck,"td",0,LOCATION_HAND),cm.tdop)
--rsef.SV_CANNOT_DISABLE_S(c)
end
function cm.spop(e,tp)
rsop.SelectSpecialSummon(tp,rscf.spfilter2(Card.IsCode,m+1),tp,LOCATION_DECK,0,1,1,nil,{},e,tp)
end
function cm.tdfilter(c,e,tp)
return c:IsAbleToDeckAsCost() and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) and (c:IsRace(RACE_MACHINE) or c:IsType(TYPE_SPELL+TYPE_TRAP)) and e:GetHandler():IsAbleToDeckAsCost()
end
function cm.fun(g,e,tp)
g:AddCard(e:GetHandler())
return g,Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsCode(m,m+1)
end
function cm.tdop(e,tp)
local hd=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil)
if #hd<=0 then return end
if Duel.SendtoDeck(hd:RandomSelect(tp,1),nil,2,REASON_EFFECT)>0 then
rsop.SelectOC({m,2},true)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
end
\ No newline at end of file
--钢铁的兄弟 詹奈
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000097)
function cm.initial_effect(c)
local e1=rsef.QO(c,nil,{m,0},{1,m},"sp",nil,LOCATION_HAND,nil,rscost.cost(Card.IsAbleToDeckAsCost,"td"),rsop.target(rscf.spfilter2(Card.IsCode,m-1),"sp",LOCATION_DECK),cm.spop)
local e2=rsef.QO(c,nil,{m,1},{1,m+100},"td,se,th",nil,LOCATION_MZONE,nil,rscost.cost(cm.tdfilter,{"td",cm.fun},rsloc.hog+LOCATION_REMOVED),rsop.target(Card.IsAbleToDeck,"td",LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,c),cm.tdop)
--rsef.SV_CANNOT_DISABLE_S(c)
end
function cm.spop(e,tp)
rsop.SelectSpecialSummon(tp,rscf.spfilter2(Card.IsCode,m-1),tp,LOCATION_DECK,0,1,1,nil,{},e,tp)
end
function cm.tdfilter(c,e,tp)
return c:IsAbleToDeckAsCost() and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) and (c:IsRace(RACE_MACHINE) or c:IsType(TYPE_SPELL+TYPE_TRAP)) and e:GetHandler():IsAbleToDeckAsCost()
end
function cm.fun(g,e,tp)
g:AddCard(e:GetHandler())
return g,Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsCode(m,m-1)
end
function cm.tdop(e,tp)
if rsop.SelectToDeck(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil,{})>0 then
rsop.SelectOC({m,2},true)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
end
\ No newline at end of file
--电脑魔神 戴斯法萨
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000098)
function cm.initial_effect(c)
c:EnableReviveLimit(c)
aux.AddLinkProcedure(c,nil,2,3,cm.gcheck)
local e1=rsef.FV_EXTRA_MATERIAL_SELF(c,"link",cm.val,cm.tg,{LOCATION_HAND,0})
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},"eq","de,dsp",rscon.sumtype("link"),nil,rsop.target(cm.eqfilter,"eq",LOCATION_DECK),cm.eqop)
local e3=rsef.I(c,{m,1},{1,m+100},"dam","ptg",nil,rscost.reglabel(100),cm.damtg,cm.damop)
local e4=rsef.STO(c,EVENT_LEAVE_FIELD,{m,2},{1,m+200},"se,th","de,dsp",cm.thcon,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
end
function cm.thcon(e,tp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function cm.thfilter(c)
return c:IsCode(25000099) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetLabel()==100 and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_SZONE,0,1,nil) end
local ct=rsop.SelectRemove(tp,cm.tgfilter,tp,LOCATION_SZONE,0,1,99,{POS_FACEUP,REASON_COST })
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(ct*1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*1000)
end
function cm.tgfilter(c)
return c:IsFaceup() and c:IsAbleToRemoveAsCost()
end
function cm.damop(e,tp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function cm.gcheck(g)
return g:IsExists(Card.IsLinkRace,1,nil,RACE_MACHINE)
end
function cm.val(e,c,mg)
return c==e:GetHandler() and not mg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND)
end
function cm.eqfilter(c,e,tp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsType(TYPE_MONSTER) and c:CheckUniqueOnField(tp)
end
function cm.eqop(e,tp)
local c=rscf.GetFaceUpSelf(e)
if not c then return end
rsop.SelectSolve(HINTMSG_EQUIP,tp,cm.eqfilter,tp,LOCATION_DECK,0,1,1,nil,cm.eqfun,e,tp)
end
function cm.eqfun(g,e,tp)
local c=e:GetHandler()
local tc=g:GetFirst()
local race=tc:GetRace()
if rsop.Equip(e,tc,c) then
local e1=rsef.FV_CANNOT_BE_TARGET({c,tc,true},"effect",aux.tgoval,cm.tg,{LOCATION_MZONE,0},cm.con,rsreset.est)
e1:SetLabelObject(c)
e1:SetLabel(race)
end
return true
end
function cm.tg(e,c)
return c:IsRace(e:GetLabel())
end
function cm.con(e,tp)
return e:GetHandler():GetEquipTarget()==e:GetLabelObject()
end
\ No newline at end of file
--超巨型植物兽 莫奈拉女王
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000099)
function cm.initial_effect(c)
local e1=rscf.SetSummonCondition(c,nil,rsval.spconbe)
local e2=rsef.SV_ADD(c,"race",RACE_FIEND)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
local e3=rsef.FC(c,EVENT_LEAVE_FIELD_P,nil,nil,"cd",rsloc.hg,cm.regcon,cm.regop)
local e4=rsef.FTO(c,EVENT_LEAVE_FIELD,{m,0},{1,m},"sp,eq","de",rsloc.hg,nil,nil,rsop.target2(cm.fun,{rscf.spfilter2(),"sp"},{ cm.eqfilter,"eq",LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED }),cm.spop)
local g=Group.CreateGroup()
g:KeepAlive()
e4:SetLabelObject(g)
e3:SetLabelObject(e4)
local e5=rsef.QO(c,nil,{m,1},{1,m+100},"tg,dam",nil,LOCATION_MZONE,nil,rscost.reglabel(100),cm.tgtg,cm.tgop)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local eqg=c:GetEquipGroup()
if chk==0 then
if e:GetLabel()~=100 then return false end
return eqg:IsExists(cm.tdfilter,1,nil,tp,c:GetFieldID())
end
e:SetLabel(0)
local ct,og,tc=rsgf.SelectToDeck(eqg,tp,cm.tdfilter,1,1,nil,{})
local tct=cm.getcount(tc)
e:SetValue(tct)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,tct,0,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,tct*500)
end
function cm.tgop(e,tp)
local tct=e:GetValue()
local ct=rsop.SelectToGrave(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,tct,tct,nil,{})
if ct>0 then
Duel.Damage(1-tp,ct*500,REASON_EFFECT)
end
end
function cm.getcount(c)
if not c:IsType(TYPE_MONSTER) then return 0 end
local ct=0
if c:IsType(TYPE_XYZ) then ct=c:GetRank()
elseif c:IsType(TYPE_LINK) then ct=c:GetLink()
else
ct=c:GetLevel()
end
return ct
end
function cm.tdfilter(c,tp,fid)
return c:GetFlagEffectLabel(m)==fid and c:IsAbleToDeckOrExtraAsCost()and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,cm.getcount(c),c)
end
function cm.cfilter(c,tp)
return c:IsControler(1-tp) and c:GetSummonLocation() & LOCATION_EXTRA ~=0 and c:IsLocation(LOCATION_MZONE)
end
function cm.regcon(e,tp,eg)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.regop(e,tp,eg)
local eg2=eg:Filter(cm.cfilter,nil,tp)
e:GetLabelObject():GetLabelObject():Clear()
e:GetLabelObject():GetLabelObject():Merge(eg2)
end
function cm.eqfilter(c,e,tp)
return e:GetLabelObject():IsContains(c) and cm.eqfilter2(c,e,tp)
end
function cm.eqfilter2(c,e,tp)
return c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function cm.fun(g,e,tp)
local og=e:GetLabelObject():Clone()
Duel.SetTargetCard(og)
end
function cm.spop(e,tp)
local tg=rsgf.GetTargetGroup()
local c=rscf.GetSelf(e)
if not c or rssf.SpecialSummon(c)<=0 or #tg<=0 then return end
rsgf.SelectSolve(tg,HINTMSG_EQUIP,tp,cm.eqfilter2,1,1,nil,cm.eqfun,e,tp)
end
function cm.eqfun(g,e,tp)
local tc=g:GetFirst()
local c=e:GetHandler()
if rsop.Equip(e,tc,c) then
tc:ResetFlagEffect(m)
tc:RegisterFlagEffect(m,rsreset.est,0,1,c:GetFieldID(),0)
end
return true
end
--恶魔之星 布莱克星
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25000119)
if rsufo then return end
rsufo = cm
rsufo.code = {}
rscf.DefineSet(rsufo,0xaf5)
function rsufo.ShowFun(c,code,ecode,cate,flag,con,excost,tg,op,checks)
local e1=rsef.QO(c,ecode,{code,0},{1,code},cate,flag,LOCATION_HAND,cm.scon(checks,con),cm.scost(excost),tg,cm.sop(checks,op))
rsufo.code[e1]=code
return e1
end
function rsufo.ShowFunT(c,code,ecode,cate,flag,con,excost,tg,op,checks)
local e1=rsef.FTO(c,ecode,{code,0},{1,code},cate,flag,LOCATION_HAND,cm.scon(checks,con),cm.scost(excost),cm.stg(tg),cm.sop(checks,op))
rsufo.code[e1]=code
return e1
end
function cm.scon(checks,con)
return function(e,...)
local tp=e:GetHandlerPlayer()
return (not checks or Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)) and (not con or con(e,...))
end
end
function cm.scost(excost)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsPublic() and (not excost or excost(e,tp,eg,ep,ev,re,r,rp,0)) end
if excost then
excost(e,tp,eg,ep,ev,re,r,rp,1)
end
end
end
function cm.stg(tg)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0)) end
if tg then
tg(e,tp,eg,ep,ev,re,r,rp,1)
end
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
end
function cm.sop(checks,op)
return function(e,tp,...)
if not cm.scon(checks)(e,tp) then return end
op(e,tp,...)
end
end
function rsufo.ToDeck(e,isbreak)
local c=rscf.GetSelf(e)
return c and (not isbreak or aux.TRUE(Duel.BreakEffect())) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)>0 and c:IsLocation(LOCATION_DECK)
end
------------------------
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
local e1=rsef.ACT(c,nil,nil,nil,"td,se,th",nil,nil,nil,rsop.target({Card.IsAbleToDeck,"td",LOCATION_HAND,0,1,1,c},{cm.thfilter,"th",LOCATION_DECK }),cm.act)
local e2=rsef.FC(c,EVENT_CHAIN_SOLVING,nil,nil,"cd,uc",LOCATION_SZONE,cm.wincon,cm.winop)
end
function cm.thfilter(c)
return rsufo.IsSetM(c) and c:IsAbleToHand()
end
function cm.act(e,tp)
local c=aux.ExceptThisCard(e)
if not c then return end
local ct,og,tc=rsop.SelectToDeck(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,c,{})
if tc and tc:IsLocation(LOCATION_DECK) then
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
end
function cm.wincon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local code=rsufo.code[re]
if code and c:GetFlagEffect(code)==0 then
rshint.Card(code)
c:RegisterFlagEffect(code,rsreset.est,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(code,0))
end
for code=25000121,25000132 do
if c:GetFlagEffect(code)<=0 then return end
end
Duel.Win(tp,0x4)
end
--布莱克指令
--why you creat this card, effects that send to deck without confirm is very common ??? very hape.
if not pcall(function() require("expansions/script/c25000119") end) then require("script/c25000119") end
local m,cm=rscf.DefineCard(25000120)
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
local e1=rsef.ACT(c)
local e2=rsef.QO(c,nil,{m,0},1,"sp",nil,LOCATION_SZONE,nil,nil,rsop.target({cm.spfilter,"sp",LOCATION_HAND },{cm.cfilter,nil,0,LOCATION_MZONE }),cm.spop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_DECK)
e3:SetCondition(cm.drcon1)
e3:SetOperation(cm.drop1)
e3:SetRange(LOCATION_SZONE)
c:RegisterEffect(e3)
--sp_summon effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_TO_DECK)
e4:SetCondition(cm.regcon)
e4:SetOperation(cm.regop)
e4:SetRange(LOCATION_SZONE)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_CHAIN_SOLVED)
e5:SetCondition(cm.drcon2)
e5:SetOperation(cm.drop2)
e5:SetRange(LOCATION_SZONE)
c:RegisterEffect(e5)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and rsufo.IsSetM(c)
end
function cm.cfilter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.spop(e,tp)
local c=rscf.GetSelf(e)
if not c then return end
local g=Duel.GetMatchingGroup(cm.cfilter,tp,0,LOCATION_MZONE,nil)
local sg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if #g<=0 or #sg<=0 then return end
rshint.Select(tp,HINTMSG_OPPO)
local tg=g:Select(tp,1,1,nil)
Duel.HintSelection(tg)
local tc=tg:GetFirst()
rshint.Select(tp,"sp")
local sc=sg:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP_ATTACK)>0 then
Duel.CalculateDamage(sc,tc)
if sc:IsAbleToHand() and not sc:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.SendtoHand(sc,nil,REASON_EFFECT)
end
end
end
function cm.filter(c,tp)
return c:IsPreviousLocation(LOCATION_HAND) and c:IsLocation(LOCATION_DECK) and c:GetPreviousControler()==tp
end
function cm.drcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function cm.drop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,tp)
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
function cm.drcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>0
end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetFlagEffect(tp,m)
Duel.ResetFlagEffect(tp,m)
Duel.Draw(tp,n,REASON_EFFECT)
end
--圆盘生物 星人布纽
if not pcall(function() require("expansions/script/c25000119") end) then require("script/c25000119") end
local m,cm=rscf.DefineCard(25000121)
function cm.initial_effect(c)
local e1=rsufo.ShowFun(c,m,nil,"td,tg,rm",nil,nil,nil,cm.tg,cm.op)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_DECK,0,nil,tp,POS_FACEDOWN)
local tlist={ TYPE_MONSTER,TYPE_SPELL,TYPE_TRAP }
local enable=0
for _,ctype in pairs(tlist) do
if g:IsExists(Card.IsType,3,nil,ctype) then
enable = enable | ctype
end
end
if chk==0 then return enable>0 end
getmetatable(c).announce_filter={ enable,OPCODE_ISTYPE }
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,0,LOCATION_ONFIELD,nil,ac)
if #g>0 then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0)
end
end
function cm.tgfilter(c,code)
return c:IsAbleToGrave() and c:IsCode(code) and c:IsFaceup()
end
function cm.op(e,tp)
local c=rscf.GetSelf(e)
if not rsufo.ToDeck(e) then return end
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if #g<=0 then return end
Duel.ConfirmCards(1-tp,g)
local tk=Duel.CreateToken(tp,ac)
local tlist= {TYPE_MONSTER,TYPE_SPELL,TYPE_TRAP }
local enable=0
for _,ctype in pairs(tlist) do
if tk:IsType(ctype) then
enable = ctype
break
end
end
local ct,og=rsop.SelectRemove(1-tp,cm.rmfilter,tp,LOCATION_DECK,0,3,3,nil,{ POS_FACEDOWN,REASON_EFFECT },enable)
Duel.ShuffleDeck(tp)
if ct==3 and og:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,0,LOCATION_ONFIELD,nil,ac)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_FORBIDDEN)
e1:SetTargetRange(0,0x7f)
e1:SetCondition(rsufo.scon(true))
e1:SetTarget(cm.bantg)
e1:SetLabel(ac)
local rct=Duel.GetTurnPlayer()==tp and 2 or 1
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,rct)
Duel.RegisterEffect(e1,tp)
end
end
function cm.bantg(e,c)
return c:IsCode(e:GetLabel())
end
function cm.rmfilter(c,enable)
return c:IsAbleToRemove(c:GetControler(),POS_FACEDOWN) and c:IsType(enable)
end
\ No newline at end of file
--圆盘生物 诺巴
if not pcall(function() require("expansions/script/c25000119") end) then require("script/c25000119") end
local m,cm=rscf.DefineCard(25000122)
function cm.initial_effect(c)
local e1=rsufo.ShowFun(c,m,nil,"td",nil,cm.con,nil,cm.tg,cm.op)
end
function cm.con(e,tp)
return Duel.GetCurrentChain()>=2
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
local op=Duel.AnnounceType(tp)
e:SetLabel(op)
Duel.SetChainLimit(aux.FALSE)
end
function cm.op(e,tp)
local c=e:GetHandler()
local ctype=e:GetLabel()
local e1,e2=rsef.FV_CANNOT_DISABLE({c,tp},"dise,act",rsval.cdisneg(cm.filter),nil,nil,rsufo.scon(true),rsreset.pend)
e1:SetLabel(ctype)
e2:SetLabel(ctype)
rsufo.ToDeck(e,true)
end
function cm.filter(e,p,te,tp)
return tp==p and te:IsActiveType(e:GetLabel())
end
--圆盘生物 汉古拉
if not pcall(function() require("expansions/script/c25000119") end) then require("script/c25000119") end
local m,cm=rscf.DefineCard(25000123)
function cm.initial_effect(c)
local e1=rsufo.ShowFun(c,m,nil,"td,dr",nil,nil,nil,cm.tg,cm.op,true)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0)+Duel.GetLocationCount(1-tp,LOCATION_SZONE,PLAYER_NONE,0)>=2 end
local dct=Duel.AnnounceNumber(tp,1,2)
local dis=Duel.SelectDisableField(tp,dct,0,LOCATION_ONFIELD,0xe000e0)
e:SetLabel(dis)
e:SetValue(dct)
Duel.Hint(HINT_ZONE,tp,dis)
end
function cm.op(e,tp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetOperation(cm.disop)
e1:SetLabel(e:GetLabel())
e1:SetReset(rsreset.pend)
Duel.RegisterEffect(e1,tp)
local dct=e:GetValue()
if rsufo.ToDeck(e,true) and Duel.IsPlayerCanDraw(1-tp,dct) and Duel.SelectYesNo(1-tp,aux.Stringid(m,1)) then
Duel.Draw(1-tp,dct,REASON_EFFECT)
end
end
function cm.disop(e,tp)
return e:GetLabel()
end
\ No newline at end of file
--圆盘生物 撒旦莫亚
if not pcall(function() require("expansions/script/c25000119") end) then require("script/c25000119") end
local m,cm=rscf.DefineCard(25000124)
function cm.initial_effect(c)
local e1=rsufo.ShowFunT(c,m,EVENT_TO_HAND,"td,dish",nil,cm.con,nil,rsop.target(1,"dish",0,LOCATION_HAND),cm.op,true)
e1:SetDescription(aux.Stringid(m,1))
local e2=rsufo.ShowFunT(c,m,EVENT_TO_HAND,"td,rm",nil,cm.con,rscost.cost(cm.rmcfilter,"rm_d",LOCATION_HAND,0,1,1,c),rsop.target(cm.rmfilter,"rm",0,LOCATION_HAND),cm.op2,true)
e2:SetDescription(aux.Stringid(m,2))
end
function cm.con(e,tp,eg)
return Duel.GetCurrentPhase()~=PHASE_DRAW and eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function cm.op(e,tp)
local c=rscf.GetSelf(e)
if not rsufo.ToDeck(e,true) then return end
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local dg=g:RandomSelect(tp,1)
Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
end
function cm.rmcfilter(c)
return c:IsAbleToRemoveAsCost(POS_FACEDOWN)
end
function cm.rmfilter(c,e,tp)
return c:IsAbleToRemove(tp,POS_FACEDOWN)
end
function cm.op2(e,tp)
local c=rscf.GetSelf(e)
if not rsufo.ToDeck(e,true) then return end
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.ConfirmCards(tp,g)
rsgf.SelectRemove(g,tp,cm.rmfilter,1,1,nil,{ POS_FACEDOWN,REASON_EFFECT },e,tp)
end
--圆盘生物 布里扎德
if not pcall(function() require("expansions/script/c25000119") end) then require("script/c25000119") end
local m,cm=rscf.DefineCard(25000125)
function cm.initial_effect(c)
local e1=rsufo.ShowFun(c,m,nil,"td,rm",nil,nil,nil,rsop.target(cm.rmfilter,"rm",LOCATION_DECK),cm.op,true)
end
function cm.rmfilter(c)
return c:IsAbleToRemove() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.op(e,tp)
local ct,ot,tc=rsop.SelectRemove(tp,cm.rmfilter,tp,LOCATION_DECK,0,1,1,nil,{})
if tc and tc:IsLocation(LOCATION_REMOVED) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(cm.chcon)
e1:SetOperation(cm.chop)
e1:SetLabelObject(tc)
Duel.RegisterEffect(e1,tp)
rsufo.ToDeck(e,true)
end
end
function cm.chcon(e,tp,eg,ep,ev,re,r,rp)
local code=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE)
return e:GetLabelObject():IsCode(code)
end
function cm.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.rep_op)
end
function cm.rep_op(e,tp,eg,ep,ev,re,r,rp)
rshint.Card(m)
local c=rscf.GetSelf(e)
if c and c:IsLocation(rsloc.ho+LOCATION_DECK+LOCATION_EXTRA) then Duel.Destroy(c,REASON_EFFECT) end
end
\ No newline at end of file
--圆盘生物 布莱克多姆
if not pcall(function() require("expansions/script/c25000119") end) then require("script/c25000119") end
local m,cm=rscf.DefineCard(25000126)
function cm.initial_effect(c)
local e1=rsufo.ShowFun(c,m,nil,"td,dis,atk,def",nil,cm.con,nil,rsop.target(aux.disfilter1,"dis",0,LOCATION_ONFIELD),cm.op,true)
end
function cm.con(e,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>=5
end
function cm.op(e,tp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_ONFIELD,nil)
local res = false
for tc in aux.Next(g) do
local e1,e2=rscf.QuickBuff({c,tc},"dis,dise")
res = res or not tc:IsImmuneToEffect(e1)
end
if not res then return end
res = false
g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e1,e2=rscf.QuickBuff({c,tc},"atkf,deff",{tc:GetAttack()/2,tc:GetDefense()/2})
res = res or not tc:IsImmuneToEffect(e1)
end
if not res then return end
rsufo.ToDeck(e,true)
end
\ No newline at end of file
--圆盘生物 戴莫斯
if not pcall(function() require("expansions/script/c25000119") end) then require("script/c25000119") end
local m,cm=rscf.DefineCard(25000128)
function cm.initial_effect(c)
local e1=rsufo.ShowFun(c,m,nil,"td,dam,rec",nil,cm.con,nil,rsop.target({cm.damct,"dam",0,1},{cm.damct,"rec"}),cm.op,true)
end
function cm.con(e,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)>=8
end
function cm.damct(e,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)*500
end
function cm.op(e,tp)
local ct=cm.damct(e,tp)
if ct>0 and Duel.Damage(1-tp,ct,REASON_EFFECT)>0 and Duel.Recover(tp,ct,REASON_EFFECT)>0 then
rsufo.ToDeck(e,true)
end
end
\ No newline at end of file
--圆盘生物 布莱克特琳娜
if not pcall(function() require("expansions/script/c25000119") end) then require("script/c25000119") end
local m,cm=rscf.DefineCard(25000129)
function cm.initial_effect(c)
local e1=rsufo.ShowFun(c,m,nil,"td,rm",nil,nil,nil,rsop.target(cm.rmfilter,"rm",rsloc.de),cm.op,true)
end
function cm.rmfilter(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function cm.op(e,tp)
local ct,ot,tc=rsop.SelectRemove(tp,cm.rmfilter,tp,rsloc.de,0,1,1,nil,{})
if tc and tc:IsLocation(LOCATION_REMOVED) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(cm.chcon)
e1:SetOperation(cm.chop)
e1:SetLabelObject(tc)
Duel.RegisterEffect(e1,tp)
rsufo.ToDeck(e,true)
end
end
function cm.chcon(e,tp,eg,ep,ev,re,r,rp)
local code1,code2=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2)
return e:GetLabelObject():IsCode(code1,code2 or 0)
end
function cm.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.rep_op)
end
function cm.rep_op(e,tp,eg,ep,ev,re,r,rp)
rshint.Card(m)
local c=rscf.GetSelf(e)
if c and c:IsLocation(rsloc.ho+LOCATION_DECK+LOCATION_EXTRA) then Duel.Destroy(c,REASON_EFFECT) end
end
\ No newline at end of file
--圆盘生物 希尔巴布尔美
if not pcall(function() require("expansions/script/c25000119") end) then require("script/c25000119") end
local m,cm=rscf.DefineCard(25000130)
function cm.initial_effect(c)
local e1=rsufo.ShowFun(c,m,nil,"td,tg",nil,cm.con,nil,cm.tg,cm.op,true)
end
function cm.con(e,tp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)
end
function cm.tgfilter(c)
return Duel.IsPlayerCanSendtoGrave(c:GetControler(),c)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g-1,1-tp,LOCATION_ONFIELD)
end
function cm.op(e,tp)
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,0,LOCATION_ONFIELD,nil)
if #g>1 then
local ct,og=rsgf.SelectToGrave(g,1-tp,aux.TRUE,#g-1,#g-1,nil,{REASON_RULE })
if ct>0 and og:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
rsufo.ToDeck(e,true)
end
end
end
\ No newline at end of file
--一角超兽 巴克西姆
local m=25000133
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--ct
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetCountLimit(1,m)
e0:SetRange(LOCATION_PZONE)
e0:SetTarget(cm.pentg)
e0:SetOperation(cm.penop)
c:RegisterEffect(e0)
--sc fusion
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,m+10000)
e3:SetCost(cm.spcost3)
e3:SetTarget(cm.sptg3)
e3:SetOperation(cm.spop3)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function cm.pcfilter(c,code)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and c:GetCode()~=code and c:IsFaceup() and not c:IsForbidden()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local b1=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
local dg
if b1 or (b2 and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
elseif b2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_PZONE,0,1,1,nil)
else return
end
if dg and Duel.Destroy(dg,REASON_EFFECT)==0 then return end
local op=0
if b1 and b2
then op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(m,2))+1
else return end
if op==0 then
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,tp,REASON_EFFECT)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil,e:GetHandler():GetCode())
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
function cm.costfilter(c,e,tp,mg)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) then return false end
return c:GetLeftScale()>0 and mg:CheckSubGroup(cm.fselect,2,c:GetLeftScale(),c:GetLeftScale(),tp)
end
function cm.fselect(g,sc,tp)
local mg=g:Clone()
if Duel.GetMZoneCount(tp,mg)>0 then
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLeftScale,sc)
else return false end
end
function cm.spcost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>0 and c:IsAbleToExtra()
end
function cm.sptg3(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop3(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if not (Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg)
local tc=g1:GetFirst()
if tc then
local g=mg:SelectSubGroup(tp,cm.fselect,false,2,tc:GetLeftScale(),tc:GetLeftScale(),tp)
if Duel.SendtoExtraP(g,nil,REASON_EFFECT)==g:GetCount() then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then
tc:CompleteProcedure()
end
end
end
end
--大蚁超兽 阿里蓬塔
local m=25000134
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--ct
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_DESTROY)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetCountLimit(1,m)
e0:SetRange(LOCATION_PZONE)
e0:SetTarget(cm.pentg)
e0:SetOperation(cm.penop)
c:RegisterEffect(e0)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_PZONE)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
--sc fusion
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,m+10000)
e3:SetCost(cm.spcost3)
e3:SetTarget(cm.sptg3)
e3:SetOperation(cm.spop3)
c:RegisterEffect(e3)
end
function cm.pcfilter(c,code)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and c:GetCode()~=code and c:IsFaceup() and not c:IsForbidden()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if chk==0 then return b2 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if b2 then
local dg
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
else
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_PZONE,0,1,1,nil)
end
if Duel.Destroy(dg,REASON_EFFECT)==0 then return end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil,e:GetHandler():GetCode())
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsType(TYPE_MONSTER) and tc:IsPreviousLocation(LOCATION_ONFIELD) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
tc=eg:GetNext()
end
end
function cm.costfilter(c,e,tp,mg)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) then return false end
return c:GetLeftScale()>0 and mg:CheckSubGroup(cm.fselect,2,c:GetLeftScale(),c:GetLeftScale(),tp)
end
function cm.fselect(g,sc,tp)
local mg=g:Clone()
if Duel.GetMZoneCount(tp,mg)>0 then
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLeftScale,sc)
else return false end
end
function cm.spcost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>0 and c:IsAbleToExtra()
end
function cm.sptg3(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop3(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if not (Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg)
local tc=g1:GetFirst()
if tc then
local g=mg:SelectSubGroup(tp,cm.fselect,false,2,tc:GetLeftScale(),tc:GetLeftScale(),tp)
if Duel.SendtoExtraP(g,nil,REASON_EFFECT)==g:GetCount() then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then
tc:CompleteProcedure()
end
end
end
end
--导弹超兽 贝劳克恩
local m=25000135
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--ct
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_DESTROY)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetCountLimit(1,m)
e0:SetRange(LOCATION_PZONE)
e0:SetTarget(cm.pentg)
e0:SetOperation(cm.penop)
c:RegisterEffect(e0)
--sc fusion
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,m+10000)
e3:SetCost(cm.spcost3)
e3:SetTarget(cm.sptg3)
e3:SetOperation(cm.spop3)
c:RegisterEffect(e3)
end
function cm.pcfilter(c,code)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and c:GetCode()~=code and c:IsFaceup() and not c:IsForbidden()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil)
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local b1=Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil)
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
local dg
if b1 or (b2 and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
elseif b2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_PZONE,0,1,1,nil)
else return
end
if dg and Duel.Destroy(dg,REASON_EFFECT)==0 then return end
local op=0
if b1 and b2
then op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(m,2))+1
else return end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(g,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil,e:GetHandler():GetCode())
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
function cm.costfilter(c,e,tp,mg)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) then return false end
return c:GetLeftScale()>0 and mg:CheckSubGroup(cm.fselect,2,c:GetLeftScale(),c:GetLeftScale(),tp)
end
function cm.fselect(g,sc,tp)
local mg=g:Clone()
if Duel.GetMZoneCount(tp,mg)>0 then
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLeftScale,sc)
else return false end
end
function cm.spcost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>0 and c:IsAbleToExtra()
end
function cm.sptg3(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop3(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if not (Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg)
local tc=g1:GetFirst()
if tc then
local g=mg:SelectSubGroup(tp,cm.fselect,false,2,tc:GetLeftScale(),tc:GetLeftScale(),tp)
if Duel.SendtoExtraP(g,nil,REASON_EFFECT)==g:GetCount() then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then
tc:CompleteProcedure()
end
end
end
end
--毒蛾超兽 多拉格里
local m=25000136
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--ct
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetCountLimit(1,m)
e0:SetRange(LOCATION_PZONE)
e0:SetTarget(cm.pentg)
e0:SetOperation(cm.penop)
c:RegisterEffect(e0)
--sc fusion
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,m+10000)
e3:SetCost(cm.spcost3)
e3:SetTarget(cm.sptg3)
e3:SetOperation(cm.spop3)
c:RegisterEffect(e3)
end
function cm.spfilter(c,e,tp,code)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and c:GetCode()~=code and (c:IsFaceup()
or c:IsLocation(LOCATION_HAND)) and not c:IsForbidden() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.pcfilter(c,code)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and c:GetCode()~=code and (c:IsFaceup()
or c:IsLocation(LOCATION_HAND)) and not c:IsForbidden()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetCode())
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local b1=Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetCode())
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
local dg
if b1 or (b2 and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
elseif b2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_PZONE,0,1,1,nil)
else return
end
if dg and Duel.Destroy(dg,REASON_EFFECT)==0 then return end
local op=0
if b1 and b2
then op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(m,2))+1
else return end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,nil,e,tp,e:GetHandler():GetCode())
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,nil,e:GetHandler():GetCode())
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
function cm.costfilter(c,e,tp,mg)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) then return false end
return c:GetLeftScale()>0 and mg:CheckSubGroup(cm.fselect,2,c:GetLeftScale(),c:GetLeftScale(),tp)
end
function cm.fselect(g,sc,tp)
local mg=g:Clone()
if Duel.GetMZoneCount(tp,mg)>0 then
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLeftScale,sc)
else return false end
end
function cm.spcost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>0 and c:IsAbleToExtra()
end
function cm.sptg3(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop3(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if not (Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg)
local tc=g1:GetFirst()
if tc then
local g=mg:SelectSubGroup(tp,cm.fselect,false,2,tc:GetLeftScale(),tc:GetLeftScale(),tp)
if Duel.SendtoExtraP(g,nil,REASON_EFFECT)==g:GetCount() then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then
tc:CompleteProcedure()
end
end
end
end
--杀手超兽 巴拉巴
local m=25000137
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--ct
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_DESTROY)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetCountLimit(1,m)
e0:SetRange(LOCATION_PZONE)
e0:SetTarget(cm.pentg)
e0:SetOperation(cm.penop)
c:RegisterEffect(e0)
--immune monster
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(cm.lvcon)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.atktg)
e1:SetValue(cm.efilter1)
c:RegisterEffect(e1)
--immune s+t
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.atktg)
e2:SetValue(cm.efilter2)
c:RegisterEffect(e2)
--sc fusion
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,m+10000)
e3:SetCost(cm.spcost3)
e3:SetTarget(cm.sptg3)
e3:SetOperation(cm.spop3)
c:RegisterEffect(e3)
end
function cm.pcfilter(c,code)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and c:GetCode()~=code and c:IsFaceup() and not c:IsForbidden()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if chk==0 then return b2 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if b2 then
local dg
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
else
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_PZONE,0,1,1,nil)
end
if Duel.Destroy(dg,REASON_EFFECT)==0 then return end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil,e:GetHandler():GetCode())
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function cm.lvcon(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function cm.atktg(e,c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xaf6)
end
function cm.efilter1(e,te)
return te:GetOwner()~=e:GetOwner() and te:IsActiveType(TYPE_MONSTER)
end
function cm.efilter2(e,te)
return te:GetOwner()~=e:GetOwner() and te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function cm.costfilter(c,e,tp,mg)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) then return false end
return c:GetLeftScale()>0 and mg:CheckSubGroup(cm.fselect,2,c:GetLeftScale(),c:GetLeftScale(),tp)
end
function cm.fselect(g,sc,tp)
local mg=g:Clone()
if Duel.GetMZoneCount(tp,mg)>0 then
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLeftScale,sc)
else return false end
end
function cm.spcost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>0 and c:IsAbleToExtra()
end
function cm.sptg3(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop3(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if not (Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg)
local tc=g1:GetFirst()
if tc then
local g=mg:SelectSubGroup(tp,cm.fselect,false,2,tc:GetLeftScale(),tc:GetLeftScale(),tp)
if Duel.SendtoExtraP(g,nil,REASON_EFFECT)==g:GetCount() then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then
tc:CompleteProcedure()
end
end
end
end
--忍者超兽 伽玛斯
local m=25000138
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--ct
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_DESTROY)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetCountLimit(1,m)
e0:SetRange(LOCATION_PZONE)
e0:SetTarget(cm.pentg)
e0:SetOperation(cm.penop)
c:RegisterEffect(e0)
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.drcon)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
cm[0]=0
cm[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROY)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(cm.clearop)
Duel.RegisterEffect(ge2,0)
end
--sc fusion
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,m+10000)
e3:SetCost(cm.spcost3)
e3:SetTarget(cm.sptg3)
e3:SetOperation(cm.spop3)
c:RegisterEffect(e3)
end
function cm.pcfilter(c,code)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and c:GetCode()~=code and c:IsFaceup() and not c:IsForbidden()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if chk==0 then return b2 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if b2 then
local dg
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
else
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_PZONE,0,1,1,nil)
end
if Duel.Destroy(dg,REASON_EFFECT)==0 then return end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil,e:GetHandler():GetCode())
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsSetCard(0xaf6) and tc:IsType(TYPE_PENDULUM) then
local p=tc:GetControler()
if cm[p]<3 then cm[p]=cm[p]+1 end
end
tc=eg:GetNext()
end
end
function cm.clearop(e,tp,eg,ep,ev,re,r,rp)
cm[0]=0
cm[1]=0
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local ct=cm[tp]
return ct>0 and Duel.GetTurnPlayer()==tp
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=cm[tp]
if chk==0 then return Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ct=cm[tp]
Duel.Draw(tp,ct,REASON_EFFECT)
end
function cm.costfilter(c,e,tp,mg)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) then return false end
return c:GetLeftScale()>0 and mg:CheckSubGroup(cm.fselect,2,c:GetLeftScale(),c:GetLeftScale(),tp)
end
function cm.fselect(g,sc,tp)
local mg=g:Clone()
if Duel.GetMZoneCount(tp,mg)>0 then
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLeftScale,sc)
else return false end
end
function cm.spcost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>0 and c:IsAbleToExtra()
end
function cm.sptg3(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop3(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if not (Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg)
local tc=g1:GetFirst()
if tc then
local g=mg:SelectSubGroup(tp,cm.fselect,false,2,tc:GetLeftScale(),tc:GetLeftScale(),tp)
if Duel.SendtoExtraP(g,nil,REASON_EFFECT)==g:GetCount() then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then
tc:CompleteProcedure()
end
end
end
end
--山椒鱼超兽 汉扎基兰
local m=25000139
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--ct
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_DESTROY)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetCountLimit(1,m)
e0:SetRange(LOCATION_PZONE)
e0:SetTarget(cm.pentg)
e0:SetOperation(cm.penop)
c:RegisterEffect(e0)
--re
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_REVERSE_DAMAGE)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(1,0)
e1:SetValue(1)
c:RegisterEffect(e1)
--sc fusion
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,m+10000)
e3:SetCost(cm.spcost3)
e3:SetTarget(cm.sptg3)
e3:SetOperation(cm.spop3)
c:RegisterEffect(e3)
end
function cm.pcfilter(c,code)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and c:GetCode()~=code and c:IsFaceup() and not c:IsForbidden()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if chk==0 then return b2 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if b2 then
local dg
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
else
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_PZONE,0,1,1,nil)
end
if Duel.Destroy(dg,REASON_EFFECT)==0 then return end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil,e:GetHandler():GetCode())
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function cm.costfilter(c,e,tp,mg)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) then return false end
return c:GetLeftScale()>0 and mg:CheckSubGroup(cm.fselect,2,c:GetLeftScale(),c:GetLeftScale(),tp)
end
function cm.fselect(g,sc,tp)
local mg=g:Clone()
if Duel.GetMZoneCount(tp,mg)>0 then
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLeftScale,sc)
else return false end
end
function cm.spcost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>0 and c:IsAbleToExtra()
end
function cm.sptg3(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop3(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if not (Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg)
local tc=g1:GetFirst()
if tc then
local g=mg:SelectSubGroup(tp,cm.fselect,false,2,tc:GetLeftScale(),tc:GetLeftScale(),tp)
if Duel.SendtoExtraP(g,nil,REASON_EFFECT)==g:GetCount() then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then
tc:CompleteProcedure()
end
end
end
end
--火炎超兽 法伊亚蒙斯
local m=25000140
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--ct
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_DESTROY)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetCountLimit(1,m)
e0:SetRange(LOCATION_PZONE)
e0:SetTarget(cm.pentg)
e0:SetOperation(cm.penop)
c:RegisterEffect(e0)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.atktg)
e1:SetValue(900)
c:RegisterEffect(e1)
--da
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.atktg2)
e2:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e2)
--sc fusion
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,m+10000)
e3:SetCost(cm.spcost3)
e3:SetTarget(cm.sptg3)
e3:SetOperation(cm.spop3)
c:RegisterEffect(e3)
end
function cm.pcfilter(c,code)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and c:GetCode()~=code and c:IsFaceup() and not c:IsForbidden()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if chk==0 then return b2 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if b2 then
local dg
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
else
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_PZONE,0,1,1,nil)
end
if Duel.Destroy(dg,REASON_EFFECT)==0 then return end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil,e:GetHandler():GetCode())
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function cm.atktg(e,c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xaf6)
end
function cm.atktg2(e,c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xaf6) and (c:GetBattleTarget()==nil or c:GetBattleTarget():GetControler()==1-e:GetHandlerPlayer())
end
function cm.costfilter(c,e,tp,mg)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) then return false end
return c:GetLeftScale()>0 and mg:CheckSubGroup(cm.fselect,2,c:GetLeftScale(),c:GetLeftScale(),tp)
end
function cm.fselect(g,sc,tp)
local mg=g:Clone()
if Duel.GetMZoneCount(tp,mg)>0 then
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLeftScale,sc)
else return false end
end
function cm.spcost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>0 and c:IsAbleToExtra()
end
function cm.sptg3(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop3(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if not (Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg)
local tc=g1:GetFirst()
if tc then
local g=mg:SelectSubGroup(tp,cm.fselect,false,2,tc:GetLeftScale(),tc:GetLeftScale(),tp)
if Duel.SendtoExtraP(g,nil,REASON_EFFECT)==g:GetCount() then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then
tc:CompleteProcedure()
end
end
end
end
--超兽人类 考克斯
local m=25000141
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--ct
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_DESTROY)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetCountLimit(1,m)
e0:SetRange(LOCATION_PZONE)
e0:SetTarget(cm.pentg)
e0:SetOperation(cm.penop)
c:RegisterEffect(e0)
--check
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_PZONE)
e1:SetTarget(cm.regcon)
e1:SetOperation(cm.regop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(cm.negcon)
e2:SetOperation(cm.negop)
c:RegisterEffect(e2)
--sc fusion
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,m+10000)
e3:SetCost(cm.spcost3)
e3:SetTarget(cm.sptg3)
e3:SetOperation(cm.spop3)
c:RegisterEffect(e3)
end
function cm.pcfilter(c,code)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and c:GetCode()~=code and c:IsFaceup() and not c:IsForbidden()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if chk==0 then return b2 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler():GetCode())
if b2 then
local dg
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
else
dg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_PZONE,0,1,1,nil)
end
if Duel.Destroy(dg,REASON_EFFECT)==0 then return end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil,e:GetHandler():GetCode())
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return not (rc:IsSetCard(0xaf6) and rc:IsType(TYPE_PENDULUM)) and re:IsActiveType(TYPE_MONSTER) and rc:GetAttack()>=2000 and rc:GetSummonLocation()==LOCATION_EXTRA and rc:IsStatus(STATUS_SPSUMMON_TURN)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
tc:RegisterFlagEffect(m,RESET_CHAIN,0,1)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rc:GetFlagEffect(m)>0
and Duel.IsChainNegatable(ev)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function cm.costfilter(c,e,tp,mg)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) then return false end
return c:GetLeftScale()>0 and mg:CheckSubGroup(cm.fselect,2,c:GetLeftScale(),c:GetLeftScale(),tp)
end
function cm.fselect(g,sc,tp)
local mg=g:Clone()
if Duel.GetMZoneCount(tp,mg)>0 then
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLeftScale,sc)
else return false end
end
function cm.spcost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:GetLeftScale()>0 and c:IsAbleToExtra()
end
function cm.sptg3(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop3(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if not (Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg)
local tc=g1:GetFirst()
if tc then
local g=mg:SelectSubGroup(tp,cm.fselect,false,2,tc:GetLeftScale(),tc:GetLeftScale(),tp)
if Duel.SendtoExtraP(g,nil,REASON_EFFECT)==g:GetCount() then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)~=0 then
tc:CompleteProcedure()
end
end
end
end
--变身超兽 布罗肯
local m=25000142
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
aux.AddFusionProcFun2(c,cm.ffilter1,cm.ffilter2,false)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+10000)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--pendulum
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,m+20000)
e3:SetCondition(cm.pencon)
e3:SetTarget(cm.pentg)
e3:SetOperation(cm.penop)
c:RegisterEffect(e3)
end
function cm.ffilter1(c)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM)
end
function cm.ffilter2(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_FIEND)
end
function cm.costfilter(c,e,tp,mg)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) then return false end
return c:GetLeftScale()>0 and mg:CheckSubGroup(cm.fselect,2,c:GetLeftScale(),c:GetLeftScale(),tp)
end
function cm.fselect(g,sc,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLeftScale,sc)
else return false end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:GetLeftScale()>0 and c:IsAbleToDeck()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_EXTRA,0,nil)
if chk==0 then return mg:CheckSubGroup(cm.fselect,1,c:GetLeftScale(),c:GetLeftScale(),tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_PZONE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_EXTRA,0,nil)
if not (c:IsRelateToEffect(e) and mg:CheckSubGroup(cm.fselect,1,c:GetLeftScale(),c:GetLeftScale(),tp)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=mg:SelectSubGroup(tp,cm.fselect,false,1,c:GetLeftScale(),c:GetLeftScale(),tp)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,TYPE_PENDULUM) end
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,TYPE_PENDULUM) then
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c,TYPE_PENDULUM)
local tc=g:GetFirst()
local ss=0
if tc:IsLocation(LOCATION_HAND) then
Duel.SendtoExtraP(tc,nil,REASON_DESTROY+REASON_EFFECT)
ss=1
else
Duel.Destroy(tc,REASON_EFFECT)
ss=1
end
if ss==1 and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--大鸽超兽 黑鸽子
local m=25000143
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
aux.AddFusionProcFun2(c,cm.ffilter1,cm.ffilter2,false)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,m+10000)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--pendulum
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,m+20000)
e3:SetCondition(cm.pencon)
e3:SetTarget(cm.pentg)
e3:SetOperation(cm.penop)
c:RegisterEffect(e3)
end
function cm.ffilter1(c)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM)
end
function cm.ffilter2(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_FIEND)
end
function cm.costfilter(c,e,tp,mg)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) then return false end
return c:GetLeftScale()>0 and mg:CheckSubGroup(cm.fselect,2,c:GetLeftScale(),c:GetLeftScale(),tp)
end
function cm.fselect(g,sc,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLeftScale,sc)
else return false end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:GetLeftScale()>0 and c:IsAbleToDeck()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_EXTRA,0,nil)
if chk==0 then return mg:CheckSubGroup(cm.fselect,1,c:GetLeftScale(),c:GetLeftScale(),tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_PZONE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_EXTRA,0,nil)
if not (c:IsRelateToEffect(e) and mg:CheckSubGroup(cm.fselect,1,c:GetLeftScale(),c:GetLeftScale(),tp)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=mg:SelectSubGroup(tp,cm.fselect,false,1,c:GetLeftScale(),c:GetLeftScale(),tp)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,TYPE_PENDULUM) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,nil,LOCATION_ONFIELD)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,TYPE_PENDULUM) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)) then
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c,TYPE_PENDULUM)
local tc=g:GetFirst()
local ss=0
if tc:IsLocation(LOCATION_HAND) then
Duel.SendtoExtraP(tc,nil,REASON_DESTROY+REASON_EFFECT)
ss=1
else
Duel.Destroy(tc,REASON_EFFECT)
ss=1
end
if ss==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg1=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg2=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
tg1:Merge(tg2)
Duel.HintSelection(tg1)
Duel.SendtoHand(tg1,nil,REASON_EFFECT)
end
end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--小提琴超兽 吉根
local m=25000144
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
aux.AddFusionProcFun2(c,cm.ffilter1,cm.ffilter2,false)
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,m)
e0:SetTarget(cm.sptg)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--ne
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_HANDES+CATEGORY_DESTROY+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m+10000)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_REMOVE)
c:RegisterEffect(e2)
--pendulum
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,m+20000)
e3:SetCondition(cm.pencon)
e3:SetTarget(cm.pentg)
e3:SetOperation(cm.penop)
c:RegisterEffect(e3)
end
function cm.ffilter1(c)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM)
end
function cm.ffilter2(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_FIEND)
end
function cm.costfilter(c,e,tp,mg)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) then return false end
return c:GetLeftScale()>0 and mg:CheckSubGroup(cm.fselect,2,c:GetLeftScale(),c:GetLeftScale(),tp)
end
function cm.fselect(g,sc,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLeftScale,sc)
else return false end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:GetLeftScale()>0 and c:IsAbleToDeck()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_EXTRA,0,nil)
if chk==0 then return mg:CheckSubGroup(cm.fselect,1,c:GetLeftScale(),c:GetLeftScale(),tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_PZONE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_EXTRA,0,nil)
if not (c:IsRelateToEffect(e) and mg:CheckSubGroup(cm.fselect,1,c:GetLeftScale(),c:GetLeftScale(),tp)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=mg:SelectSubGroup(tp,cm.fselect,false,1,c:GetLeftScale(),c:GetLeftScale(),tp)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.ckfilter(c,tp)
return c:IsControler(1-tp) and aux.disfilter1(c)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.ckfilter,1,nil,tp)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,TYPE_PENDULUM) and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,nil,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,TYPE_PENDULUM) then
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c,TYPE_PENDULUM)
local tc=g:GetFirst()
local ss=0
if tc:IsLocation(LOCATION_HAND) then
Duel.SendtoExtraP(tc,nil,REASON_DESTROY+REASON_EFFECT)
ss=1
else
Duel.Destroy(tc,REASON_EFFECT)
ss=1
end
if ss==1 then
local tc1=eg:GetFirst()
while tc1 do
if tc1:IsControler(1-tp) and aux.disfilter1(tc1) then
Duel.NegateRelatedChain(tc1,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(RESET_TURN_SET)
tc1:RegisterEffect(e2)
end
tc1=eg:GetNext()
end
local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND,nil)
if g2:GetCount()==0 then return end
local sg=g2:RandomSelect(1-tp,1)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
end
end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--雪超兽 斯诺基兰
local m=25000145
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
aux.AddFusionProcFun2(c,cm.ffilter1,cm.ffilter2,false)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+10000)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--pendulum
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,m+20000)
e3:SetCondition(cm.pencon)
e3:SetTarget(cm.pentg)
e3:SetOperation(cm.penop)
c:RegisterEffect(e3)
end
function cm.ffilter1(c)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM)
end
function cm.ffilter2(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_FIEND)
end
function cm.costfilter(c,e,tp,mg)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) then return false end
return c:GetLeftScale()>0 and mg:CheckSubGroup(cm.fselect,2,c:GetLeftScale(),c:GetLeftScale(),tp)
end
function cm.fselect(g,sc,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLeftScale,sc)
else return false end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:GetLeftScale()>0 and c:IsAbleToDeck()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_EXTRA,0,nil)
if chk==0 then return mg:CheckSubGroup(cm.fselect,1,c:GetLeftScale(),c:GetLeftScale(),tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_PZONE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_EXTRA,0,nil)
if not (c:IsRelateToEffect(e) and mg:CheckSubGroup(cm.fselect,1,c:GetLeftScale(),c:GetLeftScale(),tp)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=mg:SelectSubGroup(tp,cm.fselect,false,1,c:GetLeftScale(),c:GetLeftScale(),tp)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,TYPE_PENDULUM) end
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,TYPE_PENDULUM) then
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c,TYPE_PENDULUM)
local tc=g:GetFirst()
local ss=0
if tc:IsLocation(LOCATION_HAND) then
Duel.SendtoExtraP(tc,nil,REASON_DESTROY+REASON_EFFECT)
ss=1
else
Duel.Destroy(tc,REASON_EFFECT)
ss=1
end
if ss==1 and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-1000)
end
end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--究极超兽 奥特杀手萨乌鲁斯
local m=25000146
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
aux.AddFusionProcFunFunRep(c,cm.ffilter1,cm.ffilter2,2,2,false)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(cm.cost)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_SUMMON)
e3:SetCondition(cm.dscon)
e3:SetCost(cm.cost)
e3:SetTarget(cm.dstg)
e3:SetOperation(cm.dsop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e5)
--extra attack
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_EXTRA_ATTACK)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetValue(cm.atkval)
c:RegisterEffect(e6)
--pendulum
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e9:SetProperty(EFFECT_FLAG_DELAY)
e9:SetCode(EVENT_LEAVE_FIELD)
e9:SetCountLimit(1,m+20000)
e9:SetCondition(cm.pencon)
e9:SetTarget(cm.pentg)
e9:SetOperation(cm.penop)
c:RegisterEffect(e9)
end
function cm.atkfilter(c)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,e:GetHandlerPlayer(),LOCATION_EXTRA,0,nil)
end
function cm.ffilter1(c)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and (c:IsFusionAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_FIEND))
end
function cm.ffilter2(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_FIEND)
end
function cm.costfilter(c,e,tp,mg)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_FUSION)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) then return false end
return c:GetLeftScale()>0 and mg:CheckSubGroup(cm.fselect,2,c:GetLeftScale(),c:GetLeftScale(),tp)
end
function cm.fselect(g,sc,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLeftScale,sc)
else return false end
end
function cm.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:GetLeftScale()>0 and c:IsAbleToDeck()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_EXTRA,0,nil)
if chk==0 then return mg:CheckSubGroup(cm.fselect,1,c:GetLeftScale(),c:GetLeftScale(),tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_PZONE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_EXTRA,0,nil)
if not (c:IsRelateToEffect(e) and mg:CheckSubGroup(cm.fselect,1,c:GetLeftScale(),c:GetLeftScale(),tp)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=mg:SelectSubGroup(tp,cm.fselect,false,1,c:GetLeftScale(),c:GetLeftScale(),tp)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.tdfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsAbleToDeckAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and Duel.IsChainNegatable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.operation(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
function cm.dscon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function cm.dstg(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_DESTROY,eg,eg:GetCount(),0,0)
end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--异次元人 亚波人
local m=25000147
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,cm.lcheck)
c:EnableReviveLimit()
--im
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetCondition(cm.con)
e1:SetValue(cm.efilter1)
c:RegisterEffect(e1)
--cannot be battle target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetCondition(cm.con)
e2:SetValue(aux.imval1)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.pentg)
e3:SetOperation(cm.penop)
c:RegisterEffect(e3)
--move
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m+10000)
e4:SetTarget(cm.mvtg)
e4:SetOperation(cm.mvop)
c:RegisterEffect(e4)
end
function cm.lcheck(g,lc)
return g:IsExists(cm.hspfilter,1,nil)
end
function cm.hspfilter(c)
return c:IsLinkType(TYPE_PENDULUM) and c:IsLinkType(TYPE_MONSTER) and c:IsSetCard(0xaf6)
end
function cm.efilter1(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function cm.con(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,TYPE_PENDULUM)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.spfilter(c,e,tp,zone)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and (c:IsFaceup()
or c:IsLocation(LOCATION_DECK)) and not c:IsForbidden() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function cm.pcfilter(c)
return c:IsSetCard(0xaf6) and c:IsType(TYPE_PENDULUM) and (c:IsFaceup()
or c:IsLocation(LOCATION_DECK)) and not c:IsForbidden()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=e:GetHandler():GetLinkedZone()
local b1=Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil,e,tp,zone)
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local zone=e:GetHandler():GetLinkedZone()
local b1=Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil,e,tp,zone)
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil)
local op=0
if (b1 and zone>0) and (b2 and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)))
then op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
elseif (b1 and zone>0) then op=Duel.SelectOption(tp,aux.Stringid(m,0))
elseif (b2 and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))) then op=Duel.SelectOption(tp,aux.Stringid(m,1))+1
else return end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,1,nil,e,tp,zone)
if g2:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP,zone)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
function cm.cfilter(c,g)
return c:IsType(TYPE_PENDULUM) and g:IsContains(c)
end
function cm.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lg=e:GetHandler():GetLinkedGroup()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_MZONE,0,1,nil,lg)
and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,3))
Duel.SelectTarget(tp,cm.cfilter,tp,LOCATION_MZONE,0,1,1,nil,lg)
end
function cm.mvop(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)
end
\ No newline at end of file
local m=25000148
local cm=_G["c"..m]
cm.name="传说宇宙怪兽 希拉利"
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_DAMAGE)
e3:SetCountLimit(1,m+100000000)
e3:SetRange(LOCATION_REMOVED)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_SPSUMMON)
e4:SetCondition(cm.con1)
e4:SetCost(cm.cost)
e4:SetTarget(cm.tg1)
e4:SetOperation(cm.op1)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_ATTACK_ANNOUNCE)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(cm.con2)
e5:SetCost(cm.cost)
e5:SetTarget(cm.tg2)
e5:SetOperation(cm.op2)
c:RegisterEffect(e5)
end
function cm.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGrave()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(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,true,true,POS_FACEUP)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1500) end
Duel.PayLPCost(tp,1500)
end
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0
end
function cm.tg1(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
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
local atker=Duel.GetAttacker()
return atker~=nil and atker:GetControler()~=tp
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,Duel.GetAttacker(),1,0,0)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then
Duel.Remove(Duel.GetAttacker(),POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
local m=25000149
local cm=_G["c"..m]
cm.name="传说深海怪兽 科达拉"
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetCost(cm.recost)
e2:SetTarget(cm.retg)
e2:SetOperation(cm.reop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,m+100000000)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_CHAINING)
e4:SetCondition(cm.con1)
e4:SetCost(cm.cost)
e4:SetTarget(cm.tg1)
e4:SetOperation(cm.op1)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_ATTACK_ANNOUNCE)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(cm.con2)
e5:SetCost(cm.cost)
e5:SetTarget(cm.tg2)
e5:SetOperation(cm.op2)
c:RegisterEffect(e5)
end
function cm.recost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.refilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemove()
end
function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.refilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function cm.spfilter(c,tp)
return c:GetPreviousControler()==tp and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT)) and c:IsPreviousLocation(LOCATION_MZONE)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(cm.spfilter,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(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,true,true,POS_FACEUP)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
end
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE and Duel.IsChainNegatable(ev)
end
function cm.tg1(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():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,eg,1,0,0)
end
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT)
end
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
local atker=Duel.GetAttacker()
return atker~=nil and atker:GetControler()~=tp
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,Duel.GetAttacker(),1,0,0)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then
Duel.SendtoGrave(Duel.GetAttacker(),REASON_EFFECT)
end
end
\ No newline at end of file
local m=25000150
local cm=_G["c"..m]
cm.name="银眼的伊扎克"
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_BOTH_BATTLE_DAMAGE)
c:RegisterEffect(e2)
--return to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.spfilter(c,ft,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsAbleToRemoveAsCost() and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5))
end
function cm.spcon(e,c)
if c==nil then return true end
return Duel.IsExistingMatchingCard(cm.spfilter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,1,nil,Duel.GetLocationCount(tp,LOCATION_MZONE),c:GetControler())
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,Duel.GetLocationCount(tp,LOCATION_MZONE),c:GetControler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
local m=25000151
local cm=_G["c"..m]
cm.name="究极进化帝 曼修海特"
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e1:SetCondition(cm.ttcon)
e1:SetOperation(cm.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LIMIT_SET_PROC)
e2:SetCondition(cm.setcon)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(aux.FALSE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(cm.valcheck)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetCondition(cm.regcon)
e5:SetOperation(cm.regop)
c:RegisterEffect(e5)
e4:SetLabelObject(e5)
end
function cm.ttcon(e,c,minc)
if c==nil then return true end
return minc<=3 and Duel.CheckTribute(c,3)
end
function cm.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function cm.setcon(e,c,minc)
if not c then return true end
return false
end
function cm.valcheck(e,c)
local label=c:GetMaterial():GetClassCount(Card.GetRace)
e:GetLabelObject():SetLabel(label)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local t=e:GetLabel()
if t>0 then
t=t-1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_DECK)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_TO_HAND)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_ONFIELD))
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_RELEASE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1)
e3:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_MONSTER))
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
end
if t>0 then
t=t-1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_GRAVE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK))
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
else
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(25000151,0))
end
if t==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_HAND)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_DRAW)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(0,1)
Duel.RegisterEffect(e2,tp)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(25000151,2))
elseif t==0 then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(25000151,1))
end
end
\ No newline at end of file
local m=25000152
local cm=_G["c"..m]
cm.name="究极合体怪兽 基伽奇美拉"
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,5,false)
--mat check
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(cm.matcheck)
c:RegisterEffect(e1)
--Negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,5))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.negcon)
e2:SetTarget(cm.negtg)
e2:SetOperation(cm.negop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,6))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
e3:SetLabelObject(e1)
c:RegisterEffect(e3)
--client hint
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(cm.regcon)
e4:SetOperation(cm.regop)
e4:SetLabelObject(e1)
c:RegisterEffect(e4)
end
function cm.ffilter(c,fc,sub,mg,sg)
return (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode())) and c:IsType(TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function cm.matcheck(e,c)
local g=c:GetMaterial():Filter(Card.IsType,nil,TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
local type1=0
local tc=g:GetFirst()
while tc do
type1=bit.bor(type1,tc:GetType())
tc=g:GetNext()
end
e:SetLabel(type1)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local type1=e:GetLabelObject():GetLabel()
local type2=re:GetActiveType()-33
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and Duel.IsChainNegatable(ev)
and bit.band(type1,type2)~=0
end
function cm.rmfilter(c,tp,type2)
return c:IsType(type2) and c:IsAbleToRemove(tp,POS_FACEDOWN)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
local type2=re:GetActiveType()-33
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,0,LOCATION_MZONE,nil,tp,type2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local type2=re:GetActiveType()-33
Duel.NegateActivation(ev)
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,0,LOCATION_MZONE,nil,tp,type2)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local type1=e:GetLabelObject():GetLabel()
local tct=0
if bit.band(type1,TYPE_RITUAL)~=0 then tct=tct+1 end
if bit.band(type1,TYPE_FUSION)~=0 then tct=tct+1 end
if bit.band(type1,TYPE_SYNCHRO)~=0 then tct=tct+1 end
if bit.band(type1,TYPE_XYZ)~=0 then tct=tct+1 end
if bit.band(type1,TYPE_LINK)~=0 then tct=tct+1 end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil,tp,POS_FACEDOWN)
if chk==0 then return tct>0 and g:GetCount()>=tct end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,tct,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local type1=e:GetLabelObject():GetLabel()
local tct=0
if bit.band(type1,TYPE_RITUAL)~=0 then tct=tct+1 end
if bit.band(type1,TYPE_FUSION)~=0 then tct=tct+1 end
if bit.band(type1,TYPE_SYNCHRO)~=0 then tct=tct+1 end
if bit.band(type1,TYPE_XYZ)~=0 then tct=tct+1 end
if bit.band(type1,TYPE_LINK)~=0 then tct=tct+1 end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil,tp,POS_FACEDOWN)
if tct==0 or g:GetCount()<tct then return end
local sg=g:Select(tp,tct,tct,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_REMOVED)
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-ct*1000)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local type1=e:GetLabelObject():GetLabel()
if bit.band(type1,TYPE_RITUAL)~=0 then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
if bit.band(type1,TYPE_FUSION)~=0 then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
if bit.band(type1,TYPE_SYNCHRO)~=0 then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
if bit.band(type1,TYPE_XYZ)~=0 then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end
if bit.band(type1,TYPE_LINK)~=0 then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,4))
end
end
local m=25000154
local cm=_G["c"..m]
cm.name="宇宙恐龙 海帕杰顿·茧"
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(cm.reptg)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetCost(cm.thcost)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,m+100000000)
e5:SetTarget(cm.sptg2)
e5:SetOperation(cm.spop2)
c:RegisterEffect(e5)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function cm.spfilter(c,tp,tgc)
return not c:IsType(TYPE_FUSION) and c:IsLevel(1) and c:IsReleasable() and Duel.GetLocationCountFromEx(tp,tp,c,tgc)>0
end
function cm.spcon(e,c)
if c==nil then return true end
return Duel.IsExistingMatchingCard(cm.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil,e:GetHandlerPlayer(),c)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,e:GetHandler())
Duel.Release(g,REASON_COST)
end
function cm.reptg(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 Duel.IsExistingMatchingCard(Card.IsLevel,tp,LOCATION_DECK,0,1,nil,1) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
local g=Duel.SelectMatchingCard(tp,Card.IsLevel,tp,LOCATION_DECK,0,1,1,nil,1)
Duel.SendtoGrave(g,REASON_REPLACE+REASON_EFFECT)
return true
else
return false
end
end
function cm.thcost(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
function cm.thfilter(c)
return c:IsLevel(1) 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
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.splimit2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit2(e,c)
return not c:IsLevel(1)
end
function cm.tgfilter1(c)
return c:IsFaceup() and c:IsLevel(1) and c:IsAbleToGrave()
end
function cm.tgfilter2(g,e,tp,mc)
return g:IsContains(mc) and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,g)
end
function cm.spfilter2(c,e,tp,mg)
return c:IsCode(25000155) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.tgfilter1,tp,LOCATION_MZONE,0,nil)
if chk==0 then return g:CheckSubGroup(cm.tgfilter2,2,#g,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(cm.tgfilter1,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:SelectSubGroup(tp,cm.tgfilter2,false,2,#g,e,tp,e:GetHandler())
if #tg>0 and Duel.SendtoGrave(tg,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
local m=25000155
local cm=_G["c"..m]
cm.name="宇宙恐龙 海帕杰顿·幼体"
function cm.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.adval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetCost(cm.igcost1)
e4:SetTarget(cm.tg)
e4:SetOperation(cm.op)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetDescription(aux.Stringid(m,1))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e5:SetCost(cm.igcost2)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_DESTROYED)
e6:SetCountLimit(1,m+100000000)
e6:SetCondition(cm.lvupcon)
e6:SetTarget(cm.lvuptg)
e6:SetOperation(cm.lvupop)
c:RegisterEffect(e6)
end
function cm.adval(e,c)
return Duel.GetMatchingGroupCount(Card.IsLevel,c:GetControler(),LOCATION_GRAVE,0,nil,1)*1000
end
function cm.tgfilter(c)
return c:IsLevel(1) and c:IsAbleToGraveAsCost()
end
function cm.igcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.igcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.filter(c)
return not c:IsDisabled()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
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(e:GetHandler())
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)
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
end
function cm.lvupcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT)
end
function cm.lvupfilter(c,e,tp)
return c:IsCode(25000156) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.lvuptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.lvupfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.lvupop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.lvupfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
local m=25000156
local cm=_G["c"..m]
cm.name="宇宙恐龙 海帕杰顿·完全体"
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.adval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(cm.negcon)
e5:SetCost(cm.negcost)
e5:SetTarget(cm.negtg)
e5:SetOperation(cm.negop)
c:RegisterEffect(e5)
end
function cm.adval(e,c)
return Duel.GetMatchingGroupCount(Card.IsLevel,c:GetControler(),LOCATION_GRAVE,0,nil,1)*800
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(Card.IsLevel,tp,LOCATION_GRAVE,0,nil,1)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.GetFlagEffect(tp,m)<ct end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,800,REASON_EFFECT)
end
end
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and ep~=tp
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(Card.IsLevel,tp,LOCATION_GRAVE,0,nil,1)
if chk==0 then return aux.nbcon(tp,re) and Duel.GetFlagEffect(tp,m+100000000)<ct end
Duel.RegisterFlagEffect(tp,m+100000000,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re)
and Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)~=0 and c:GetFlagEffect(m)~=0 then
Duel.BreakEffect()
Duel.ReturnToField(c)
end
end
\ No newline at end of file
--创世安魂曲
local m=25000158
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e2:SetCost(cm.cost2)
e2:SetTarget(cm.rmtg)
e2:SetOperation(cm.rmop)
c:RegisterEffect(e2)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end
local hg=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,hg:GetCount(),nil)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local tg=Duel.GetOperatedGroup()
for tc in aux.Next(tg) do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
tg:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tg)
e1:SetCountLimit(1)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retfilter(c)
return c:GetFlagEffect(m)~=0
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(cm.retfilter,nil)
g:DeleteGroup()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
function cm.thfilter(c)
return c:IsRace(RACE_WYRM) 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
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCountLimit(1)
e1:SetCondition(cm.thcon2)
e1:SetOperation(cm.thop2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
end
function cm.thop2(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
function cm.cfilter(c)
return c:IsRace(RACE_WYRM) and c:IsAbleToRemoveAsCost()
end
function cm.check(g,rs)
if g:IsExists(Card.IsCode,1,nil,25000157) then return true end
local ct=g:FilterCount(Card.IsRace,nil,RACE_WYRM)
return ct>0 and ct<=rs
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
local hg=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,c)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,c)
local hs=hg:GetCount()
local rs=rg:GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=hg:SelectSubGroup(tp,cm.check,false,1,hs,rs)
local ss=Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)
local tg=Duel.GetOperatedGroup()
local ts=tg:FilterCount(Card.IsRace,nil,RACE_WYRM)
tg:KeepAlive()
if ss~=0 then
for tc in aux.Next(tg) do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tg)
e1:SetCountLimit(1)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
if tg:IsExists(Card.IsCode,1,nil,25000157) then
e:SetLabel(64)
else
e:SetLabel(ts)
end
end
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ss=e:GetLabel()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
if ss==64 then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,LOCATION_ONFIELD)
else
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,ss,0,LOCATION_ONFIELD)
end
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local ss=e:GetLabel()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
local gc=g:GetCount()
if ss==64 and gc>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
elseif ss<=gc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,ss,ss,nil)
Duel.HintSelection(rg)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
--邪神魔兽 格里姆德
local m=25000159
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(cm.splimit)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(cm.efilter1)
c:RegisterEffect(e2)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_MOVE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.atkcon)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,1)
e4:SetCondition(cm.con4)
e4:SetValue(cm.actlimit)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(cm.tgcon)
e5:SetOperation(cm.tgop)
c:RegisterEffect(e5)
end
function cm.splimit(e,se,sp,st)
return se:GetHandler()==e:GetHandler()
end
function cm.cfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function cm.cfilter2(c)
return c:IsLevelAbove(1) and c:IsAbleToRemove()
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=eg:Filter(cm.cfilter2,nil)
return eg:IsExists(cm.cfilter,1,nil) and tg:CheckWithSumGreater(Card.GetLevel,12)
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
e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_PZONE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
local c=e:GetHandler()
local tg=eg:Filter(cm.cfilter2,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local mat=tg:SelectWithSumGreater(tp,Card.GetLevel,12)
Duel.Remove(mat,POS_FACEUP,REASON_EFFECT)
c:SetMaterial(nil)
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
c:CompleteProcedure()
end
function cm.efilter1(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function cm.filter(c,tp)
return not c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetControler()==1-tp
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,tp)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
c:RegisterEffect(e1)
end
function cm.con4(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetAttack()>=10000
end
function cm.actlimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetAttack()>=1000 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsFaceup() or not c:IsRelateToEffect(e) or c:GetAttack()<1000
or c:IsStatus(STATUS_BATTLE_DESTROYED) then
return
end
local atk=c:GetAttack()
local max=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
local t={}
local l=1
while l<=max and l*1000<=atk do
t[l]=l*1000
l=l+1
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local anatk=Duel.AnnounceNumber(tp,table.unpack(t))
local ss=anatk/1000
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-anatk)
c:RegisterEffect(e1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local dg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,ss,ss,nil)
if dg:GetCount()>0 then
Duel.HintSelection(dg)
Duel.SendtoGrave(dg,REASON_EFFECT)
end
end
\ No newline at end of file
--魔皇剑 觉醒之魔剑
function c25000160.initial_effect(c)
c:EnableCounterPermit(0xaf1)
c:SetCounterLimit(0xaf1,3)
--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:SetCountLimit(1,25000160+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c25000160.target)
e1:SetOperation(c25000160.operation)
c:RegisterEffect(e1)
--COUNTER
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(c25000160.ctcost)
e2:SetTarget(c25000160.cttg)
e2:SetOperation(c25000160.ctop)
c:RegisterEffect(e2)
--Equip limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(c25000160.eqlimit)
c:RegisterEffect(e4)
end
function c25000160.eqlimit(e,c)
return c:IsRace(RACE_ZOMBIE)
end
function c25000160.filter(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE)
end
function c25000160.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c25000160.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c25000160.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c25000160.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c25000160.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 c25000160.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,Duel.GetLP(tp)/2) end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2)
end
function c25000160.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=c:GetFlagEffect(25000160)==0
local b2=c:GetFlagEffect(05000160)==0
local b3=c:GetFlagEffect(15000160)==0
if chk==0 then return e:GetHandler():GetEquipTarget()~=nil and e:GetHandler():IsCanAddCounter(0xaf1,1) and (b1 or b2 or b3) end
end
function c25000160.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0xaf1,1)
local op=0
local b1=c:GetFlagEffect(25000160)==0
local b2=c:GetFlagEffect(05000160)==0
local b3=c:GetFlagEffect(15000160)==0
if b1 and b2 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(25000160,0),aux.Stringid(25000160,1),aux.Stringid(25000160,2))
elseif b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(25000160,0),aux.Stringid(25000160,1))
elseif b2 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(25000160,1),aux.Stringid(25000160,2))+1
elseif b1 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(25000160,0),aux.Stringid(25000160,2))
if op==1 then op=op+1 end
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(25000160,0))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(25000160,1))+1
elseif b3 then
op=Duel.SelectOption(tp,aux.Stringid(25000160,2))+2
end
if op==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e1:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(25000160,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(25000160,0))
elseif op==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_ATTACK_ALL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(05000160,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(25000160,1))
elseif op==2 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetRange(LOCATION_SZONE)
e1:SetValue(c25000160.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(15000160,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(25000160,2))
end
end
end
function c25000160.efilter(e,ct)
local p=e:GetHandlerPlayer()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te:GetHandler()==e:GetHandler():GetEquipTarget()
end
--升阶魔法 魔皇力融合
function c25000161.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(25000161,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,25000161+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c25000161.target)
e1:SetOperation(c25000161.activate)
c:RegisterEffect(e1)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(25000161,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,25000161+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c25000161.target1)
e1:SetOperation(c25000161.activate1)
c:RegisterEffect(e1)
end
function c25000161.filter1(c,e,tp)
local rk=c:GetRank()
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRace(RACE_ZOMBIE)
and Duel.IsExistingMatchingCard(c25000161.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c25000161.filter2(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsAttribute(ATTRIBUTE_DARK) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c25000161.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c25000161.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c25000161.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c25000161.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c25000161.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c25000161.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
--immune
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(25000161,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(c25000161.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
sc:CompleteProcedure()
end
end
function c25000161.fefilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:GetActivateLocation()==LOCATION_MZONE and te:IsActivated()
end
function c25000161.ffilter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsAttribute(ATTRIBUTE_DARK)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c25000161.ffilter2(c,e)
return not c:IsImmuneToEffect(e)
end
function c25000161.ffcheck(tp,sg,fc)
return sg:IsExists(Card.IsRace,nil,1,RACE_ZOMBIE)
end
function c25000161.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
aux.FCheckAdditional=c25000161.ffcheck
local res=Duel.IsExistingMatchingCard(c25000161.ffilter,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(c25000161.ffilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
aux.FCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c25000161.activate1(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c25000161.ffilter2,nil,e)
aux.FCheckAdditional=c25000161.ffcheck
local sg1=Duel.GetMatchingGroup(c25000161.ffilter,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(c25000161.ffilter,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()
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_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
--immune
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(25000161,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(c25000161.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc:CompleteProcedure()
end
aux.FCheckAdditional=nil
end
--永远的王牌
function c25000174.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,25000174)
e1:SetCost(c25000174.cost)
e1:SetTarget(c25000174.target)
e1:SetOperation(c25000174.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:SetCountLimit(1,05000174)
e2:SetCost(c25000174.thcost)
e2:SetTarget(c25000174.thtg)
e2:SetOperation(c25000174.thop)
c:RegisterEffect(e2)
end
function c25000174.filter0(c)
return c:IsFaceup() and c:IsCanBeFusionMaterial()
end
function c25000174.filter1(c,e)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c25000174.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c25000174.filter3(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e)
end
function c25000174.fcheck(tp,sg,fc)
return sg:GetClassCount(Card.GetRace)==sg:GetCount()
end
function c25000174.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,Duel.GetLP(tp)/2) end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2)
end
function c25000174.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
local mg2=Duel.GetMatchingGroup(c25000174.filter0,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg2)
aux.FGoalCheckAdditional=c25000174.fcheck
local res=Duel.IsExistingMatchingCard(c25000174.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(c25000174.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
aux.FGoalCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function c25000174.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c25000174.filter3,nil,e)
local mg2=Duel.GetMatchingGroup(c25000174.filter1,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2)
aux.FGoalCheckAdditional=c25000174.fcheck
local sg1=Duel.GetMatchingGroup(c25000174.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(c25000174.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()
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_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
aux.FGoalCheckAdditional=nil
end
function c25000174.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_MZONE,0,1,nil) end
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc:IsType(TYPE_FUSION) then
e:SetLabel(1)
end
local g=Group.FromCards(e:GetHandler(),tc)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c25000174.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_MZONE)
end
function c25000174.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if g:GetCount()<=0 then return end
local op=e:GetLabel()
if op==1 then
sg=g:Select(tp,1,1,nil)
else
sg=g:Select(1-tp,1,1,nil)
end
Duel.SendtoHand(sg,nil,REASON_EFFECT+REASON_RULE)
end
--命运的王牌
function c25000176.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,25000176)
e1:SetTarget(c25000176.target)
e1:SetOperation(c25000176.activate)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,05000176)
e2:SetTarget(c25000176.target1)
e2:SetOperation(c25000176.activate1)
c:RegisterEffect(e2)
end
function c25000176.ckfil(c,e,tp)
return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c25000176.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,c)
end
function c25000176.spfil(c,e,tp,tc)
local code=tc:GetCode()
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code)
end
function c25000176.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c25000176.ckfil,tp,LOCATION_MZONE,0,1,nil,e,tp) end
local tc=Duel.SelectTarget(tp,c25000176.ckfil,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,tc,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c25000176.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Release(tc,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c25000176.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,tc) then
local sg=Duel.SelectMatchingCard(tp,c25000176.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,tc)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c25000176.mgfilter(c,e,tp,fusc,mg)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc
and fusc:CheckFusionMaterial(mg,c,PLAYER_NONE,true)
end
function c25000176.xfilter(c)
local g=c:GetMaterial()
return c:IsType(TYPE_FUSION) and g:FilterCount(c25000176.mgfilter,nil,e,tp,e:GetHandler(),g)==g:GetCount()
end
function c25000176.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c25000176.xfilter,tp,LOCATION_MZONE,0,1,nil) end
local tc=Duel.SelectTarget(tp,c25000176.xfilter,tp,LOCATION_MZONE,0,1,1,nil)
local mg=tc:GetMaterial()
Duel.SetOperationInfo(0,CATEGORY_REMOVE,mg,mg:GetCount(),tp,LOCATION_GRAVE)
end
function c25000176.activate1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local mg=tc:GetMaterial()
if mg:FilterCount(c25000176.mgfilter,nil,e,tp,e:GetHandler(),g)==mg:GetCount() then
Duel.Remove(mg,POS_FACEUP,REASON_EFFECT)
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(mg:GetSum(Card.GetAttack))
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
--复活的王牌
function c25000178.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,25000178+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c25000178.actg)
e1:SetOperation(c25000178.acop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c25000178.reptg)
e2:SetValue(c25000178.repval)
e2:SetOperation(c25000178.repop)
c:RegisterEffect(e2)
end
function c25000178.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp))
end
function c25000178.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c25000178.spfil,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local tc=Duel.SelectTarget(tp,c25000178.spfil,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c25000178.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c25000178.efilter)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e4:SetOwnerPlayer(tp)
tc:RegisterEffect(e4)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
end
end
function c25000178.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c25000178.repfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c25000178.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c25000178.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c25000178.repval(e,c)
return c25000178.repfilter(c,e:GetHandlerPlayer())
end
function c25000178.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
if Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(25000178,0)) then
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.Destroy(g,REASON_EFFECT)
end
end
--觉醒的王牌
function c25000180.initial_effect(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:SetCountLimit(1,25000180+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c25000180.target)
e1:SetOperation(c25000180.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DISABLE)
e2:SetCondition(c25000180.discon)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCondition(c25000180.discon1)
e3:SetOperation(c25000180.disop1)
c:RegisterEffect(e3)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DISABLE)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetTarget(c25000180.distg)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_DISABLE_EFFECT)
c:RegisterEffect(e5)
--change
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_CONTROL+CATEGORY_DESTROY)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetRange(LOCATION_SZONE)
e6:SetCountLimit(1)
e6:SetCode(EVENT_PHASE+PHASE_END)
e6:SetTarget(c25000180.cgtg)
e6:SetOperation(c25000180.cgop)
c:RegisterEffect(e6)
end
function c25000180.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_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c25000180.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 c25000180.discon(e,tp,eg,ep,ev,re,r,rp)
return ec:GetControler()~=e:GetHandler():GetControler()
end
function c25000180.discon1(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and (ec==Duel.GetAttacker() or ec==Duel.GetAttackTarget()) and ec:GetBattleTarget() and ec:GetControler()==e:GetHandler():GetControler()
end
function c25000180.disop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetEquipTarget():GetBattleTarget()
tc:RegisterFlagEffect(25000180,RESET_EVENT+RESETS_STANDARD,0,1)
Duel.AdjustInstantly(c)
end
function c25000180.distg(e,c)
return c:GetFlagEffect(25000180)~=0
end
function c25000180.cgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipTarget()~=nil end
local tc=e:GetHandler():GetEquipTarget()
Duel.SetOperationInfo(0,CATEGORY_CONTROL,tc,1,0,0)
end
function c25000180.cgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetHandler():GetEquipTarget()
local p=tc:GetControler()
if tc:IsRelateToEffect(e) and Duel.GetControl(tc,p) then
Duel.BreakEffect()
Duel.Destroy(c)
end
end
--宇宙机器人 金古桥
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001000)
function cm.initial_effect(c)
local e1=rsef.QO(c,nil,{m,0},{1,m},"sp",nil,LOCATION_HAND,nil,rscost.cost(cm.tgfilter,"tg",rsloc.ho),rsop.target(rscf.spfilter2(),"sp"),cm.spop)
local e2=rsef.QO(c,nil,{m,0},{1,m+100},"tk,sp",nil,LOCATION_MZONE,nil,rscost.cost(Card.IsReleasable,"res"),cm.tktg,cm.tkop)
--Revive
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1)
e3:SetTarget(cm.sumtg)
e3:SetOperation(cm.sumop)
c:RegisterEffect(e3)
end
function cm.tgfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function cm.spop(e,tp)
local c=rscf.GetSelf(e)
if c then rssf.SpecialSummon(c) end
end
function cm.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0,0x4011,1000,800,3,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
local ft=5
if Duel.IsPlayerAffectedByEffect(tp,m) then ft=1 end
ft=math.min(ft,(Duel.GetLocationCount(tp,LOCATION_MZONE)),4)
if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0,0x4011,1000,800,3,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
repeat
local token=Duel.CreateToken(tp,m+1)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
ft=ft-1
until ft<=0 or not Duel.SelectYesNo(tp,aux.Stringid(m,2))
Duel.SpecialSummonComplete()
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:GetFlagEffect(m)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
--宇宙机器人 黑金古桥
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001002)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),2)
local e1=rsef.FC(c,EVENT_TO_GRAVE)
e1:SetRange(LOCATION_EXTRA)
rsef.RegisterSolve(e1,cm.thcon,nil,nil,cm.thop)
local e2=rsef.RegisterClone(c,e1,"code",EVENT_REMOVE)
local e3=rsef.I(c,{m,1},{1,m},"te",nil,LOCATION_GRAVE,nil,rscost.cost(cm.tgfilter,"tg",rsloc.ho),rsop.target(Card.IsAbleToExtra,"te"),cm.teop)
local e4=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,2},{1,m+100},"sp,disd","de,dsp",rscon.sumtype("link"),nil,rsop.target(cm.spfilter,"sp",rsloc.hg),cm.spop)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_EFFECT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.spop(e,tp)
local ct,og,tc=rsop.SelectSpecialSummon(tp,aux.NecroValleyFilter(cm.spfilter),tp,rsloc.hg,0,1,1,nil,{},e,tp)
if tc and tc:IsType(TYPE_LINK) then
local dct=tc:GetLink()
if Duel.IsPlayerCanDiscardDeck(tp,dct) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect()
Duel.DiscardDeck(tp,dct,REASON_EFFECT)
end
end
end
function cm.tgfilter(c)
if not c:IsAbleToGraveAsCost() then return false end
return (c:IsType(TYPE_SPELL+TYPE_TRAP)) or (c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()))
end
function cm.teop(e,tp)
local c=rscf.GetSelf(e)
if c then
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end
function cm.cfilter(c,tp,re)
return c:IsPreviousLocation(LOCATION_HAND) and c:IsReason(REASON_COST) and re and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and re:GetHandler():IsRace(RACE_MACHINE) and c:GetPreviousControler()==tp
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)==0 and eg:IsExists(cm.cfilter,1,nil,tp,re) and e:GetHandler():IsAbleToGrave()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.SelectEffectYesNo(tp,c,aux.Stringid(m,0)) then return end
rshint.Card(m)
Duel.RegisterFlagEffect(tp,m,rsreset.pend,0,1)
if Duel.SendtoGrave(c,REASON_EFFECT)>0 then
local tg=eg:Filter(cm.cfilter,nil,tp,re)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--宇宙来的机械岛
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001003)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m},"se,th,td",nil,nil,nil,rsop.target({cm.tdfilter,cm.gcheck},"td",rsloc.hmg+LOCATION_REMOVED,0,2),cm.act)
local e2=rsef.I(c,{m,0},{1,m+100},"se,th,sp",nil,LOCATION_SZONE,nil,rscost.cost(cm.cfilter,"rm",LOCATION_GRAVE),rsop.target2(cm.fun,cm.spfilter,"sp",LOCATION_DECK),cm.spop)
local e3=rsef.I(c,{m,2},{1,m+100},"tg",nil,LOCATION_SZONE,nil,rscost.cost(cm.cfilter,"rm",LOCATION_GRAVE),rsop.target(cm.tgfilter,"tg",LOCATION_DECK),cm.tgop)
local e4=rsef.I(c,{m,4},{1,m+200},"th",nil,LOCATION_REMOVED,nil,rscost.cost(Card.IsAbleToHandAsCost,"th",LOCATION_ONFIELD),rsop.target(cm.thcfilter,"th"),cm.thcop)
end
function cm.thcfilter(c,e,tp)
return c:IsAbleToHand() or Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function cm.thcop(e,tp)
local c=rscf.GetSelf(e)
if not c then return end
local b1=tc:IsAbleToHand()
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)
local op=rsop.SelectOption(tp,b1,{m,1},b2,{m,4})
if op==1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function cm.tgfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAbleToGrave()
end
function cm.tgop(e,tp)
if not rscf.GetSelf(e) then return end
rsop.SelectToGrave(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.cfilter(c)
return c:IsAbleToRemoveAsCost() and (c:IsType(TYPE_SPELL+TYPE_TRAP) or c:IsRace(RACE_MACHINE))
end
function cm.spfilter(c,e,tp)
return c:IsCode(m+2) and (c:IsAbleToHand() or rscf.spfilter2()(c,e,tp))
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp)
if not rscf.GetSelf(e) then return end
rsop.SelectSolve(HINTMSG_SELF,tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,cm.solvefun,e,tp)
end
function cm.solvefun(g,e,tp)
local tc=g:GetFirst()
local b1=tc:IsAbleToHand()
local b2=rscf.spfilter2()(tc,e,tp)
local op=rsop.SelectOption(tp,b1,{m,1},b2,{m,3})
if op==1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
return true
end
function cm.tdfilter(c,e,tp)
return c:IsRace(RACE_MACHINE) and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) and c:IsAbleToDeck()
end
function cm.gcheck(g,e,tp)
return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,g)
end
function cm.thfilter(c,g)
return c:IsAbleToHand() and c:IsRace(RACE_MACHINE) and not g:IsExists(Card.IsCode,1,nil,c:GetCode())
end
function cm.act(e,tp)
if not rscf.GetSelf(e) then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.tdfilter),tp,rsloc.hmg+LOCATION_REMOVED,0,nil)
if not g:CheckSubGroup(cm.gcheck,2,2,e,tp) then return end
rshint.Select(tp,"td")
local tg=g:SelectSubGroup(tp,cm.gcheck,false,2,2,e,tp)
if Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)>0 then
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{},g)
end
end
\ No newline at end of file
--钢铁的假面 哥布纽•基加
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001004)
function cm.initial_effect(c)
local e1=rsef.STO(c,EVENT_TO_GRAVE,{m,0},{1,m},"sp","de,dsp",cm.spcon,nil,rsop.target(rscf.spfilter2(Card.IsCode,m),"sp",LOCATION_DECK),cm.spop)
local e2=rsef.I(c,{m,1},{1,m+100},"se,th",nil,LOCATION_GRAVE,nil,aux.bfgcost,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
end
function cm.thfilter(c,e,tp)
return c:IsCode(m-1) and (c:IsAbleToHand() or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
end
function cm.thop(e,tp)
rsop.SelectSolve(HINTMSG_SELF,tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,cm.thfun,e,tp)
end
function cm.thfun(g,e,tp)
local tc=g:GetFirst()
local b1=tc:IsAbleToHand()
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
local op=rsop.SelectOption(tp,b1,{m,1},b2,{m,2})
if op==1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
return true
end
function cm.spcon(e,tp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND)
end
function cm.spop(e,tp)
local sg=Duel.GetMatchingGroup(rscf.spfilter2(Card.IsCode,m),tp,LOCATION_DECK,0,nil,e,tp)
local maxct=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),#sg)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then maxct=1 end
rsgf.SelectSpecialSummon(sg,tp,aux.TRUE,maxct,maxct,nil,{})
local e1=rsef.FV_LIMIT_PLAYER({e:GetHandler(),tp},"sp",nil,cm.tg,{1,0},nil,rsreset.pend)
end
function cm.tg(e,c)
return not c:IsRace(RACE_MACHINE)
end
\ No newline at end of file
--钢铁的假面 哥布纽•奥古玛
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001005)
function cm.initial_effect(c)
local e1=rsef.I(c,{m,0},{1,m},"sp",nil,rsloc.hg,nil,rscost.cost({cm.tdcfilter,aux.dncheck},"td",rsloc.hg+LOCATION_REMOVED,0,2,2,c),rsop.target(rscf.spfilter2(),"sp"),cm.spop)
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,1},{1,m+100},"se,th","de,dsp",nil,rscost.reglabel(100),cm.thtg,cm.thop)
local e3=rsef.RegisterClone(c,e2,"code",EVENT_SUMMON_SUCCESS)
local e4=rsef.STO(c,EVENT_LEAVE_FIELD,{m,1},{1,m+200},"se,th","de,dsp",cm.lcon,nil,rsop.target(cm.thfilter2,"th",rsloc.dg+LOCATION_REMOVED),cm.thop2)
end
function cm.lcon(e,tp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function cm.thfilter2(c)
return c:IsCode(m-1) and c:IsAbleToHand() and c:RemovePosCheck()
end
function cm.thop2(e,tp)
rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter2),tp,rsloc.dg+LOCATION_REMOVED,0,1,1,nil,{})
end
function cm.tdcfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAbleToDeckOrExtraAsCost() and c:RemovePosCheck()
end
function cm.spop(e,tp)
local c=rscf.GetSelf(e)
if c then rssf.SpecialSummon(c) end
end
function cm.cfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAbleToRemoveAsCost()
end
function cm.gfilter(g,tp)
return g:GetClassCount(Card.GetCode)==1 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,g,g:GetFirst():GetCode())
end
function cm.thfilter(c,code)
return c:IsCode(code) and c:IsAbleToHand() and c:IsRace(RACE_MACHINE)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return e:GetLabel()==100 and g:CheckSubGroup(cm.gfilter,2,2,tp) end
e:SetLabel(0)
rshint.Select(tp,"rm")
local rg=g:SelectSubGroup(tp,cm.gfilter,false,2,2,tp)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
e:SetValue(rg:GetFirst():GetCode())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp)
local code=e:GetValue()
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{},code)
end
\ No newline at end of file
--奇机械宇宙人 萨迪斯
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001006)
function cm.initial_effect(c)
local e1=rsef.QO(c,nil,{m,0},{1,m},"dr","ptg",LOCATION_HAND,nil,rscost.cost({Card.IsAbleToGraveAsCost,nil},{cm.tgcfilter,{"tg",cm.tgfun},LOCATION_ONFIELD+LOCATION_HAND,0,1,1,c }),rsop.target(2,"dr"),cm.drop)
local e2=rsef.I(c,{m,1},{1,m+100},"eq","tg",LOCATION_GRAVE,nil,nil,rstg.target(cm.eqfilter,"eq",LOCATION_MZONE),cm.eqop)
local e3=rsef.I(c,{m,2},{1,m+200},"sp",nil,LOCATION_SZONE,nil,nil,rsop.target(rscf.spfilter2(cm.spfilter),"sp"),cm.spop)
end
function cm.spfilter(c)
return c:GetEquipTarget()
end
function cm.spop(e,tp)
local c=rscf.GetSelf(e)
if c then rssf.SpecialSummon(c) end
end
function cm.tgcfilter(c,e,tp)
return c:IsAbleToGraveAsCost() and ((c:IsRace(RACE_MACHINE) and c:FieldPosCheck()) or c:IsType(TYPE_SPELL+TYPE_TRAP))
end
function cm.tgfun(g,e,tp)
g:AddCard(e:GetHandler())
local ct=Duel.SendtoGrave(g,REASON_COST)
return Duel.GetOperatedGroup(),ct
end
function cm.drop(e,tp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.eqfilter(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function cm.eqop(e,tp)
local c,tc=rscf.GetSelf(e),rscf.GetTargetCard(Card.IsFaceup)
if not c or not tc then return end
if rsop.Equip(e,c,tc) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetReset(rsreset.est)
e3:SetRange(LOCATION_SZONE)
e3:SetOperation(cm.chainop)
c:RegisterEffect(e3)
end
end
function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler()==e:GetHandler():GetEquipTarget() then
Duel.SetChainLimit(cm.chainlm)
end
end
function cm.chainlm(e,rp,tp)
return tp==rp
end
\ No newline at end of file
--奇机械兽 戴亚博里古
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001007)
function cm.initial_effect(c)
local e1=rsef.QO(c,nil,{m,0},{1,m+100},"tg,dr",nil,LOCATION_HAND,nil,rscost.cost(Card.IsAbleToGrave,"tg"),rsop.target(Card.IsAbleToGrave,"tg",LOCATION_ONFIELD,LOCATION_ONFIELD),cm.tgop)
local e2=rsef.STO(c,EVENT_SUMMON_SUCCESS,{m,1},{1,m+200},"tg,rm","de,dsp",nil,nil,rsop.target2(cm.fun,cm.tgfilter,"tg",LOCATION_DECK),cm.tgop2)
local e3=rsef.RegisterClone(c,e2,"code",EVENT_SPSUMMON_SUCCESS)
local e4=rsef.RegisterClone(c,e2,"code",EVENT_FLIP_SUMMON_SUCCESS)
local e5=rsef.STO(c,EVENT_BE_MATERIAL,{m,2},{1,m+300},nil,"de,dsp",cm.lcon,nil,nil,cm.lop)
end
function cm.lcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r & REASON_LINK ~=0 and c:GetReasonCard():IsRace(RACE_MACHINE)
end
function cm.lop(e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(cm.chainop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
if re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and ep==tp then
Duel.SetChainLimit(cm.chainlm)
end
end
function cm.chainlm(e,ep,tp)
return tp==ep
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,0,1,tp,LOCATION_DECK)
end
function cm.tgfilter(c)
return (c:IsAbleToGrave() or c:IsAbleToRemove()) and c:IsComplexType(TYPE_SPELL,true,TYPE_CONTINUOUS,TYPE_FIELD)
end
function cm.tgop2(e,tp)
rsop.SelectSolve(HINTMSG_SELF,tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,cm.sfun,tp)
end
function cm.sfun(g,tp)
local tc=g:GetFirst()
local b1=tc:IsAbleToGrave()
local b2=tc:IsAbleToRemove()
local op=rsop.SelectOption(tp,b1,{m,0},b2,{m,1})
if op==1 then
Duel.SendtoGrave(tc,REASON_EFFECT)
else
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
return true
end
function cm.tgop(e,tp)
local ct,og,tc=rsop.SelectToGrave(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,{})
if tc and tc:GetPreviousControler()==tp and Duel.IsPlayerCanDraw(tp,2) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
end
--机械兽 机械哥莫拉
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001008)
function cm.initial_effect(c)
--summon with s/t
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e1:SetTargetRange(LOCATION_SZONE+LOCATION_HAND,0)
e1:SetTarget(cm.tg)
e1:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e1)
local e2=rsef.STO(c,EVENT_SUMMON_SUCCESS,{m,0},{1,m},"dr","ptg",nil,nil,rsop.target(2,"dr"),cm.drop)
local e3=rscf.AddSpecialSummonProcdure(c,rsloc.hg,cm.spcon)
--negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1,m+100)
e4:SetCondition(cm.negcon)
e4:SetCost(rscost.cost(0,"dish"))
e4:SetTarget(cm.negtg)
e4:SetOperation(cm.negop)
c:RegisterEffect(e4)
local e5=rsef.FTO(c,EVENT_SPSUMMON_SUCCESS,{m,2},{1,m+100},"pos","de",LOCATION_HAND,nil,rscost.cost(0,"dish"),rsop.target2(cm.fun,cm.pfilter,"pos",LOCATION_MZONE,LOCATION_MZONE,true),cm.posop)
end
function cm.pfilter(c,e,tp,eg)
return c:IsCanTurnSet() and eg:IsContains(c)
end
function cm.fun(g,e,tp,eg)
Duel.SetTargetCard(eg)
end
function cm.posop(e,tp,eg)
local tg=rsgf.GetTargetGroup(Card.IsCanTurnSet)
if #tg<=0 then return end
Duel.ChangePosition(tg,POS_FACEDOWN_DEFENSE)
end
function cm.negtg(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)
local cat=e:GetCategory()
if bit.band(re:GetHandler():GetOriginalType(),TYPE_MONSTER)~=0 then
e:SetCategory(bit.bor(cat,CATEGORY_SPECIAL_SUMMON))
else
e:SetCategory(bit.band(cat,bit.bnot(CATEGORY_SPECIAL_SUMMON)))
end
end
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not Duel.NegateActivation(ev) then return end
if rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 and not rc:IsLocation(LOCATION_HAND+LOCATION_DECK)
and not rc:IsHasEffect(EFFECT_NECRO_VALLEY) then
if rc:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (not rc:IsLocation(LOCATION_EXTRA) or Duel.GetLocationCountFromEx(tp,tp,nil,rc)>0)
and rc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect()
Duel.SpecialSummon(rc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,rc)
elseif (rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and rc:IsSSetable() and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect()
Duel.SSet(tp,rc)
end
end
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if ep==tp then return false end
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function cm.spcon(e,c,tp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.tg(e,c)
return c:IsComplexType(TYPE_SPELL+TYPE_CONTINUOUS) or c:IsRace(RACE_MACHINE)
end
\ No newline at end of file
--拉古斯东•机械改造
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001009)
function cm.initial_effect(c)
local e1=rscf.SetSummonCondition(c,nil,rsval.spconbe)
local e2=rsef.I(c,{m,0},{1,m},"sp",nil,LOCATION_HAND,rscon.excard2(Card.IsRace,LOCATION_MZONE,0,1,nil,RACE_MACHINE),nil,rsop.target(rscf.spfilter2(),"sp"),cm.spop)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_HAND+LOCATION_MZONE)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetCountLimit(1,m+100)
e3:SetCondition(cm.atkcon)
e3:SetCost(cm.atkcost)
e3:SetTarget(cm.atktg)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
local e4=rsef.QO(c,nil,{m,2},{1,m+200},"th",nil,LOCATION_GRAVE,cm.thcon,nil,rsop.target(Card.IsAbleToHand,"th"),cm.thop)
end
function cm.con(e,tp)
local c=e:GetHandler()
return c:GetTurnID()==Duel.GetTurnCount() and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND)
end
function cm.thop(e,tp)
local c=rscf.GetSelf(e)
if c then Duel.SendtoHand(c,nil,REASON_EFFECT) end
end
function cm.spop(e,tp)
local c=rscf.GetSelf(e)
if c then rssf.SpecialSummon(c) end
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end
local a=Duel.GetBattleMonster(tp)
local d=Duel.GetBattleMonster(1-tp)
return a and a:IsControler(tp) and a:IsRelateToBattle()
and d and d:IsControler(1-tp) and d:IsRelateToBattle() and Duel.IsPlayerCanSendtoHand(1-tp,d)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local d=Duel.GetBattleMonster(1-tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,d,1,0,0)
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetBattleMonster(1-tp)
if not d:IsRelateToBattle() then return end
if Duel.SendtoHand(d,nil,REASON_RULE)>0 then
Duel.BreakEffect()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
Duel.SetLP(1-tp,math.max(0,Duel.GetLP(1-tp)-1000))
end
end
\ No newline at end of file
--对混沌病毒歼灭兵器 改造海兹王
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001010)
function cm.initial_effect(c)
local e1=rscf.SetSummonCondition(c,nil,rsval.spconbe)
local e2=rsef.I(c,{m,0},{1,m},"sp,tg",nil,LOCATION_GRAVE,nil,nil,cm.tg,cm.op)
local e3=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,1},{1,m+100},nil,"de,dsp",nil,nil,nil,cm.buffop)
end
function cm.buffop(e,tp)
local c=e:GetHandler()
local e1=rsef.FV_LIMIT({c,tp},"ctrl",nil,nil,{ LOCATION_MZONE,LOCATION_MZONE },nil,rsreset.pend,"sa")
local e2=rsef.FV_LIMIT_PLAYER({c,tp},"td",nil,nil,{0,1},nil,rsreset.pend)
local e3,e4=rsef.FV_LIMIT_PLAYER({c,tp},"tg,rm",nil,aux.TargetBoolFunction(Card.IsLocation,LOCATION_HAND),{0,1},nil,rsreset.pend)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_DECK)
end
function cm.tgfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAbleToGrave()
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=rscf.GetSelf(e)
local g=Duel.GetDecktopGroup(tp,5)
if #g<5 then return end
Duel.ConfirmDecktop(tp,5)
if g:IsExists(cm.tgfilter,1,nil) and c and rscf.spfilter2()(c,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.DisableShuffleCheck()
rshint.Select(tp,"tg")
local tg=g:FilterSelect(tp,cm.tgfilter,1,3,nil)
if Duel.SendtoGrave(tg,REASON_EFFECT)>0 then
rssf.SpecialSummon(c)
end
g:Sub(tg)
end
if #g>0 then
Duel.SortDecktop(tp,tp,#g)
for i=1,#g do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
end
\ No newline at end of file
--飞在天上的大铁块
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001011)
function cm.initial_effect(c)
local e1=rscf.SetSummonCondition(c,false)
local e2=rsef.I(c,{m,0},{1,m},"sp",nil,LOCATION_GRAVE,nil,nil,rsop.target(cm.spfilter,"sp"),cm.spop)
local e3=rsef.QO(c,nil,{m,1},nil,nil,nil,LOCATION_HAND,rscon.turno,cm.rmcost,nil,cm.op)
local e4,e5=rsef.SV_UPDATE(c,"atk,def",cm.val)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetCode(EFFECT_REVERSE_DAMAGE)
e6:SetTargetRange(1,0)
e6:SetRange(LOCATION_MZONE)
e6:SetValue(cm.valcon)
c:RegisterEffect(e6)
local e7=rsef.QO(c,nil,{m,2},{1,m+100},"tg",nil,LOCATION_MZONE,nil,rscost.lpcost(1000),rsop.target(cm.tgfilter,"tg",0,LOCATION_ONFIELD),cm.tgop)
end
function cm.spfilter(c,e,tp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,true,POS_FACEUP)
end
function cm.tgfilter(c,e,tp)
return Duel.IsPlayerCanSendtoGrave(1-tp,c)
end
function cm.tgop(e,tp)
if rsop.SelectToGrave(1-tp,cm.tgfilter,1-tp,LOCATION_ONFIELD,0,1,1,nil,{ REASON_RULE },e,tp)>0 then
Duel.BreakEffect()
Duel.SetLP(1-tp,math.max(Duel.GetLP(1-tp)-1000),0)
end
end
function cm.valcon(e,re,r,rp,rc)
return r & REASON_BATTLE + REASON_EFFECT ~=0
end
function cm.val(e,c)
return Duel.GetLP(e:GetHandlerPlayer())
end
function cm.spop(e,tp)
local c=rscf.GetSelf(e)
if c then
rssf.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP,nil,{"cp"})
end
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
c:RegisterFlagEffect(m,rsreset.est_pend,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retcon(e,tp)
local c=e:GetLabelObject()
return c:GetFlagEffect(m)>0
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetLabelObject(),REASON_EFFECT+REASON_RETURN)
end
function cm.op(e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
\ No newline at end of file
--地中鲨 盖欧扎克
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001012)
function cm.initial_effect(c)
local e1=rsef.QO(c,nil,{m,0},{1,m},"sp",nil,LOCATION_HAND,nil,rscost.cost(0,"dish"),rsop.target(cm.spfilter,"sp",LOCATION_DECK),cm.spop)
local e2=rsef.QO(c,nil,{m,1},{1,m+100},"sp",nil,LOCATION_GRAVE,nil,rscost.cost(cm.tgfilter,"tg",LOCATION_ONFIELD),rsop.target2(cm.fun,rscf.spfilter2(),"sp"),cm.spop2)
local e3=rsef.QO(c,nil,{m,3},{1,m+200},"dr","ptg",LOCATION_GRAVE,cm.drcon,nil,rsop.target(1,"dr"),cm.drop)
end
function cm.drcon(e,tp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK+LOCATION_ONFIELD) and c:GetTurnID()==Duel.GetTurnCount()
end
function cm.drop(e,tp)
local ct=Duel.Draw(tp,1,REASON_EFFECT)
if ct==0 then return end
local dc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,dc)
if dc:IsType(TYPE_SPELL) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
Duel.ShuffleHand(tp)
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.spop(e,tp)
local ct,og=rsop.SelectSpecialSummon(tp,cm.spfilter,tp,LOCATION_DECK,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.tgfilter(c)
return c:IsAbleToGraveAsCost() and c:IsFacedown()
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,PLAYER_ALL,LOCATION_ONFIELD)
end
function cm.spop2(e,tp)
local c=rscf.GetSelf(e)
if c and rssf.SpecialSummon(c)>0 then
rsop.SelectOC({m,2},true)
rsop.SelectToGrave(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,{})
end
end
\ No newline at end of file
--复合怪兽 立加德隆
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001013)
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSummonType,SUMMON_TYPE_SPECIAL),3,true)
local e1=rscf.SetSummonCondition(c,false)
local e2=rsef.QO(c,EVENT_CHAINING,{m,0},{1,m,2},"sp",nil,LOCATION_EXTRA,cm.spcon,rscost.cost2(cm.cfun,{cm.cfilter,cm.gcheck},"rm",LOCATION_MZONE,LOCATION_MZONE,3),rsop.target(cm.spfilter,"sp"),cm.spop)
local e3=rsef.RegisterClone(c,e2,"code",EVENT_SPSUMMON_SUCCESS,"con",cm.spcon2)
local e4,e5=rsef.SV_INDESTRUCTABLE(c,"battle,effect")
local e6=rsef.QO_NEGATE(c,"neg",1,"des",LOCATION_MZONE,cm.negcon)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local att,race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_ATTRIBUTE,CHAININFO_TRIGGERING_RACE)
return rp~=tp and re:IsActiveType(TYPE_MONSTER) and (att & e:GetLabelObject():GetLabel() ~=0 or race & e:GetLabelObject():GetValue() ~=0)
end
function cm.cfun(g,e,tp)
local att,race=0
for tc in aux.Next(g) do
att = att|tc:GetAttribute()
race = race|tc:GetRace()
end
e:SetLabel(att)
e:SetValue(race)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:IsActiveType(TYPE_MONSTER)
end
function cm.spcfilter(c,tp)
return c:GetSummonPlayer()~=tp
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spcfilter,1,nil,tp)
end
function cm.cfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToRemoveAsCost()
end
function cm.gcheck(g,e,tp)
return Duel.GetLocationCountFromEx(tp,tp,g,e:GetHandler())>0
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP)
end
function cm.spop(e,tp)
local c=rscf.GetSelf(e)
if c and Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)>0 then
c:CompleteProcedure()
end
end
--怪兽机械 撒旦拉布摩斯
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001014)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,3,true)
local e1=rscf.SetSummonCondition(c,false)
local e2=aux.AddContactFusionProcedure(c,cm.cfilter,rsloc.hd+LOCATION_MZONE,0,cm.solvefun,c)
local e3,e4=rsef.FV_CANNOT_DISABLE(c,"dise,act",nil,aux.TargetBoolFunction(Card.IsRace,RACE_MACHINE),{LOCATION_MZONE,0})
local e5=rsef.I(c,{m,0},1,"th,dis",nil,LOCATION_MZONE,nil,nil,rsop.target(cm.thfilter,"th",rsloc.gr),cm.thop)
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsComplexType(TYPE_SPELL+TYPE_CONTINUOUS) and c:IsFaceup()
end
function cm.thop(e,tp)
local ct,og,tc=rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter),tp,rsloc.gr,0,1,1,nil,{})
if tc and tc:IsLocation(LOCATION_HAND) then
rsop.SelectOC({m,1},true)
rsop.SelectSolve(HINTMSG_DISABLE,tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil,cm.disfun,e:GetHandler())
end
end
function cm.disfun(g,c)
local tc=g:GetFirst()
local e1,e2=rscf.QuickBuff({c,tc},"dis,dise")
return true
end
function cm.ffilter(c,fc,sub,mg,sg)
return c:IsRace(RACE_MACHINE) and (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode()))
end
function cm.cfilter(c)
local tp=c:GetControler()
if not c:IsAbleToGraveAsCost() then return false end
return not c:IsLocation(LOCATION_DECK) or (Duel.GetFlagEffect(tp,m)==0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0)
end
function cm.solvefun(g,c)
local tp=c:GetControler()
local atk=g:GetSum(Card.GetTextAttack)
local def=g:GetSum(Card.GetTextDefense)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel.RegisterFlagEffect(tp,m,0,0,1)
end
Duel.SendtoGrave(g,REASON_COST)
local e1,e2=rsef.SV_SET(c,"batk,bdef",{atk,def},nil,rsreset.est_d-RESET_TOFIELD)
end
\ No newline at end of file
--索尔比诺之歌
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001015)
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.QO(c,nil,{m,0},{1,m},nil,nil,LOCATION_SZONE,cm.pcon,nil,nil,cm.pop)
local e3=rsef.QO(c,nil,{m,1},{1,m},nil,nil,LOCATION_SZONE,nil,nil,rsop.target(cm.pfilter,nil,rsloc.gr),cm.pop2)
local e4=rsef.QO(c,nil,{m,2},{1,m+100},"rm,tg",nil,LOCATION_HAND,nil,rscost.cost(0,"dish"),rsop.target2(cm.fun,cm.rmfilter,"rm",LOCATION_DECK),cm.rmop)
local e5=rsef.STO(c,EVENT_TO_GRAVE,{m,0},{1,m+200},nil,"de",cm.pconx,nil,nil,cm.pop)
local e6=rsef.RegisterClone(c,e5,"code",EVENT_REMOVE)
local e7=rsef.STO(c,EVENT_TO_GRAVE,{m,1},{1,m+200},nil,"de",cm.xcon,nil,rsop.target(cm.pfilter,nil,rsloc.gr),cm.pop2)
local e8=rsef.RegisterClone(c,e7,"code",EVENT_REMOVE)
end
function cm.xcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_COST) and re and re:IsActivated()
end
function cm.pconx(e,tp,...)
local c=e:GetHandler()
return cm.pcon(e,tp) and cm.xcon(e,tp,...)
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_DECK)
end
function cm.rmfilter(c)
return c:IsComplexType(TYPE_SPELL+TYPE_CONTINUOUS) and (c:IsAbleToGrave() or c:IsAbleToRemove())
end
function cm.rmop(e,tp)
rsop.SelectSolve(HINTMSG_SELF,tp,cm.rmfilter,tp,LOCATION_DECK,0,1,1,nil,cm.rmfun,tp)
end
function cm.rmfun(g,tp)
local tc=g:GetFirst()
local b1=tc:IsAbleToGrave()
local b2=tc:IsAbleToRemove()
local op=rsop.SelectOption(tp,b1,{m,3},b2,{m,4})
if op==1 then
return Duel.SendtoGrave(tc,REASON_EFFECT)
else
return Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function cm.pcon(e,tp)
local c=e:GetHandler()
return not c:IsComplexType(TYPE_SPELL+TYPE_CONTINUOUS) and (c:IsLocation(LOCATION_SZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
end
function cm.pop(e,tp)
local c=rscf.GetSelf(e)
if not c then return end
if not c:IsLocation(LOCATION_SZONE) then
if not Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then return end
end
c:CancelToGrave(true)
local e1=rsef.SV_CHANGE(c,"type",TYPE_SPELL+TYPE_CONTINUOUS)
end
function cm.pfilter(c,e,tp)
return c:IsComplexType(TYPE_SPELL+TYPE_CONTINUOUS) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsFaceup()
end
function cm.pop2(e,tp)
local c=rscf.GetSelf(e)
if not c then return end
rsop.SelectMoveToField(tp,aux.NecroValleyFilter(cm.pfilter),tp,rsloc.gr,0,1,1,nil,{tp,tp,LOCATION_SZONE,POS_FACEUP,true})
end
--自然控制机器 天界
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001016)
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.QO(c,nil,{m,0},{1,m},"sp",nil,LOCATION_HAND,nil,rscost.cost({Card.IsAbleToHandAsCost,aux.mzctcheck},"th",LOCATION_ONFIELD,0,1,3),cm.sptg,cm.spop)
local e3=rsef.QO(c,nil,{m,1},1,"rm",nil,LOCATION_MZONE,cm.rmcon,nil,rsop.target(Card.IsAbleToRemove,"rm",0,LOCATION_ONFIELD),cm.rmop)
local e4=rsef.STO(c,EVENT_LEAVE_FIELD,{m,2},{1,m+100},nil,"de",cm.plcon,nil,nil,cm.plop)
local e5=rsef.STO(c,EVENT_LEAVE_FIELD,{m,3},{1,m+200},"se,th","de",cm.thcon,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
end
function cm.thfilter(c)
return c:IsCode(m+1,m+2) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.plcon(e,tp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end
function cm.thcon(e,tp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsPreviousLocation(LOCATION_SZONE)
end
function cm.plop(e,tp)
local c=rscf.GetSelf(e)
if c then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function cm.rmop(e,tp)
rsop.SelectRemove(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil,{})
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x1021,1700,1200,3,RACE_MACHINE,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x1021,1700,1200,3,RACE_MACHINE,ATTRIBUTE_WIND) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_SPELL+TYPE_TUNER)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP_ATTACK)
end
--自然控制机器 炎山
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001017)
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.QO(c,nil,{m,0},{1,m},"sp",nil,LOCATION_HAND,nil,rscost.cost(Card.IsAbleToDeckAsCost,"td",LOCATION_GRAVE,LOCATION_GRAVE,1,3),cm.sptg,cm.spop)
local e3=rsef.QO(c,nil,{m,1},1,"tg",nil,LOCATION_MZONE,cm.tgcon,nil,rsop.target(Card.IsAbleToGrave,"tg",0,LOCATION_ONFIELD),cm.tgop)
local e4=rsef.STO(c,EVENT_LEAVE_FIELD,{m,2},{1,m+100},nil,"de",cm.plcon,nil,nil,cm.plop)
local e5=rsef.STO(c,EVENT_LEAVE_FIELD,{m,3},{1,m+200},"se,th","de",cm.thcon,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
end
function cm.thfilter(c)
return c:IsCode(m+1,m-1) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.plcon(e,tp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end
function cm.thcon(e,tp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsPreviousLocation(LOCATION_SZONE)
end
function cm.plop(e,tp)
local c=rscf.GetSelf(e)
if c then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function cm.tgop(e,tp)
rsop.SelectToGrave(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil,{})
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.IsPlayerCanSpecialSummonMonster(tp,m,0,0x1021,1500,1500,3,RACE_MACHINE,ATTRIBUTE_FIRE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x1021,1500,1500,3,RACE_MACHINE,ATTRIBUTE_FIRE) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_SPELL+TYPE_TUNER)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP_ATTACK)
end
\ No newline at end of file
--自然控制机器 深绿
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25001018)
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.QO(c,nil,{m,0},{1,m},"sp",nil,LOCATION_HAND,nil,rscost.cost(nil,"disd",LOCATION_DECK,0,1,3),cm.sptg,cm.spop)
local e3=rsef.QO(c,nil,{m,1},1,"pos",nil,LOCATION_MZONE,cm.tscon,nil,rsop.target(cm.tsfilter,"pos",0,LOCATION_ONFIELD),cm.tsop)
local e4=rsef.STO(c,EVENT_LEAVE_FIELD,{m,2},{1,m+100},nil,"de",cm.plcon,nil,nil,cm.plop)
local e5=rsef.STO(c,EVENT_LEAVE_FIELD,{m,3},{1,m+200},"se,th","de",cm.thcon,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
end
function cm.thfilter(c)
return c:IsCode(m-1,m-2) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.plcon(e,tp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end
function cm.thcon(e,tp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsPreviousLocation(LOCATION_SZONE)
end
function cm.plop(e,tp)
local c=rscf.GetSelf(e)
if c then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function cm.tscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
end
function cm.tsfilter(c)
local chain=Duel.GetCurrentChain()
if chain>1 then
for i=1,chain do
local re=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler()==c then return false end
end
end
return not c:IsComplexType(TYPE_PENDULUM+TYPE_SPELL) and c:IsCanTurnSet()
end
function cm.tsop(e,tp)
rsop.SelectSolve(HINTMSG_SET,tp,cm.tsfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e),cm.tsfun,e,tp)
end
function cm.tsfun(g,e,tp)
local ct=Duel.ChangePosition(g,POS_FACEDOWN)
if g:GetFirst():IsType(TYPE_SPELL+TYPE_TRAP) then
Duel.RaiseEvent(g,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
return ct
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.IsPlayerCanSpecialSummonMonster(tp,m,0,0x1021,1400,1800,3,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x1021,1400,1800,3,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_SPELL+TYPE_TUNER)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP_ATTACK)
end
\ No newline at end of file
--光之巨人 复合迪迦
if not pcall(function() require("expansions/script/c25010000") end) then require("script/c25010000") end
local m,cm=rscf.DefineCard(25010001)
if rsgol then return end
rsgol=cm
function cm.TigaSummonFun(c,code,spcode1,spcode2,leavecon,sprcon,sprop)
c:EnableReviveLimit()
local e1=rscf.SetSummonCondition(c,false,cm.tigasumval(spcode1,spcode2))
local e2=rsef.QO(c,nil,{m,0},{1,code+700},"sp,te",nil,LOCATION_MZONE,nil,cm.tigaspcost,rsop.target({cm.tigaspfilter(spcode1,spcode2),"sp",LOCATION_EXTRA},{Card.IsAbleToExtra,"te"}),cm.tigaspop(spcode1,spcode2))
local e3=rsgol.ToExtraEffect(c,leavecon)
local e4
if sprcon then
e4=rscf.SetSpecialSummonProduce(c,LOCATION_EXTRA,sprcon,sprop)
end
return e1,e2,e3,e4
end
function rsgol.ToExtraEffect(c,leavecon)
local e1=rsef.FTF(c,EVENT_PHASE+PHASE_END,{m,1},1,"te",nil,LOCATION_MZONE,leavecon,nil,rsop.target(Card.IsAbleToExtra,"te"),cm.tigateop)
return e1
end
function cm.tigasumval(code1,code2)
return function(e,se,sp,st)
return se and se:GetHandler():IsCode(code1,code2)
end
end
function cm.tigaspcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,3)
if chk==0 then return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEDOWN)==3 end
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function cm.tigaspfilter(spcode1,spcode2)
return function(c,e)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCode(spcode1,spcode2)
end
end
function cm.tigaspop(spcode1,spcode2)
return function(e,tp)
local c=aux.ExceptThisCard(e)
local ct,og,tc=rsop.SelectSpecialSummon(tp,cm.tigaspfilter(spcode1,spcode2),tp,LOCATION_EXTRA,0,1,1,nil,{},e,tp)
if ct>0 then
tc:CompleteProcedure()
if c then
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end
end
end
function cm.tigateop(e,tp)
local c=aux.ExceptThisCard(e)
if c then
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end
function rsgol.GaiaSummonFun(c,code,lv,ovfilter,spcode,spcost,disoverlay)
c:EnableReviveLimit()
if ovfilter then
aux.AddXyzProcedure(c,nil,lv,3,ovfilter,aux.Stringid(m,0))
else
aux.AddXyzProcedure(c,nil,lv,3)
end
if not spcode then return end
local e1=rsef.STO(c,EVENT_LEAVE_FIELD,{m,0},{1,code+200},"sp","de,dsp",cm.gaiaspcon(disoverlay),spcost,rsop.target(cm.gaiaspfilter(spcode),"sp",LOCATION_EXTRA),cm.gaiaspop(spcode,disoverlay))
return e1
end
function cm.gaiaspcon(disoverlay)
return function(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler()
return tc:IsPreviousPosition(POS_FACEUP) and (disoverlay or tc:GetOverlayCount()<=0) and (tc:IsReason(REASON_BATTLE) or (tc:IsReason(REASON_EFFECT) and rp~=tp))
end
end
function cm.gaiaspfilter(spcode)
return function(c,e,tp)
return c:IsCode(spcode) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL)
end
end
function cm.gaiaspop(spcode,disoverlay)
return function(e,tp)
local c=aux.ExceptThisCard(e)
local ct,og,tc=rsop.SelectSpecialSummon(tp,cm.gaiaspfilter(spcode),tp,LOCATION_EXTRA,0,1,1,nil,{SUMMON_TYPE_XYZ},e,tp)
if ct>0 then
tc:CompleteProcedure()
if not disoverlay and c and c:IsCanOverlay() then
Duel.Overlay(tc,Group.FromCards(c))
end
end
end
end
------------------------------------
function cm.initial_effect(c)
rsgol.TigaSummonFun(c,m,m+1,m+2,rscon.turno,cm.sprcon,cm.sprop)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,2},{1,m},"th","de,dsp",nil,nil,rsop.target(cm.thfilter,"th",LOCATION_GRAVE),cm.thop)
end
function cm.sprcon(e,c,tp)
return Duel.IsExistingMatchingCard(cm.sprcfilter,tp,LOCATION_MZONE,0,1,nil,tp,c)
end
function cm.sprcfilter(c,tp,fc)
return c:IsFaceup() and not c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(cm.sprcfilter2,tp,LOCATION_HAND,0,1,nil,tp,fc,c)
end
function cm.sprcfilter2(c,tp,fc,c2)
return c:IsAbleToGraveAsCost() and c:IsAttribute(ATTRIBUTE_LIGHT) and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,c2),fc)>0
end
function cm.sprop(e,tp)
local c=e:GetHandler()
rshint.Select(tp,"tg")
local g1=Duel.SelectMatchingCard(tp,cm.sprcfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c)
rshint.Select(tp,"tg")
local g2=Duel.SelectMatchingCard(tp,cm.sprcfilter2,tp,LOCATION_HAND,0,1,1,nil,tp,c,g1:GetFirst())
Duel.SendtoGrave((g1+g2),REASON_COST)
end
function cm.thfilter(c)
return c:IsLevelBelow(4) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,{})
end
\ No newline at end of file
--光之巨人 空中迪迦
if not pcall(function() require("expansions/script/c25010001") end) then require("script/c25010001") end
local m,cm=rscf.DefineCard(25010002)
function cm.initial_effect(c)
rsgol.TigaSummonFun(c,m,m+1,m-1,rscon.turns)
local e1=rsef.QO(c,nil,{m,0},{1,m},"des","tg",LOCATION_MZONE,nil,nil,rstg.target(aux.FilterBoolFunction(Card.IsType,TYPE_SPELL+TYPE_TRAP),"des",0,LOCATION_ONFIELD,1,2),cm.desop)
end
function cm.desop(e,tp)
local dg=rsgf.GetTargetGroup()
if #dg>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
end
--光之巨人 强力迪迦
if not pcall(function() require("expansions/script/c25010001") end) then require("script/c25010001") end
local m,cm=rscf.DefineCard(25010003)
function cm.initial_effect(c)
rsgol.TigaSummonFun(c,m,m-1,m-2,rscon.turns)
local e1=rsef.QO(c,nil,{m,0},{1,m},"des","tg",LOCATION_MZONE,nil,nil,rstg.target(aux.TRUE,"des",0,LOCATION_MZONE),cm.desop)
end
function cm.desop(e,tp)
local dg=rsgf.GetTargetGroup()
if #dg>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
end
--光之巨人 闪亮戴拿
if not pcall(function() require("expansions/script/c25010001") end) then require("script/c25010001") end
local m,cm=rscf.DefineCard(25010004)
function cm.initial_effect(c)
rsgol.TigaSummonFun(c,m,m+1,m+2,rscon.turno,cm.sprcon,cm.sprop)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},"dr,dish","ptg,de,dsp",nil,nil,rsop.target2(cm.fun,1,"dr"),cm.drop)
end
function cm.sprcon(e,c,tp)
return Duel.IsExistingMatchingCard(cm.sprcfilter,tp,LOCATION_MZONE,0,1,nil,tp,c)
end
function cm.sprcfilter(c,tp,fc)
return c:IsFaceup() and not c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToDeckOrExtraAsCost() and Duel.IsExistingMatchingCard(cm.sprcfilter2,tp,LOCATION_REMOVED,0,1,nil,tp,fc,c)
end
function cm.sprcfilter2(c,tp,fc,c2)
return c:IsAbleToDeckOrExtraAsCost() and c:IsAttribute(ATTRIBUTE_LIGHT) and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,c2),fc)>0 and c:IsFaceup()
end
function cm.sprop(e,tp)
local c=e:GetHandler()
rshint.Select(tp,"td")
local g1=Duel.SelectMatchingCard(tp,cm.sprcfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c)
rshint.Select(tp,"td")
local g2=Duel.SelectMatchingCard(tp,cm.sprcfilter2,tp,LOCATION_REMOVED,0,1,1,nil,tp,c,g1:GetFirst())
Duel.SendtoDeck((g1+g2),nil,2,REASON_COST)
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)~=0 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
\ No newline at end of file
--光之巨人 奇迹戴拿
if not pcall(function() require("expansions/script/c25010001") end) then require("script/c25010001") end
local m,cm=rscf.DefineCard(25010005)
function cm.initial_effect(c)
rsgol.TigaSummonFun(c,m,m-1,0,rscon.turns)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},"se,th","de,dsp",nil,rscost.cost(Card.IsAbleToDeckAsCost,"td",LOCATION_HAND,0,3),rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
\ No newline at end of file
--光之巨人 强壮戴拿
if not pcall(function() require("expansions/script/c25010001") end) then require("script/c25010001") end
local m,cm=rscf.DefineCard(25010006)
function cm.initial_effect(c)
rsgol.TigaSummonFun(c,m,m-2,0,rscon.turns)
local e1=rsef.QO_NEGATE(c,"neg",{1,m},"des",LOCATION_MZONE,rscon.negcon(cm.filter))
e1:SetOperation(cm.negop)
end
function cm.filter(e,tp,re,rp,tg,loc)
return rp~=tp and re:IsActiveType(TYPE_MONSTER) and loc&LOCATION_ONFIELD >0
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local c=rscf.GetFaceUpSelf(e)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then
local atk=rc:GetAttack()
if Duel.Destroy(eg,REASON_EFFECT)>0 and c and rc then
rscf.QuickBuff(c,"atk+",atk)
end
end
end
\ No newline at end of file
--大地之光 盖亚
if not pcall(function() require("expansions/script/c25010001") end) then require("script/c25010001") end
local m,cm=rscf.DefineCard(25010007)
function cm.initial_effect(c)
rsgol.GaiaSummonFun(c,m,4,cm.ovfilter,m+1,rscost.cost(cm.cfilter,"tg",LOCATION_EXTRA))
local e1=rsef.FV_LIMIT_PLAYER(c,"rm",nil,cm.rmtg,{0,1})
local e2=rsef.QO_NEGATE(c,"neg",{1,m},nil,LOCATION_MZONE,rscon.negcon(cm.negfilter),rscost.rmxyz(1))
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsXyzType(TYPE_NORMAL) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevelBelow(4)
end
function cm.cfilter(c)
return c:IsAbleToGraveAsCost() and c:IsCode(25010010)
end
function cm.rmtg(e,c)
return c:GetControler()==e:GetHandlerPlayer()
end
function cm.negfilter(e,tp,re,rp,tg,loc)
return rp~=tp and loc&LOCATION_ONFIELD ==0 and re:IsActiveType(TYPE_MONSTER)
end
\ No newline at end of file
--大地之光 盖亚V2
if not pcall(function() require("expansions/script/c25010001") end) then require("script/c25010001") end
local m,cm=rscf.DefineCard(25010008)
function cm.initial_effect(c)
rsgol.GaiaSummonFun(c,m,7)
local e1=rsef.FV_LIMIT_PLAYER(c,"rm",nil,cm.rmtg,{0,1})
local e2=rsef.FV_LIMIT_PLAYER(c,"act",cm.disval,nil,{0,1})
local e3=rsef.QO_NEGATE(c,"neg",{1,m},nil,LOCATION_MZONE,rscon.negcon(2,true),rscost.rmxyz(1))
local e4=rsef.QO(c,nil,{25010001,0},{1,m+200},"sp",nil,LOCATION_MZONE,cm.spcon,rscost.lpcost(true),rsop.target2(cm.fun,cm.spfilter,"sp",LOCATION_EXTRA),cm.spop)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(m-1) and c:GetOverlayCount()<=0
end
function cm.rmtg(e,c)
return c:GetControler()==e:GetHandlerPlayer()
end
function cm.disval(e,re)
return re:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsLocation(LOCATION_REMOVED)
end
function cm.spcon(e,tp)
local c=e:GetHandler()
return c:GetOverlayCount()<=0 and rscon.phmp(e,tp)
end
function cm.spfilter(c,e,tp)
local oc=e:GetHandler()
return c:IsCode(m+1) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,oc,c)>0 and aux.MustMaterialCheck(oc,tp,EFFECT_MUST_BE_XMATERIAL) and oc:IsCanBeXyzMaterial(c)
end
function cm.fun(g,e,tp)
Duel.SetChainLimit(aux.FALSE)
end
function cm.spop(e,tp)
local c=aux.ExceptThisCard(e)
if not c then return end
rshint.Select(tp,"sp")
local sc=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if #mg~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
\ No newline at end of file
--大地之光 盖亚SV
if not pcall(function() require("expansions/script/c25010001") end) then require("script/c25010001") end
local m,cm=rscf.DefineCard(25010009)
function cm.initial_effect(c)
rsgol.GaiaSummonFun(c,m,10)
--local e1=rsef.SV_IMMUNE_EFFECT(c,cm.val)
local e2=rsef.SV_CANNOT_BE_TARGET(c,"effect",aux.tgoval)
local e3=rsef.FV_LIMIT_PLAYER(c,"rm",nil,nil,{0,1})
local e4=rsef.FV_LIMIT_PLAYER(c,"act",cm.disval,nil,{0,1})
local e5=rsef.QO_NEGATE(c,"neg",{1,m},"des",LOCATION_MZONE,rscon.negcon(2,true),rscost.rmxyz(1))
local e6=rsef.QO_NEGATE(c,"sp",{1,m},"des",LOCATION_MZONE,cm.discon,rscost.rmxyz(1))
--local e7=rsgol.ToExtraEffect(c)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(m-1) and c:GetOverlayCount()<=0
end
function cm.val(e,re)
return re:IsActiveType(TYPE_MONSTER) and re:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function cm.disval(e,re)
return re:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP) and not re:GetHandler():IsOnField()
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
\ No newline at end of file
--海洋之光 阿古茹
if not pcall(function() require("expansions/script/c25010001") end) then require("script/c25010001") end
local m,cm=rscf.DefineCard(25010010)
function cm.initial_effect(c)
rsgol.GaiaSummonFun(c,m,4,cm.ovfilter,m+1,rscost.cost(Card.IsDiscardable,"dish",LOCATION_HAND))
local e1,e2=rsef.SV_INDESTRUCTABLE(c,"battle,effect")
local e3=rsef.QO_NEGATE(c,"neg",{1,m},nil,LOCATION_MZONE,rscon.negcon(cm.negfilter),rscost.rmxyz(1))
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsXyzType(TYPE_NORMAL) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelBelow(4)
end
function cm.negfilter(e,tp,re,rp,tg,loc)
return rp~=tp and loc&LOCATION_ONFIELD ==0 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
\ No newline at end of file
--海洋之光 阿古茹V2
if not pcall(function() require("expansions/script/c25010001") end) then require("script/c25010001") end
local m,cm=rscf.DefineCard(25010011)
function cm.initial_effect(c)
rsgol.GaiaSummonFun(c,m,9,nil,25010008,rscost.cost(Card.IsDiscardable,"dish",LOCATION_HAND),true)
local e1=rscf.SetSpecialSummonProduce(c,LOCATION_EXTRA,cm.sprcon,cm.sprop,{25010001,0})
e1:SetValue(SUMMON_TYPE_XYZ)
local e2,e3=rsef.SV_INDESTRUCTABLE(c,"battle,effect")
--local e4=rsef.SV_IMMUNE_EFFECT(c,cm.imval)
local e5=rsef.SV_CANNOT_BE_TARGET(c,"effect",aux.tgoval)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e6:SetValue(1)
c:RegisterEffect(e6)
local e7=rsef.QO_NEGATE(c,"neg",{1,m},nil,LOCATION_MZONE,rscon.negcon(4,true),rscost.rmxyz(1))
end
function cm.cfilter(c)
return c:IsAbleToExtraAsCost() and c:IsCode(m-1)
end
function cm.sprcon(e,c,tp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL)
end
function cm.sprop(e,tp)
rsop.SelectToDeck(tp,cm.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,{})
end
function cm.imval(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
\ No newline at end of file
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