Commit 019f5db9 authored by tsubaki's avatar tsubaki

1.999zy更新

parent 2f814b62
Pipeline #10266 passed with stage
in 51 seconds
No preview for this file type
This diff is collapsed.
......@@ -120,7 +120,7 @@ function Nef.EnablePendulumAttributeSP(c,num,filter,argTable,reg,tag)
c:RegisterEffect(e1)
-- 由于utility处加载nef,不需要再无效效果
-- --disable HINTMSG_SPSUMMON
-- --disable HINTMSG_SPSUMMON
-- local e2=Effect.CreateEffect(c)
-- e2:SetType(EFFECT_TYPE_FIELD)
-- e2:SetRange(LOCATION_PZONE)
......@@ -172,7 +172,7 @@ function Nef.PConditionFilterSP(c,e,tp,lscale,rscale,filter,argTable,filter2,arg
end
local normalCondition = (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM)))
and lv>lscale and lv<rscale and not c:IsForbidden()
and Nef.PendSummonCheck(c,e,tp,lscale,rscale,filter,argTable,filter2,argTable2,lpz,rpz)
and Nef.PendSummonCheck(c,e,tp,lscale,rscale,filter,argTable,filter2,argTable2,lpz,rpz)
local spCondition = filter(c,Nef.unpack(argTable)) and filter2(c,Nef.unpack(argTable2))
return spCondition and normalCondition
end
......@@ -238,7 +238,7 @@ function Nef.PendOperationSP()
local n1, filter1, argTable1, tag1, pexfunc1 = Nef.GetPendSPInfo(lpz)
local n2, filter2, argTable2, tag2, pexfunc2 = Nef.GetPendSPInfo(rpz)
local lscale = lpz:GetLeftScale()
local rscale = rpz:GetRightScale()
if lscale > rscale then lscale, rscale = rscale, lscale end
......@@ -366,7 +366,7 @@ function Nef.GetPendSPInfo(c)
local pnum = type(mt.pend_num) == "number" and mt.pend_num or mt.pend_num(c)
pend_num = math.min(pend_num, pnum)
end
if mt.pend_filter then
if mt.pend_filter then
local f1=pend_filter
local arg=mt.pend_arg or {1}
local f2_ori=mt.pend_filter
......@@ -395,7 +395,7 @@ end
function Nef.GetFieldLeftScale(tp)
local lpz=Duel.GetFieldCard(tp, LOCATION_PZONE, 0)
if lpz then
if lpz then
return lpz:GetLeftScale()
else
return
......@@ -404,7 +404,7 @@ end
function Nef.GetFieldRightScale(tp)
local rpz=Duel.GetFieldCard(tp, LOCATION_PZONE, 1)
if rpz then
if rpz then
return rpz:GetRightScale()
else
return
......@@ -414,7 +414,7 @@ end
-- function Nef.PendSummonLimitTarget(e,c,sump,sumtype,sumpos,targetp)
-- local c = nil
-- if e then c = e:GetHandler() end
-- return c and sumtype==SUMMON_TYPE_PENDULUM and _G["c" .. c:GetOriginalCode()].pend_filter==nil
-- return c and sumtype==SUMMON_TYPE_PENDULUM and _G["c" .. c:GetOriginalCode()].pend_filter==nil
-- and (c == Duel.GetFieldCard(tp,LOCATION_SZONE, 6) or c == Duel.GetFieldCard(tp,LOCATION_SZONE, 7))
-- end
......@@ -525,7 +525,7 @@ function Nef.SelectGroup(tp,desc,g,f,cg,min,max,...)
local cg=cg or Group.CreateGroup()
sg:Merge(cg)
local ct=sg:GetCount()
local ag=g:Filter(Nef.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
local ag=g:Filter(Nef.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
while ct<max and ag:GetCount()>0 do
local finish=(ct>=min and ct<=max and f(sg,...))
local seg=sg:Clone()
......@@ -553,7 +553,7 @@ function Nef.SelectGroupWithCancel(tp,desc,g,f,cg,min,max,...)
local cg=cg or Group.CreateGroup()
sg:Merge(cg)
local ct=sg:GetCount()
local ag=g:Filter(Nef.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
local ag=g:Filter(Nef.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
while ct<max and ag:GetCount()>0 do
local finish=(ct>=min and ct<=max and f(sg,...))
local cancel=finish or ct==0
......@@ -626,7 +626,7 @@ function Nef.AddXyzProcedureCustom(c,func,gf,minc,maxc,xm,...)
local mt=_G["c" .. code]
mt.xyz_filter=func or aux.TRUE
mt.xyz_count=minc
end
end
local maxc=maxc or minc
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -758,7 +758,7 @@ function Nef.AddCommonCounter(num, code, tp)
if tc:IsControler(tp) then
tc:ResetFlagEffect(999900+code)
if tc:IsLocation(LOCATION_ONFIELD) and tag > 0 then
tc:RegisterFlagEffect(999900+code, RESET_EVENT+0xfe0000, EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE, 0, 0,
tc:RegisterFlagEffect(999900+code, RESET_EVENT+0xfe0000, EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE, 0, 0,
aux.Stringid(code, tag))
end
end
......@@ -791,7 +791,7 @@ function Nef.RefreshCommonCounter(c, code)
local tag = math.min(Nef.counter[c:GetControler()][code], 11)
c:ResetFlagEffect(999900+code)
if tag > 0 then
c:RegisterFlagEffect(999900+code, RESET_EVENT+0xfe0000, EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE, 0, 0,
c:RegisterFlagEffect(999900+code, RESET_EVENT+0xfe0000, EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE, 0, 0,
aux.Stringid(code, tag))
end
end
......@@ -868,7 +868,7 @@ end
-- this group include cards in szone
function Nef.GetLinkArrowGroup(c)
local g = Group.CreateGroup()
if c:IsOnField() then
if c:IsOnField() then
local tp = c:GetControler()
local loc = c:GetLocation()
local seq = c:GetSequence()
......@@ -1041,7 +1041,7 @@ function Nef.RegisterBigFiendEffect(c,e)
ex:SetCode(EVENT_FREE_CHAIN)
ex:SetHintTiming(0,0x1c0)
end
c:RegisterEffect(ex)
c:RegisterEffect(ex)
end
function Auxiliary.NonTuner(f,...)
......@@ -1055,7 +1055,7 @@ if not Nef.SeedField then
local class = {}
class.seeds = {}
class.hint = true
function class.readZone(zone)
local zone0 = zone & 0xff
local zone1 = zone >> 16
......@@ -1095,12 +1095,12 @@ if not Nef.SeedField then
return 1 << (seq - 16)
else
return 1 << (seq + 16)
end
end
end
end
end
--[[
--[[
tp 种子持有者
zone 目标区域
]]
......@@ -1135,7 +1135,7 @@ if not Nef.SeedField then
return true
end
--[[
--[[
tp 种子持有者
p seq的玩家
seq 相对玩家p目标区域序号
......@@ -1151,36 +1151,36 @@ if not Nef.SeedField then
local zone00, zone01 = 0, 0
local zone10, zone11 = 0, 0
for i = 0, 4 do
if class.seeds[i] then
if class.seeds[i] then
local p = class.seeds[i][1]
if p == 0 then
zone00 = zone00 | 1<<i
zone00 = zone00 | 1<<i
zone10 = zone10 | 1<<(i+16)
else
zone01 = zone01 | 1<<i
zone01 = zone01 | 1<<i
zone11 = zone11 | 1<<(i+16)
end
end
if class.seeds[i+16] then
if class.seeds[i+16] then
local p = class.seeds[i+16][1]
if p == 0 then
zone00 = zone00 | 1<<(i+16)
zone00 = zone00 | 1<<(i+16)
zone10 = zone10 | 1<<i
else
zone01 = zone01 | 1<<(i+16)
zone01 = zone01 | 1<<(i+16)
zone11 = zone11 | 1<<i
end
end
end
end
for i = 5, 6 do
if class.seeds[i] then
if class.seeds[i] then
local p = class.seeds[i][1]
if p == 0 then
zone00 = zone00 | 1<<i | 1<<(i+16)
zone10 = zone10 | 1<<i | 1<<(i+16)
zone00 = zone00 | 1<<i | 1<<(i+16)
zone10 = zone10 | 1<<i | 1<<(i+16)
else
zone01 = zone01 | 1<<i | 1<<(i+16)
zone11 = zone11 | 1<<i | 1<<(i+16)
zone01 = zone01 | 1<<i | 1<<(i+16)
zone11 = zone11 | 1<<i | 1<<(i+16)
end
end
end
......@@ -1266,7 +1266,7 @@ if not Nef.SeedField then
if c:IsLocation(LOCATION_MZONE) then
local p = c:GetControler()
local cseq = c:GetSequence()
if p == 1 then
if p == 1 then
p = 0
if cseq < 5 then
cseq = cseq + 16
......@@ -1279,7 +1279,7 @@ if not Nef.SeedField then
end
function class.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then
if chk == 0 then
local seq = e:GetLabel()
return eg:IsExists(class.cfilter, 1, nil, seq)
end
......@@ -1366,21 +1366,29 @@ if not Nef.PLCounter then
function class.Add(tp, code, num)
local eg = class._e[tp][code]
if eg then
--local e = eg:GetLabelObject()
--e:Reset()
eg:Reset()
end
local e1 = Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
--local eg1 = Effect.GlobalEffect()
--eg1:SetType(EFFECT_TYPE_FIELD|EFFECT_TYPE_GRANT)
--eg1:SetTargetRange(0xff, 0)
--eg1:SetTarget(aux.TRUE)
local count = (class._n[tp][code] or 0) + num
class._e[tp][code] = e1
class._n[tp][code] = count
e1:SetDescription(aux.Stringid(code, count))
--eg1:SetLabelObject(e1)
Duel.RegisterEffect(e1, tp)
end
......
......@@ -163,6 +163,7 @@
!setname 0x317 幽曲
!setname 0x334 谢库丽特
!setname 0x338 幽幽子
!setname 0x371 虹之花
!setname 0x372 遗存
!setname 0x379 嫦娥
!setname 0x381
......
No preview for this file type
#[1.999赞颂我的降临吧! HCG][2015.10][2015.4.1][2015.4.1 TCG][2015.1.1][2015.1.1 TCG][2014.10.1][2014.10.1 TCG][2014.7.1][2014.7.14 TCG][2014世界赛][2014.4.1][2014.4.1 TCG][2014.2.1][2014.1.1 TCG][2013.9.1][2013.10.11 TCG][2013.9.1 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1][2011.3.1][2010.9.1][2010.3.1][2009.9.1][2009.3.1][2008.9.1][2008.3.1][2007.9.1][2007.3.1][2006.9.1][2006.3.1][2005.9.1][2005.3.1][2004.9.1][2004.3.1][2003.10.15][2003.7.1][2003.4.10][2003.1.1][2002.10.1][2002.1.1][2000.12.1][2000.4.1][1999.8.26]
#[1.999zy HCG][2015.10][2015.4.1][2015.4.1 TCG][2015.1.1][2015.1.1 TCG][2014.10.1][2014.10.1 TCG][2014.7.1][2014.7.14 TCG][2014世界赛][2014.4.1][2014.4.1 TCG][2014.2.1][2014.1.1 TCG][2013.9.1][2013.10.11 TCG][2013.9.1 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1][2011.3.1][2010.9.1][2010.3.1][2009.9.1][2009.3.1][2008.9.1][2008.3.1][2007.9.1][2007.3.1][2006.9.1][2006.3.1][2005.9.1][2005.3.1][2004.9.1][2004.3.1][2003.10.15][2003.7.1][2003.4.10][2003.1.1][2002.10.1][2002.1.1][2000.12.1][2000.4.1][1999.8.26]
!1.999赞颂我的降临吧! HCG
!1.999zy HCG
#limit
23252 0 --暴力取材
14028 2 --BAD APPLE!!
......@@ -66,6 +66,7 @@
86379864 1 --羽衣若水✿永江衣玖
86379758 1 --嫉妒『看不见的绿眼怪物』
86379752 0 --花咲爷『对华丽的仁者之嫉妒』
86379692 0 --隙间妖怪✿八云紫
--花草卡?
99677001 0 --茨歌仙✿
--k
......
--闲暇✿片断
function c1135101.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetTarget(c1135101.target)
e1:SetOperation(c1135101.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c1135101.handcon)
c:RegisterEffect(e2)
if not c1135101.global_check then
c1135101.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c1135101.checkop)
Duel.RegisterEffect(ge1,0)
end
--
end
--
function c1135101.checkop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),1135101,RESET_PHASE+PHASE_END,0,1)
end
end
function c1135101.handcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.GetFlagEffect(1-tp,1135101)>=5 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
--
function c1135101.tfilter(c,e)
return c:IsFaceup() and c:IsCanBeEffectTarget(e)
end
function c1135101.mfilter(mg,tp)
return Duel.GetLocationCountFromEx(tp,tp,mg,TYPE_LINK)>0
end
function c1135101.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local mg=Duel.GetMatchingGroup(c1135101.tfilter,tp,0,LOCATION_MZONE,nil,e)
if chk==0 then return mg:GetCount()>0 and mg:CheckSubGroup(c1135101.mfilter,2,2,1-tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local tg=mg:SelectSubGroup(tp,c1135101.mfilter,false,2,2,1-tp)
Duel.SetTargetCard(tg)
end
function c1135101.ofilter(c,e)
return c:IsRelateToEffect(e) and c:IsFaceup()
end
function c1135101.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if tg:FilterCount(c1135101.ofilter,nil,e)>1 then
local sg=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,0,LOCATION_EXTRA,nil,tg,nil,2,2)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local lg=sg:Select(1-tp,1,1,nil)
Duel.LinkSummon(1-tp,lg:GetFirst(),tg,nil,2,2)
else
Duel.Draw(tp,1,REASON_EFFECT)
end
else
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--
\ No newline at end of file
--声缘兽 紫薯缘
local m=13000500
local cm=_G["c"..m]
function cm.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetTarget(cm.rmtg)
e1:SetOperation(cm.rmop)
c:RegisterEffect(e1)
end
function cm.rmft(c)
return c:IsFaceup() and c:IsSetCard(0x1ec2) and c:IsAbleToRemove()
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToRemove() end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.rmft,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--声缘兽 潮来狐
local m=13000509
local cm=_G["c"..m]
function cm.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
end
function cm.eqft(c)
return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0xec4) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingMatchingCard(cm.eqft,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceUp,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,cm.eqft,tp,LOCATION_GRAVE,0,1,1,nil)
local eqc=g:GetFirst()
if not eqc or not Duel.Equip(tp,eqc,tc) then return end
local e1=Effect.CreateEffect(e:GetHandler())
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)
e1:SetLabelObject(tc)
eqc:RegisterEffect(e1)
end
end
function cm.eqlimit(e,c)
return e:GetLabelObject()==c
end
--声缘 弦卷真纪
local m=13002000
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon when no monster
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.sphcon)
c:RegisterEffect(e1)
--spsummon when summon success
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function cm.sphcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xec1) and c:GetSummonPlayer()==tp
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
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,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),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_DEFENSE)
end
end
\ No newline at end of file
--声缘 弦卷真纪M
local m=13002003
local cm=_G["c"..m]
function cm.initial_effect(c)
--summon
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.ntcon)
e1:SetOperation(cm.ntop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetTarget(cm.indtg)
e2:SetOperation(cm.indop)
c:RegisterEffect(e2)
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.ntop(e,tp,eg,ep,ev,re,r,rp,c)
--change base attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0xff0000)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(0)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0xec3) and c:IsType(TYPE_MONSTER)
end
function cm.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--声缘+ 弦卷真纪
local m=13002006
local cm=_G["c"..m]
function cm.initial_effect(c)
--linksummon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.matfilter,1,1)
--add magic card to hand
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.shtg)
e1:SetOperation(cm.shop)
c:RegisterEffect(e1)
--add monster to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.adcon)
e2:SetTarget(cm.adtg)
e2:SetOperation(cm.adop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
--splimit
local e4=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(cm.regcon)
e4:SetOperation(cm.regop)
c:RegisterEffect(e4)
end
function cm.matfilter(c)
return c:IsLinkSetCard(0xec3) and c:GetLevel()>0
end
function cm.shft(c)
return c:IsCode(13000015) and c:IsAbleToHand()
end
function cm.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.shft,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.shop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.shft,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
function cm.adcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.adfilter(c,e,tp)
return c:IsLinkSetCard(0xec3) and c:GetLevel()>0 and c:IsAbleToHand()
end
function cm.adtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.adfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.adop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.adfilter,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
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
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)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(m) and bit.band(sumtype,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
\ No newline at end of file
--声缘 弦卷真纪AI ψ
local m=13002009
local cm=_G["c"..m]
--thanks for xhe for part of the script
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.raceft,2,2,cm.linkfilter)
--set unique on field
c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsSetCard,0x1ec3),LOCATION_MZONE)
--add atk
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--to deck
local e2 = Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetCountLimit(1,m)
e2:SetRange(LOCATION_MZONE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.raceft(c)
return c:IsLinkRace(RACE_CYBERSE)
end
function cm.linkfilter(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xec3)
end
function cm.atkval(c)
return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,0xec1) * 100
end
function cm.tdfilter(c)
return c:IsSetCard(0xec3) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,LOCATION_GRAVE,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local tcl=tc:GetLevel()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,tp,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
if tcl>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetValue(tcl)
c:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--声缘 弦卷真纪AI Ξ
local m=13002012
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.raceft,2,2,cm.linkfilter)
--set unique on field
c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsSetCard,0x1ec3),LOCATION_MZONE)
--decrease atk and des
local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_BATTLE_PHASE+TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.atkcon)
e1:SetTarget(cm.atktg)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--to hand
local e2 = Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCountLimit(1,m)
e2:SetRange(LOCATION_MZONE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.raceft(c)
return c:IsLinkRace(RACE_CYBERSE)
end
function cm.linkfilter(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xec3)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.cfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.cfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.cfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(-2100)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
if tc:GetAttack()<=0 then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
function cm.tdfilter(c)
return c:IsSetCard(0xec3) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:GetLevel()>0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(CATEGORY_TOHAND,LOCATION_REMOVED,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local tcl=tc:GetLevel()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
if tcl>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetValue(tcl)
c:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--声缘 弦卷真纪J
local m=13002015
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_CYBERSE),5,2)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--atkup and draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(aux.dscon)
e2:SetCost(cm.atkcost)
--e2:SetTarget(cm.atktarget)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
--spsummon2
--not fixed(20210426)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0xec3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.operation(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)
end
end
function cm.atkfilter(c)
return c:IsSetCard(0xec1) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsType(TYPE_MONSTER)
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.atkfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(500)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousControler(tp)
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_LINK) and c:IsSetCard(0xec1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsLinkBelow(1)
end
function cm.sptg(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.spop(e,tp,eg,ep,ev,re,r,rp)
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 g:GetCount()>0 then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1)
end
--Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--弦卷咖啡厅
local m=13002018
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
c:SetCounterLimit(0x1ec1,9)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(cm.ctcon)
e2:SetOperation(cm.ctop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.spcon)
e3:SetCost(cm.spcost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.ctfilter(c)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousLevelOnField()>=5
end
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.ctfilter,1,nil)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)--wait to change
e:GetHandler():AddCounter(0x1ec1,1)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1ec1)==9
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() end
Duel.SendtoGrave(c,REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.sptg(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)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,PLAYER_ALL,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.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local atk = g:GetFirst():GetTextAttack()
Duel.Recover(tp,atk*2+900,REASON_EFFECT)
Duel.Recover(1-tp,atk*2+900,REASON_EFFECT)
end
end
--弦卷电震大火
local m=13002021
local cm=_G["c"..m]
function cm.initial_effect(c)
--attack twice
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.atkcon)
e1:SetTarget(cm.atktg)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xec3) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK)
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(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--声缘 东北伊达子
local m=13003000
local cm=_G["c"..m]
function cm.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(cm.shtg)
e1:SetOperation(cm.shop)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetCode(EVENT_RELEASE)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.shft(c)
return (c:IsSetCard(0x1ec1) or c:IsSetCard(0xec4)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.shft,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.shop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.shft,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
if Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) and Duel.GetFlagEffect(tp,m)==0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xec1))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xec4) and c:IsLocation(LOCATION_GRAVE) and c:IsLevelBelow(4) 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 true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local c = e:GetHandler()
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc then return end
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
--声缘 东北俊子
local m=13003003
local cm=_G["c"..m]
function cm.initial_effect(c)
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.dscon)
e1:SetTarget(cm.dstg)
e1:SetOperation(cm.dsop)
c:RegisterEffect(e1)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetCode(EVENT_RELEASE)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.dsft(c)
return c:IsFaceup() and not c:IsCode(m) and c:IsRace(RACE_CYBERSE)
end
function cm.dscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.dsft,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function cm.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return Duel.IsExistingMatchingCard(cm.dsft,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if #g>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
if tc:IsType(TYPE_SPELL) and tc:IsDestructable() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
function cm.thft(c)
return c:IsSetCard(0xec1) and c:IsType(TYPE_SPELL) and c:GetType()~=TYPE_SPELL
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,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.thft,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--东北的神弓-东北俊子
local m=13003021
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--link summon
aux.AddLinkProcedure(c,cm.mfilter,3,99)
c:EnableReviveLimit()
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.dscon)
e2:SetTarget(cm.dstg)
e2:SetOperation(cm.dsop)
c:RegisterEffect(e2)
--place
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_RELEASE)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.pltg)
e3:SetOperation(cm.plop)
c:RegisterEffect(e3)
end
function cm.mfilter(c)
return c:IsLinkType(TYPE_LINK)
end
function cm.dscon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_SPELL)
and Duel.IsChainNegatable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAttackAbove(800) and c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsFaceup() or not c:IsRelateToEffect(e) or c:GetAttack()<800
or Duel.GetCurrentChain()~=ev+1 or c:IsStatus(STATUS_BATTLE_DESTROYED) then
return
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-800)
c:RegisterEffect(e1)
if not c:IsHasEffect(EFFECT_REVERSE_UPDATE) then
Duel.NegateActivation(ev)
end
end
function cm.pltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.plop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
--Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_REDIRECT)
e3:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e3)
end
--set link magic(not working properly)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_LINK_SPELL_KOISHI)
e2:SetValue(LINK_MARKER_TOP+LINK_MARKER_TOP_LEFT+LINK_MARKER_BOTTOM+LINK_MARKER_BOTTOM_RIGHT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
\ No newline at end of file
--切蒲英稻米棒
local m=13003039
local cm=_G["c"..m]
function cm.initial_effect(c)
--release
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.mstft(c)
return c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect()
end
function cm.filter(c,tp)
return
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.mstft,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_HAND+LOCATION_MZONE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.mstft,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if g:GetCount()<=0 then return 0 end
Duel.HintSelection(g)
if Duel.Release(g,REASON_EFFECT)~=0 then
Duel.Recover(tp,1000,REASON_EFFECT)
if g:GetFirst():IsSetCard(0xec4) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local dg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE,0,3,3,nil)
if dg:GetCount()>0 then
Duel.HintSelection(dg)
Duel.SendtoDeck(dg,tp,2,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--Lost✿离爱红泪
function c16000007.initial_effect(c)
c:EnableReviveLimit()
--Cannot special summon
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)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16000007,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,160000070)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c16000007.sptg)
e2:SetOperation(c16000007.spop)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16000007,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCost(c16000007.tgcost)
e3:SetTarget(c16000007.tgtg)
e3:SetOperation(c16000007.tgop)
c:RegisterEffect(e3)
--Flag
if not c16000007.global_check then
c16000007.global_check=true
c16000007[0]=0
c16000007[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c16000007.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c16000007.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c16000007.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:FilterCount(Card.IsSetCard,nil,0x104e)>0 then
c16000007[rp]=true
end
end
function c16000007.clear(e,tp,eg,ep,ev,re,r,rp)
c16000007[0]=false
c16000007[1]=false
end
function c16000007.spfilter(c,e,tp)
return c:IsType(TYPE_SPELL) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),nil,0x11,0,0,1,RACE_PLANT,ATTRIBUTE_DARK)
end
function c16000007.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c16000007.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c16000007.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16000007.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if not tc then return end
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_NORMAL+TYPE_MONSTER)
e1:SetReset(RESET_EVENT+0x47c0000)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_PLANT)
tc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(ATTRIBUTE_DARK)
tc:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_SET_BASE_ATTACK)
e4:SetValue(0)
tc:RegisterEffect(e4,true)
local e5=e1:Clone()
e5:SetCode(EFFECT_SET_BASE_DEFENSE)
e5:SetValue(0)
tc:RegisterEffect(e5,true)
local e6=e1:Clone()
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(1)
tc:RegisterEffect(e6,true)
if Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_HAND)
tc:RegisterEffect(e1,true)
end
end
function c16000007.tgcost(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 c16000007.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c16000007.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c16000007.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c16000007.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c16000007.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--时椿之景 晓春红曦
function c16030001.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16030001,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,160300010)
e1:SetTarget(c16030001.thtg)
e1:SetOperation(c16030001.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--token
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16030001,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,160300011)
e3:SetCost(c16030001.tkcost)
e3:SetTarget(c16030001.tktg)
e3:SetOperation(c16030001.tkop)
c:RegisterEffect(e3)
--xyzlimit
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e10:SetValue(c16030001.mlimit)
c:RegisterEffect(e10)
local e11=e10:Clone()
e11:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e11)
local e12=e10:Clone()
e12:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e12)
local e13=e10:Clone()
e13:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e13)
end
--
function c16030001.mlimit(e,c)
if not c then return false end
return c:GetRace()~=RACE_PLANT
end
--
function c16030001.thfilter(c)
return c:IsLevelBelow(3) and c:IsRace(RACE_PLANT)
end
function c16030001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16030001.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16030001.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16030001.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 c16030001.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.DiscardDeck(tp,1,REASON_COST)
end
function c16030001.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,16039999,nil,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16030001.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,16039999,nil,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,16039999)
Duel.SpecialSummon(token,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:SetTarget(c16030001.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c16030001.splimit(e,c,tp,sumtp,sumpos)
return c:GetRace()~=RACE_PLANT
end
\ No newline at end of file
--时椿之景 倦夏静流
function c16030002.initial_effect(c)
--pos
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16030002,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,160300020)
e1:SetCost(c16030002.poscost)
e1:SetTarget(c16030002.postg)
e1:SetOperation(c16030002.posop)
c:RegisterEffect(e1)
--token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16030002,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,160300021)
e2:SetCost(c16030002.tkcost)
e2:SetTarget(c16030002.tktg)
e2:SetOperation(c16030002.tkop)
c:RegisterEffect(e2)
--xyzlimit
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e10:SetValue(c16030002.mlimit)
c:RegisterEffect(e10)
local e11=e10:Clone()
e11:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e11)
local e12=e10:Clone()
e12:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e12)
local e13=e10:Clone()
e13:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e13)
end
--
function c16030002.mlimit(e,c)
if not c then return false end
return c:GetRace()~=RACE_PLANT
end
--
function c16030002.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c16030002.setfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c16030002.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16030002.setfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c16030002.setfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c16030002.setfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c16030002.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
--
function c16030002.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.DiscardDeck(tp,1,REASON_COST)
end
function c16030002.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,16039999,nil,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16030002.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,16039999,nil,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,16039999)
Duel.SpecialSummon(token,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:SetTarget(c16030002.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c16030002.splimit(e,c,tp,sumtp,sumpos)
return c:GetRace()~=RACE_PLANT
end
\ No newline at end of file
--时椿之景 冷秋心雨
function c16030003.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16030003,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,160300030)
e1:SetTarget(c16030003.target)
e1:SetOperation(c16030003.operation)
c:RegisterEffect(e1)
--token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16030003,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,160300031)
e2:SetCost(c16030003.tkcost)
e2:SetTarget(c16030003.tktg)
e2:SetOperation(c16030003.tkop)
c:RegisterEffect(e2)
--xyzlimit
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e10:SetValue(c16030003.mlimit)
c:RegisterEffect(e10)
local e11=e10:Clone()
e11:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e11)
local e12=e10:Clone()
e12:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e12)
local e13=e10:Clone()
e13:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e13)
end
--
function c16030003.mlimit(e,c)
if not c then return false end
return c:GetRace()~=RACE_PLANT
end
--
function c16030003.target(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 c16030003.operation(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
--
function c16030003.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.DiscardDeck(tp,1,REASON_COST)
end
function c16030003.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,16039999,nil,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16030003.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,16039999,nil,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,16039999)
Duel.SpecialSummon(token,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:SetTarget(c16030003.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c16030003.splimit(e,c,tp,sumtp,sumpos)
return c:GetRace()~=RACE_PLANT
end
\ No newline at end of file
--时椿之景 谧冬祈愿
function c16030004.initial_effect(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,160300040)
e1:SetCondition(c16030004.con)
e1:SetOperation(c16030004.op)
c:RegisterEffect(e1)
--token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16030004,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,160300041)
e2:SetCost(c16030004.tkcost)
e2:SetTarget(c16030004.tktg)
e2:SetOperation(c16030004.tkop)
c:RegisterEffect(e2)
--xyzlimit
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e10:SetValue(c16030004.mlimit)
c:RegisterEffect(e10)
local e11=e10:Clone()
e11:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e11)
local e12=e10:Clone()
e12:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e12)
local e13=e10:Clone()
e13:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e13)
end
--
function c16030004.mlimit(e,c)
if not c then return false end
return c:GetRace()~=RACE_PLANT
end
--
function c16030004.con(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasCategory(CATEGORY_NEGATE) or re:IsHasCategory(CATEGORY_DISABLE) or re:IsHasCategory(CATEGORY_DISABLE_SUMMON)
end
function c16030004.filter(c,rtype)
return c:IsType(rtype) and c:IsAbleToGrave()
end
function c16030004.op(e,tp,eg,ep,ev,re,r,rp)
local rtype=bit.band(re:GetActiveType(),0x7)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c16030004.repop)
if Duel.IsExistingMatchingCard(c16030004.filter,tp,LOCATION_DECK,0,1,nil,rtype) and Duel.SelectYesNo(tp,aux.Stringid(16030004,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,c16030004.filter,tp,LOCATION_DECK,0,1,1,nil,rtype)
if sg:GetCount()>0 then Duel.SendtoGrave(sg,REASON_EFFECT) end
end
end
function c16030004.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsType(TYPE_SPELL+TYPE_TRAP) then
c:CancelToGrave(false)
end
Duel.SendtoGrave(c,REASON_EFFECT)
end
--
function c16030004.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.DiscardDeck(tp,1,REASON_COST)
end
function c16030004.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,16039999,nil,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16030004.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,16039999,nil,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,16039999)
Duel.SpecialSummon(token,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:SetTarget(c16030004.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c16030004.splimit(e,c,tp,sumtp,sumpos)
return c:GetRace()~=RACE_PLANT
end
--时椿之景 冬结
function c16030101.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c16030101.ffilter,2,false)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_MATERIAL)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c16030101.spcond)
c:RegisterEffect(e0)
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16030101,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCost(c16030101.tkcost)
e1:SetTarget(c16030101.tktg)
e1:SetOperation(c16030101.tkop)
c:RegisterEffect(e1)
--xyzlimit
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e10:SetValue(c16030101.mlimit)
c:RegisterEffect(e10)
local e11=e10:Clone()
e11:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e11)
local e12=e10:Clone()
e12:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e12)
local e13=e10:Clone()
e13:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e13)
end
--
function c16030101.spcond(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
--
function c16030101.mlimit(e,c)
if not c then return false end
return c:GetRace()~=RACE_PLANT
end
--
function c16030101.ffilter(c,fc,sub,mg,sg)
return c:IsRace(RACE_PLANT)
end
--
function c16030101.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.DiscardDeck(tp,1,REASON_COST)
end
function c16030101.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,16039999,nil,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c16030101.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,16039999,nil,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,16039999)
Duel.SpecialSummon(token,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:SetTarget(c16030101.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c16030101.splimit(e,c,tp,sumtp,sumpos)
return not c:IsRace(RACE_PLANT)
end
\ No newline at end of file
--时椿之景 春归
function c16030102.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c16030102.ffilter,2,false)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_MATERIAL)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c16030102.splimit)
c:RegisterEffect(e0)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_GRAVE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(c16030102.indtg)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
--xyzlimit
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e10:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e10:SetValue(c16030102.mlimit)
c:RegisterEffect(e10)
local e11=e10:Clone()
e11:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e11)
local e12=e10:Clone()
e12:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e12)
local e13=e10:Clone()
e13:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e13)
end
--
function c16030102.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
--
function c16030102.mlimit(e,c)
if not c then return false end
return c:GetRace()~=RACE_PLANT
end
--
function c16030102.ffilter(c,fc,sub,mg,sg)
return c:IsRace(RACE_PLANT)
end
--
function c16030102.indtg(e,c)
return c:IsType(TYPE_TOKEN) and c:IsRace(RACE_PLANT)
end
--时椿之景 他时黑椿
function c16031201.initial_effect(c)
c:SetUniqueOnField(1,0,16031201)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16031201,0))
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c16031201.tgtg)
e2:SetOperation(c16031201.tgop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c16031201.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(16031201,1))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c16031201.drcon)
e4:SetTarget(c16031201.drtg)
e4:SetOperation(c16031201.drop)
c:RegisterEffect(e4)
end
--
function c16031201.eftg(e,c)
return c:IsSetCard(0xcaa)
end
function c16031201.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,5)
end
function c16031201.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,5,REASON_EFFECT)
end
--
function c16031201.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c16031201.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 c16031201.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
\ No newline at end of file
--时椿之景 寂默久远
function c16032001.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16032001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c16032001.spcost1)
e1:SetTarget(c16032001.sptg1)
e1:SetOperation(c16032001.spop1)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c16032001.handcon)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetOperation(c16032001.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(16032001,1))
e4:SetCategory(CATEGORY_)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(c16032001.damcon)
e4:SetOperation(c16032001.damop)
c:RegisterEffect(e4)
end
--
function c16032001.handfilter(c)
return c:IsFaceup() and c:GetRace()~=RACE_PLANT
end
function c16032001.handcon(e)
return not Duel.IsExistingMatchingCard(c16032001.handfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
--
function c16032001.cfilter1(c,tp)
return c:IsRace(RACE_PLANT) and c:IsType(TYPE_TOKEN) and Duel.GetMZoneCount(tp,c)>0
end
function c16032001.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c16032001.cfilter1,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c16032001.cfilter1,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c16032001.spfilter1(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16032001.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16032001.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c16032001.spop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16032001.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 c16032001.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(16032001,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c16032001.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(16032001)>0
end
function c16032001.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(tp,1)
end
\ No newline at end of file
--一根呆毛
function c19114519.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c19114519.condition)
e1:SetCost(c19114519.cost)
e1:SetTarget(c19114519.target)
e1:SetOperation(c19114519.activate)
c:RegisterEffect(e1)
--special summon
-- local e2=Effect.CreateEffect(c)
-- e2:SetDescription(aux.Stringid(19114519,0))
-- e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
-- e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
-- e2:SetProperty(EFFECT_FLAG_DELAY)
-- e2:SetCode(EVENT_TO_GRAVE)
-- e2:SetCountLimit(1,19114519)
-- e2:SetCondition(c19114519.con)
-- e2:SetOperation(c19114519.op)
-- c:RegisterEffect(e2)
--synchro
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(19114519,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c19114519.syncost)
e3:SetTarget(c19114519.syntg)
e3:SetOperation(c19114519.synop)
c:RegisterEffect(e3)
end
--function c19114519.con(e,tp,eg,ep,ev,re,r,rp)
-- local c=e:GetHandler()
-- return c:GetPreviousControler()==tp
-- and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) and c:IsReason(REASON_DESTROY)
--end
--function c19114519.op(e,tp,eg,ep,ev,re,r,rp)
--immune effect
-- local e4=Effect.CreateEffect(c)
-- e4:SetType(EFFECT_TYPE_FIELD)
-- e4:SetCode(EFFECT_IMMUNE_EFFECT)
-- e4:SetTargetRange(LOCATION_SZONE,0)
-- e4:SetTarget(c19114519.etarget)
-- e4:SetValue(c19114519.efilter)
-- c:RegisterEffect(e4)
--end
--function c19114519.etarget(e,c)
-- return c:IsType(TYPE_SPELL)
--end
--function c19114519.efilter(e,re)
-- return re:GetOwnerPlayer()~=e:GetHandlerPlayer()
--end
function c19114519.cfilter(c)
return c:IsLocation(LOCATION_MZONE) and (c:IsSetCard(0x300) or c:IsSetCard(0x150) or c:IsSetCard(0x299))
end
function c19114519.condition(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(c19114519.cfilter,1,nil) and Duel.IsChainNegatable(ev)
end
function c19114519.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil)
end
end
function c19114519.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c19114519.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c19114519.syncost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c19114519.syntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c19114519.synop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil)
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(),nil)
end
end
\ No newline at end of file
--人形的扫除时间
function c19114524.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,19114524)
e1:SetTarget(c19114524.target)
e1:SetOperation(c19114524.operation)
c:RegisterEffect(e1)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,19114524)
e3:SetTarget(c19114524.tdtg)
e3:SetOperation(c19114524.tdop)
c:RegisterEffect(e3)
end
function c19114524.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() and chkc~=e:GetHandler() end
if chk==0 then return e:GetHandler():IsAbleToDeck()
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
end
function c19114524.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local g=Group.FromCards(c,tc)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
function c19114524.remfilter(c,tp)
return c:IsLocation(LOCATION_SZONE) and c:IsControler(tp)
end
function c19114524.gfilter(c,tp)
local g=c:GetColumnGroup()
g:Remove(c19114524.remfilter,nil,tp)
g:RemoveCard(c)
return c:IsSetCard(0x186) and g:GetCount()>0 and c:IsFaceup()
end
function c19114524.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c19114524.gfilter(chkc,tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c19114524.gfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
local tg=Duel.SelectTarget(tp,c19114524.gfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
local tc=tg:GetFirst()
local g=tc:GetColumnGroup()
g:Remove(c19114524.remfilter,nil,tp)
g:RemoveCard(tc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c19114524.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local g=tc:GetColumnGroup()
g:Remove(c19114524.remfilter,nil,tp)
g:RemoveCard(tc)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
--魔彩光✿上海人形
function c19214522.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),1,2,c19214522.ovfilter,aux.Stringid(19214522,3),13,c19214522.xyzop)
c:EnableReviveLimit()
--deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19214522,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,19214522)
e1:SetCost(c19214522.cost)
e1:SetTarget(c19214522.target1)
e1:SetOperation(c19214522.operation1)
c:RegisterEffect(e1)
--grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19214522,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,19214522)
e1:SetCost(c19214522.cost)
e1:SetTarget(c19214522.target2)
e1:SetOperation(c19214522.operation2)
c:RegisterEffect(e1)
--to deck top
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19214522,2))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,19214522)
e1:SetCost(c19214522.cost)
e1:SetTarget(c19214522.target3)
e1:SetOperation(c19214522.operation3)
c:RegisterEffect(e1)
end
--
function c19214522.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x186) and c:IsRace(RACE_MACHINE) and c:IsSummonType(SUMMON_TYPE_NORMAL)
end
--
function c19214522.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,19214522)==0 end
Duel.RegisterFlagEffect(tp,19214522,RESET_PHASE+PHASE_END,0,1)
end
--
function c19214522.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
--
function c19214522.filter1(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsLevelBelow(4) and c:IsSetCard(0x186) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c19214522.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19214522.filter1,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 c19214522.operation1(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,c19214522.filter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c19214522.filter2(c,e,tp)
return c:IsSetCard(0x186) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c19214522.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19214522.filter2,tp,LOCATION_HAND+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_HAND+LOCATION_GRAVE)
end
function c19214522.operation2(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,c19214522.filter2,tp,LOCATION_HAND+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
end
--
function c19214522.filter3(c)
return c:IsSetCard(0x186) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c19214522.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19214522.filter3,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND+CATEGORY_SEARCH,nil,1,tp,LOCATION_DECK)
end
function c19214522.operation3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c19214522.filter3,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x186) and Duel.SelectYesNo(tp,aux.Stringid(19214522,4)) then
Duel.BreakEffect()
local g2=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x186)
local tc=g2:GetFirst()
if tc then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
end
end
--四季花开✿蓬莱人形
function c19214526.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,19214526)
e1:SetCost(c19214526.cost)
e1:SetTarget(c19214526.target)
e1:SetOperation(c19214526.operation)
c:RegisterEffect(e1)
--grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,19214527)
e2:SetCost(c19214526.spcost)
e2:SetTarget(c19214526.sptg)
e2:SetOperation(c19214526.spop)
c:RegisterEffect(e2)
end
--
function c19214526.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable()
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c19214526.filter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsSetCard(0x186) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c19214526.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19214526.filter,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 c19214526.operation(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,c19214526.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c19214526.spfilter(c,e,tp)
return c:IsCode(19214528) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c19214526.spcostfilter(c)
return c:IsSetCard(0x186) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:IsRace(RACE_MACHINE)
end
function c19214526.attfilter1(c,att1)
return c:GetAttribute()==att1
end
function c19214526.attfilter2(c,att2)
return c:GetAttribute()==att2
end
function c19214526.attfilter3(c,att3)
return c:GetAttribute()==att3
end
function c19214526.attfilter4(c,att4)
return c:GetAttribute()==att4
end
function c19214526.attfilter5(c,att5)
return c:GetAttribute()==att5
end
function c19214526.attfilter6(c,att6)
return c:GetAttribute()==att6
end
function c19214526.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c19214526.spcostfilter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return g:GetCount()>=6 and g:GetClassCount(Card.GetAttribute)>=6 end
local tg=Group.CreateGroup()
local att1=c:GetAttribute()
g:Remove(c19214526.attfilter1,nil,att1)
tg:AddCard(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg2=g:Select(tp,1,1,nil)
local att2=tg2:GetFirst():GetAttribute()
g:Remove(c19214526.attfilter2,nil,att2)
tg:Merge(tg2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg3=g:Select(tp,1,1,nil)
local att3=tg3:GetFirst():GetAttribute()
g:Remove(c19214526.attfilter3,nil,att3)
tg:Merge(tg3)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg4=g:Select(tp,1,1,nil)
local att4=tg4:GetFirst():GetAttribute()
g:Remove(c19214526.attfilter4,nil,att4)
tg:Merge(tg4)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg5=g:Select(tp,1,1,nil)
local att5=tg5:GetFirst():GetAttribute()
g:Remove(c19214526.attfilter5,nil,att5)
tg:Merge(tg5)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg6=g:Select(tp,1,1,nil)
local att6=tg6:GetFirst():GetAttribute()
g:Remove(c19214526.attfilter6,nil,att6)
tg:Merge(tg6)
if tg:GetCount()>=6 then
Duel.Remove(tg,POS_FACEUP,REASON_COST)
end
end
function c19214526.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19214526.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c19214526.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.GetFirstMatchingCard(c19214526.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if g then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--花开幻想✿爱丽丝
function c19214528.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_TUNER),aux.FilterBoolFunction(Card.IsSetCard,0x300),nil,aux.NonTuner(nil),1,99)
--seven
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19214528,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,19214528)
e1:SetCost(c19214528.cost)
e1:SetTarget(c19214528.target)
e1:SetOperation(c19214528.operation)
c:RegisterEffect(e1)
end
--
function c19214528.costfilter(c)
return c:IsSetCard(0x186) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() and c:IsRace(RACE_MACHINE)
end
function c19214528.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19214528.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c19214528.costfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
local att=g:GetFirst():GetAttribute()
e:SetLabel(att)
end
function c19214528.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local att=e:GetLabel()
if bit.band(att,ATTRIBUTE_WIND)~=0 then
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,0,0)
end
if bit.band(att,ATTRIBUTE_EARTH)~=0 then
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_ONFIELD)
end
if bit.band(att,ATTRIBUTE_DARK)~=0 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
if bit.band(att,ATTRIBUTE_LIGHT)~=0 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
end
function c19214528.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local att=e:GetLabel()
if bit.band(att,ATTRIBUTE_WIND)~=0 then
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(700)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
e2:SetValue(c19214528.efilter)
c:RegisterEffect(e2)
end
if bit.band(att,ATTRIBUTE_FIRE)~=0 then
if Duel.GetFlagEffect(tp,19214528)==0 then
Duel.RegisterFlagEffect(tp,19214528,0,0,1)
end
--Negate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(c19214528.discon)
e1:SetOperation(c19214528.disop)
Duel.RegisterEffect(e1,tp)
end
if bit.band(att,ATTRIBUTE_WATER)~=0 then
if Duel.GetFlagEffect(tp,19214529)==0 then
Duel.RegisterFlagEffect(tp,19214529,0,0,1)
end
--damage reflect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e1:SetTargetRange(1,0)
e1:SetValue(c19214528.damval)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_REFLECT_DAMAGE)
Duel.RegisterEffect(e2,tp)
end
if bit.band(att,ATTRIBUTE_EARTH)~=0 then
if Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(19214528,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
if bit.band(att,ATTRIBUTE_LIGHT)~=0 then
if Duel.IsExistingMatchingCard(c19214528.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(19214528,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c19214528.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
if bit.band(att,ATTRIBUTE_DARK)~=0 then
if Duel.IsExistingMatchingCard(c19214528.thfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(19214528,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c19214528.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x186) and Duel.SelectYesNo(tp,aux.Stringid(19214528,4)) then
local g2=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x186)
local tc=g2:GetFirst()
if tc then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
end
end
end
function c19214528.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c19214528.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) and rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.GetFlagEffect(tp,19214528)>0
end
function c19214528.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(tp,19214528)
Duel.NegateEffect(ev)
end
function c19214528.damval(e,tp)
if Duel.GetFlagEffect(tp,19214529)>0 then
Duel.ResetFlagEffect(tp,19214529)
return true
else
return false
end
end
function c19214528.spfilter(c,e,tp)
return c:IsSetCard(0x186) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c19214528.thfilter(c)
return c:IsSetCard(0x186) and c:IsAbleToHand()
end
--人形舞台剧团
function c19214532.initial_effect(c)
c:SetUniqueOnField(1,0,19214532)
--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,19214532)
e1:SetOperation(c19214532.activate)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19214532,1))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,19214533)
e2:SetTarget(c19214532.actg)
e2:SetOperation(c19214532.acop)
c:RegisterEffect(e2)
--remove counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(19214532,6))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCost(c19214532.cost3)
e3:SetTarget(c19214532.tg3)
e3:SetOperation(c19214532.op3)
c:RegisterEffect(e3)
end
--
function c19214532.filter(c)
return c:IsAbleToHand() and c:IsSetCard(0x186) and c:IsType(TYPE_SPELL) and (c:IsType(TYPE_FIELD) or c:IsType(TYPE_CONTINUOUS))
end
function c19214532.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c19214532.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(19214532,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 c19214532.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x128d)
end
function c19214532.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
tc:AddCounter(0x128d,1)
end
end
--
function c19214532.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local off=1
local ops={}
local opval={}
local a1=Duel.IsCanRemoveCounter(tp,1,1,0x128d,1,REASON_COST) and Duel.IsExistingMatchingCard(c19214532.filter1,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil)
local a3=Duel.IsCanRemoveCounter(tp,1,1,0x128d,3,REASON_COST) and Duel.IsExistingMatchingCard(c19214532.filter3,tp,LOCATION_REMOVED,LOCATION_REMOVED,3,nil) and Duel.IsPlayerCanDraw(tp,1)
local a5=Duel.IsCanRemoveCounter(tp,1,1,0x128d,5,REASON_COST) and Duel.IsExistingMatchingCard(c19214532.filter5,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local a7=Duel.IsCanRemoveCounter(tp,1,1,0x128d,7,REASON_COST) and Duel.IsExistingMatchingCard(c19214532.filter7,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0)
if chk==0 then return a1 or a3 or a5 or a7 end
if a1 then
ops[off]=aux.Stringid(19214532,2)
opval[off-1]=1
off=off+1
end
if a3 then
ops[off]=aux.Stringid(19214532,3)
opval[off-1]=3
off=off+1
end
if a5 then
ops[off]=aux.Stringid(19214532,4)
opval[off-1]=5
off=off+1
end
if a7 then
ops[off]=aux.Stringid(19214532,5)
opval[off-1]=7
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
Duel.RemoveCounter(tp,1,1,0x128d,sel,REASON_COST)
end
function c19214532.filter1(c)
return (c:IsAbleToDeck() or c:IsLocation(LOCATION_DECK)) and c:IsSetCard(0x186)
end
function c19214532.filter3(c)
return c:IsAbleToGrave()
end
function c19214532.filter5(c,e,tp)
return c:IsSetCard(0x300) and c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c19214532.filter7(c,e,tp)
return c:IsSetCard(0x186) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c19214532.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local sel=e:GetLabel()
if sel==3 then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,3,0,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
elseif sel==5 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
elseif sel==7 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND)
end
end
function c19214532.op3(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local sel=e:GetLabel()
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c19214532.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
if g:GetFirst():IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(g:GetFirst(),0)
Duel.ConfirmDecktop(tp,1)
elseif g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SendtoDeck(g:GetFirst(),nil,0,REASON_EFFECT)
end
end
end
if sel==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c19214532.filter3,tp,LOCATION_REMOVED,LOCATION_REMOVED,3,3,nil)
if g:GetCount()==3 then
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
if sel==5 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c19214532.filter5,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
if sel==7 then
local ct1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local ft=ct1+ct2
if ft<=0 then return end
local g=Duel.GetMatchingGroup(c19214532.filter7,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()<=0 then return end
local op=0
while g:GetCount()>0 and ft>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=g:Select(tp,1,1,nil)
if ct1>0 and ct2>0 then op=Duel.SelectOption(tp,aux.Stringid(19214532,7),aux.Stringid(19214532,8))
elseif ct1>0 then op=Duel.SelectOption(tp,aux.Stringid(19214532,7))
elseif ct2>0 then op=Duel.SelectOption(tp,aux.Stringid(19214532,8))+1
else op=2 end
if op==0 then
Duel.SpecialSummonStep(sc:GetFirst(),0,tp,tp,false,false,POS_FACEUP)
elseif op==1 then
Duel.SpecialSummonStep(sc:GetFirst(),0,tp,1-tp,false,false,POS_FACEUP)
end
ft=ft-1
g:RemoveCard(sc:GetFirst())
end
Duel.SpecialSummonComplete()
end
end
--凶兆的黑猫
function c20004.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(20004,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c20004.spcon)
e1:SetTarget(c20004.sptg)
e1:SetOperation(c20004.spop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c20004.atkcon)
e2:SetValue(1000)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(20004,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_REMOVE)
e3:SetCondition(c20004.condition)
e3:SetTarget(c20004.target)
e3:SetOperation(c20004.operation)
c:RegisterEffect(e3)
end
function c20004.cfilter(c)
return c:IsFaceup() and c:IsLevelBelow(2)
end
function c20004.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c20004.cfilter,1,nil)
end
function c20004.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 c20004.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
function c20004.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc225)
end
function c20004.atkcon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c20004.atkfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c20004.filter(c,e,tp)
return c:IsLevelBelow(3) and c:IsSetCard(0x208) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c20004.condition(e,tp,eg,ep,ev,re,r,rp)
if (Duel.GetFlagEffect(tp,20003)==0) then Duel.RegisterFlagEffect(tp,20003,0,0,0)
else return false end
return Duel.GetFlagEffect(tp,20003)==1
end
function c20004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c20004.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c20004.operation(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,c20004.filter,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
This diff is collapsed.
--七日速成的圣子
local m=21210000
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsSetCard,0xa12),LOCATION_MZONE)
--spsummon from deck/hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)--can be disabled
e1:SetRange(LOCATION_DECK+LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon1)
c:RegisterEffect(e1)
--unable be released as higher summon mat.
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UNRELEASABLE_SUM)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
--spsummon from grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.spcon2)
e3:SetTarget(cm.sptg2)
e3:SetOperation(cm.spop2)
c:RegisterEffect(e3)
end
function cm.spcon1(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_ONFIELD,0)==0
end
function cm.spcfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousSetCard(0xa12) and c:IsType(TYPE_XYZ)
and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT)))
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spcfilter,1,nil,tp,rp)
end
function cm.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 cm.spop2(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=21210003
local cm=_G["c"..m]
function cm.initial_effect(c)
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment