Commit eb56c55e authored by 聖園ミカ's avatar 聖園ミカ 🐟

wdnmd

parent 2427ca4e
No preview for this file type
......@@ -3,16 +3,12 @@
#1
00112010 0 --萨卡兹的王女-特蕾西娅
00113217 1 --小红花
00115001 0 --旧巢之女 大黄蜂
00115003 0 --梦魇剧团团长 格林
00115005 0 --丝线的奏歌 大黄蜂
00189113 1 --恒夜的略影
00189116 0 --恒夜骑士 流羽之伽蓝菲恩
00189118 0 --恒夜骑士-昏暗之奎狄
00189121 0 --青之记忆
00119002 0 --MS-06S 夏亚专用-扎古II
00119006 1 --海帕杰顿-完全体
00189121 0 --青之记忆
#10
01009020 1 --物语纪录·羽川翼
01009021 1 --物语纪录·八九寺真宵
......@@ -86,9 +82,6 @@
06160503 0 --破碎世界 永恒之核
06160508 0 --最低世界 偏离的岔路
06161601 0 --虚无世界 最终之梦
#67
06700016 1 --地狱把妹王·阿撒兹勒 好奇天使
06700024 1 --实验室把妹王·67号实验体 博学士的怪物
#93
09300004 0 --对折相叠
09300010 1 --降阶魔法-牝堕之力
......@@ -105,7 +98,6 @@
09310064 0 --被遗忘的单调灵 结良
09310068 0 --单调士的叛者
09320004 0 --三首翼龙王
09320009 0 --大波静流
09320233 1 --尸位素餐
09330001 1 --陷阵营首-高顺
09330003 0 --陷阵营统帅
......@@ -143,8 +135,6 @@
10080021 2 --来自未来的先导者 礼奈
10090061 0 --觉醒之时 庆明
#101
10150096 0 --融合幻象
10151005 0 --昆虫皇后
10158004 0 --原田秋叶·夏祭
10174036 0 --紧急弹射
10174059 1 --暴君恐兽
......
--余火
Duel.LoadScript("c10199990.lua")
local m,cm=rscf.DefineCard(10171001)
if rsds then return end
rsds=cm
function rsds.cost1(e,...)
e:SetLabel(100)
return rscost.cost(Card.IsReleasable,"res")(e,...)
end
function cm.costfun(e,tp)
e:SetValue(100)
end
function rsds.cost2(ct)
return function(e,...)
e:SetLabel(100)
return rscost.cost(cm.rmcfilter,"rm",LOCATION_GRAVE,LOCATION_GRAVE,ct,ct)(e,...)
end
end
function cm.rmcfilter(c,e,tp)
if not c:IsAbleToRemoveAsCost() or not c:IsType(TYPE_MONSTER) then return false end
return (c:IsCode(m) and c:IsControler(tp)) or (Duel.IsPlayerAffectedByEffect(tp,m+19) and not c:IsCode(e:GetHandler():GetCode()))
end
function rsds.SearchFun(c,scode,op)
local e1=rsef.STO(c,EVENT_SUMMON_SUCCESS,{m,0},nil,"se,th","de,dsp",nil,rsds.cost2(1),rsop.target(cm.thfilter(scode),"th",LOCATION_DECK),cm.thop(scode,op))
local e2=rsef.RegisterClone(c,e1,"code",EVENT_SPSUMMON_SUCCESS)
return e1,e2
end
function cm.thfilter(scode)
return function(c)
return c:IsCode(scode) and c:IsAbleToHand()
end
end
function cm.thop(scode,op)
return function(e,tp,...)
local ct,og,tc=rsop.SelectToHand(tp,cm.thfilter(scode),tp,LOCATION_DECK,0,1,1,nil,{})
if ct>0 and op then
op(tc,e,tp,...)
end
end
end
function rsds.ChainingFun(c,code,cate,flag,tg,op)
local e1=rsef.QO(c,EVENT_CHAINING,{code,0},1,cate,flag,LOCATION_MZONE,cm.cfcon,nil,tg,op)
return e1
end
function cm.cfcon(e,tp,eg,ep,ev,re,r,rp)
for i=1,ev do
local te,tep,tecode1,tecode2,teloc=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2,CHAININFO_TRIGGERING_LOCATION )
if tep==tp and (tecode1==m or (tecode2 and tecode2==m)) and teloc&LOCATION_HAND+LOCATION_ONFIELD ~=0 then
return true
end
end
return false
end
function rsds.ExtraSummonFun(c,code)
local e1=rscf.SetSummonCondition(c,false,cm.exsumval(code))
return e1
end
function cm.exsumval(code,excode)
return function(e,se,sp,st)
--if not e:GetHandler():IsLocation(LOCATION_EXTRA) then return true end
return se and se:GetHandler():IsCode(code,excode or 0)
end
end
function rsds.TributeFun(c,code,cate,flag,tg,op,isign)
local e1=rsef.QO(c,nil,{code,0},{1,code},cate,flag,LOCATION_HAND,nil,rsds.cost1,tg,op)
if isign then e1:SetType(EFFECT_TYPE_IGNITION) end
return e1
end
function rsds.SpExtraFun(c,code,rmcode,spcode,con,ct)
ct=ct or 1
local e1=rsef.QO(c,nil,{code,1},{1,code+100},"sp",nil,LOCATION_GRAVE,con,rscost.reglabel(100),cm.spetg(rmcode,spcode,ct),cm.speop(spcode))
return e1
end
function cm.spefilter(c,e,tp,spcode)
return c:IsCode(spcode) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sprmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:IsSetCard(0xa335)
end
function cm.specfilter(c,rmcode)
return c:IsCode(rmcode) and c:IsAbleToRemoveAsCost()
end
function cm.spgfilter(g,rmcode)
return g:IsExists(Card.IsCode,1,nil,rmcode)
end
function cm.spetg(rmcode,spcode,ct)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.spefilter,tp,LOCATION_EXTRA,0,nil,e,tp,spcode)
local rg=Duel.GetMatchingGroup(cm.sprmfilter,tp,LOCATION_GRAVE,0,c)
local ft=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_FUSION)
if chk==0 then
if e:GetLabel()==100 then
return c:IsAbleToRemoveAsCost() and rg:IsExists(Card.IsCode,1,nil,rmcode) and #g>0
else
return #g>0 and ct==1
end
end
local sct=math.min(ct,#g)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then sct=1 end
if c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp] then sct=math.min(c29724053[tp],sct) end
sct=math.min(sct,ft)
local sct2=0
if e:GetLabel()==100 then
e:SetLabel(0)
rshint.Select(tp,"rm")
local rg2=rg:SelectSubGroup(tp,cm.spgfilter,false,1,sct,rmcode)
rg2:AddCard(c)
sct2=Duel.Remove(rg2,POS_FACEUP,REASON_COST)-1
end
e:SetValue(ct==1 and sct or sct2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,sct,tp,LOCATION_EXTRA)
end
end
function cm.speop(spcode)
return function(e,tp,...)
local sg=Duel.GetMatchingGroup(cm.spefilter,tp,LOCATION_EXTRA,0,nil,e,tp,spcode)
local sct=e:GetValue()
if sct<=0 or #sg<sct then return end
if sct>=2 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]<sct then return end
local ft=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_FUSION)
if ft<sct then return end
local ct,og=rsgf.SelectSpecialSummon(sg,tp,aux.TRUE,sct,sct,nil,{})
if #og>0 then
for tc in aux.Next(og) do
tc:CompleteProcedure()
end
end
end
end
-------------------------
function cm.initial_effect(c)
local e2=rsef.QO(c,nil,{m,2},nil,"sp",nil,LOCATION_HAND+LOCATION_MZONE,nil,rsds.cost1,rsop.target2(cm.resetfun,cm.spfilter,"sp",LOCATION_HAND),cm.spop)
local e3=rsef.QO(c,nil,{m,4},nil,"atk,def","dsp",LOCATION_HAND+LOCATION_MZONE,nil,rsds.cost1,rsop.target(cm.atkfilter,"dum",LOCATION_MZONE,LOCATION_MZONE),cm.atkop)
local e4=rsef.FTF(c,EVENT_LEAVE_FIELD,{m,0},nil,"th",nil,LOCATION_REMOVED,cm.embthcon,cm.embthcost,rsop.target(Card.IsAbleToHand,"th"),cm.embthop)
end
function cm.recop(e,tp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function cm.resetfun(g,e,tp)
e:SetLabel(0)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xa335) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ((e:GetLabel()==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or (e:GetLabel()==100 and Duel.GetMZoneCount(tp,e:GetHandler(),tp)>0 and c~=e:GetHandler()))
end
function cm.spop(e,tp)
rsop.SelectSpecialSummon(tp,cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,{},e,tp)
end
function cm.rmfilter(c,e,tp)
return c:IsAbleToRemove() and c:IsFaceup() and (e:GetLabel()~=100 or c~=e:GetHandler())
end
function cm.rmop(e,tp)
local ct,og,tc=rsop.SelectRemove(tp,cm.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,{ POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY },e,tp)
if tc and tc:IsLocation(LOCATION_REMOVED) and Duel.ReturnToField(tc) then
local e1=rsef.SV_UPDATE({e:GetHandler(),tc},"atk",300,nil,rsreset.est,"cd")
end
end
function cm.atkfilter(c,e,tp)
return c:IsFaceup() and ( not e:IsCostChecked() or c~=e:GetHandler())
end
function cm.atkop(e,tp)
local ct=rsop.SelectSolve(HINTMSG_FACEUP,tp,cm.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,aux.ExceptThisCard(e),cm.solvefun,e,tp)
end
function cm.solvefun(g,e,tp)
local tc=g:GetFirst()
local c=e:GetHandler()
Duel.HintSelection(Group.FromCards(tc))
local e1,e2=rscf.QuickBuff({c,tc},"atk+,def+",500,"rst",rsreset.est_pend)
tc:RegisterFlagEffect(m,rsreset.est_pend-RESET_LEAVE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
local e3,e4=rsef.FV_CANNOT_DISABLE({c,tp},"neg,dise",cm.imval(tc),nil,nil,nil,rsreset.pend)
--local phase=Duel.GetCurrentPhase()
--if phase>PHASE_MAIN1 and phase<PHASE_MAIN2 then phase=PHASE_BATTLE end
--local e3=rsef.SV_IMMUNE_EFFECT({c,tc},rsval.imoe,cm.imcon(phase),rsreset.pend)
end
function cm.imval(tc)
return function(e,ev)
local te,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_LOCATION)
return tc:GetFlagEffect(m)>0 and loc&LOCATION_MZONE ~=0 and te:GetHandler()==tc
end
end
function cm.imcon(phase)
return function(e)
local cp=Duel.GetCurrentPhase()
if cp>PHASE_MAIN1 and cp<PHASE_MAIN2 then cp=PHASE_BATTLE end
return cp==phase
end
end
function cm.embthfilter(c)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0xa335,0xc335)
end
function cm.embthcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.embthfilter,1,nil)
end
function cm.embthcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCurrentChain()==0 end
end
function cm.embthop(e,tp)
local c=aux.ExceptThisCard(e)
if c then Duel.SendtoHand(c,nil,REASON_EFFECT) end
end
--灰烬人
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171002)
function cm.initial_effect(c)
local e1=rsef.I(c,{m,0},{1,m},"sp",nil,LOCATION_HAND+LOCATION_GRAVE,nil,rsds.cost2(1),rsop.target(rscf.spfilter2(),"sp"),cm.spop)
local e2=rsef.STO(c,EVENT_SUMMON_SUCCESS,{m,1},nil,"se,th","de,dsp",nil,rscost.reglabel(100),rsop.target2(cm.fun,cm.thfilter,"th",rsloc.dg),cm.thop)
local e3=rsef.RegisterClone(c,e2,"code",EVENT_SPSUMMON_SUCCESS)
end
function cm.spop(e,tp)
local c=aux.ExceptThisCard(e)
if c then rssf.SpecialSummon(c) end
end
function cm.thfilter(c,e,tp)
return c:IsCode(m-1) and c:IsAbleToHand() and (c:IsLocation(LOCATION_DECK) or Duel.IsPlayerAffectedByEffect(tp,10171024))
end
function cm.fun(g,e,tp)
local c=e:GetHandler()
local op=rsop.SelectOption(tp,true,{m,2},c:IsReleasable() and e:GetLabel()==100,{m,3})
e:SetLabel(0)
if op==2 then
Duel.Release(c,REASON_COST)
e:SetValue(2)
else
e:SetValue(1)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp)
local c=e:GetHandler()
rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter),tp,rsloc.dg,0,1,e:GetValue(),nil,{},e,tp)
end
\ No newline at end of file
--灰烬修女 芙莉德
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171003)
function cm.initial_effect(c)
local e1,e2=rsds.SearchFun(c,m+10)
local e3=rsds.ChainingFun(c,m,"des","tg",rstg.target(aux.TRUE,"des",LOCATION_ONFIELD,LOCATION_ONFIELD),cm.desop)
end
function cm.desop(e,tp)
local tc=rscf.GetTargetCard()
if tc then Duel.Destroy(tc,REASON_EFFECT) end
end
--灰烬骑士 安里
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171004)
function cm.initial_effect(c)
local e1,e2=rsds.SearchFun(c,m+10)
local e3=rsds.ChainingFun(c,m,"sp",nil,rsop.target(rscf.spfilter2(cm.spfilter),"sp",LOCATION_DECK),cm.spop)
e3:SetCountLimit(1,m)
end
function cm.spfilter(c)
return not c:IsCode(m) and c:IsSetCard(0xa335)
end
function cm.spop(e,tp)
rsop.SelectSpecialSummon(tp,rscf.spfilter2(cm.spfilter),tp,LOCATION_DECK,0,1,1,nil,{},e,tp)
end
\ No newline at end of file
--灰烬逃脱者 霍克伍德
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171005)
function cm.initial_effect(c)
local e1,e2=rsds.SearchFun(c,m+10)
local e3=rsds.ChainingFun(c,m,"dis","tg",rstg.target(aux.disfilter1,"dis",LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c),cm.disop)
end
function cm.disop(e,tp)
local c=e:GetHandler()
local tc=rscf.GetTargetCard(Card.IsFaceup)
if not tc then return end
local e1,e2=rsef.SV_LIMIT({c,tc},"dis,dise",nil,nil,rsreset.est_pend,"cd")
end
--灰烬铁铠 杰克巴尔多
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171006)
function cm.initial_effect(c)
local e1,e2=rsds.SearchFun(c,m+10,cm.op)
local e3=rsds.ChainingFun(c,m,"dr","ptg",rsop.target(1,"dr"),cm.drop)
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.op(tc,e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,m+10))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--灰烬黑焰 芙莉德
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171007)
function cm.initial_effect(c)
local e1=rsds.ExtraSummonFun(c,m+6)
local e3=rsds.ChainingFun(c,m,nil,nil,cm.mvtg,cm.mvop)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(cm.adjustop)
c:RegisterEffect(e2)
end
function cm.tgfilter(c,tc)
return tc:GetColumnGroup():IsContains(c) and c:GetSequence()<5
end
function cm.adjustop(e,tp)
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,0,LOCATION_MZONE,nil,e:GetHandler())
if Duel.SendtoGrave(g,REASON_EFFECT)>0 then
Duel.Readjust()
end
end
function cm.mvfilter(c)
return c:GetSequence()<5
end
function cm.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND)
end
function cm.mvop(e,tp)
local c=aux.ExceptThisCard(e)
if not c or c:IsControler(1-tp) or c:IsImmuneToEffect(e)
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(c,nseq)
--[[local g=Duel.GetMatchingGroup(rscf.spfilter2(Card.IsSetCard,0xa335),tp,LOCATION_HAND,0,nil,e,tp)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
rsgf.SelectSpecialSummon(g,tp,aux.TRUE,1,1,nil,{})
end]]--
end
\ No newline at end of file
--灰烬守护者 防火女
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171008)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0xa335),2)
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},nil,"de,dsp",rscon.sumtype("link"),nil,rsop.target(cm.thfilter,nil,LOCATION_DECK),cm.actop)
local e3=rsef.QO(c,nil,{m,1},1,nil,"tg",LOCATION_MZONE,nil,nil,rstg.target(cm.imfilter,nil,LOCATION_MZONE),cm.imop)
end
function cm.thfilter(c,e,tp)
return c:IsCode(m+12) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
rsop.SelectSolve(HINTMSG_TOFIELD,tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,cm.actfun,e,tp,eg,ep,ev,re,r,rp)
end
function cm.actfun(g,e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if not tc then return end
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc and tc:IsType(TYPE_FIELD) 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())
return true
end
function cm.imfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa335,0xc335)
end
function cm.imop(e,tp)
local c=e:GetHandler()
local tc=rscf.GetTargetCard(Card.IsFaceup)
if not tc then return end
local e1,e2,e3=rsef.SV_UPDATE({c,tc},"lv,atk,def",{1,800,800},nil,rsreset.est,"cd")
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_ONFIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTarget(cm.distg)
e1:SetReset(rsreset.est_pend)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(cm.discon2)
e2:SetOperation(cm.disop2)
e2:SetDescription(aux.Stringid(m,2))
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e2:SetReset(rsreset.est_pend)
tc:RegisterEffect(e2,true)
end
function cm.distg(e,c)
return c:IsHasCardTarget(e:GetHandler())
end
function cm.discon2(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g:IsContains(e:GetHandler()) and rp~=tp
end
function cm.disop2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--监视深渊的薪王
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171009)
function cm.initial_effect(c)
local e1=rsds.ExtraSummonFun(c,m+6,m)
local e2=rsef.SV_UPDATE(c,"atk",cm.val)
local e3=rsef.STO(c,EVENT_LEAVE_FIELD,{m,0},nil,"sp","de,dsp",cm.spcon,rsds.cost2(1),rsop.target(rscf.spfilter2(Card.IsCode,m),"sp",LOCATION_GRAVE,0,1,1,c),cm.spop)
end
function cm.val(e,c)
return Duel.GetMatchingGroupCount(rscf.FilterFaceUp(Card.IsCode,m),e:GetHandlerPlayer(),rsloc.mg,0,e:GetHandler())*1000
end
function cm.cfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousSetCard(0xa335,0xc335) and (c:IsReason(REASON_BATTLE) or (rp~=tp and c:IsReason(REASON_EFFECT)))
end
function cm.spcon(e,tp,eg)
return eg and eg:IsExists(cm.cfilter,1,nil,tp,rp)
end
function cm.spop(e,tp)
local ct,og=rsop.SelectSpecialSummon(tp,rscf.spfilter2(Card.IsCode,m),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,aux.ExceptThisCard(e),{},e,tp)
if ct>0 then
og:GetFirst():CompleteProcedure()
end
end
--罪业之都的薪王
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171010)
function cm.initial_effect(c)
local e1=rsds.ExtraSummonFun(c,m+6)
local e2=rsef.SV_IMMUNE_EFFECT(c,rsval.imoe,rscon.phbp)
local e3=rsef.QO(c,nil,{m,0},1,nil,nil,LOCATION_MZONE,rscon.phase("bp_o"),nil,rsop.target(aux.FilterBoolFunction(Card.IsPosition,POS_FACEUP_ATTACK),nil,0,LOCATION_MZONE),cm.aop)
--damage calculate
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e4:SetOperation(cm.btop)
c:RegisterEffect(e4)
end
function cm.btop(e,tp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
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())
local def=math.max(0,tc:GetBaseDefense())
--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(tc:GetBaseAttack())
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(tc:GetBaseDefense())
tc:RegisterEffect(e2,true)
end
function cm.aop(e,tp)
local c=aux.ExceptThisCard(e)
if not c then return end
rshint.Select(1-tp,HINTMSG_SELF)
local tg=Duel.SelectMatchingCard(1-tp,Card.IsPosition,1-tp,LOCATION_MZONE,0,1,1,nil,POS_FACEUP_ATTACK)
if #tg<=0 then return end
Duel.HintSelection(tg)
if not tg:GetFirst():IsImmuneToEffect(e) then
Duel.CalculateDamage(tg:GetFirst(),c,true)
end
end
\ No newline at end of file
--吞噬神明的薪王
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171011)
function cm.initial_effect(c)
local e1=rsds.ExtraSummonFun(c,m+3)
local e2=rsef.SV_CANNOT_BE_TARGET(c,"effect",aux.tgoval)
local e3,e4=rsef.SV_INDESTRUCTABLE(c,"battle,effect")
local e5=rsef.I(c,{m,0},1,"rm","tg",LOCATION_MZONE,nil,nil,rstg.target(cm.rmfilter,"rm",rsloc.mg,rsloc.mg),cm.rmop)
--local e6=rsef.FC(c,EVENT_PHASE_START+PHASE_DRAW,nil,nil,"cd",LOCATION_MZONE,cm.copyop)
end
function cm.rmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsSetCard(0xc335)
end
function cm.rmop(e,tp)
local c=rscf.GetFaceUpSelf(e)
local tc=rscf.GetTargetCard()
if not tc then return end
local atk,def=tc:GetAttack(),tc:GetDefense()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then
local e1,e2=rscf.QuickBuff(c,"atk+",atk,"def+",def)
local mt=getmetatable(tc)
cm.reg =Card.RegisterEffect
Card.RegisterEffect = cm.reg2
if mt.initial_effect then
mt.initial_effect(c)
end
Card.RegisterEffect = cm.reg
--Duel.MajesticCopy(c,tc)
--c:RegisterFlagEffect(m,rsreset.est,0,1,tc:GetOriginalCodeRule())
end
end
function cm.reg2(c,e)
if e:IsHasType(EFFECT_TYPE_QUICK_F) then
e:SetType((e:GetType()-EFFECT_TYPE_QUICK_F)|EFFECT_TYPE_QUICK_O)
local flag1,flag2=e:GetProperty()
e:SetProperty(flag1|EFFECT_FLAG_DELAY,flag2)
end
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
e:SetType((e:GetType()-EFFECT_TYPE_TRIGGER_F)|EFFECT_TYPE_TRIGGER_O)
end
e:SetReset(rsreset.est)
if not e:IsActivated() then e:Reset()
else
cm.reg(c,e)
end
end
function cm.copyop(e,tp)
local c=e:GetHandler()
local codelist={c:GetFlagEffectLabel(m)}
for _,code in pairs(codelist) do
local tc=Duel.GetFirstMatchingCard(Card.IsOriginalCodeRule,tp,0xff,0xff,nil,code) or Duel.CreateToken(tp,code)
Duel.MajesticCopy(c,tc)
end
end
--薪王们的化身
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171012)
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=rsef.I(c,{m,0},nil,"se,th",nil,LOCATION_HAND,nil,rsds.cost1,rsop.target2(cm.fun,cm.thfilter,"th",rsloc.dg),cm.thop)
local e2=rsef.QO(c,nil,{m,1},{1,m},nil,nil,LOCATION_MZONE,nil,nil,cm.antg,cm.anop)
local e3=rsef.I(c,{m,2},{1,m+100},"sp",nil,LOCATION_GRAVE,nil,rsds.cost2(2),rsop.target(rscf.spfilter2(),"sp"),cm.spop)
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thfilter(c,e,tp)
return c:IsCode(m-11) and c:IsAbleToHand() and (c:IsLocation(LOCATION_DECK) or Duel.IsPlayerAffectedByEffect(tp,10171024))
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter),tp,rsloc.dg,0,1,1,nil,{},e,tp)
end
function cm.antg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local code=c:GetCode()
getmetatable(c).announce_filter={ 0xc335,OPCODE_ISSETCARD,code,OPCODE_ISCODE,OPCODE_NOT,TYPE_FUSION,OPCODE_ISTYPE,OPCODE_AND,OPCODE_AND }
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(c).announce_filter))
Duel.SetTargetParam(ac)
Duel.Hint(HINT_CARD,0,ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function cm.anop(e,tp)
local c=rscf.GetFaceUpSelf(e)
if not c then return end
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
c:SetHint(CHINT_CARD,ac)
local cid=c:CopyEffect(ac,rsreset.est_pend,1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(rshint.finshcopy)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(rsreset.est_pend)
e1:SetLabel(cid)
e1:SetOperation(cm.rstop)
c:RegisterEffect(e1)
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
Duel.HintSelection(Group.FromCards(c))
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
c:SetHint(CHINT_CARD,0)
end
function cm.spop(e,tp)
local c=aux.ExceptThisCard(e)
if c then rssf.SpecialSummon(c) end
end
function cm.mat_group_check(g)
if not c10171018.checkeffect then return true end
local og=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
return #g<=0 or g:IsExists(Card.IsCode,1,nil,m-11)
end
--艾雷德尔神父
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171013)
function cm.initial_effect(c)
local e1=rsds.TributeFun(c,m,nil,nil,nil,cm.op)
local e2=rsds.SpExtraFun(c,m,m-10,m-6,rscon.excard2(Card.IsSetCard,LOCATION_MZONE,LOCATION_MZONE,1,nil,0xa335))
end
function cm.op(e,tp)
local c=e:GetHandler()
Duel.RegisterFlagEffect(tp,m,rsreset.pend,0,1)
local e1=rsef.FC({c,tp},EVENT_RELEASE)
e1:SetOperation(cm.regop)
e1:SetReset(rsreset.pend)
local e2=rsef.RegisterClone({c,tp},e1,"code",EVENT_REMOVE)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(Card.IsReason,1,nil,REASON_COST) and re:IsHasType(0x7e0) and rp==tp then
Duel.SetChainLimit(cm.chainlm)
end
end
function cm.chainlm(e,rp,tp)
return tp==rp
end
\ No newline at end of file
--沉默骑士 霍拉斯
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171014)
function cm.initial_effect(c)
local e1=rsds.TributeFun(c,m,"sp","tg",rstg.target(rscf.spfilter2(cm.spfilter),"sp",rsloc.gr),cm.spop,true)
local e2=rsds.SpExtraFun(c,m,m-10,m-3)
end
function cm.spfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa335)
end
function cm.spop(e,tp)
local c=rscf.GetTargetCard()
if c then rssf.SpecialSummon(c) end
end
\ No newline at end of file
--法兰老狼
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171015)
function cm.initial_effect(c)
local e1=rsds.TributeFun(c,m,"se,th",nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop,true)
local e2=rsds.SpExtraFun(c,m,m-10,m-6,nil,3)
end
function cm.thfilter(c)
return c:IsSetCard(0xa335) and c:IsType(TYPE_MONSTER) 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
--风暴管束者
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171016)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,nil,"eq","tg",aux.dscon,cm.cost,rstg.target2(cm.fun,Card.IsFaceup,"eq",LOCATION_MZONE),cm.act)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetCondition(cm.atkcon)
e2:SetValue(cm.atkval)
c:RegisterEffect(e2)
local e3=rsef.FC(c,EVENT_BATTLED)
e3:SetOperation(cm.tgop)
local e4=rsds.SpExtraFun(c,m,m-10,m-6)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(cm.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false)
end
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.act(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) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
rsop.eqop(e,c,tc)
else
c:CancelToGrave(false)
end
end
function cm.atkval(e,c)
return c:GetBaseAttack()*2
end
function cm.atkcon(e)
local c=e:GetHandler()
local tc=c:GetEquipTarget()
local res= tc and tc:GetBattleTarget() and tc:GetBattleTarget():IsAttackAbove(tc:GetAttack()) and Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL
if res then
--Duel.Hint(HINT_CARD,0,m)
e:GetHandler():RegisterFlagEffect(m,rsreset.est_pend,0,1)
end
return res
end
function cm.tgop(e,tp)
local c=e:GetHandler()
if c:GetFlagEffect(m)>0 then
Duel.Hint(HINT_CARD,0,m)
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
--深渊之主 马努斯
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171017)
function cm.initial_effect(c)
local e1=rsds.ExtraSummonFun(c,m+2)
local e2=rsef.FTF(c,EVENT_SPSUMMON_SUCCESS,{m,0},nil,"tk,sp",nil,LOCATION_MZONE,cm.tkcon,nil,cm.tktg,cm.tkop)
local e3=rsef.SV_IMMUNE_EFFECT(c,rsval.imoe,rscon.excard2(Card.IsCode,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,10171021))
local e4=rsef.QO(c,nil,{m,2},nil,"atk,def","dcal",LOCATION_MZONE,aux.dscon,rscost.cost(cm.resfilter,"res",LOCATION_ONFIELD),nil,cm.atkop)
--local e3=rsef.QO(c,nil,{m,1},{1,m},"sp",nil,LOCATION_GRAVE,nil,cm.spcost,rstg.target2(cm.fun,cm.spfilter,"sp"),cm.spop)
end
function cm.tkcfilter(c,tp)
return c:GetSummonPlayer()~=tp
end
function cm.tkcon(e,tp,eg)
return eg:IsExists(cm.tkcfilter,1,nil,tp)
end
function cm.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true 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 Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,m+4,0,0x4011,2000,2500,1,RACE_SPELLCASTER,ATTRIBUTE_DARK) then
local token=Duel.CreateToken(tp,m+4)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=rsef.SV_INDESTRUCTABLE({c,token,true},"effect",1,nil,rsreset.est)
local e2,e3=rsef.SV_CANNOT_BE_MATERIAL({c,token,true},"syn,link",1,nil,rsreset.est)
end
end
end
function cm.resfilter(c,e,tp)
return (c:IsCode(m+4) or c:IsSetCard(0xc335)) and c:IsReleasable() and Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.spcost(e,...)
e:SetLabel(100)
return rscost.cost(cm.resfilter,"res",LOCATION_MZONE)(e,...)
end
function cm.fun(g,e,tp)
e:SetLabel(0)
end
function cm.spfilter(c,e,tp)
if not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
return e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.spop(e,tp)
local c=aux.ExceptThisCard(e)
if c then rssf.SpecialSummon(c) end
end
function cm.resfilter(c)
return c:IsReleasable() and c:IsCode(10171021)
end
function cm.atkop(e,tp)
local c=rscf.GetFaceUpSelf(e)
if not c then return end
local e1,e2=rscf.QuickBuff(c,"atk+,def+",500)
end
\ No newline at end of file
--火之传承
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171018)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m},"sp",nil,nil,nil,rsop.target(rscf.spfilter2(Card.IsCode,m-16),"sp",rsloc.hdg),cm.act)
local e2=aux.AddRitualProcGreater2(c,aux.FilterBoolFunction(Card.IsCode,m-6),LOCATION_HAND+LOCATION_GRAVE,aux.TRUE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.rit(e2:GetTarget()))
e2:SetOperation(cm.rit(e2:GetOperation()))
end
function cm.thfilter(c)
return c:IsCode(m-16) and c:IsAbleToHand()
end
function cm.act(e,tp)
rsop.SelectSpecialSummon(tp,aux.NecroValleyFilter(rscf.spfilter2(Card.IsCode,m-16)),tp,rsloc.hdg,0,1,1,nil,{},e,tp)
end
function cm.gfilter(tp,g,c)
local og=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
if #og>0 and not g:IsExists(Card.IsCode,1,nil,m-17) then return false end
return true
end
function cm.rit(op)
return function(...)
aux.RCheckAdditional=cm.gfilter
local res=op(...)
aux.RCheckAdditional=nil
return res
end
end
--火之终结
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171019)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m},"td",nil,nil,nil,rsop.target(cm.tdfilter,"td",rsloc.de),cm.act)
local e2=rsef.QO(c,nil,{m,0},{1,m},"sp,dam",nil,LOCATION_GRAVE,nil,aux.bfgcost,rsop.target2(cm.fun,cm.rmfilter,"rm",rsloc.mg,0,true),cm.damop)
end
function cm.tdfilter(c)
return c:IsCode(m-18) or (c:IsType(TYPE_MONSTER) and c:IsSetCard(0xc335)) and c:IsAbleToGrave()
end
function cm.act(e,tp)
rsop.SelectToGrave(tp,cm.tdfilter,tp,rsloc.de,0,1,3,nil,{})
end
function cm.rmfilter(c)
return c:IsFaceup() and (c:IsCode(m-18) or c:IsSetCard(0xc335)) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.fun(g,e,tp)
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,rsloc.mg,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,#g*400)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_EXTRA)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(m-2) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.damop(e,tp)
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,rsloc.mg,0,nil)
if #g<=0 then return end
local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if ct>0 and Duel.Damage(1-tp,ct*400,REASON_EFFECT)>0 and ct>=3 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
rsop.SelectSpecialSummon(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,{},e,tp)
end
end
--初火之炉
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171020)
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.I(c,{m,0},{1,m},"se,th",nil,LOCATION_FZONE,nil,rsds.cost2(1),rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
--remove
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(m)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsCode(m-2,m-1) and c:IsAbleToHand()
end
function cm.thop(e,tp)
if aux.ExceptThisCard(e) then
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
end
--分担诅咒的薪王
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171022)
function cm.initial_effect(c)
rscf.SetSummonCondition(c,false,cm.sumval)
aux.AddFusionProcCodeFun(c,10171002,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa335),1,false,false)
local e1=aux.AddContactFusionProcedure(c,cm.resfilter,LOCATION_ONFIELD,0,Duel.Release,REASON_COST+REASON_MATERIAL+REASON_FUSION)
e1:SetValue(SUMMON_VALUE_SELF)
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},nil,"se,th","de,dsp",cm.thcon,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e3=rsef.FTO(c,EVENT_PHASE+PHASE_END,{m,1},1,"atk,des",nil,LOCATION_MZONE,nil,nil,cm.atktg,cm.atkop)
end
function cm.resfilter(c)
return c:IsReleasable() and (c:IsFusionCode(10171002) or c:IsFusionSetCard(0xa335) and c:IsType(TYPE_MONSTER))
end
function cm.sumval(e,se)
return se and se:GetHandler():IsCode(m+1)
end
function cm.thcon(e,tp)
return e:GetHandler():IsSummonType(SUMMON_VALUE_SELF)
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.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,1-tp,LOCATION_ONFIELD)
end
function cm.eqfilter(c)
return c:IsCode(m+1) and c:IsFaceup()
end
function cm.atkop(e,tp)
local c=rscf.GetFaceUpSelf(e)
if not c then return end
local e1,e2=rscf.QuickBuff(c,"atk+,def+",500)
if not c:IsImmuneToEffect(e1) and c:GetEquipGroup():FilterCount(cm.eqfilter,nil)>0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
rsop.SelectDestroy(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil,{})
end
end
\ No newline at end of file
--背弃王座的薪王
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171023)
function cm.initial_effect(c)
local e1=rsds.TributeFun(c,m,"tg",nil,rsop.target(cm.tgfilter,"tg",LOCATION_DECK),cm.tgop,true)
local e2=rsef.QO(c,nil,{m,1},{1,m+500},"sp,eq,lg","tg",LOCATION_GRAVE,nil,rscost.cost(cm.cfilter,"rm",LOCATION_GRAVE),rstg.target2(cm.fun,cm.spfilter,"sp",LOCATION_GRAVE),cm.spop)
end
function cm.tgfilter(c)
return c:IsAbleToGrave() and (c:IsSetCard(0xa335) or c:IsCode(10171001))
end
function cm.gcheck(g)
return g:FilterCount(Card.IsSetCard,nil,0xa335)<=1 and g:FilterCount(Card.IsCode,nil,10171001)<=1
end
function cm.tgop(e,tp)
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil)
if #g<=0 then return end
rshint.Select(tp,"tg")
local tg=g:SelectSubGroup(tp,cm.gcheck,false,1,2)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
function cm.cfilter(c)
return c:IsCode(10171002) and c:IsAbleToRemoveAsCost()
end
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.spfilter(c,e,tp)
return c:IsCode(m-1) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function cm.spop(e,tp)
local c,tc=aux.ExceptThisCard(e),rscf.GetTargetCard()
if not tc or Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)<=0 or not c or not rsop.eqop(e,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(rsval.imoe)
e1:SetReset(rsreset.est)
tc:RegisterEffect(e1)
end
\ No newline at end of file
--凝练灵魂的薪王
Duel.LoadScript("c10171001.lua")
local m,cm=rscf.DefineCard(10171024)
function cm.initial_effect(c)
c:EnableReviveLimit()
--aux.AddFusionProcCode2(c,10171001,10171008,true,true)
local e1=rscf.SetSummonCondition(c,false)
local e2=rscf.SetSpecialSummonProduce(c,LOCATION_EXTRA,cm.sprcon)
e2:SetTarget(cm.sprtg)
local e3=rsef.SV_ADD(c,"code",10171001)
local e4=rsef.FC(c,EVENT_ADJUST)
e4:SetOperation(cm.copyop)
e4:SetRange(LOCATION_MZONE)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(m)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(1,0)
c:RegisterEffect(e5)
local e6=rsef.FTO(c,EVENT_PHASE+PHASE_END,{m,0},1,"td",nil,LOCATION_MZONE,nil,nil,rsop.target(Card.IsAbleToDeck,"td",LOCATION_REMOVED,0),cm.tdop)
end
function cm.resfilter(c,fc,e,tp)
return c:IsCode(10171008) and Duel.IsExistingMatchingCard(cm.tdfilter,tp,rsloc.hmg,0,1,c,c,fc,e,tp)
end
function cm.tdfilter(c,rc,fc,e,tp)
return c:IsAbleToDeckAsCost() and c:IsCode(10171001) and Duel.GetLocationCountFromEx(tp,tp,rsgf.Mix2(c,rc),fc)>0
end
function cm.sprcon(e,c,tp)
local g1=Duel.GetReleaseGroup(tp)
return g1:IsExists(cm.resfilter,1,nil,c,e,tp)
end
function cm.sprtg(e,tp,eg)
local c=e:GetHandler()
local mg=Group.CreateGroup()
local g1=Duel.GetReleaseGroup(tp):Filter(cm.resfilter,nil,c,e,tp)
rshint.Select(tp,"res")
local tc1=g1:SelectUnselect(mg,tp,false,true,1,1)
if not tc1 then return false end
mg:AddCard(tc1)
local g2=Duel.GetMatchingGroup(cm.tdfilter,tp,rsloc.hmg,0,mg,tc,c,e,tp)
rshint.Select(tp,"td")
local tc2=g2:SelectUnselect(mg,tp,false,false,1,1)
if not tc2 then return false end
e:SetOperation(cm.sprop(tc1,tc2))
return true
end
function cm.sprop(tc1,tc2)
return function(e,tp)
Duel.Release(tc1,REASON_COST)
if tc2:IsLocation(LOCATION_HAND+LOCATION_GRAVE) or tc2:IsFacedown() then
Duel.ConfirmCards(1-tp,tc2)
end
Duel.SendtoDeck(tc2,nil,2,REASON_COST)
end
end
function cm.copyop(e,tp)
local c=e:GetHandler()
if c:GetFlagEffect(m)>0 or not c:IsLocation(LOCATION_MZONE) then return end
c:RegisterFlagEffect(m,rsreset.est_d,0,1)
c:CopyEffect(10171001,rsreset.est,1)
end
function cm.tdop(e,tp)
rsop.SelectToDeck(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,1,3,nil,{})
end
\ No newline at end of file
--D4C
function c111004.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c111004.tg)
e1:SetCost(c111004.cost)
e1:SetOperation(c111004.op)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
c:RegisterEffect(e2)
end
function c111004.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetTurnPlayer()~=tp end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
end
function c111004.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(1-tp,LOCATION_MZONE) end
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
e:SetLabelObject(g)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0)
end
function c111004.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
local a=Duel.CreateToken(tp,111005)
Duel.SpecialSummonStep(a,0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(tc:GetBaseAttack())
a:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(tc:GetBaseDefense())
a:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_CODE)
e3:SetValue(tc:GetOriginalCode())
a:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e4:SetValue(tc:GetOriginalAttribute())
a:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CHANGE_RACE)
e5:SetValue(tc:GetOriginalRace())
a:RegisterEffect(e5)
if tc:IsType(TYPE_XYZ) or tc:IsType(TYPE_LINK) then
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(1)
a:RegisterEffect(e6)
else
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(tc:GetOriginalLevel())
a:RegisterEffect(e6)
end
--Destroy
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_PHASE+PHASE_END)
e7:SetRange(LOCATION_ONFIELD)
e7:SetOperation(c111004.deop)
a:RegisterEffect(e7)
a:CopyEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD,1)
Duel.SpecialSummonComplete()
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_TODECK)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetLabel(a:GetCode())
e2:SetLabelObject(a)
e2:SetTarget(c111004.datg)
e2:SetOperation(c111004.daop)
c:RegisterEffect(e2)
end
function c111004.deop(e,tp,eg,ep,ev,re,r,rp)
local x=e:GetHandler():GetCode()
local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetCode())
Duel.SendtoDeck(g,nil,2,REASON_EFFECT+REASON_RULE)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c111004.xfil(c,x)
return c:IsCode(x)
end
function c111004.datg(e,tp,eg,ep,ev,re,r,rp,chk)
local a=e:GetLabel()
local x=e:GetLabelObject()
if chk==0 then return eg:IsContains(x) and Duel.IsExistingMatchingCard(Card.IsCode,tp,0,LOCATION_MZONE,1,nil,a) end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,nil)
end
function c111004.daop(e,tp,eg,ep,ev,re,r,rp)
local a=e:GetLabel()
local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_MZONE,nil,a)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT+REASON_RULE)
local atk=g:GetSum(Card.GetAttack)
local def=g:GetSum(Card.GetDefense)
Duel.Damage(1-tp,atk+def,REASON_EFFECT)
end
local m=111102
local cm=_G["c"..m]
cm.name="投蛙问路"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
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.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.cfilter(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_SEASERPENT) and c:IsType(TYPE_XYZ) and c:IsRank(4) and c:CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_AQUA) and c:IsType(TYPE_XYZ) and c:IsRank(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) and Duel.GetLocationCountFromEx(1-tp,tp,nil,c)>=1 and Duel.GetMatchingGroupCount(cm.mmfilter,1-tp,LOCATION_MZONE,0,nil)<5
end
function cm.mmfilter(c)
return c:GetSequence()<5
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM)
local c=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
c:RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
-- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ZONE)
-- local zone=Duel.SelectField(tp,1,0,LOCATION_MZONE,nil)
if Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)~=0 then
local seq=tc:GetSequence()
local ag=Duel.GetMatchingGroup(cm.seqfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,tc,tp,seq)
if ag:GetCount()~=0 then Duel.Destroy(ag,REASON_EFFECT) end
end
end
function cm.seqfilter(c,tp,seq)
local loc=LOCATION_MZONE
if seq>8 then
loc=LOCATION_SZONE
seq=seq-8
end
local cseq=c:GetSequence()
-- if tp==c:GetControler() then cseq=cseq>>16 end
if tp==c:GetControler() and (cseq==5 and seq==3 or cseq==6 and seq==1) then return true end
local cloc=c:GetLocation()
if cloc==LOCATION_SZONE and cseq>=5 then return false end
if cloc==LOCATION_MZONE and cseq>=5 and loc==LOCATION_MZONE and tp~=c:GetControler()
and (seq==1 and cseq==5 or seq==3 and cseq==6) then return true end
return cseq==seq or cloc==loc and math.abs(cseq-seq)==1 and tp~=c:GetControler()
end
\ No newline at end of file
--爱国者&霜星
function c112004.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,112004)
e1:SetTarget(c112004.target)
e1:SetOperation(c112004.operation)
c:RegisterEffect(e1)
end
function c112004.thfilter(c)
return c:IsSetCard(0xca7,0xca8) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c112004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c112004.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c112004.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c112004.thfilter,tp,LOCATION_DECK,0,1,2,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:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c112004.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c112004.splimit(e,c)
return c:GetType()&TYPE_NORMAL==0
end
--崇高的背叛-爱国者
function c112005.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(1,0)
e2:SetTarget(c112005.splimit)
c:RegisterEffect(e2)
end
function c112005.splimit(e,c,tp,sumtp,sumpos)
return not c:IsType(TYPE_NORMAL) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
--令人敬佩的指挥官-浮士德
function c112006.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,112006)
e1:SetCost(c112006.cost)
e1:SetTarget(c112006.target)
e1:SetOperation(c112006.operation)
c:RegisterEffect(e1)
end
function c112006.cfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsDiscardable()
end
function c112006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c112006.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c112006.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c112006.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c112006.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--令人敬佩的觉悟-梅菲斯特
function c112007.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--recover
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_PZONE)
e1:SetOperation(c112007.operation)
c:RegisterEffect(e1)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,112007)
e1:SetCost(c112007.cost)
e1:SetTarget(c112007.tg)
e1:SetOperation(c112007.op)
c:RegisterEffect(e1)
end
function c112007.operation(e,tp,eg,ep,ev,re,r,rp)
if ep==tp then return end
Duel.Recover(tp,500,REASON_EFFECT)
end
function c112007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
local lp=Duel.GetLP(tp)
local t={}
local f=math.floor((lp)/1000)
local l=1
while l<=f and l<=20 do
t[l]=l*1000
l=l+1
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(17078030,0))
local announce=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,announce)
e:SetLabel(announce)
e:GetHandler():SetHint(CHINT_NUMBER,announce)
end
function c112007.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,0,1,nil,TYPE_NORMAL) end
end
function c112007.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_MZONE,0,1,1,nil,TYPE_NORMAL):GetFirst()
local x=e:GetLabel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(x/2)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
end
--固执的战士-霜星
function c112008.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(8873112,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_PZONE)
e3:SetCondition(c112008.spcon2)
e3:SetTarget(c112008.sptg2)
e3:SetOperation(c112008.spop)
c:RegisterEffect(e3)
end
function c112008.cfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsSetCard(0xca8)
end
function c112008.spcon2(e,tp,eg,ep,ev,re,r,rp)
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc+tg:FilterCount(c112008.cfilter,nil,tp)-tg:GetCount()>0
end
function c112008.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c112008.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.NegateEffect(ev)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--ACE
function c112009.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_NORMAL))
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCondition(c112009.con)
e2:SetTarget(c112009.tg)
e2:SetOperation(c112009.op)
c:RegisterEffect(e2)
end
function c112009.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and (Duel.GetAttackTarget()==nil or (Duel.GetAttackTarget():IsFaceup() and Duel.GetAttackTarget():IsType(TYPE_NORMAL)))
end
function c112009.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c112009.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) then
local g,atk=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(atk/2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
--萨卡兹王女-特蕾西娅
function c112010.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetDescription(aux.Stringid(112010,0))
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,112010)
e1:SetCost(c112010.cost)
e1:SetOperation(c112010.op)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetDescription(aux.Stringid(112010,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,112910+EFFECT_COUNT_CODE_DUEL)
e2:SetCost(c112010.thcost)
e2:SetTarget(c112010.thtg)
e2:SetOperation(c112010.thop)
c:RegisterEffect(e2)
end
function c112010.cfil(c)
return c:IsType(TYPE_NORMAL) and c:IsDiscardable()
end
function c112010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c112010.cfil,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,0,1,nil,TYPE_NORMAL) end
local g=Duel.SelectMatchingCard(tp,c112010.cfil,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c112010.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,0,nil,TYPE_NORMAL)
local atk=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,nil,TYPE_NORMAL)*200
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function c112010.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c112010.thfil(c)
return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(6) and c:IsAbleToHand()
end
function c112010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c112010.thfil,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c112010.thfil,tp,LOCATION_DECK,0,1,2,nil)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c112010.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c112010.splimit1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c112010.splimit1(e,c,tp,sumtp,sumpos)
return c:GetType()&TYPE_NORMAL==0
end
--霜星-冬痕
function c112011.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,112011)
e1:SetCost(c112011.cost)
e1:SetTarget(c112011.tg)
e1:SetOperation(c112011.op)
c:RegisterEffect(e1)
end
function c112011.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.CheckLPCost(tp,2000) end
Duel.PayLPCost(tp,2000)
end
function c112011.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(6) and c:IsSetCard(0xca8)
end
function c112011.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c112011.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c112011.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c112011.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c112011.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c112011.splimit1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c112011.splimit1(e,c,tp,sumtp,sumpos)
return c:GetType()&TYPE_NORMAL==0
end
--爱国者-毁灭模式&霜星-冬痕
function c112012.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SpecialSummon 1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetDescription(aux.Stringid(112012,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetRange(LOCATION_PZONE)
e1:SetCost(c112012.spcost)
e1:SetTarget(c112012.sptg)
e1:SetOperation(c112012.spop)
c:RegisterEffect(e1)
--SpecialSummon 2
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetDescription(aux.Stringid(112012,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,112012)
e2:SetCost(c112012.thcost)
e2:SetTarget(c112012.thtg)
e2:SetOperation(c112012.thop)
c:RegisterEffect(e2)
end
function c112012.spcost(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetLabel(100,0)
local c=e:GetHandler()
local lp=Duel.GetLP(tp)
if chk==0 then return Duel.CheckLPCost(tp,lp-1,true) end
e:SetLabel(100,lp-1)
Duel.PayLPCost(tp,lp-1,true)
end
function c112012.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local label,atk=e:GetLabel()
if chk==0 then
e:SetLabel(0,0)
if label~=100 then return false end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end
e:SetLabel(0,0)
Duel.SetTargetParam(atk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c112012.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,false,false,POS_FACEUP)
local atk=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e2)
end
function c112012.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c112012.thfil(c,e,tp)
return (c:IsSetCard(0xca8) or c:IsSetCard(0xca7)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c112012.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c112012.thfil,tp,LOCATION_DECK,0,1,nil,e,tp) end
local g=Duel.SelectMatchingCard(tp,c112012.thfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE,e,tp)
end
function c112012.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c112012.splimit1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c112012.splimit1(e,c,tp,sumtp,sumpos)
return not c:IsType(TYPE_NORMAL)
end
--小驴子交响曲
function c112311.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c112311.con)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_NORMAL))
e2:SetValue(500)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_NORMAL))
e3:SetValue(1)
c:RegisterEffect(e3)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(112311,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,112311)
e2:SetTarget(c112311.sptg2)
e2:SetOperation(c112311.spop2)
c:RegisterEffect(e2)
end
function c112311.hfil(c)
return not c:IsType(TYPE_NORMAL)
end
function c112311.con(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c112311.hfil,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,0,1,nil,TYPE_NORMAL)
end
function c112311.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end
function c112311.spfilter1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_NORMAL)
end
function c112311.spfilter2(c,e,tp)
return c:IsAbleToHand() and c:IsType(TYPE_NORMAL)
end
function c112311.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=4 then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
local ct=g:GetCount()
if ct>0 and ((Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:FilterCount(c112311.spfilter1,nil,e,tp)>0) or (g:FilterCount(c112311.spfilter2,nil,e,tp)>0))
and Duel.SelectYesNo(tp,aux.Stringid(112311,2)) then
local op=0
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:FilterCount(c112311.spfilter1,nil,e,tp)>0
local b2=g:FilterCount(c112311.spfilter2,nil,e,tp)>0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(112311,0),aux.Stringid(112311,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(112311,1))
else
op=Duel.SelectOption(tp,aux.Stringid(112311,0))
end
Duel.DisableShuffleCheck()
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:FilterSelect(tp,c112311.spfilter1,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g:FilterSelect(tp,c112311.spfilter2,1,1,nil,e,tp)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
local m=112312
local cm=_G["c"..m]
cm.name="傲慢的赌徒&疯子的国王 Solomon"
function cm.initial_effect(c)
c:EnableCounterPermit(0xca6)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.sprcon)
e1:SetOperation(cm.sprop)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetValue(cm.atkval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e3)
--counter
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetCondition(cm.ctcon)
e4:SetOperation(cm.ctop)
c:RegisterEffect(e4)
--end!
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetCountLimit(1)
e5:SetTarget(cm.tg)
c:RegisterEffect(e5)
end
cm.toss_dice=true
function cm.sprcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
--cannot release
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(cm.fuslimit)
e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
local e6=e4:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
end
function cm.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
function cm.atkval(e,c)
return Duel.GetCounter(c:GetControler(),LOCATION_ONFIELD,0,0xca6)*80
end
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
return not re:GetHandler():IsCode(112312)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local dc=Duel.TossDice(tp,1)
e:GetHandler():AddCounter(0xca6,dc)
end
function cm.IsOuNumber(num)
local num1,num2=math.modf(num/2)
if(num2==0)then
return true
else
return false
end
end
function cm.ct1filter(c,e,tp)
return c:IsCode(112312) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=e:GetHandler():GetCounter(0xca6)
if ct~=0 then e:GetHandler():RemoveCounter(tp,0xca6,ct,REASON_EFFECT) end
local x=0
if ct==0 then x=1 end
if ct~=0 and cm.IsOuNumber(ct) then x=3 end
if ct~=0 and not cm.IsOuNumber(ct) then x=2 end
if ct>=66 then x=4 end
if ct>=66 and cm.IsOuNumber(ct) and (Duel.GetFlagEffect(tp,114312)~=0 or Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))==0) then x=3 end
if ct>=66 and not cm.IsOuNumber(ct) and (Duel.GetFlagEffect(tp,114312)~=0 or Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,2))==0) then x=2 end
if x==1 and Duel.GetFlagEffect(tp,111312)==0 then
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e:SetOperation(cm.aop)
Duel.RegisterFlagEffect(tp,111312,RESET_PHASE+PHASE_STANDBY,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end
if x==2 and Duel.GetFlagEffect(tp,112312)==0 then
e:SetCategory(CATEGORY_DESTROY)
e:SetOperation(cm.bop)
Duel.RegisterFlagEffect(tp,112312,RESET_PHASE+PHASE_STANDBY,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,tp,LOCATION_ONFIELD)
end
if x==3 and Duel.GetFlagEffect(tp,113312)==0 then
e:SetCategory(CATEGORY_DESTROY)
e:SetOperation(cm.cop)
Duel.RegisterFlagEffect(tp,113312,RESET_PHASE+PHASE_STANDBY,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,1-tp,LOCATION_MZONE)
end
if x==4 and Duel.GetFlagEffect(tp,114312)==0 then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e:SetOperation(cm.dop)
Duel.RegisterFlagEffect(tp,114312,RESET_PHASE+PHASE_STANDBY,0,1)
end
end
function cm.aop(e,tp,eg,ep,ev,re,r,rp)
local ag=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,e:GetHandler())
Duel.SendtoGrave(ag,REASON_EFFECT)
local ct=Duel.GetFirstMatchingCard(cm.ct1filter,tp,LOCATION_DECK,0,nil,e,tp)
if ct and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.SpecialSummon(ct,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(cm.imlimit)
e1:SetValue(cm.efilter)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function cm.imlimit(e,c)
return c:IsFaceup() and c:IsCode(112312)
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.bop(e,tp,eg,ep,ev,re,r,rp)
local bg=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_ONFIELD,0,nil,112312)
local ag=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,bg)
Duel.Destroy(ag,REASON_EFFECT)
end
function cm.cop(e,tp,eg,ep,ev,re,r,rp)
local ag=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_MONSTER)
Duel.Destroy(ag,REASON_EFFECT)
end
function cm.wfilter(c)
return (c:GetType()==TYPE_SPELL or c:GetType()==TYPE_TRAP) and c:IsAbleToHand()
end
function cm.dop(e,tp,eg,ep,ev,re,r,rp)
local ag=Duel.GetMatchingGroup(cm.wfilter,tp,LOCATION_DECK,0,nil)
if ag:GetCount()~=0 then
local bg=ag:Select(tp,1,1,nil)
Duel.SendtoHand(bg,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--霜星 向日葵
local m=112313
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
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+REASON_DISCARD)
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,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spfilter(c,e,tp)
return c:IsCode(112003) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsSetCard(0xca7,0xca8) and c:IsLocation(LOCATION_EXTRA)
end
--霜星 春意
local m=112314
local cm=_G["c"..m]
function cm.initial_effect(c)
--summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SUMMON_PROC)
e5:SetRange(LOCATION_HAND)
e5:SetCondition(cm.ntcon)
c:RegisterEffect(e5)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(cm.eftg)
e3:SetValue(2000)
c:RegisterEffect(e3)
--effect gain
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.eftg)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--become effect monster
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(cm.eftg)
e3:SetValue(TYPE_EFFECT)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_REMOVE_TYPE)
e4:SetValue(TYPE_NORMAL)
c:RegisterEffect(e4)
end
function cm.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5)
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.eftg(e,c)
return c:IsCode(112003)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xca8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then Duel.SpecialSummon(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP)
end
end
--霜星 凛冽的冬日
local m=112315
local cm=_G["c"..m]
function cm.initial_effect(c)
--summon with no tribute
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(cm.ntcon)
c:RegisterEffect(e0)
--effect gain
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.descost)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.eftg)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--become effect monster
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(cm.eftg)
e3:SetValue(TYPE_EFFECT)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_REMOVE_TYPE)
e4:SetValue(TYPE_NORMAL)
c:RegisterEffect(e4)
end
function cm.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.eftg(e,c)
return c:IsCode(112003)
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 and Duel.CheckReleaseGroup(REASON_COST,tp,nil,1,e:GetHandler()) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,nil,1,1,e:GetHandler())
Duel.Release(g,REASON_COST)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--
function c112316.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,012316)
e1:SetOperation(c112316.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(112316,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,112316)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(c112316.cost)
e2:SetTarget(c112316.target)
e2:SetOperation(c112316.operation)
c:RegisterEffect(e2)
end
function c112316.thfilter(c)
return c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x0ca8) or c:IsSetCard(0x0ca7)) and c:IsAbleToHand()
end
function c112316.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c112316.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(112316,0)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c112316.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+REASON_DISCARD)
end
function c112316.filter(c,e,sp)
return (c:IsSetCard(0x0ca8) or c:IsSetCard(0x0ca7)) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) and c:IsLevelBelow(6)
end
function c112316.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c112316.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c112316.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c112316.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c112316.splimit)
Duel.RegisterEffect(e1,tp)
end
end
function c112316.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x0ca8) and not c:IsSetCard(0x0ca7) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--三首恶龙
function c113000.initial_effect(c)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,113000)
e1:SetCost(c113000.spcost)
e1:SetTarget(c113000.sptg)
e1:SetOperation(c113000.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,013000)
e2:SetTarget(c113000.thtg)
e2:SetOperation(c113000.thop)
c:RegisterEffect(e2)
--to tand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetCountLimit(1)
e3:SetTarget(c113000.thtg1)
e3:SetOperation(c113000.thop1)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(113000,ACTIVITY_SPSUMMON,c113000.counterfilter)
end
function c113000.counterfilter(c)
return c:GetAttack()==2300 and c:GetDefense()==2800
end
function c113000.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(113000,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c113000.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c113000.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:GetAttack()==2300 and c:GetDefense()==2800)
end
function c113000.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c113000.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,true,POS_FACEUP)
end
function c113000.thfil(c)
return c:IsAbleToHand() and c:IsAttack(2300) and c:IsDefense(2800) and c:IsLevel(7) and c:IsType(TYPE_TUNER) and not c:IsCode(113000)
end
function c113000.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c113000.thfil,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c113000.thfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_DECK)
end
function c113000.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
function c113000.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_MZONE)
end
function c113000.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
--大地の化身
function c113001.initial_effect(c)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,113001)
e1:SetCost(c113001.spcost)
e1:SetTarget(c113001.sptg)
e1:SetOperation(c113001.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,013001)
e2:SetTarget(c113001.atktg)
e2:SetOperation(c113001.atkop)
c:RegisterEffect(e2)
--to tand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetCountLimit(1)
e3:SetTarget(c113001.thtg1)
e3:SetOperation(c113001.thop1)
c:RegisterEffect(e3)
end
function c113001.counterfilter(c)
Duel.AddCustomActivityCounter(113001,ACTIVITY_SPSUMMON,c113001.counterfilter)
end
function c113001.counterfilter(c)
return c:GetAttack()==2300 and c:GetDefense()==2800
end
function c113001.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(113001,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c113001.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c113001.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:GetAttack()==2300 and c:GetDefense()==2800)
end
function c113001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c113001.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,true,POS_FACEUP)
end
function c113001.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_MZONE)
end
function c113001.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c113001.ckfil1(c)
return not c:IsAttribute(ATTRIBUTE_FIRE)
end
function c113001.ckfil2(c)
return c:IsAttribute(ATTRIBUTE_FIRE)
end
function c113001.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c113001.ckfil1,tp,0,LOCATION_MZONE,1,nil) or Duel.IsExistingMatchingCard(c113001.ckfil2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function c113001.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ag1=Duel.GetMatchingGroup(c113001.ckfil1,tp,0,LOCATION_MZONE,nil)
local ag2=Duel.GetMatchingGroup(c113001.ckfil2,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc1=ag1:GetFirst()
while tc1 do
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-700)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc1:RegisterEffect(e2)
tc1=ag1:GetNext()
end
local tc2=ag2:GetFirst()
while tc2 do
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc2:RegisterEffect(e1)
tc2=ag2:GetNext()
end
end
--时拉比
function c113002.initial_effect(c)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,113002)
e1:SetCost(c113002.spcost)
e1:SetTarget(c113002.sptg)
e1:SetOperation(c113002.spop)
c:RegisterEffect(e1)
--to tand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetCountLimit(1)
e3:SetTarget(c113002.thtg1)
e3:SetOperation(c113002.thop1)
c:RegisterEffect(e3)
--synchro effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(113002,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c113002.sccon)
e2:SetTarget(c113002.sctarg)
e2:SetOperation(c113002.scop)
c:RegisterEffect(e2)
end
function c113002.counterfilter(c)
Duel.AddCustomActivityCounter(113002,ACTIVITY_SPSUMMON,c113002.counterfilter)
end
function c113002.counterfilter(c)
return c:GetAttack()==2300 and c:GetDefense()==2800
end
function c113002.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(113002,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c113002.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c113002.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:GetAttack()==2300 and c:GetDefense()==2800)
end
function c113002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c113002.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,true,POS_FACEUP)
end
function c113002.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_MZONE)
end
function c113002.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c113002.sccon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c113002.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(113002)==0
and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,c) end
c:RegisterFlagEffect(113002,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c113002.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
--海洋与大地の调停者
function c113003.initial_effect(c)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,113003)
e1:SetCost(c113003.spcost)
e1:SetTarget(c113003.sptg)
e1:SetOperation(c113003.spop)
c:RegisterEffect(e1)
--to tand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetCountLimit(1)
e3:SetTarget(c113003.thtg1)
e3:SetOperation(c113003.thop1)
c:RegisterEffect(e3)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,013003)
e2:SetCost(c113003.thcost)
e2:SetTarget(c113003.thtg)
e2:SetOperation(c113003.thop)
c:RegisterEffect(e2)
end
function c113003.counterfilter(c)
Duel.AddCustomActivityCounter(113003,ACTIVITY_SPSUMMON,c113003.counterfilter)
end
function c113003.counterfilter(c)
return c:GetAttack()==2300 and c:GetDefense()==2800
end
function c113003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(113003,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c113003.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c113003.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:GetAttack()==2300 and c:GetDefense()==2800)
end
function c113003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c113003.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,true,POS_FACEUP)
end
function c113003.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_MZONE)
end
function c113003.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c113003.thfil(c)
return c:IsAbleToHand() and c:IsAttack(2300) and c:IsDefense(2800) and c:IsLevel(7) and c:IsType(TYPE_TUNER)
end
function c113003.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
local tc=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
e:SetLabelObject(tc)
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end
function c113003.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local xc=e:GetLabelObject()
if chk==0 then return Duel.IsExistingMatchingCard(c113003.thfil,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c113003.thfil,tp,LOCATION_GRAVE,0,1,1,xc)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_DECK)
local xg=Duel.GetFieldGroup(tp,LOCATION_FZONE,LOCATION_FZONE)
if xg:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,xg,1,0,0)
end
end
function c113003.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
local xg=Duel.GetFieldGroup(tp,LOCATION_FZONE,LOCATION_FZONE)
if xg:GetCount()>0 then
Duel.Destroy(xg,REASON_EFFECT)
end
end
--海洋の化身
function c113004.initial_effect(c)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,113004)
e1:SetCost(c113004.spcost)
e1:SetTarget(c113004.sptg)
e1:SetOperation(c113004.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,013004)
e2:SetTarget(c113004.atktg)
e2:SetOperation(c113004.atkop)
c:RegisterEffect(e2)
--to tand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetCountLimit(1)
e3:SetTarget(c113004.thtg1)
e3:SetOperation(c113004.thop1)
c:RegisterEffect(e3)
end
function c113004.counterfilter(c)
Duel.AddCustomActivityCounter(113004,ACTIVITY_SPSUMMON,c113004.counterfilter)
end
function c113004.counterfilter(c)
return c:GetAttack()==2300 and c:GetDefense()==2800
end
function c113004.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(113004,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c113004.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c113004.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:GetAttack()==2300 and c:GetDefense()==2800)
end
function c113004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c113004.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,true,POS_FACEUP)
end
function c113004.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_MZONE)
end
function c113004.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c113004.ckfil1(c)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
function c113004.ckfil2(c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
function c113004.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c113004.ckfil1,tp,0,LOCATION_MZONE,1,nil) or Duel.IsExistingMatchingCard(c113004.ckfil2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function c113004.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ag1=Duel.GetMatchingGroup(c113004.ckfil1,tp,0,LOCATION_MZONE,nil)
local ag2=Duel.GetMatchingGroup(c113004.ckfil2,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc1=ag1:GetFirst()
while tc1 do
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-700)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc1:RegisterEffect(e2)
tc1=ag1:GetNext()
end
local tc2=ag2:GetFirst()
while tc2 do
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc2:RegisterEffect(e1)
tc2=ag2:GetNext()
end
end
--雷吉艾斯
function c113005.initial_effect(c)
c:SetSPSummonOnce(113005)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,113005)
e1:SetCost(c113005.spcost)
e1:SetTarget(c113005.sptg)
e1:SetOperation(c113005.spop)
c:RegisterEffect(e1)
--to tand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetCountLimit(1)
e3:SetTarget(c113005.thtg1)
e3:SetOperation(c113005.thop1)
c:RegisterEffect(e3)
--sp
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,013005)
e2:SetCondition(c113005.sccon)
e2:SetTarget(c113005.sctarg)
e2:SetOperation(c113005.scop)
c:RegisterEffect(e2)
end
function c113005.counterfilter(c)
Duel.AddCustomActivityCounter(113005,ACTIVITY_SPSUMMON,c113005.counterfilter)
end
function c113005.counterfilter(c)
return c:GetAttack()==2300 and c:GetDefense()==2800
end
function c113005.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(113005,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c113005.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c113005.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:GetAttack()==2300 and c:GetDefense()==2800)
end
function c113005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c113005.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,true,POS_FACEUP)
end
function c113005.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_MZONE)
end
function c113005.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c113005.sccon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c113005.xfil(c)
return c:IsAbleToDeck() and c:IsAttack(2300) and c:IsDefense(2800) and c:IsLevel(7) and c:IsType(TYPE_TUNER)
end
function c113005.spfil(c,e,tp)
return c:IsCode(113006,113007) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c113005.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c113005.xfil,tp,LOCATION_MZONE,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(c113005.spfil,tp,LOCATION_DECK,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c113005.xfil,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c113005.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then
local sc=Duel.SelectMatchingCard(tp,c113005.spfil,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummonStep(sc,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
--雷击洛克
function c113006.initial_effect(c)
c:SetSPSummonOnce(113006)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,113006)
e1:SetCost(c113006.spcost)
e1:SetTarget(c113006.sptg)
e1:SetOperation(c113006.spop)
c:RegisterEffect(e1)
--to tand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetCountLimit(1)
e3:SetTarget(c113006.thtg1)
e3:SetOperation(c113006.thop1)
c:RegisterEffect(e3)
--sp
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,013006)
e2:SetCondition(c113006.sccon)
e2:SetTarget(c113006.sctarg)
e2:SetOperation(c113006.scop)
c:RegisterEffect(e2)
end
function c113006.counterfilter(c)
Duel.AddCustomActivityCounter(113006,ACTIVITY_SPSUMMON,c113006.counterfilter)
end
function c113006.counterfilter(c)
return c:GetAttack()==2300 and c:GetDefense()==2800
end
function c113006.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(113006,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c113006.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c113006.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:GetAttack()==2300 and c:GetDefense()==2800)
end
function c113006.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c113006.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,true,POS_FACEUP)
end
function c113006.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_MZONE)
end
function c113006.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c113006.sccon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c113006.xfil(c)
return c:IsAbleToDeck() and c:IsAttack(2300) and c:IsDefense(2800) and c:IsLevel(7) and c:IsType(TYPE_TUNER)
end
function c113006.spfil(c,e,tp)
return c:IsCode(113005,113007) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c113006.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c113006.xfil,tp,LOCATION_MZONE,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(c113006.spfil,tp,LOCATION_DECK,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c113006.xfil,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c113006.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then
local sc=Duel.SelectMatchingCard(tp,c113006.spfil,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummonStep(sc,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
--雷吉斯奇鲁
function c113007.initial_effect(c)
c:SetSPSummonOnce(113007)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,113007)
e1:SetCost(c113007.spcost)
e1:SetTarget(c113007.sptg)
e1:SetOperation(c113007.spop)
c:RegisterEffect(e1)
--to tand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetCountLimit(1)
e3:SetTarget(c113007.thtg1)
e3:SetOperation(c113007.thop1)
c:RegisterEffect(e3)
--sp
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,013007)
e2:SetCondition(c113007.sccon)
e2:SetTarget(c113007.sctarg)
e2:SetOperation(c113007.scop)
c:RegisterEffect(e2)
end
function c113007.counterfilter(c)
Duel.AddCustomActivityCounter(113007,ACTIVITY_SPSUMMON,c113007.counterfilter)
end
function c113007.counterfilter(c)
return c:GetAttack()==2300 and c:GetDefense()==2800
end
function c113007.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(113007,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c113007.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c113007.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:GetAttack()==2300 and c:GetDefense()==2800)
end
function c113007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c113007.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,true,POS_FACEUP)
end
function c113007.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_MZONE)
end
function c113007.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c113007.sccon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c113007.xfil(c)
return c:IsAbleToDeck() and c:IsAttack(2300) and c:IsDefense(2800) and c:IsLevel(7) and c:IsType(TYPE_TUNER)
end
function c113007.spfil(c,e,tp)
return c:IsCode(113006,113005) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c113007.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c113007.xfil,tp,LOCATION_MZONE,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(c113007.spfil,tp,LOCATION_DECK,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c113007.xfil,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c113007.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then
local sc=Duel.SelectMatchingCard(tp,c113007.spfil,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummonStep(sc,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
--裂空の访问者
function c113008.initial_effect(c)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_STEP_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,113008)
e1:SetCost(c113008.spcost)
e1:SetTarget(c113008.sptg)
e1:SetOperation(c113008.spop)
c:RegisterEffect(e1)
--to tand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetCountLimit(1)
e3:SetTarget(c113008.thtg1)
e3:SetOperation(c113008.thop1)
c:RegisterEffect(e3)
--xyz
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLED)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c113008.descon)
e3:SetTarget(c113008.destg)
e3:SetOperation(c113008.desop)
c:RegisterEffect(e3)
--xyzlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(c113008.xyzlimit)
c:RegisterEffect(e2)
end
function c113008.xyzlimit(e,c)
if not c then return false end
return not (c:IsAttack(2300) and c:IsDefense(2800))
end
function c113008.counterfilter(c)
Duel.AddCustomActivityCounter(113008,ACTIVITY_SPSUMMON,c113008.counterfilter)
end
function c113008.counterfilter(c)
return c:GetAttack()==2300 and c:GetDefense()==2800
end
function c113008.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(113008,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c113008.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c113008.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:GetAttack()==2300 and c:GetDefense()==2800)
end
function c113008.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c113008.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,true,POS_FACEUP)
end
function c113008.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_MZONE)
end
function c113008.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c113008.descon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not d then return false end
if d:IsControler(tp) then a,d=d,a end
return a:IsControler(tp)
end
function c113008.xyzfilter(c,sg)
return c:IsXyzSummonable(sg,1,1)
end
function c113008.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Group.FromCards(e:GetHandler())
local xyzg=Duel.GetMatchingGroup(c113008.xyzfilter,tp,LOCATION_EXTRA,0,nil,sg)
if chk==0 then return xyzg:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c113008.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Group.FromCards(e:GetHandler())
local xyzg=Duel.GetMatchingGroup(c113008.xyzfilter,tp,LOCATION_EXTRA,0,nil,sg)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,sg)
end
end
--裂空の访问者-速度形态
function c113009.initial_effect(c)
c:EnableReviveLimit()
--xyz summon
aux.AddXyzProcedure(c,nil,7,5,c113009.ovfilter,aux.Stringid(113009,0))
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)
e1:SetValue(aux.xyzlimit)
c:RegisterEffect(e1)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--to tand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetCountLimit(1)
e3:SetTarget(c113009.thtg1)
e3:SetOperation(c113009.thop1)
c:RegisterEffect(e3)
end
function c113009.ovfilter(c)
return c:IsFaceup() and c:IsCode(113008)
end
function c113009.ckfil(c)
return c:IsAbleToHand() and c:IsCode(113008)
end
function c113009.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() and Duel.IsExistingMatchingCard(c113009.ckfil,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c113009.thop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) then
local g=Duel.SelectMatchingCard(tp,c113009.ckfil,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
--裂空の访问者-防御形态
function c113010.initial_effect(c)
c:EnableReviveLimit()
--xyz summon
aux.AddXyzProcedure(c,nil,7,5,c113010.ovfilter,aux.Stringid(113010,0))
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)
e1:SetValue(aux.xyzlimit)
c:RegisterEffect(e1)
--to tand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetCountLimit(1)
e3:SetTarget(c113010.thtg1)
e3:SetOperation(c113010.thop1)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(500)
e4:SetRange(LOCATION_MZONE)
c:RegisterEffect(e4)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_CANNOT_ATTACK)
e4:SetRange(LOCATION_MZONE)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_MUST_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,LOCATION_MZONE)
c:RegisterEffect(e5)
local e2=e5:Clone()
e2:SetCode(EFFECT_MUST_ATTACK_MONSTER)
e2:SetValue(c113010.atklimit)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
c:RegisterEffect(e2)
end
function c113010.ovfilter(c)
return c:IsFaceup() and c:IsCode(113008)
end
function c113010.ckfil(c)
return c:IsAbleToHand() and c:IsCode(113008)
end
function c113010.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() and Duel.IsExistingMatchingCard(c113010.ckfil,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c113010.thop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) then
local g=Duel.SelectMatchingCard(tp,c113010.ckfil,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
function c113010.atklimit(e,c)
return c==e:GetHandler()
end
--裂空の访问者-攻击形态
function c113011.initial_effect(c)
c:EnableReviveLimit()
--xyz summon
aux.AddXyzProcedure(c,nil,7,5,c113011.ovfilter,aux.Stringid(113011,0))
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)
e1:SetValue(aux.xyzlimit)
c:RegisterEffect(e1)
--to tand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetCountLimit(1)
e3:SetTarget(c113011.thtg1)
e3:SetOperation(c113011.thop1)
c:RegisterEffect(e3)
--battle
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,113011)
e4:SetTarget(c113011.batg)
e4:SetOperation(c113011.baop)
c:RegisterEffect(e4)
end
function c113011.ovfilter(c)
return c:IsFaceup() and c:IsCode(113008)
end
function c113011.ckfil(c)
return c:IsAbleToHand() and c:IsCode(113008)
end
function c113011.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() and Duel.IsExistingMatchingCard(c113011.ckfil,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c113011.thop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) then
local g=Duel.SelectMatchingCard(tp,c113011.ckfil,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
function c113011.batg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) end
local tc=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
end
function c113011.baop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.CalculateDamage(e:GetHandler(),tc)
end
end
--升阶魔法-大吃一餐
function c113210.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:SetCountLimit(1,113210+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c113210.cost)
e1:SetTarget(c113210.target)
e1:SetOperation(c113210.activate)
c:RegisterEffect(e1)
end
function c113210.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2)
end
function c113210.filter1(c,e,tp)
local rk=c:GetRank()
return c:IsFaceup() and c:GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0xcad) and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c113210.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c113210.filter2(c,e,tp,mc,rk)
return c:IsRank(rk+2,rk+4) and c:IsAttribute(ATTRIBUTE_WATER) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c113210.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c113210.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c113210.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c113210.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c113210.upfil(c)
return c:IsSetCard(0xcad) or c:GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0xcad)
end
function c113210.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,c113210.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank())
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)
sc:CompleteProcedure()
Duel.BreakEffect()
local xg=Duel.GetMatchingGroup(c113210.upfil,tp,LOCATION_MZONE,0,nil)
local tc=xg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=xg:GetNext()
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c113210.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function c113210.splimit(e,c)
return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER)
end
--鲨鱼乐器
function c113211.initial_effect(c)
c:EnableCounterPermit(0xcad)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetOperation(c113211.activate)
c:RegisterEffect(e0)
--disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c113211.splimit)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCondition(c113211.ccon)
e3:SetOperation(c113211.cop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EVENT_TO_GRAVE)
c:RegisterEffect(e5)
--atk def
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_UPDATE_ATTACK)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(LOCATION_MZONE,0)
e6:SetTarget(c113211.atktg)
e6:SetValue(c113211.atkval)
c:RegisterEffect(e6,true)
local e7=e6:Clone()
e7:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e7,true)
--counter
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetProperty(EFFECT_FLAG_DELAY)
e8:SetCode(EVENT_MOVE)
e8:SetRange(LOCATION_SZONE)
e8:SetCondition(c113211.ctcon1)
e8:SetOperation(c113211.ctop1)
c:RegisterEffect(e8)
end
function c113211.atktg(e,c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
function c113211.atkval(e,c)
return Duel.GetCounter(c:GetControler(),1,0,0xcad)*100
end
function c113211.thfilter(c,e,tp)
return c:IsSetCard(0xcad) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c113211.activate(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c113211.thfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) then return end
if Duel.GetFlagEffect(tp,113211)~=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(113211,0)) then
local sg=Duel.SelectMatchingCard(tp,c113211.thfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
Duel.RegisterFlagEffect(tp,113211,RESET_PHASE+PHASE_END,0,1)
end
end
function c113211.splimit(e,c)
return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER)
end
function c113211.ccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER)
end
function c113211.cop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0xcad,1)
end
function c113211.cfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xcad) and c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c113211.ctcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c113211.cfilter,1,nil)
end
function c113211.ctop1(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0xcad,1)
end
--叹气鲨鱼
function c113212.initial_effect(c)
--zone
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(113212,2))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetTarget(c113212.zotg)
e1:SetOperation(c113212.zoop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(113212,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_MOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,113212)
e2:SetCondition(c113212.ctcon1)
e2:SetTarget(c113212.cttg1)
e2:SetOperation(c113212.ctop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(113212,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(2)
e3:SetCountLimit(1,113212)
e3:SetCondition(c113212.ctcon2)
e3:SetTarget(c113212.cttg1)
e3:SetOperation(c113212.ctop1)
c:RegisterEffect(e3)
end
function c113212.zotg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,e:GetHandler(),0xcad) and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),0xcad)
Duel.SetTargetCard(g)
end
function c113212.zoop(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)<1 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
function c113212.ctcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c113212.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,113225)~=0 and Duel.GetFlagEffect(tp,113222)==0
end
function c113212.filter1(c,e,tp)
local rk=c:GetRank()
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c113212.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c113212.filter2(c,e,tp,mc,rk)
return c:IsRank(rk+2,rk+4) and c:IsAttribute(ATTRIBUTE_WATER) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c113212.cttg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c113212.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c113212.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c113212.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
if Duel.GetFlagEffect(tp,113225)~=0 and e:GetLabel()==2 then
Duel.RegisterFlagEffect(tp,113222,RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c113212.upfil(c)
return c:IsSetCard(0xcad) or c:GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0xcad)
end
function c113212.ctop1(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,c113212.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank())
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)
sc:CompleteProcedure()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c113212.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function c113212.splimit(e,c)
return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER)
end
--哭泣鲨鱼
function c113213.initial_effect(c)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(113213,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,113213)
e1:SetCost(c113213.spcost)
e1:SetTarget(c113213.sptg)
e1:SetOperation(c113213.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(113213,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_MOVE)
e2:SetCountLimit(1,013213)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c113213.ctcon1)
e2:SetTarget(c113213.cttg1)
e2:SetOperation(c113213.ctop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(113213,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,013213)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(2)
e3:SetCondition(c113213.ctcon2)
e3:SetTarget(c113213.cttg1)
e3:SetOperation(c113213.ctop1)
c:RegisterEffect(e3)
end
function c113213.spcost(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
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c113213.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function c113213.spfil(c,e,tp)
return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c113213.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetSequence()==2 and Duel.IsExistingMatchingCard(c113213.spfil,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local g=Duel.SelectMatchingCard(tp,c113213.spfil,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE)
end
function c113213.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
function c113213.splimit(e,c)
return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER)
end
function c113213.cfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xcad) and c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c113213.ctcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c113213.cfilter,1,e:GetHandler())
end
function c113213.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,113225)~=0 and Duel.GetFlagEffect(tp,113222)==0
end
function c113213.xxfil(c)
return c:IsSetCard(0xcad) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c113213.cttg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c113213.xxfil,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c113213.xxfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetTargetCard(g)
if Duel.GetFlagEffect(tp,113225)~=0 and e:GetLabel()==2 then
Duel.RegisterFlagEffect(tp,113222,RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,0)
end
function c113213.ctop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.SSet(tp,tc)
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
--奔跑鲨鱼
function c113214.initial_effect(c)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(113214,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c113214.exscon)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetTarget(c113214.exstg)
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_MZONE)
e2:SetCountLimit(1,113214)
e2:SetTarget(c113214.reptg)
e2:SetValue(c113214.repval)
e2:SetOperation(c113214.repop)
c:RegisterEffect(e2)
end
function c113214.exscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()==0 or e:GetHandler():GetSequence()==4
end
function c113214.exstg(e,c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelBelow(2)
end
function c113214.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and e:GetHandler():GetSequence()==2 and eg:IsContains(e:GetHandler()) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c113214.repval(e,c)
return e:GetHandler()
end
function c113214.thfil(c)
return c:IsSetCard(0xcad) and c:IsAbleToHand()
end
function c113214.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SendtoDeck(c,nil,2,REASON_EFFECT+REASON_REPLACE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c113214.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
if Duel.IsExistingMatchingCard(c113214.thfil,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(113214,1)) then
local g=Duel.SelectMatchingCard(tp,c113214.thfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c113214.splimit(e,c)
return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER)
end
local m=113215
local cm=_G["c"..m]
cm.name="疑问鲨鱼"
function cm.initial_effect(c)
--dice
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3))
e1:SetCategory(CATEGORY_DICE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,113215)
e1:SetTarget(cm.dctg)
e1:SetOperation(cm.dcop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_MOVE)
e2:SetCountLimit(1,013215)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.ctcon1)
e2:SetTarget(cm.cttg1)
e2:SetOperation(cm.ctop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,013215)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(2)
e3:SetCondition(cm.ctcon2)
e3:SetTarget(cm.cttg1)
e3:SetOperation(cm.ctop1)
c:RegisterEffect(e3)
end
c113215.toss_dice=true
function cm.splimit(e,c)
return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.spfil(c,e,tp)
return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function cm.dcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<1 then return end
local d=Duel.TossDice(tp,1)
if d==1 then
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(c,nseq)
elseif d>=2 and d<=6 then
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(c,nseq)
Duel.BreakEffect()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<d then return end
Duel.ConfirmDecktop(tp,d)
local g=Duel.GetDecktopGroup(tp,d)
local ct=g:GetCount()
if ct>0 and g:FilterCount(cm.spfil,nil,e,tp)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local sg=g:FilterSelect(tp,cm.spfil,1,1,nil,e,tp)
if sg:GetFirst():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(sg:GetFirst(),0,tp,tp,false,false,POS_FACEUP)
g:RemoveCard(sg:GetFirst())
ct=g:GetCount()
end
end
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function cm.cfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xcad) and c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function cm.ctcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,e:GetHandler(),tp)
end
function cm.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,113225)~=0 and Duel.GetFlagEffect(tp,113222)==0
end
function cm.cttg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
if Duel.GetFlagEffect(tp,113225)~=0 and e:GetLabel()==2 then
Duel.RegisterFlagEffect(tp,113222,RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.ctop1(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
local m=113216
local cm=_G["c"..m]
cm.name="灵感来袭!"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,113216+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.splimit(e,c)
return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0xcad) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.filter2(c)
return c:IsSetCard(0xcad) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()==0 then return end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<5 then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
local ct=g:GetCount()
if ct>0 and g:FilterCount(cm.filter2,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local sg=g:FilterSelect(tp,cm.filter2,1,1,nil)
if sg:GetFirst():IsAbleToHand() then
Duel.SendtoHand(sg:GetFirst(),tp,REASON_EFFECT)
g:RemoveCard(sg:GetFirst())
ct=g:GetCount()
end
end
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
\ No newline at end of file
local m=113217
local cm=_G["c"..m]
cm.name="小红花"
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e2)
--move
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_CARD_TARGET)
e3:SetCode(EVENT_MOVE)
e3:SetCountLimit(1,113217)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.ctcon1)
e3:SetTarget(cm.cttg1)
e3:SetOperation(cm.ctop1)
c:RegisterEffect(e3)
end
function cm.splimit(e,c)
return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.cfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xcad) and c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function cm.ovfilter(c,e)
return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xcad) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay() and c:IsCanBeEffectTarget(e)
end
function cm.xyzfilter(c,e,tp,lv,mc)
return c:IsType(TYPE_XYZ) and c:IsRank(lv) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and mc:IsCanBeXyzMaterial(c) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function cm.ctcon1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.ovfilter,tp,LOCATION_MZONE,0,nil,e)
if g:GetCount()==0 then return false end
local ag=Group.CreateGroup()
local tc=g:GetFirst()
while tc do
if Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,tc:GetLevel(),tc) then
ag:AddCard(tc)
end
tc=g:GetNext()
end
return ag:GetCount()~=0 and eg:IsExists(cm.cfilter,1,e:GetHandler(),tp)
end
function cm.cttg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(cm.ovfilter,tp,LOCATION_MZONE,0,nil,e)
if g:GetCount()==0 then return false end
local ag=Group.CreateGroup()
local tc=g:GetFirst()
while tc do
if Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,tc:GetLevel(),tc) then
ag:AddCard(tc)
end
tc=g:GetNext()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local ac=ag:Select(tp,1,1,nil)
Duel.SetTargetCard(ac)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_EXTRA)
end
function cm.ctop1(e,tp,eg,ep,ev,re,r,rp)
local ag=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local ac=ag:GetFirst()
if ac:IsFaceup() and ac:IsRelateToEffect(e) and ac:IsControler(tp) and not ac:IsImmuneToEffect(e) and aux.MustMaterialCheck(ac,tp,EFFECT_MUST_BE_XMATERIAL) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,ac:GetLevel(),ac)
local tc=g:GetFirst()
if tc then
local mg=ac:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(tc,mg)
end
tc:SetMaterial(Group.FromCards(ac))
Duel.Overlay(tc,Group.FromCards(ac))
Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
end
\ No newline at end of file
local m=113218
local cm=_G["c"..m]
cm.name="恰薯片"
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e2)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xcad))
e3:SetValue(500)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--SearchCard
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1,m)
e5:SetTarget(cm.srtg)
e5:SetOperation(cm.srop)
c:RegisterEffect(e5)
end
function cm.splimit(e,c)
return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.thfilter(c)
return c:IsSetCard(0xcad) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function cm.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
local m=113219
local cm=_G["c"..m]
cm.name="伤心鲨鱼"
function cm.initial_effect(c)
--zone
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetTarget(cm.zotg)
e1:SetOperation(cm.zoop)
c:RegisterEffect(e1)
--when move
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_MOVE)
e2:SetCountLimit(1,113219)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.ctcon1)
e2:SetTarget(cm.cttg1)
e2:SetOperation(cm.ctop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,113219)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(2)
e3:SetCondition(cm.ctcon2)
e3:SetTarget(cm.cttg1)
e3:SetOperation(cm.ctop1)
c:RegisterEffect(e3)
end
function cm.zotg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0xcad) and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_MZONE,0,1,1,nil,0xcad)
Duel.SetTargetCard(g)
end
function cm.zoop(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)<1 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
function cm.cfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xcad) and c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function cm.ctcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,e:GetHandler(),tp)
end
function cm.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,113225)~=0 and Duel.GetFlagEffect(tp,113222)==0
end
function cm.splimit(e,c)
return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xcad) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.cttg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) end
if Duel.GetFlagEffect(tp,113225)~=0 and e:GetLabel()==2 then
Duel.RegisterFlagEffect(tp,113222,RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.ctop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT,nil,REASON_EFFECT) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
\ No newline at end of file
local m=113220
local cm=_G["c"..m]
cm.name="ACT MODE Mio&Type15Ver2"
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,cm.mtfilter,cm.mt2filter,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_MATERIAL):SetValue(SUMMON_TYPE_FUSION)
--Draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.drcon)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop)
c:RegisterEffect(e4)
end
function cm.mtfilter(c)
return c:IsSetCard(0xcad) and c:IsType(TYPE_MONSTER) and not c:IsCode(113220)
end
function cm.mt2filter(c)
return c:IsRace(RACE_WARRIOR)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,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)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_FISH) and c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c)
return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER)
end
\ No newline at end of file
local m=113221
local cm=_G["c"..m]
cm.name="鲨鱼娘Mio 农作系统-100%"
function cm.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,113221)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_MOVE)
e2:SetCountLimit(1,013213)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.ctcon1)
e2:SetTarget(cm.cttg1)
e2:SetOperation(cm.ctop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,013213)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(2)
e3:SetCondition(cm.ctcon2)
e3:SetTarget(cm.cttg1)
e3:SetOperation(cm.ctop1)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsSetCard(0xcad) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
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.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.cfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xcad) and c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function cm.ctcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,e:GetHandler(),tp)
end
function cm.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,113225)~=0 and Duel.GetFlagEffect(tp,113222)==0
end
function cm.cttg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
if Duel.GetFlagEffect(tp,113225)~=0 and e:GetLabel()==2 then
Duel.RegisterFlagEffect(tp,113222,RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end
function cm.ctop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=4 then return end
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5)
local ct=g:GetCount()
if ct>0 and g:FilterCount(cm.thfilter,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,cm.thfilter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
ct=g:GetCount()-sg:GetCount()
end
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c)
return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER)
end
\ No newline at end of file
local m=113222
local cm=_G["c"..m]
cm.name="鲨鱼娘Mio 鲷鱼烧"
function cm.initial_effect(c)
--when move
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_MOVE)
e1:SetCountLimit(1,113222)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.ctcon1)
e1:SetTarget(cm.cttg1)
e1:SetOperation(cm.ctop1)
c:RegisterEffect(e1)
local e2=Effect.Clone(e1)
e2:SetRange(LOCATION_GRAVE)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1,113222)
e4:SetRange(LOCATION_HAND)
e4:SetLabel(2)
e4:SetCondition(cm.ctcon2)
e4:SetTarget(cm.cttg1)
e4:SetOperation(cm.ctop1)
c:RegisterEffect(e4)
local e5=Effect.Clone(e4)
e5:SetRange(LOCATION_GRAVE)
c:RegisterEffect(e5)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,013222)
e3:SetCost(cm.cost)
e3:SetTarget(cm.target)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
end
function cm.cfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xcad) and c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function cm.ctcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,113225)~=0 and Duel.GetFlagEffect(tp,113222)==0
end
function cm.cttg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
if Duel.GetFlagEffect(tp,113225)~=0 and e:GetLabel()==2 then
Duel.RegisterFlagEffect(tp,113222,RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.ctop1(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.filter1(c,e,tp,mc)
return c:IsType(TYPE_MONSTER) and c:IsReleasable() and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,Group.FromCards(c,mc))
end
function cm.filter2(c,e,tp,mg)
return c:IsCode(113220) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,true,true) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp,e:GetHandler())
rg:AddCard(e:GetHandler())
Duel.Release(rg,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
local tc=g:GetFirst()
if tc then
if Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,true,true,POS_FACEUP)~=0 then
tc:CompleteProcedure()
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c)
return not c:IsType(TYPE_XYZ) and not c:IsAttribute(ATTRIBUTE_WATER)
end
\ No newline at end of file
local m=113223
local cm=_G["c"..m]
cm.name="鲨鱼娘Mio 炮击"
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcMix(c,false,true,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1cad),cm.mtfilter)
--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)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.hspcon)
e2:SetOperation(cm.hspop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e5)
--aaaaaaaaaa
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_DESTROY)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_TO_GRAVE)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e6:SetCountLimit(1,m)
e6:SetTarget(cm.atktg)
e6:SetOperation(cm.atkop)
c:RegisterEffect(e6)
end
function cm.mtfilter(c)
return c:GetBaseAttack()>=2000 and c:IsFusionType(TYPE_EFFECT)
end
function cm.hspfilter(c,tp)
return c:IsSetCard(0x1cad) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(cm.hsp2filter,tp,LOCATION_GRAVE,0,1,c)
end
function cm.hsp2filter(c)
return c:GetBaseAttack()>=2000 and c:IsType(TYPE_EFFECT) and c:IsAbleToRemoveAsCost()
end
function cm.hspcon(e,c)
if c==nil then return true end
return Duel.IsExistingMatchingCard(cm.hspfilter,c:GetControler(),LOCATION_GRAVE,0,1,nil,c:GetControler())
and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),nil,c)>0
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ag=Duel.SelectMatchingCard(tp,cm.hspfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
local ac=ag:GetFirst()
local bg=Duel.SelectMatchingCard(tp,cm.hsp2filter,tp,LOCATION_GRAVE,0,1,1,ac)
ag:Merge(bg)
Duel.Remove(ag,POS_FACEUP,REASON_COST)
end
function cm.desfilter(c)
return c:IsFaceup()
end
function cm.des2filter(c)
return c:IsType(TYPE_MONSTER)
end
function cm.tdfilter(c)
return c:IsSetCard(0xcad) and c:IsAbleToDeck() and c:IsType(TYPE_MONSTER)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and cm.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()~=0 then Duel.SendtoDeck(g,nil,2,REASON_EFFECT) end
end
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.des2filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.des2filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
local m=113224
local cm=_G["c"..m]
cm.name="鲨鱼娘Mio 信徒"
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)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.sprcon)
e2:SetOperation(cm.sprop)
c:RegisterEffect(e2)
--hp+++
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,m)
e3:SetOperation(cm.rcop)
c:RegisterEffect(e3)
--th
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCountLimit(1,m+10000)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
--move
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,2))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(cm.seqtg)
e5:SetOperation(cm.seqop)
c:RegisterEffect(e5)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or st&SUMMON_TYPE_SYNCHRO~=SUMMON_TYPE_SYNCHRO
end
function cm.sprfilter(c)
return c:IsFaceup() and c:IsLevel(2) and c:IsAbleToGraveAsCost() and not c:IsCode(m)
end
function cm.sprfilter1(c,tp,g,sc)
local lv=c:GetLevel()
return c:IsType(TYPE_TUNER) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(2) and g:IsExists(cm.sprfilter2,1,c,tp,c,sc,lv) and not c:IsCode(m)
end
function cm.sprfilter2(c,tp,mc,sc,lv)
local sg=Group.FromCards(c,mc)
return c:IsLevel(lv) and c:IsType(TYPE_TUNER) and c:IsAttribute(ATTRIBUTE_WATER) and Duel.GetLocationCountFromEx(tp,tp,sg,sc)>0 and not c:IsCode(m)
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(cm.sprfilter1,1,nil,tp,g,c)
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:FilterSelect(tp,cm.sprfilter1,1,1,nil,tp,g,c)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=g:FilterSelect(tp,cm.sprfilter2,1,1,mc,tp,mc,c,mc:GetLevel())
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
end
function cm.rcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.drcon1)
e1:SetOperation(cm.drop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--sp_summon effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.regcon)
e2:SetOperation(cm.regop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetCondition(cm.drcon2)
e3:SetOperation(cm.drop2)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
--nontuner
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCode(EFFECT_SYNCHRO_LEVEL)
e0:SetValue(cm.tnval)
c:RegisterEffect(e0)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetTarget(cm.splimit2)
Duel.RegisterEffect(e4,tp)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e5,tp)
end
function cm.filter(c,sp)
return c:GetSummonPlayer()==sp and c:IsAttribute(ATTRIBUTE_WATER)
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.Recover(tp,200,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.Recover(tp,n*200,REASON_EFFECT)
end
function cm.tnval(e,c)
local lv=e:GetHandler():GetLevel()
return 4*65536+lv
end
function cm.splimit2(e,c)
return not (c:IsType(TYPE_XYZ) or c:IsAttribute(ATTRIBUTE_WATER))
end
function cm.thfilter(c)
return c:IsSetCard(0xcad) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.seqfilter(c)
return true
end
function cm.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.seqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.seqfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(16151001,1))
Duel.SelectTarget(tp,cm.seqfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.seqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
end
local m=113225
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)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.sprcon)
e2:SetOperation(cm.sprop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetRange(LOCATION_DECK)
c:RegisterEffect(e3)
--duel.buff
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,113225+EFFECT_COUNT_CODE_DUEL)
e4:SetCondition(cm.buffcon)
e4:SetOperation(cm.buffop)
c:RegisterEffect(e4)
--negate
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e5:SetCountLimit(1)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(cm.negcon)
e5:SetTarget(cm.negtg)
e5:SetOperation(cm.negop)
c:RegisterEffect(e5)
end
function cm.sprfilter(c)
return c:IsSetCard(0xcad) and c:IsAbleToDeckAsCost()
end
function cm.sprcodefilter(c,cg,tp)
return c:IsSetCard(0xcad) and c:IsAbleToDeckAsCost() and (cg:GetCount()==0 or not cg:IsExists(Card.IsCode,1,nil,c:GetCode()))
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)>=9 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local tp=c:GetControler()
local ag=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_GRAVE,0,nil)
local x=0
local g=Group.CreateGroup()
while x<9 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local ac=Duel.SelectMatchingCard(tp,cm.sprcodefilter,tp,LOCATION_GRAVE,0,1,1,nil,g,tp):GetFirst()
x=x+1
g:AddCard(ac)
end
while ag:IsExists(cm.sprcodefilter,1,nil,g,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local ac=Duel.SelectMatchingCard(tp,cm.sprcodefilter,tp,LOCATION_GRAVE,0,1,1,nil,g,tp):GetFirst()
g:AddCard(ac)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
c:RegisterFlagEffect(m,RESET_PHASE+PHASE_END,0,1)
end
function cm.buffcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)~=0
end
function cm.buffop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,113225,RESET_EVENT+0x1fe0000,0,99)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
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)
end
end
function cm.tdfilter(c)
return c:IsSetCard(0xcad) and c:IsAbleToDeck()
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
if Duel.Destroy(eg,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil):GetFirst()
if tc:IsFacedown() or not tc:IsPublic() then
Duel.ConfirmCards(1-tp,tc)
end
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--失智刀客塔
local m=114001
local cm=_G["c"..m]
function cm.initial_effect(c)
--atk
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xca2))
e1:SetValue(500)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--博士大加班
local m=114002
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter0(c)
return c:IsAbleToRemove()
end
function cm.filter1(c,e)
return c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsCode(114003) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter0,nil)
local mg2=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rs=0
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
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)
rs=Duel.Remove(mat1,POS_FACEUP,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()
if rs>=1 then
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
e5:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(cm.thtg1)
e5:SetOperation(cm.thop1)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e5,true)
end
if rs>=3 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(tc:GetMaterialCount()*500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
end
if rs>=5 then
tc:RegisterFlagEffect(114002,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,3))
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.thfilter(c)
return c:IsSetCard(0xca2) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g2:GetCount()>0 and Duel.SendtoHand(g2,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g2)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function cm.splimit(e,c)
return not (c:IsSetCard(0xca2) and c:IsType(TYPE_FUSION) )
end
\ No newline at end of file
--Operatives·巴别塔的恶灵
local m=114003
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep2(c,cm.ffilter,1,63,true)
end
function cm.ffilter(c,fc)
return c:IsFusionSetCard(0xca2)
end
\ No newline at end of file
--Operatives·玫兰莎
local m=114004
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,cm.lcheck)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--effect gain
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:SetCountLimit(1,m+10000)
e3:SetCondition(cm.effcon)
e3:SetOperation(cm.effop)
c:RegisterEffect(e3)
end
function cm.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xca2)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xca2) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsSetCard(0xca2)
end
function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_FUSION)~=0
and e:GetHandler():GetReasonCard():IsSetCard(0xca2)
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local fs=c:GetFlagEffect(114002)
local cs=c:GetFlagEffect(m)
local ss=c:GetMaterialCount()
return fs~=0 and cs<ss-4
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsAttackPos,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsAttackPos,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--Operatives·卡缇
local m=114005
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,cm.lcheck)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--effect gain
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:SetCountLimit(1,m+10000)
e3:SetCondition(cm.effcon)
e3:SetOperation(cm.effop)
c:RegisterEffect(e3)
end
function cm.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xca2)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xca2) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsSetCard(0xca2)
end
function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_FUSION)~=0
and e:GetHandler():GetReasonCard():IsSetCard(0xca2)
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
rc:RegisterEffect(e2,true)
if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
\ No newline at end of file
--Operatives·翎羽
local m=114006
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,cm.lcheck)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--effect gain
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:SetCountLimit(1,m+10000)
e3:SetCondition(cm.effcon)
e3:SetOperation(cm.effop)
c:RegisterEffect(e3)
end
function cm.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xca2)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xca2) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsSetCard(0xca2)
end
function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_FUSION)~=0
and e:GetHandler():GetReasonCard():IsSetCard(0xca2)
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local fs=c:GetFlagEffect(114002)
local cs=c:GetFlagEffect(m)
local ss=c:GetMaterialCount()
return fs~=0 and cs<ss-4
end
function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--Operatives·安塞尔
local m=114007
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,cm.lcheck)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--effect gain
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:SetCountLimit(1,m+10000)
e3:SetCondition(cm.effcon)
e3:SetOperation(cm.effop)
c:RegisterEffect(e3)
end
function cm.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xca2)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.thfilter(c,e,tp)
return c:IsSetCard(0xca2) and c:IsType(TYPE_SPELL) 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_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE+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(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsSetCard(0xca2)
end
function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_FUSION)~=0
and e:GetHandler():GetReasonCard():IsSetCard(0xca2)
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
--indes
local e3=Effect.CreateEffect(rc)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(1)
rc:RegisterEffect(e3,true)
if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
--后巴别塔·瑕光
function c114010.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,114010)
e1:SetCost(c114010.thcost)
e1:SetTarget(c114010.thtg)
e1:SetOperation(c114010.thop)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(c114010.efcon)
e2:SetOperation(c114010.efop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_RECOVER)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,214010)
e3:SetCost(c114010.stcost)
e3:SetTarget(c114010.sttg)
e3:SetOperation(c114010.stop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(114010,ACTIVITY_SPSUMMON,c114010.counterfilter)
end
function c114010.counterfilter(c)
return c:IsSetCard(0xca3) and c:IsType(TYPE_SPELL)
end
function c114010.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c114010.thfil(c)
return c:IsAbleToHand() and c:IsSetCard(0xca3)
end
function c114010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c114010.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function c114010.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c114010.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
local tg=g:Select(tp,1,1,nil)
Duel.SendtoHand(tg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
local tc=tg:GetFirst()
Duel.Recover(tp,tc:GetAttack()/2,REASON_EFFECT)
end
function c114010.efcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetReasonCard()
return r==REASON_FUSION and ec:IsSetCard(0xca3)
end
function c114010.efop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,114010)
local c=e:GetHandler()
local rc=c:GetReasonCard()
--indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(aux.indoval)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e5)
rc:RegisterFlagEffect(114010,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(114010,0))
end
function c114010.stfil(c)
return c:IsSetCard(0xca3) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c114010.stcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(114010,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c114010.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c114010.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xca3)
end
function c114010.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,nil,0xca3) and ep==tp and re:GetHandler():IsSetCard(0xca3) and Duel.IsExistingMatchingCard(c114010.stfil,tp,LOCATION_DECK,0,2,nil) end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,tp,LOCATION_PZONE)
end
function c114010.stop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local g1=Duel.GetMatchingGroup(c114010.stfil,tp,LOCATION_DECK,0,nil)
if Duel.Destroy(g,REASON_EFFECT) and g1:GetCount()>1 then
local tg=g1:Select(tp,2,2,nil)
local tc=tg:GetFirst()
while tc do
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
tc=tg:GetNext()
end
end
end
--后巴别塔·清流
function c114011.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--Recover
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,114011)
e1:SetRange(LOCATION_PZONE)
e1:SetCost(c114011.reccost)
e1:SetTarget(c114011.rectg)
e1:SetOperation(c114011.recop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,214011)
e2:SetTarget(c114011.thtg)
e2:SetOperation(c114011.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,214011)
e4:SetTarget(c114011.thtg1)
e4:SetOperation(c114011.thop1)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(114011,ACTIVITY_SPSUMMON,c114011.counterfilter)
end
function c114011.counterfilter(c)
return c:IsSetCard(0xca3)
end
function c114011.reccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(114011,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c114011.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c114011.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xca3)
end
function c114011.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(114011,tp,ACTIVITY_SPSUMMON)==0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800)
end
function c114011.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c114011.thfil(c)
return c:IsAbleToHand() and c:IsSetCard(0xca3) and c:IsType(TYPE_MONSTER)
end
function c114011.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c114011.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,100)
end
function c114011.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c114011.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
local tg=g:Select(tp,1,1,nil)
Duel.SendtoHand(tg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
Duel.BreakEffect()
Duel.Recover(tp,100,REASON_EFFECT)
end
function c114011.thfil1(c)
return c:IsAbleToHand() and c:IsSetCard(0xca3) and c:IsType(TYPE_SPELL)
end
function c114011.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c114011.thfil1,tp,LOCATION_DECK,0,1,nil) and e:GetHandler():IsReason(REASON_EFFECT) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c114011.thop1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c114011.thfil1,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
local tg=g:Select(tp,1,1,nil)
Duel.SendtoHand(tg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
--后巴别塔·末药
function c114014.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,114014)
e1:SetTarget(c114014.sptg)
e1:SetOperation(c114014.spop)
c:RegisterEffect(e1)
--Recover
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c114014.rectg)
e2:SetOperation(c114014.recop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetCode(EVENT_RECOVER)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1,214014)
e4:SetCost(c114014.spcost1)
e4:SetTarget(c114014.sptg1)
e4:SetOperation(c114014.spop1)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(114014,ACTIVITY_SPSUMMON,c114014.counterfilter)
end
function c114014.counterfilter(c)
return c:IsSetCard(0xca3)
end
function c114014.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(114014,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c114014.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c114014.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xca3)
end
function c114014.spfil(c,e,tp)
return c:IsSetCard(0xca3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ((c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 ) or (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 ))
end
function c114014.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,nil,0xca3) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c114014.spfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end
function c114014.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
local g1=Duel.GetMatchingGroup(c114014.spfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_EXTRA,0,nil,e,tp)
if g1:GetCount()<=0 then return end
Duel.BreakEffect()
local sg=g1:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
function c114014.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c114014.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c114014.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and ep==tp end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c114014.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--后巴别塔·嘉维尔
function c114016.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,114016)
e1:SetCost(c114016.thcost)
e1:SetTarget(c114016.thtg)
e1:SetOperation(c114016.thop)
c:RegisterEffect(e1)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetCost(c114016.atkcost)
e3:SetOperation(c114016.atkop)
c:RegisterEffect(e3)
end
function c114016.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c114016.thfil(c)
return c:IsAbleToHand() and c:IsSetCard(0xca3) and c:IsType(TYPE_SPELL)
end
function c114016.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c114016.thfil,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler(),0xca3) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,LOCATION_ONFIELD+LOCATION_HAND)
end
function c114016.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler(),0xca3)
if g:GetCount()<=0 then return end
local dg=g:Select(tp,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
local g1=Duel.GetMatchingGroup(c114016.thfil,tp,LOCATION_DECK,0,nil)
if g1:GetCount()<=0 then return end
local tg=g1:Select(tp,1,1,nil)
Duel.SendtoHand(tg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
function c114016.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if chk==0 then return c:GetFlagEffect(114016)==0 and bc end
c:RegisterFlagEffect(114016,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c114016.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c:IsRelateToBattle() and c:IsFaceup() and bc:IsRelateToBattle() and bc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(1500)
c:RegisterEffect(e1)
Duel.Recover(tp,100,REASON_EFFECT)
end
end
--后巴别塔·临光
function c114017.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,114017)
e1:SetTarget(c114017.sptg1)
e1:SetOperation(c114017.spop1)
c:RegisterEffect(e1)
end
function c114017.spfil(c,e,tp)
return c:IsSetCard(0xca3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c114017.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c114017.spfil,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c114017.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c114017.spfil,tp,LOCATION_DECK,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or g:GetCount()<=0 then return end
local sg=g:Select(tp,1,1,nil)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) then
--
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetProperty(EFFECT_FLAG_IGNORE_RANGE)
e2:SetTarget(c114017.actfilter)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c114017.actfilter(e,c)
return c:GetControler()==e:GetHandlerPlayer() and not c:IsSetCard(0xca3)
end
--后巴别塔·哞
function c114018.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--Recover
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_PZONE)
e1:SetCost(c114018.reccost)
e1:SetTarget(c114018.rectg)
e1:SetOperation(c114018.recop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,214018)
e2:SetCondition(c114018.spcon)
e2:SetTarget(c114018.sptg)
e2:SetOperation(c114018.spop)
c:RegisterEffect(e2)
--Recover
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,114018)
e4:SetTarget(c114018.rectg1)
e4:SetOperation(c114018.recop1)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(114018,ACTIVITY_SPSUMMON,c114018.counterfilter)
end
function c114018.counterfilter(c)
return c:IsSetCard(0xca3)
end
function c114018.reccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(114018,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c114018.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c114018.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xca3)
end
function c114018.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800)
end
function c114018.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c114018.cfilter2(c,tp)
return c:IsSetCard(0xca3) and (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE)) and c:IsPreviousLocation(LOCATION_ONFIELD)
and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP)
end
function c114018.spcon(e,tp,eg,ep,ev,re,r,rp)
if eg:IsContains(e:GetHandler()) then return false end
return eg:IsExists(c114018.cfilter2,1,nil,tp)
end
function c114018.sptg(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_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c114018.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c114018.rthfil(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xca3) and (c:IsLocation(LOCATION_GRAVE) or (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function c114018.rectg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c114018.rthfil,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) and e:GetHandler():IsReason(REASON_EFFECT) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c114018.recop1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(c114018.rthfil,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,nil)
if Duel.Recover(p,d,REASON_EFFECT) and g:GetCount()<=0 then return end
Duel.BreakEffect()
local tg=g:Select(tp,1,1,nil)
Duel.SendtoHand(tg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
--后巴别塔·塞雷娅
function c114019.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_RECOVER)
e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,114019)
e1:SetCost(c114019.spcost)
e1:SetTarget(c114019.sptg)
e1:SetOperation(c114019.spop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,214019)
e2:SetCost(c114019.incost)
e2:SetTarget(c114019.intg)
e2:SetOperation(c114019.inop)
c:RegisterEffect(e2)
--Recover
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,314019)
e4:SetTarget(c114019.rectg)
e4:SetOperation(c114019.recop)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(114019,ACTIVITY_SPSUMMON,c114019.counterfilter)
end
function c114019.counterfilter(c)
return c:IsSetCard(0xca3)
end
function c114019.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,Duel.GetLP(tp)/2) and Duel.GetCustomActivityCount(114019,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c114019.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.PayLPCost(tp,Duel.GetLP(tp)/2)
end
function c114019.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xca3)
end
function c114019.thfil(c)
return c:IsSetCard(0xca3) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c114019.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c114019.thfil,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 and ep==tp end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c114019.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c114019.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
local tg=g:Select(tp,1,1,nil)
Duel.SendtoHand(tg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
function c114019.incost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c114019.intg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c114019.inop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xca3))
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
Duel.RegisterEffect(e2,tp)
end
function c114019.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and e:GetHandler():IsReason(REASON_EFFECT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function c114019.recop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp,tp,nil,c)<=0 then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) then
Duel.BreakEffect()
local atk=c:GetAttack()
Duel.Recover(tp,atk,REASON_EFFECT)
end
end
--不畏苦暗·瑕光
function c114020.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(c114020.sfilter),1)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--atk def
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(aux.TargetBoolFunction(Card.IsSetCard,0xca3))
e1:SetCondition(c114020.adcon)
e1:SetValue(800)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,114020)
e3:SetRange(LOCATION_PZONE)
e3:SetCost(c114020.spcost)
e3:SetTarget(c114020.sptg)
e3:SetOperation(c114020.spop)
c:RegisterEffect(e3)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(114020,0))
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_POSITION)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c114020.discon)
e3:SetTarget(c114020.distg)
e3:SetOperation(c114020.disop)
c:RegisterEffect(e3)
--destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c114020.desreptg)
e4:SetValue(c114020.desrepval)
e4:SetOperation(c114020.desrepop)
c:RegisterEffect(e4)
--p set
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCondition(c114020.pscon)
e5:SetTarget(c114020.pstg)
e5:SetOperation(c114020.psop)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCondition(c114020.pscon1)
e6:SetCode(EVENT_DESTROYED)
c:RegisterEffect(e6)
Duel.AddCustomActivityCounter(114020,ACTIVITY_SPSUMMON,c114020.counterfilter)
end
function c114020.counterfilter(c)
return c:IsSetCard(0xca3)
end
function c114020.sfilter(c)
return c:IsSetCard(0xca3) and c:IsType(TYPE_PENDULUM)
end
function c114020.adcon(e,c)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xca3)
end
function c114020.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,e:GetHandler()) and Duel.GetCustomActivityCount(114020,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c114020.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD)
end
function c114020.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xca3)
end
function c114020.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c114020.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.SpecialSummon(c,SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF,tp,tp,false,false,POS_FACEUP)
end
function c114020.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) and (e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) or e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF))
end
function c114020.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,1,0,0)
end
function c114020.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(114021,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(114021,0))
if Duel.NegateActivation(ev) and re:GetHandler():IsCanTurnSet() then
Duel.ChangePosition(eg,POS_FACEDOWN_DEFENSE)
local def=eg:GetFirst():GetBaseDefense()
Duel.Recover(tp,def,REASON_EFFECT)
end
end
function c114020.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c114020.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c114020.repfilter,1,nil,tp)
and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c114020.desrepval(e,c)
return c114020.repfilter(c,e:GetHandlerPlayer())
end
function c114020.desrepop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD)
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c114020.retop)
Duel.RegisterEffect(e1,tp)
end
Duel.Hint(HINT_CARD,0,114020)
end
function c114020.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount(tp)==e:GetLabel()
end
function c114020.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,114020)
Duel.ReturnToField(e:GetLabelObject())
end
function c114020.pscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ((c:IsReason(REASON_EFFECT) and rp==1-tp) or c:IsReason(REASON_BATTLE)) and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c114020.pscon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE)) and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c114020.pstg(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 c114020.psop(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
--不畏苦暗·临光
function c114021.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0xca3),1)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--atk def
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(aux.TargetBoolFunction(Card.IsSetCard,0xca3))
e1:SetCondition(c114021.adcon)
e1:SetValue(800)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,114021)
e3:SetRange(LOCATION_PZONE)
e3:SetCost(c114021.spcost)
e3:SetTarget(c114021.sptg)
e3:SetOperation(c114021.spop)
c:RegisterEffect(e3)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(114021,0))
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_POSITION)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c114021.discon)
e3:SetTarget(c114021.distg)
e3:SetOperation(c114021.disop)
c:RegisterEffect(e3)
--destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c114021.desreptg)
e4:SetValue(c114021.desrepval)
e4:SetOperation(c114021.desrepop)
c:RegisterEffect(e4)
--p set
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCondition(c114021.pscon)
e5:SetTarget(c114021.pstg)
e5:SetOperation(c114021.psop)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EVENT_DESTROYED)
e6:SetCondition(c114021.pscon1)
c:RegisterEffect(e6)
Duel.AddCustomActivityCounter(114021,ACTIVITY_SPSUMMON,c114021.counterfilter)
end
function c114021.counterfilter(c)
return c:IsSetCard(0xca3)
end
function c114021.sfilter(c)
return c:IsSetCard(0xca3) and c:IsType(TYPE_PENDULUM)
end
function c114021.adcon(e,c)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xca3)
end
function c114021.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,e:GetHandler()) and Duel.GetCustomActivityCount(114021,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c114021.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD)
end
function c114021.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xca3)
end
function c114021.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c114021.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.SpecialSummon(c,SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF,tp,tp,false,false,POS_FACEUP)
end
function c114021.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainDisablable(ev) and (e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) or e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF))
end
function c114021.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c114021.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) then
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(114021,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(114021,0))
end
end
function c114021.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c114021.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c114021.repfilter,1,nil,tp)
and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c114021.desrepval(e,c)
return c114021.repfilter(c,e:GetHandlerPlayer())
end
function c114021.desrepop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD)
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c114021.retop)
Duel.RegisterEffect(e1,tp)
end
Duel.Hint(HINT_CARD,0,114021)
end
function c114021.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,114021)
Duel.ReturnToField(e:GetLabelObject())
end
function c114021.pscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ((c:IsReason(REASON_EFFECT) and rp==1-tp) or c:IsReason(REASON_BATTLE)) and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c114021.pscon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE)) and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c114021.pstg(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 c114021.psop(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
--涌泉净水·清流
function c114022.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xca3),2,2)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_RECOVER)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,114022)
e1:SetTarget(c114022.thtg)
e1:SetOperation(c114022.thop)
c:RegisterEffect(e1)
--up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCategory(CATEGORY_DEFCHANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_RECOVER)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c114022.uptg)
e2:SetOperation(c114022.upop)
c:RegisterEffect(e2)
end
function c114022.thfil1(c)
return c:IsAbleToHand() and c:IsSetCard(0xca3) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end
function c114022.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c114022.thfil1,tp,LOCATION_DECK,0,1,nil) and ep==tp end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c114022.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c114022.thfil1,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
local tg=g:Select(tp,1,1,nil)
Duel.SendtoHand(tg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
function c114022.uptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return ep==tp end
Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,nil,0,0,0)
end
function c114022.upop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(300)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--驶向明日的方舟
function c114023.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,114023+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c114023.tg)
e1:SetOperation(c114023.op)
c:RegisterEffect(e1)
end
function c114023.spfil(c,e,tp)
return c:IsSetCard(0xca3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ((c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 ) or (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 ))
end
function c114023.thfil(c)
return c:IsSetCard(0xca3) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c114023.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c114023.spfil,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(c114023.thfil,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(114023,0),aux.Stringid(114023,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(114023,0))
else
op=Duel.SelectOption(tp,aux.Stringid(114023,1))+1
end
e:SetLabel(op)
if op==0 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
else
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function c114023.op(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
if op==0 then
local g=Duel.GetMatchingGroup(c114023.spfil,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,nil,e,tp)
if g:GetCount()<=0 then return end
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
else
local g=Duel.GetMatchingGroup(c114023.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
local tc=g:Select(tp,1,1,nil)
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--耀眼的胜利
function c114024.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,114024)
e1:SetTarget(c114024.target)
e1:SetOperation(c114024.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c114024.eqlimit)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
--to grave
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetRange(LOCATION_SZONE)
e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetCode(EVENT_BATTLE_DESTROYING)
e5:SetCondition(c114024.hdcon)
e5:SetTarget(c114024.hdtg)
e5:SetOperation(c114024.hdop)
c:RegisterEffect(e5)
end
function c114024.eqlimit(e,c)
return c:IsCode(114020,114010)
end
function c114024.filter(c)
return c:IsFaceup() and c:IsCode(114020,114010)
end
function c114024.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c114024.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c114024.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c114024.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c114024.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
if Duel.Equip(tp,e:GetHandler(),tc) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(114024,0)) then
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_PZONE,0,nil)
local x=Duel.Destroy(g,REASON_EFFECT)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(x*800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
function c114024.hdcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler():GetEquipTarget() and eg:GetFirst():IsStatus(STATUS_OPPO_BATTLE)
end
function c114024.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_ONFIELD)
end
function c114024.hdop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
--莱茵的坚盾·塞雷娅
function c114030.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c114030.ffilter,3,true)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c114030.cost)
e1:SetTarget(c114030.target)
e1:SetOperation(c114030.operation)
c:RegisterEffect(e1)
end
function c114030.ffilter(c)
return c:IsSetCard(0xca3) or c:IsSetCard(0xf36)
end
function c114030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c114030.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c114030.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c114030.lftg)
e1:SetOperation(c114030.lfop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
--Recover
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c114030.retg)
e2:SetOperation(c114030.reop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
c:RegisterEffect(e5)
end
function c114030.lftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return rp==tp and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function c114030.lfop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
function c114030.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return rp==1-tp end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(200)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,200)
end
function c114030.reop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--扭曲念想·不死的黑蛇
function c114031.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)
--special summon rule
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(c114031.sprcon)
e2:SetOperation(c114031.sprop)
c:RegisterEffect(e2)
--Announce
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ANNOUNCE+CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c114031.antg)
e3:SetOperation(c114031.anop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(114031,0))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetTarget(c114031.seqtg)
e4:SetOperation(c114031.seqop)
c:RegisterEffect(e4)
end
function c114031.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return ec end
end
function c114031.seqop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
-----
function c114031.sprfilter(c)
return c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function c114031.sprfilter1(c,tp,g,sc)
local lv=c:GetLevel()
return c:IsType(TYPE_TUNER) and g:IsExists(c114031.sprfilter2,1,c,tp,c,sc,lv)
end
function c114031.sprfilter2(c,tp,mc,sc,lv)
local sg=Group.FromCards(c,mc)
return c:IsLevel(lv) and not c:IsType(TYPE_TUNER)
and Duel.GetLocationCountFromEx(tp,tp,sg,sc)>0
end
function c114031.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c114031.sprfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(c114031.sprfilter1,1,nil,tp,g,c)
end
function c114031.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c114031.sprfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:FilterSelect(tp,c114031.sprfilter1,1,1,nil,tp,g,c)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=g:FilterSelect(tp,c114031.sprfilter2,1,1,mc,tp,mc,c,mc:GetLevel())
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
end
function c114031.antg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local op=0
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(114031,3))
op=Duel.SelectOption(tp,aux.Stringid(114031,0),aux.Stringid(114031,1),aux.Stringid(114031,2))
e:SetLabel(op)
end
function c114031.anop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op=e:GetLabel()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetLabel(op)
e1:SetCondition(c114031.eqcon)
e1:SetOperation(c114031.eqop)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c114031.eqcon(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
local ex2,g2,gc2,dp2,dv2=Duel.GetOperationInfo(ev,CATEGORY_SPECIAL_SUMMON)
if op==0 then
return ((ex2 and bit.band(dv2,LOCATION_DECK)==LOCATION_DECK) or (ex2 and bit.band(dv2,LOCATION_EXTRA)==LOCATION_EXTRA)) and rp==1-tp and Duel.IsChainDisablable(ev) and re:GetHandler():IsType(TYPE_MONSTER)
elseif op==1 then
return (ex2 and bit.band(dv2,LOCATION_GRAVE)==LOCATION_GRAVE) and rp==1-tp and Duel.IsChainDisablable(ev) and re:GetHandler():IsType(TYPE_MONSTER)
elseif op==2 then
return (ex2 and bit.band(dv2,LOCATION_HAND)==LOCATION_HAND) and rp==1-tp and Duel.IsChainDisablable(ev) and re:GetHandler():IsType(TYPE_MONSTER)
end
end
function c114031.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,114031)
Duel.NegateEffect(ev)
local c=e:GetHandler()
local tc=re:GetHandler()
if c:IsOnField() and c:IsFaceup() and not c:IsStatus(STATUS_BATTLE_DESTROYED) then
if tc:IsLocation(LOCATION_MZONE) then
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c114031.eqlimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_SET_CONTROL)
e2:SetValue(tp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
elseif not tc:IsLocation(LOCATION_MZONE) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c114031.eqlimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
end
e:Reset()
end
function c114031.eqlimit(e,c)
return e:GetOwner()==c
end
--斗士·塔露拉
local m=114032
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,114031,114034,114032)
--xyz summon
aux.AddXyzProcedure(c,nil,10,2)
c:EnableReviveLimit()
--special summon (hand)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg1)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,m+1)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.rectg)
e2:SetOperation(cm.recop)
c:RegisterEffect(e2)
----
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_CONTROL_CHANGED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1000)
e3:SetTarget(cm.tg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
end
function cm.spfilter1(c,e,tp)
return aux.IsCodeListed(c,114034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
----
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,0,1,0,0)
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=tg:GetFirst()
Duel.SendtoGrave(tc,REASON_EFFECT)
end
----
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x87af) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local sg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
if #sg>0 then
local c=e:GetHandler()
if c:GetEquipGroup():IsExists(cm.eqfilter,1,nil) and Duel.Destroy(sg,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,114031) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local qg=Duel.SelectMatchingCard(tp,cm.eqfilter2,tp,LOCATION_GRAVE,0,1,1,nil,tc,tp)
local sc=qg:GetFirst()
Duel.Equip(tp,sc,tc)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
sc:RegisterEffect(e1)
end
else
Duel.Destroy(sg,REASON_EFFECT)
end
end
end
function cm.eqfilter2(c,tc,tp)
return c:IsCode(114031) and
c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:IsType(TYPE_MONSTER)
end
function cm.eqfilter(c)
return c:IsFaceup() and c:IsCode(114031)
end
function cm.eqlimit(e,c)
return e:GetOwner()==c
end
\ No newline at end of file
--乌萨斯刁民
local m=114033
local cm=_G["c"..m]
function cm.initial_effect(c)
end
--朝暮的小鹿·阿丽娜
local m=114034
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,114032,114035,114034)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return re and (re:GetHandler():IsRace(RACE_WARRIOR) or re:GetHandler():GetCode()==114035)
end
function cm.spfilter(c,e,tp)
return c:IsCode(114032) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetLocationCountFromEx(1-tp,tp,nil,nil)
if chk==0 then return ct>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(1-tp,tp,nil,nil)<=0 then return end
local zg=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0)
if zg:IsExists(cm.spfilter,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
end
end
end
\ No newline at end of file
--黑蛇已死?
local m=114035
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,114032,114034)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m+1000)
e3:SetTarget(cm.tktg)
e3:SetOperation(cm.tkop)
c:RegisterEffect(e3)
end
--e1
function cm.spfilter(c,e,tp)
return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(114034)
end
function cm.spfilter2(c,e,tp)
return c:IsCode(114031) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler(),REASON_EFFECT) and Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP)
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if sg:GetCount()>0 then
local sc=sg:GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,true,true,POS_FACEUP)
end
end
end
----
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_BEASTWARRIOR)
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,114033,0,0x4011,0,200,4,RACE_WARRIOR,ATTRIBUTE_EARTH) and Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,e:GetHandler()) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,0,0)
end
function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,114033,0,0x4011,0,200,4,RACE_WARRIOR,ATTRIBUTE_EARTH) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local fid=e:GetHandler():GetFieldID()
local g=Group.CreateGroup()
for i=1,ft do
local token=Duel.CreateToken(tp,114033)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_NONSUM)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(1)
token:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(1)
token:RegisterEffect(e3,true)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
token:RegisterEffect(e4,true)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
token:RegisterEffect(e5,true)
end
Duel.SpecialSummonComplete()
Duel.BreakEffect()
local tg=Duel.SelectMatchingCard(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
if #tg>0 then Duel.Destroy(tg,REASON_EFFECT) end
end
\ No newline at end of file
--最后一线的希望
function c1199031.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1199031)
e1:SetCondition(c1199031.con1)
e1:SetCost(c1199031.cost1)
e1:SetTarget(c1199031.tg1)
e1:SetOperation(c1199031.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,1199032)
e2:SetCost(c1199031.cost2)
e2:SetCondition(c1199031.con2)
e2:SetOperation(c1199031.op2)
c:RegisterEffect(e2)
end
--
function c1199031.con1(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)==0
end
--
function c1199031.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local LP=Duel.GetLP(tp)
local cost=LP/2
if chk==0 then return Duel.CheckLPCost(tp,cost) end
Duel.PayLPCost(tp,cost)
end
--
function c1199031.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
local sg=Duel.GetMatchingGroup(aux.TURE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
if sg:GetCount()>3 then
Duel.SetChainLimit(c1199031.limit1)
end
end
--
function c1199031.limit1(e,ep,tp)
return tp==ep
end
--
function c1199031.ofilter1(c)
return c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_GRAVE)
end
function c1199031.op1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.DiscardDeck(p,d,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
local ct=g:FilterCount(c1199031.ofilter1,nil)
local dg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if ct~=0 and dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(1199031,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sdg=dg:Select(tp,1,ct,e:GetHandler())
Duel.Destroy(sdg,REASON_EFFECT)
end
end
--
function c1199031.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
--
function c1199031.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local LP=Duel.GetLP(tp)
local cost=LP/2
if chk==0 then return Duel.CheckLPCost(tp,cost) end
Duel.PayLPCost(tp,cost)
end
--
function c1199031.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 then
Duel.SortDecktop(tp,tp,5)
end
end
Duel.LoadScript("c12000000.lua")
--墓城
HakaShiro=HakaShiro or {}
function HakaShiro.SPSummon(c,code)
local e1=srre.SPSummon(c,code,{code,0},{1,code},LOCATION_HAND+LOCATION_GRAVE,HakaShiro.SPSummoncon,HakaShiro.SPSummonop)
return e1
end
function HakaShiro.SPSummoncon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local cc=Duel.GetFlagEffect(tp,12048004)*2
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and ( cc<3 and Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_GRAVE,0,5-cc,c) or cc>2 )
end
function HakaShiro.SPSummonop(e,tp,eg,ep,ev,re,r,rp,c)
local cc=Duel.GetFlagEffect(tp,12048004)*2
if cc>2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_GRAVE,0,5-cc,5-cc,c)
Duel.SendtoDeck(g,nil,0,REASON_COST)
Duel.ShuffleDeck(tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(HakaShiro.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function HakaShiro.splimit(e,c)
return not c:IsRace(RACE_ZOMBIE)
end
function HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
local tc=g:GetFirst()
while tc do
if tc:IsLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(12048001,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
tc=g:GetNext()
end
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--墓城七姬 六之姬 涅依
local m=12048001
local cm=_G["c"..m]
cm.named_with_SeHakaShiroJyou=true
cm.named_with_Mei=true
function cm.initial_effect(c)
--SpecialSummon
local e1=HakaShiro.SPSummon(c,m)
--SpecialSummoneffect
local e2=srre.SPSummoneffect(c,m,{m,1},4,CATEGORY_TOGRAVE,nil,{1,m+100},nil,cm.spcost,cm.sptg,cm.spop)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,3) end
Duel.DiscardDeck(tp,3,REASON_COST)
local g=Duel.GetOperatedGroup()
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
end
function cm.filter(c)
return srre.check_set_HakaShiro(c) and c:IsAbleToGrave()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--幻梦的探求者 墓城姬涅依
local m=12048002
local cm=_G["c"..m]
cm.named_with_HakaShiroJyou=true
cm.named_with_Mei=true
function cm.initial_effect(c)
--SpecialSummon
local e1=HakaShiro.SPSummon(c,m)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
--tohand
local e3=srre.QFEffect(c,m,{m,1},CATEGORY_TOHAND,nil,LOCATION_MZONE,{1,m+100},cm.qecon,nil,cm.qetg,cm.qeop)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) or not Duel.IsPlayerCanDiscardDeck(1-tp,1) or rp==tp then return end
local g=Duel.GetDecktopGroup(tp,1)
local g1=Duel.GetDecktopGroup(1-tp,1)
g:Merge(g1)
Duel.SendtoGrave(g,REASON_EFFECT)
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
end
function cm.chainfilter(re,tp,cid)
return not ( re:GetHandler():GetLocation(LOCATION_GRAVE) )
end
function cm.qecon(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return tt>19 and Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN,cm.chainfilter)>0
end
function cm.filter(c)
return c:IsAbleToHand()
end
function cm.qetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.qeop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,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+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(cm.actlimit)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function cm.actlimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--如己所愿 墓城姬涅依
local m=12048003
local cm=_G["c"..m]
cm.named_with_HakaShiroJyou=true
cm.named_with_Mei=true
function cm.initial_effect(c)
--SpecialSummon
local e1=HakaShiro.SPSummon(c,m)
--handeffect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m+100)
e2:SetCost(cm.cost)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetDescription(aux.Stringid(m,2))
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.descon)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.cost(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.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.drcon1)
e1:SetOperation(cm.drop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--sp_summon effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.regcon)
e2:SetOperation(cm.regop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetCondition(cm.drcon2)
e3:SetOperation(cm.drop2)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function cm.filter(c,sp)
return c:GetSummonPlayer()==sp
end
function cm.drcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,1-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)
if not Duel.IsPlayerCanDiscardDeck(tp,2) then return end
local g=Duel.GetDecktopGroup(tp,2)
Duel.SendtoGrave(g,REASON_EFFECT)
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,1-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)
if not Duel.IsPlayerCanDiscardDeck(tp,2*n) then return end
local g=Duel.GetDecktopGroup(tp,2*n)
Duel.SendtoGrave(g,REASON_EFFECT)
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return tt>19
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,c) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,aux.ExceptThisCard(e))
Duel.Destroy(sg,REASON_EFFECT)
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--墓城的款待者 萨文
local m=12048004
local cm=_G["c"..m]
cm.named_with_HakaShiro=true
function cm.initial_effect(c)
--SpecialSummoneffect
local e1=srre.SPSummoneffect(c,m,{m,0},4,CATEGORY_TOGRAVE,nil,{1,m},nil,nil,cm.sptg,cm.spop)
if not cm.global_check then
cm.global_check=true
HakaShiro_EndEffect={}
HakaShiro_EndEffect[1]=0
end
--handeffect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetHintTiming(0,TIMING_STANDBY_PHASE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(2,m+100)
e2:SetCost(cm.cost)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsAbleToGrave()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
local tt=Duel.GetOperatedGroup():GetFirst()
HakaShiro_EndEffect[#HakaShiro_EndEffect+1]=tt:GetCode()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetLabel(tt:GetCode())
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetLabel(tt:GetFieldID())
Duel.RegisterEffect(e2,tp)
e1:SetLabelObject(e2)
if Duel.GetFlagEffect(tp,m+100)==0 then
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetOperation(cm.retop)
Duel.RegisterEffect(e3,tp)
end
end
end
function cm.aclimit(e,re,tp)
local rc=re:GetHandler()
return rc:GetOriginalCode()==e:GetLabel() and (not rc:IsOnField() or rc:GetFieldID()~=e:GetLabelObject():GetLabel())
end
function cm.retfilter(c)
return HakaShiro_EndEffect and c:IsAbleToGrave() and c:IsCode(table.unpack(HakaShiro_EndEffect))
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.retfilter,tp,LOCATION_DECK,0,1,nil) then return end
local tt=Duel.GetMatchingGroup(cm.retfilter,tp,LOCATION_DECK,0,nil)
if tt:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=tt:Select(tt,tp,1,63,nil)
if tg:GetCount()>0 then
Duel.SendtoGrave(tg,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m+100,0,0,1)
end
end
end
function cm.cost(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.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--墓城的巡逻员 帕特拉
local m=12048005
local cm=_G["c"..m]
cm.named_with_HakaShiro=true
function cm.initial_effect(c)
--SpecialSummon
local e1=srre.SPSummon(c,code,{m,0},{1,m},LOCATION_GRAVE,cm.spcon,nil)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if not c:GetReasonEffect() then return false end
local tt=c:GetReasonEffect():GetHandler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and srre.check_set_HakaShiro(tt) and tt:IsType(TYPE_MONSTER)
end
function cm.filter(c)
return srre.check_set_HakaShiro(c) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.smfilter(c)
return srre.check_set_SeHakaShiroJyou(c)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
local tt=Duel.GetMatchingGroupCount(cm.smfilter,tp,LOCATION_GRAVE,0,nil)
if tt>0 and Duel.IsPlayerCanDiscardDeck(tp,tt) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
local g=Duel.GetDecktopGroup(tp,tt)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
Duel.LoadScript("c12048000.lua")
--墓城的血姬 布璐缇雅
local m=12048006
local cm=_G["c"..m]
cm.named_with_HakaShiro=true
function cm.initial_effect(c)
--SpecialSummon
local e1=srre.SPSummon(c,code,{m,1},{1,m},LOCATION_HAND+LOCATION_GRAVE,cm.spcon,cm.spop)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.spfilter(c)
return srre.check_set_HakaShiro(c)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanDiscardDeckAsCost(tp,1) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetDecktopGroup(tp,1)
Duel.SendtoGrave(g,REASON_EFFECT)
local tc=g:GetFirst()
while tc do
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetLabel(tc:GetFieldID())
Duel.RegisterEffect(e2,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_EVENT+RESET_PHASE+PHASE_END)
e1:SetLabel(tc:GetCode())
e1:SetLabelObject(e2)
Duel.RegisterEffect(e1,tp)
tc=g:GetNext()
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.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
local loc=c:GetLocation()
if not bit.band(loc,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE) then return end
if Duel.IsExistingMatchingCard(nil,tp,0,loc,1,nil) then
local g=Duel.GetFieldGroup(tp,0,loc)
local sg=g:RandomSelect(tp,1)
local g1=Duel.GetFieldGroup(tp,loc,0)
local sg1=g1:RandomSelect(tp,1)
g:Merge(g1)
if Duel.Remove(g,POS_FACEUP,nil)==0 then return end
if c:IsFaceup() and c:IsOnField() then
srre.codechangeop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--万圣狼娘 墓城姬涅依
local m=12048007
local cm=_G["c"..m]
cm.named_with_HakaShiroJyou=true
cm.named_with_Mei=true
function cm.initial_effect(c)
--SpecialSummon
local e1=HakaShiro.SPSummon(c,m)
--DownSpecialSummon
local e2=srre.SPSummoneffect(c,m,{m,1},4,CATEGORY_SPECIAL_SUMMON,nil,{1,m+100},nil,nil,cm.sptg,cm.spop)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetCost(cm.descost)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.spfilter1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp)>0
and Duel.IsExistingTarget(cm.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function cm.costfilter(c)
return c:IsReleasable() and srre.check_set_HakaShiro(c)
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,1-tp,LOCATION_MZONE)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--至妙之漂浮 墓城姬涅依
local m=12048008
local cm=_G["c"..m]
cm.named_with_HakaShiroJyou=true
cm.named_with_Mei=true
function cm.initial_effect(c)
--SpecialSummon
local e1=HakaShiro.SPSummon(c,m)
--to grave
local e2=srre.SPSummoneffect(c,m,{m,1},3,CATEGORY_DECKDES,nil,{1,m+100},cm.spcon,nil,cm.sptg,cm.spop)
--disable field
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetCondition(cm.accon)
e3:SetValue(cm.aclimit)
c:RegisterEffect(e3)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)-Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)
if chk==0 then return ct>0 and Duel.IsPlayerCanDiscardDeck(tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)-Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)
if ct>0 then
if ct>7 then ct=7 end
Duel.DiscardDeck(tp,ct,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
end
end
function cm.aclimit(e,re,tp)
local rc=re:GetHandler()
return re:GetHandler():IsType(TYPE_TRAP) and not rc:IsImmuneToEffect(e)
end
function cm.accon(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return tt>29
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--至高之按摩 墓城姬涅依
local m=12048009
local cm=_G["c"..m]
cm.named_with_HakaShiroJyou=true
cm.named_with_Mei=true
function cm.initial_effect(c)
--SpecialSummon
local e1=HakaShiro.SPSummon(c,m)
--to grave
local e2=srre.SPSummoneffect(c,m,{m,1},3,CATEGORY_DECKDES,nil,{1,m+100},cm.spcon,nil,cm.sptg,cm.spop)
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetDescription(aux.Stringid(m,2))
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.discon)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
if chk==0 then return ct>0 and Duel.IsPlayerCanDiscardDeck(tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
if ct>0 then
if ct>7 then ct=7 end
Duel.DiscardDeck(tp,ct,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
end
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return tt>29
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(0,1)
Duel.RegisterEffect(e2,tp)
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--蝴蝶的魔导姬 涅依
local m=12048015
local cm=_G["c"..m]
cm.named_with_Mei=true
function cm.initial_effect(c)
--SpecialSummon
local e1=HakaShiro.SPSummon(c,m)
--to grave
local e2=srre.SPSummoneffect(c,m,{m,1},3,CATEGORY_TOGRAVE+CATEGORY_DECKDES,nil,{1,m+100},nil,nil,cm.sptg,cm.spop)
--INDESTRUCTABLE
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.indcon)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.IsPlayerCanDiscardDeck(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,nil)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if ( not Duel.IsPlayerCanDiscardDeck(tp,1) ) or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 then return end
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)-1
local hc=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,math.min(ct,hc),nil,REASON_EFFECT)
local tt=g:GetCount()+1
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
local tg=Duel.GetDecktopGroup(tp,tt)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return tt>9
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--阿尔·阿吉夫的残页
local m=12048018
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e0:SetCost(cm.cost)
c:RegisterEffect(e0)
--destroy replace
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetRange(LOCATION_FZONE)
e1:SetTarget(cm.desreptg)
e1:SetValue(cm.desrepval)
e1:SetOperation(cm.desrepop)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--Special Summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCost(cm.spcost1)
e3:SetTarget(cm.sptg1)
e3:SetOperation(cm.spop1)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return not c:IsLocation(LOCATION_EXTRA)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()==nil
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=Duel.GetAttacker()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,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
local tc=Duel.GetAttacker()
if tc:IsRelateToBattle() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function cm.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x2fb0,3,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x2fb0,3,REASON_COST)
end
function cm.spfilter1(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg1(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 Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp)
and Duel.IsPlayerCanDiscardDeck(tp,1) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function cm.desrepval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer())
end
function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,ct,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
Duel.Hint(HINT_CARD,0,m)
end
Duel.LoadScript("c12048000.lua")
--墓城七姬 壹之姬 亚希娅
local m=12048020
local cm=_G["c"..m]
cm.named_with_SeHakaShiroJyou=true
cm.srre_front_side=12048020
cm.srre_back_side=12048023
function cm.initial_effect(c)
--SpecialSummon
local e1=srre.SPSummon(c,code,{m,0},{1,m},LOCATION_HAND+LOCATION_GRAVE,cm.spcon,nil)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.tgcon)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
--qe
local e3=srre.negateeffect(c,m,{m,3},CATEGORY_DESTROY,LOCATION_MZONE,nil,cm.necon,cm.cost,cm.netg,cm.neop)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tt>29
end
function cm.cfilter(c,tp)
return c:IsFaceup() and srre.check_set_HakaShiroJyou(c) and c:GetSummonPlayer()==tp
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
local g=Duel.GetDecktopGroup(tp,1)
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
if Duel.GetFlagEffect(tp,m)>4 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
srre.codechangeop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.necon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and e:GetHandler():IsDestructable()
end
function cm.costfilter(c)
return c:IsAbleToDeckAsCost() and srre.check_set_HakaShiro(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,3,nil) end
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.SendtoDeck(g,nil,1,REASON_COST)
end
function cm.netg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function cm.neop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if eg and eg:GetFirst():IsRelateToEffect(e) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--墓城七姬 二之姬 玛莉梅娜
local m=12048021
local cm=_G["c"..m]
cm.named_with_SeHakaShiroJyou=true
cm.srre_front_side=12048021
cm.srre_back_side=12048022
function cm.initial_effect(c)
--SpecialSummon
local e1=srre.SPSummon(c,code,{m,0},{1,m},LOCATION_HAND+LOCATION_GRAVE,cm.spcon,nil)
--change EFFECT
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetDescription(aux.Stringid(m,1))
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(cm.cost)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tt>14
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,3) end
Duel.DiscardDeck(tp,3,REASON_COST)
end
function cm.cfilter1(c)
return srre.check_set_HakaShiro(c)
end
function cm.cfilter2(c)
return srre.check_set_HakaShiroJyou(c)
end
function cm.cfilter3(c)
return srre.check_set_SeHakaShiroJyou(c)
end
function cm.filter(c,e,tp)
return srre.check_set_HakaShiro(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tt1=Duel.GetMatchingGroupCount(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
local tt2=Duel.GetMatchingGroupCount(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)
if tt1>9 then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
if tt2>6 then
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local tt1=Duel.GetMatchingGroupCount(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
local tt2=Duel.GetMatchingGroupCount(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)
local tt=Duel.GetMatchingGroup(cm.cfilter3,tp,LOCATION_GRAVE,0,nil)
local tt3=tt:GetClassCount(Card.GetCode)
if tt1>9 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if tt2>6 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
if tt3>5 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
srre.codechangeop(e,tp,eg,ep,ev,re,r,rp)
end
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--永远的证明 玛莉梅娜
local m=12048022
local cm=_G["c"..m]
cm.srre_front_side=12048021
cm.srre_back_side=12048022
function cm.initial_effect(c)
--immune
local e1=srre.immuneffect(c,1)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_DRAW)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--back
local e3=srre.backeffect(c)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and r==REASON_RULE
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tt=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(1-tp,tt) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,tt)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
Duel.DiscardDeck(1-tp,tt,REASON_EFFECT)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_DRAW)
e2:SetReset(RESET_PHASE+PHASE_END,1)
e2:SetTargetRange(0,1)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PREDRAW)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCountLimit(1)
e3:SetCondition(cm.recon)
e3:SetOperation(cm.reop)
Duel.RegisterEffect(e3,tp)
end
function cm.recon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(1-tp)
end
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--享乐的不死者 亚希娅
local m=12048023
local cm=_G["c"..m]
cm.srre_front_side=12048020
cm.srre_back_side=12048023
function cm.initial_effect(c)
--immune
local e1=srre.immuneffect(c,1)
--qe
local e2=srre.negateeffect(c,m,{m,0},CATEGORY_NEGATE,LOCATION_MZONE,nil,cm.necon,cm.cost,cm.netg,cm.neop)
--back
local e3=srre.backeffect(c)
end
function cm.necon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function cm.costfilter(c)
return c:IsAbleToDeckAsCost() and srre.check_set_HakaShiro(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,5,nil) end
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,5,5,nil)
Duel.SendtoDeck(g,nil,1,REASON_COST)
end
function cm.netg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.neop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
Duel.LoadScript("c12048000.lua")
--墓城七姬 五之姬 哈谢尔
local m=12048024
local cm=_G["c"..m]
cm.srre_front_side=12048024
cm.srre_back_side=12048025
cm.named_with_SeHakaShiroJyou=true
function cm.initial_effect(c)
--front change
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_ADJUST)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e0:SetCountLimit(1)
e0:SetCondition(cm.fronton)
e0:SetOperation(cm.frontop)
c:RegisterEffect(e0)
--SpecialSummon
local e1=srre.SPSummon(c,code,{m,0},{1,m},LOCATION_HAND+LOCATION_GRAVE,cm.spcon,cm.spop)
--level
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetRange(LOCATION_HAND)
e3:SetValue(cm.lvval)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
c:RegisterEffect(e3)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_GRAVE,0)
e2:SetValue(cm.efilter)
c:RegisterEffect(e2)
--immune
local e4=srre.immuneffect(c,1,SUMMON_TYPE_NORMAL)
--arkup
local e5=srre.atk_up(c,cm.atkval,1)
end
function cm.fronton(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return cm.srre_back_side and c:GetOriginalCode()==cm.srre_front_side and c:GetFlagEffect(m)>0
end
function cm.frontop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tcode=cm.srre_back_side
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,1,tcode)
end
function cm.efilter(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function cm.rfilter(c)
return srre.check_set_HakaShiro(c)
end
function cm.lvval(e)
local tp=e:GetHandlerPlayer()
local g=Duel.GetMatchingGroupCount(cm.rfilter,tp,LOCATION_GRAVE,0,nil)
return -g/2
end
function cm.spfilter(c)
return srre.check_set_SeHakaShiroJyou(c)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
srre.codechangeop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.atkval(e,c)
local tp=e:GetHandlerPlayer()
local g=Duel.GetMatchingGroupCount(cm.rfilter,tp,LOCATION_GRAVE,0,nil)
return g*300
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--血族之夏 墓城姬 哈谢尔
local m=12048025
local cm=_G["c"..m]
cm.srre_front_side=12048024
cm.srre_back_side=12048025
function cm.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetHintTiming(TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetCondition(cm.tgcon)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
--level_Redirect
local e3=srre.level_Redirect(c,LOCATION_HAND)
--back
local e4=srre.backeffect(c)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():GetEquipGroup():IsContains(e:GetHandler()) and Duel.IsPlayerCanDiscardDeck(tp,3)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,3)
Duel.SendtoGrave(g,REASON_EFFECT)
local th=re:GetHandler():GetEquipTarget()
local tt=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_GRAVE,0,nil)
if tt>29 and th:IsControlerCanBeChanged() then
Duel.GetControl(th,tp,PHASE_END)
end
end
function cm.filter(c)
return c:IsFaceup()
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.filter(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(m)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_MZONE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not tc:IsRelateToEffect(e) or not cm.filter(tc) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc)
e1:SetValue(cm.eqlimit)
c:RegisterEffect(e1)
end
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--墓城七姬 四之姬 萨莉亚
local m=12048026
local cm=_G["c"..m]
cm.named_with_SeHakaShiroJyou=true
cm.srre_front_side=12048026
cm.srre_back_side=12048027
function cm.initial_effect(c)
--special summon proc
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetCondition(cm.actcon)
e4:SetOperation(cm.actop)
e4:SetLabelObject(e2)
c:RegisterEffect(e4)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(cm.splimit)
e1:SetRange(LOCATION_MZONE)
c:RegisterEffect(e1)
--to grave
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_TO_DECK)
e4:SetCondition(cm.tgcon)
e4:SetOperation(cm.tgop)
c:RegisterEffect(e4)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_HAND)
end
function cm.nfilter(c)
return not c:IsRace(RACE_ZOMBIE)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local tt=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tt>14
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
return re==te and not Duel.IsExistingMatchingCard(cm.nfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
srre.codechangeop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.tgfilter(c,tp)
return c:IsControler(tp) and c:IsAbleToGrave() and c:IsLocation(LOCATION_DECK)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
if not eg then return false end
local teg=eg:Filter(cm.tgfilter,nil,tp)
return teg
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local teg=eg:Filter(cm.tgfilter,nil,tp)
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local stdg=teg:Select(tp,1,1,nil)
Duel.SendtoGrave(stdg,REASON_EFFECT)
end
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--血族冲刺 墓城姬 萨莉亚
local m=12048027
local cm=_G["c"..m]
cm.srre_front_side=12048026
cm.srre_back_side=12048027
cm.named_with_SeHakaShiroJyou=true
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetRange(LOCATION_MZONE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.spop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetTargetRange(LOCATION_GRAVE,0)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(cm.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
local e4=srre.backeffect(c)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and c:IsType(TYPE_LINK)
end
function cm.eftg(e,c)
return c:IsRace(RACE_ZOMBIE)
end
function cm.spcostfilter(c,m)
return c:IsAbleToRemoveAsCost() and c:IsCode(m)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetMZoneCount(tp)<=0 then return false end
local g=Duel.GetMatchingGroup(cm.spcostfilter,tp,LOCATION_GRAVE,0,c,c:GetCode())
return g:GetCount()>0
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.spcostfilter,tp,LOCATION_GRAVE,0,c,c:GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
\ No newline at end of file
--墓城的血姬 布璐缇雅
local m=12048028
local cm=_G["c"..m]
cm.named_with_HakaShiro=true
Duel.LoadScript("c12048000.lua")
cm.srre_front_side=12048006
cm.srre_back_side=12048028
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,m)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(cm.eqtg)
e2:SetOperation(cm.eqop)
c:RegisterEffect(e2)
--immune
local e1=srre.immuneffect(c,1)
--back
local e3=srre.backeffect(c)
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,0,tp,LOCATION_DECK)
end
function cm.filter(c,rc)
return not c:IsType(TYPE_EQUIP) and srre.check_set_HakaShiro(c)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,5)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local g=Duel.GetDecktopGroup(tp,5):Filter(cm.filter,nil,c)
if g:GetCount()>0 and Duel.SelectEffectYesNo(tp,e:GetHandler()) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tg=g:FilterSelect(tp,cm.filter,1,5,nil,rc)
local tc=tg:GetFirst()
while tc do
if not Duel.Equip(tp,tc,c,true) then return end
if tc:GetOriginalType()~=TYPE_SPELL+TYPE_EQUIP then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
e1:SetLabelObject(c)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(300)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=tg:GetNext()
end
end
Duel.ShuffleDeck(tp)
end
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--墓城誓姬 黑崎春日
local m=12048030
local cm=_G["c"..m]
cm.named_with_HakaShiro=true
function cm.initial_effect(c)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.cfilter(c,tp)
return srre.check_set_HakaShiro(c) and c:IsAbleToGraveAsCost()
end
function cm.cfilter1(c,tp)
return srre.check_set_HakaShiro(c) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,3,nil,tp) and Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end
if Duel.GetMZoneCount(tp)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,3,3,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter1,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
local g1=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,2,g,tp)
g:Merge(g1)
Duel.SendtoGrave(g,REASON_COST)
end
end
function cm.spfilter1(c,e,tp)
return srre.check_set_HakaShiro(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=( Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) )
local b2=( Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) )
if chk==0 then return b1 and b2 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if true then
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tt=g:Select(tp,1,1,nil)
Duel.SendtoDeck(tt,nil,2,REASON_EFFECT)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetLabel(tt)
e1:SetReset(RESET_EVENT+EVENT_CHAIN_END)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local tt=Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)
local ct=e:GetLabel()
local ctt=math.abs(tt-ct)
if ctt>0 then
Duel.DiscardDeck(tp,ctt,REASON_EFFECT)
end
e:Reset()
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--墓城强欲姬 黑崎春日
local m=12048031
local cm=_G["c"..m]
cm.named_with_HakaShiro=true
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)
--special summon rule
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.sprcon)
e2:SetOperation(cm.sprop)
c:RegisterEffect(e2)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCountLimit(1,m)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.descon)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
end
function cm.sprfilter(c)
return c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function cm.sprfilter1(c,tp,g,sc)
local lv=c:GetLevel()
return c:IsType(TYPE_TUNER) and g:IsExists(cm.sprfilter2,1,c,tp,c,sc,lv)
end
function cm.sprfilter2(c,tp,mc,sc,lv)
local sg=Group.FromCards(c,mc)
return ( c:IsLevel(lv+3) or lv>3 and c:IsLevel(lv-3) ) and not c:IsType(TYPE_TUNER)
and Duel.GetLocationCountFromEx(tp,tp,sg,sc)>0
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(cm.sprfilter1,1,nil,tp,g,c)
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:FilterSelect(tp,cm.sprfilter1,1,1,nil,tp,g,c)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=g:FilterSelect(tp,cm.sprfilter2,1,1,mc,tp,mc,c,mc:GetLevel())
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
end
function cm.cfilter(c,tp)
return srre.check_set_HakaShiro(c) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=nil
if tg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=tg:Select(tp,ft,ft,nil)
else
g=tg
end
if g:GetCount()>0 then
local fid=e:GetHandler():GetFieldID()
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
Duel.Destroy(g,REASON_EFFECT)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(HakaShiro.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.ffilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp and c:IsType(TYPE_MONSTER)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return eg and eg:FilterCount(cm.ffilter,nil,tp)>0
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.ffilter,nil,tp)
local tt=g:GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,tt,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--剑誓 节制 春日
local m=12048032
local cm=_G["c"..m]
function cm.initial_effect(c)
--set
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1)
e3:SetCondition(cm.setcon)
e3:SetTarget(cm.settg)
e3:SetOperation(cm.setop)
c:RegisterEffect(e3)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE,tp,LOCATION_REASON_TOFIELD)>0 and not e:GetHandler():IsForbidden() end
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetRange(LOCATION_SZONE)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TEMP_REMOVE-RESET_TURN_SET)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_REMOVE_TYPE)
e2:SetValue(TYPE_MONSTER+TYPE_EFFECT)
c:RegisterEffect(e2)
--to deck
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(m,0))
e7:SetCategory(CATEGORY_RECOVER)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_PHASE+PHASE_STANDBY)
e7:SetRange(LOCATION_SZONE)
e7:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TEMP_REMOVE-RESET_TURN_SET)
e7:SetCountLimit(1)
e7:SetCondition(cm.rtdcon)
e7:SetTarget(cm.rtdtg)
e7:SetOperation(cm.rtdop)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetCondition(cm.rtdcon1)
e8:SetTarget(cm.rtdtg1)
e8:SetOperation(cm.rtdop1)
c:RegisterEffect(e8)
end
function cm.rtdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function cm.rtdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
end
function cm.rtdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLP(tp)<Duel.GetLP(1-tp) then
local lp=Duel.GetLP(1-tp)-Duel.GetLP(tp)
Duel.Recover(tp,lp,REASON_ADJUST)
end
end
function cm.rtdcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsFaceup() and Duel.GetTurnPlayer()==tp and Duel.GetLP(tp)==Duel.GetLP(1-tp) and c:GetFlagEffect(m)==0
end
function cm.rtdtg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.rtdop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetMZoneCount(tp)==0 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local tt=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
if chk==0 then return tt>5 and Duel.GetCurrentChain()==0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,5-tt,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanSendtoHand(1-tp) then return end
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if g:GetCount()<6 then return end
local ct=g:GetCount()-5
if ct>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(1-tp,Card.IsAbleToHand,ct,ct,nil,1-tp,POS_FACEUP,REASON_RULE)
Duel.SendtoHand(sg,nil,REASON_RULE)
end
end
\ No newline at end of file
--偶尔拿出点真本事
function c12048033.initial_effect(c)
--effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c12048033.target)
e1:SetOperation(c12048033.operation)
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(c12048033.reptg)
e2:SetValue(c12048033.repval)
e2:SetOperation(c12048033.repop)
c:RegisterEffect(e2)
end
function c12048033.filter(c)
return c:IsSetCard(0xafa9) and c:IsFaceup()
end
function c12048033.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if (not Duel.IsExistingMatchingCard(c12048033.filter,tp,LOCATION_ONFIELD,0,1,nil)) or (not Duel.IsPlayerCanDraw(tp,1)) then
op=0
e:SetLabel(op)
return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local op=Duel.SelectOption(tp,aux.Stringid(12048033,1),aux.Stringid(12048033,2))
e:SetLabel(op)
if op==1 then
e:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
end
function c12048033.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if e:GetLabel()==0 then
Duel.RegisterFlagEffect(tp,12048004,RESET_PHASE+PHASE_END,0,1)
else
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c12048033.repfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE)
and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c12048033.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c12048033.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c12048033.repval(e,c)
return c12048033.repfilter(c,e:GetHandlerPlayer())
end
function c12048033.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--强欲妹 玛门
local m=12048035
local cm=_G["c"..m]
cm.named_with_HakaShiro=true
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,cm.tfilter,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,1)
e1:SetValue(cm.aclimit)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
end
function cm.tfilter(c)
return c:IsCode(12048031)
end
function cm.nfilter(c)
return c:IsFacedown() or not c:IsRace(RACE_ZOMBIE)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return not Duel.IsExistingMatchingCard(cm.nfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.aclimit(e,re,tp)
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_HAND) and not rc:IsImmuneToEffect(e)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
if Duel.CheckReleaseGroup(REASON_COST,tp,nil,2,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
local g=Duel.SelectReleaseGroup(REASON_COST,tp,nil,2,2,nil)
Duel.Release(g,REASON_COST)
c.drop(e,tp,eg,ep,ev,re,r,rp)
end
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--向墓城起誓
local m=12048040
local cm=_G["c"..m]
cm.named_with_HakaShiro=true
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(cm.setcon)
e2:SetCountLimit(1,m)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.settg)
e2:SetOperation(cm.setop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsAbleToGraveAsCost() and srre.check_set_Mei(c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tt=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SendtoGrave(tt,REASON_COST)
end
function cm.tgfilter(c)
return srre.check_set_HakaShiro(c) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_GRAVE,0,2,2,nil)
if #sg>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END
end
function cm.filter(c,e,sp)
return c:IsSetCard(0xafa9) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local sc=Duel.GetFirstMatchingCard(aux.NecroValleyFilter(cm.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
Duel.LoadScript("c12048000.lua")
--开启幻想之门
local m=12048048
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
end
function cm.tfilter(c,e,tp)
if not c.srre_back_side then return false end
local tcim={Duel.ReadCard(tc.srre_back_side,CARDDATA_CODE,CARDDATA_SETCODE,CARDDATA_TYPE,CARDDATA_ATTACK,CARDDATA_DEFENSE,CARDDATA_LEVEL,CARDDATA_RACE,CARDDATA_ATTRIBUTE)}
return srre.check_set_seHakaShiroJyou(c) and not c:IsPublic() and Duel.IsPlayerCanSpecialSummonMonster(tp,table.unpack(tcim))
end
function cm.tgfilter(c)
return c:IsAbleToGrave() and c:IsSetCard(0xafa9)
end
function cm.spfilter1(c,sc)
return c:IsAbleToRemove() and c:IsCanBeSynchroMaterial(sc)
end
function cm.thfilter1(c,e,tp)
local mg=Duel.GetMatchingGroup(cm.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,c)
return c:IsType(TYPE_SYNCHRO) and c:IsSynchroSummonable(nil,mg) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=( Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,20,nil) )
local b2=Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_EXTRA,0,1,nil)
local b3=Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp)
if chk==0 then return b1 or b2 or b3 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(m,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(m,1)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(m,2)
opval[off-1]=3
off=off+1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
e:SetOperation(cm.atop)
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
elseif opval[op]==2 then
e:SetCategory(CATEGORY_TOGRAVE)
e:SetOperation(cm.tgop)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
elseif opval[op]==3 then
e:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e:SetOperation(cm.spop)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
end
function cm.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,cm.tfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()==0 then return false end
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
local tcim={Duel.ReadCard(tc.srre_back_side,CARDDATA_CODE,CARDDATA_SETCODE,CARDDATA_TYPE,CARDDATA_ATTACK,CARDDATA_DEFENSE,CARDDATA_LEVEL,CARDDATA_RACE,CARDDATA_ATTRIBUTE)}
if Duel.GetMZoneCount(tp)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,table.unpack(tcim)) then
local tcode=tc.srre_back_side
tc:SetEntityCode(tcode,true)
tc:ReplaceEffect(tcode,0,0)
Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)
end
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
local tc=g:GetFirst()
Duel.SendtoGrave(tc,REASON_EFFECT)
local c=e:GetHandler()
--cost -2
Duel.RegisterFlagEffect(tp,12048004,RESET_PHASE+PHASE_END,0,1)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.thfilter1,tp,LOCATION_EXTRA,0,nil,e,tp)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local mg=Duel.GetMatchingGroup(cm.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,sg:GetFirst())
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end
end
--薇薇安·伊文捷琳 υ
local m=12098004
local cm=_G["c"..m]
function cm.initial_effect(c)
--summon proc
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.sumcon)
e1:SetOperation(cm.sumop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCondition(cm.descon)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_RELEASE)
e3:SetCondition(cm.dsscon)
e3:SetTarget(cm.dsstg)
e3:SetOperation(cm.dssop)
c:RegisterEffect(e3)
end
function cm.sumcon(e,c)
local tp=e:GetHandler():GetControler()
return Duel.CheckLPCost(tp,2000)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.PayLPCost(tp,2000)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function cm.desfilter(c)
return c:IsType(TYPE_TRAP) or (c:IsFacedown() and c:IsLocation(LOCATION_SZONE) and c:GetSequence()~=5)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and cm.desfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 and g:GetFirst():IsFaceup() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end
if tc:IsType(TYPE_TRAP) then Duel.Destroy(tc,REASON_EFFECT) end
end
end
function cm.dsscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_SUMMON)
end
function cm.dssfilter(c)
return c:IsFacedown() or c:IsType(TYPE_SPELL)
end
function cm.dsstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and cm.dssfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.dssfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
if g:GetCount()>0 and g:GetFirst():IsFaceup() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
end
function cm.dssop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end
if tc:IsType(TYPE_SPELL) then Duel.Destroy(tc,REASON_EFFECT) end
end
end
--薇薇安·伊文捷琳 η
local m=12098009
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(1160)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetRange(LOCATION_HAND)
e0:SetCost(cm.reg)
c:RegisterEffect(e0)
--level up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.sdcon)
e1:SetTarget(cm.sdtg)
e1:SetOperation(cm.sdop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+900)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--
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_TO_GRAVE)
e3:SetCountLimit(1,12098109)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.reg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:GetHandler():RegisterFlagEffect(m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.sdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)~=0
end
function cm.sdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
end
function cm.sdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SortDecktop(tp,tp,3)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsType(TYPE_PENDULUM) then
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
else
Duel.MoveSequence(tc,1)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
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,false,false) 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 c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--时光的本愿
local m=12098073
local cm=_G["c"..m]
function cm.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:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function cm.filter(c,e,tp)
return c:IsCode(12098000)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CHANGE_DAMAGE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(0,1)
e4:SetValue(0)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
local e5=e4:Clone()
e5:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e5:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e5,tp)
end
end
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()==re:GetOwnerPlayer() and e:GetHandler()~=re:GetHandler()
end
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
if ven then return end
ven=ven or {}
function ven.set(code,setcode,rkflag)
if not _G["c"..code] then _G["c"..code]={}
setmetatable(_G["c"..code],Card)
_G["c"..code].__index=_G["c"..code]
end
return code,_G["c"..code]
end
local m,cm=ven.set(189113)
cm.name="恒夜的略影"
ven=cm
function ven.EnableSpiritReturn(c,op,cat,event1,...)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(event1)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(cm.SpiritReturnReg(op,cat))
c:RegisterEffect(e1)
for i,event in ipairs{...} do
local e2=e1:Clone()
e2:SetCode(event)
c:RegisterEffect(e2)
end
end
function cm.SpiritReturnReg(op,cat)
return
function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(1104)
e1:SetCategory(CATEGORY_TOHAND|cat)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0xd6e0000+RESET_PHASE+PHASE_END)
e1:SetCondition(cm.SpiritReturnConditionForced)
e1:SetTarget(aux.SpiritReturnTargetForced)
e1:SetOperation(cm.SpiritReturnOperation(op))
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(cm.SpiritReturnConditionOptional)
e2:SetTarget(aux.SpiritReturnTargetOptional)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e3:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end)
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE end)
e3:SetOperation(cm.SpiritReturnOperation(op))
c:RegisterEffect(e3)
end
end
function cm.SpiritReturnConditionForced(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(m)==0 and not c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) and not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN)
end
function cm.SpiritReturnConditionOptional(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(m)==0 and not c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) and c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN)
end
function cm.SpiritReturnOperation(op)
return
function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
if Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
if Duel.GetCurrentPhase()==PHASE_BATTLE_START then
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return Duel.GetTurnCount()~=e:GetLabel()end)
e1:SetReset(RESET_PHASE+PHASE_BATTLE_START,2)
else
e1:SetReset(RESET_PHASE+PHASE_BATTLE_START)
end
e1:SetCountLimit(1)
e1:SetOperation(op)
Duel.RegisterEffect(e1,tp)
end
end
end
if not cm then return end
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DRAW+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
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:IsAbleToHand() end
local exc=nil
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then exc=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,0,1,nil) and (Duel.IsPlayerCanSummon(tp) or Duel.IsPlayerCanDraw(tp,1) or Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,exc)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.filter(c)
return (c:IsSummonable(true,nil) or c:IsMSetable(true,nil)) and c:IsType(TYPE_SPIRIT)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or Duel.SendtoHand(tc,nil,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_HAND) then return end
local b1=Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
local b2=Duel.IsPlayerCanDraw(tp,1)
local exc=nil
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then exc=e:GetHandler() end
local b3=Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,exc)
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(m,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(m,1)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(m,2)
opval[off-1]=3
off=off+1
end
if off==1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local op=Duel.SelectOption(tp,table.unpack(ops))
Duel.BreakEffect()
if opval[op]==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
if tc:IsSummonable(true,nil) and (not tc:IsMSetable(true,nil) or Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) then Duel.Summon(tp,tc,true,nil) else Duel.MSet(tp,tc,true,nil) end
end
elseif opval[op]==2 then
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,exc)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst():IsType(TYPE_SPIRIT)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
local m=189114
local cm=_G["c"..m]
cm.name="恒夜骑士-刺影之塞维尔"
Duel.LoadScript("c189113.lua")
function cm.initial_effect(c)
ven.EnableSpiritReturn(c,function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(function(c)return c:IsSummonable(true,nil) or c:IsMSetable(true,nil)end,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(m,0)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc:IsSummonable(true,nil) and (not tc:IsMSetable(true,nil) or Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) then Duel.Summon(tp,tc,true,nil) else Duel.MSet(tp,tc,true,nil) end
end
,CATEGORY_SUMMON,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if dg:GetCount()>0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
local m=189115
local cm=_G["c"..m]
cm.name="恒夜骑士-向曜之尼格蒂姆"
Duel.LoadScript("c189113.lua")
function cm.initial_effect(c)
ven.EnableSpiritReturn(c,function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(function(c)return c:IsSummonable(true,nil) or c:IsMSetable(true,nil)end,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(m,0)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc:IsSummonable(true,nil) and (not tc:IsMSetable(true,nil) or Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) then Duel.Summon(tp,tc,true,nil) else Duel.MSet(tp,tc,true,nil) end
end
,CATEGORY_SUMMON,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return c:IsSetCard(0x1cae) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsAttribute(ATTRIBUTE_LIGHT)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
local m=189116
local cm=_G["c"..m]
cm.name="恒夜骑士-流羽之伽兰菲恩"
Duel.LoadScript("c189113.lua")
function cm.initial_effect(c)
ven.EnableSpiritReturn(c,function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(m,0)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
,CATEGORY_REMOVE,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_HAND)
e3:SetTarget(cm.tg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonable(true,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsSummonable(true,nil) and c:IsRelateToEffect(e) then
Duel.Summon(tp,c,true,nil)
end
end
local m=189118
local cm=_G["c"..m]
cm.name="恒夜骑士-昏暗之奎狄"
Duel.LoadScript("c189113.lua")
function cm.initial_effect(c)
ven.EnableSpiritReturn(c,function(e,tp,eg,ep,ev,re,r,rp)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local fg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if #hg+#fg==0 or not Duel.SelectYesNo(tp,aux.Stringid(m,0)) then return end
local g
if #hg>0 and (#fg==0 or Duel.SelectOption(tp,aux.Stringid(m,3),aux.Stringid(m,4))==0) then
g=hg:RandomSelect(tp,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
end
if g:GetCount()~=0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
,CATEGORY_DESTROY,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsType(TYPE_SPIRIT) and (c:IsSummonable(true,nil) or c:IsMSetable(true,nil)) and not c:IsCode(m)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if tc:IsSummonable(true,nil) and (not tc:IsMSetable(true,nil)
or Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) then
Duel.Summon(tp,tc,true,nil)
else Duel.MSet(tp,tc,true,nil) end
end
end
local m=189119
local cm=_G["c"..m]
cm.name="恒夜骑士-咎灵之莱拉"
function cm.initial_effect(c)
cm.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsXyzType,TYPE_SPIRIT),4,2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetCondition(function(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end)
e3:SetValue(cm.aclimit)
c:RegisterEffect(e3)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c,tc=e:GetHandler(),eg:GetFirst()
local ph=Duel.GetCurrentPhase()
if ph<PHASE_BATTLE_START or ph>PHASE_BATTLE or ep~=tp or not tc:IsType(TYPE_SPIRIT) or not tc:IsOnField() or not tc:IsCanOverlay() or Duel.GetFlagEffect(tp,m)>0 or Duel.GetLocationCountFromEx(tp,tp,nil,c)==0 or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or not Duel.SelectYesNo(tp,aux.Stringid(m,0)) then return end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
e1:SetCondition(cm.hspcon)
e1:SetValue(SUMMON_TYPE_SPECIAL)
c:RegisterEffect(e1)
local g=Group.FromCards(c,tc)
g:KeepAlive()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetLabelObject(g)
e2:SetOperation(cm.xyzop)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_NEGATED)
e3:SetOperation(cm.rstop)
e3:SetLabelObject(e2)
e3:SetReset(RESET_PHASE+PHASE_BATTLE)
Duel.RegisterEffect(e3,tp)
Duel.SpecialSummonRule(tp,c,SUMMON_TYPE_SPECIAL)
end
function cm.hspcon(e,c)
if c==nil then return true end
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tc,c=g:GetFirst(),g:GetNext()
if eg:GetFirst()~=c or not c:IsType(TYPE_XYZ) or not tc:IsCanOverlay() then return end
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then Duel.SendtoGrave(og,REASON_RULE) end
Duel.Overlay(c,Group.FromCards(tc))
end
function cm.rstop(e,tp,eg,ep,ev,re,r,rp)
local e1=e:GetLabelObject()
if e1 then e1:Reset() end
e:Reset()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsCanOverlay),tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil):GetFirst()
if tc and not tc:IsImmuneToEffect(e) then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then Duel.SendtoGrave(og,REASON_RULE) end
Duel.Overlay(c,tc)
end
end
function cm.aclimit(e,re,tp)
if not e:GetHandler():IsType(TYPE_XYZ) then return false end
local g=e:GetHandler():GetOverlayGroup()
if #g==0 then return false end
local typ=0
for tc in aux.Next(g) do typ=typ|tc:GetType() end
return re:IsActiveType(typ)
end
function cm.AddXyzProcedure(c,f,lv,ct,alterf,desc,maxct,op)
local e1=Effect.CreateEffect(c)
e1:SetDescription(1165)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
if not maxct then maxct=ct end
e1:SetCondition(cm.XyzCondition(f,lv,ct,maxct))
e1:SetTarget(aux.XyzTarget(f,lv,ct,maxct))
e1:SetOperation(aux.XyzOperation(f,lv,ct,maxct))
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
end
function cm.XyzCondition(f,lv,minc,maxc)
return function(e,c,og,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local ph=Duel.GetCurrentPhase()
return Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og) and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
end
--大波静流
function c9320009.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2)
--RemoveOverlayCard
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9320009,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,9320009)
e1:SetTarget(c9320009.atttg)
e1:SetOperation(c9320009.attop)
c:RegisterEffect(e1)
--copy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9320009,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,9321009)
e2:SetCost(c9320009.cpcost)
e2:SetTarget(c9320009.cptg)
e2:SetOperation(c9320009.cpop)
c:RegisterEffect(e2)
end
function c9320009.attfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()>0
end
function c9320009.atttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c9320009.attfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9320009.attfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c9320009.attfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c9320009.attop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local og=tc:GetOverlayGroup()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(og,REASON_EFFECT)
end
end
function c9320009.cpfilter(c)
return (c:GetType()==TYPE_SPELL or c:IsType(TYPE_QUICKPLAY)) and c:IsSetCard(0x95) and c:IsAbleToGraveAsCost()
and c:CheckActivateEffect(true,true,false)~=nil
end
function c9320009.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function c9320009.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.CheckLPCost(tp,2000) and Duel.IsExistingMatchingCard(c9320009.cpfilter,tp,LOCATION_DECK,0,1,nil)
end
e:SetLabel(0)
Duel.PayLPCost(tp,2000)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c9320009.cpfilter,tp,LOCATION_DECK,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.SendtoGrave(g,REASON_COST)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function c9320009.cpop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
......@@ -7,16 +7,6 @@
# ◇已核实作者联系不到且没人修Bug的内容【和公共区间内容一样随时都有可能下架】
#◇某失智の刀客塔 3529764274 1 0xca0-0xcaf
!setname 0xca2 Operatives
!setname 0xca3 后巴别塔
!setname 0xca7 爱国者
!setname 0xca8 霜星
!setname 0xcad 鲨鱼
!setname 0x1cad 鲨鱼娘
!setname 0xcae 恒夜
!setname 0x1cae 恒夜骑士
!counter 0xca6 Solomon指示物
!counter 0xcad 鲨鱼指示物
#公孙氏 2167068485 2
......@@ -143,8 +133,6 @@
!counter 0x50a BO指示物
#◇SCL 2798419987 101 0x330-0x33f
!setname 0xa335 灰烬
!setname 0xc335 薪王
#AddCodeList(10113037) 饥饿狼群卡名记述
#团子 1362961985 102 0x5a0-0x5af
......@@ -332,7 +320,6 @@
!setname 0xcfbe 爱妮慕丝
#setcode="yatori" yatori
#named_with_ALSTYE 阿蕾斯缇耶尔
#named_with_HakaShiro 墓城
#named_with_IDA ida
#named_with_Kanariya 卡娜莉雅
#named_with_Mei 涅依
......
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