Commit d67fa4ab authored by Nemo Ma's avatar Nemo Ma

wd 250406

parent 5fabfe73
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
7210017 0 7210017 0
7210018 0 7210018 0
7407235 0 7407235 0
7423643 0
7423753 0 7423753 0
7451999 0 7451999 0
7485071 0 7485071 0
...@@ -133,6 +134,7 @@ ...@@ -133,6 +134,7 @@
11451023 0 11451023 0
11451024 0 11451024 0
11451025 0 11451025 0
11451026 0
11451767 0 11451767 0
11513043 0 11513043 0
11513044 0 11513044 0
...@@ -195,6 +197,7 @@ ...@@ -195,6 +197,7 @@
12847415 0 12847415 0
12847417 0 12847417 0
12847419 0 12847419 0
12847444 0
12847555 0 12847555 0
12847556 0 12847556 0
12847666 0 12847666 0
...@@ -363,7 +366,6 @@ ...@@ -363,7 +366,6 @@
21411006 0 21411006 0
21411007 0 21411007 0
21419996 0 21419996 0
22021680 0
22348028 0 22348028 0
22348134 0 22348134 0
22510002 0 22510002 0
...@@ -971,6 +973,7 @@ ...@@ -971,6 +973,7 @@
65860065 0 65860065 0
65899920 0 65899920 0
65899925 0 65899925 0
65899945 0
67200701 0 67200701 0
67200702 0 67200702 0
67200703 0 67200703 0
...@@ -999,6 +1002,13 @@ ...@@ -999,6 +1002,13 @@
70000904 0 70000904 0
70000905 0 70000905 0
70000906 0 70000906 0
70001018 0
70001019 0
70001020 0
70001021 0
70001023 0
70001024 0
70001025 0
70002010 0 70002010 0
70002012 0 70002012 0
70002024 0 70002024 0
...@@ -1157,6 +1167,34 @@ ...@@ -1157,6 +1167,34 @@
70052430 0 70052430 0
70052431 0 70052431 0
70052433 0 70052433 0
71000100 0
71000101 0
71000102 0
71000103 0
71000104 0
71000106 0
71000107 0
71000108 0
71000109 0
71000110 0
71000111 0
71000112 0
71000113 0
71000114 0
71000115 0
71000116 0
71000117 0
71000171 0
71000172 0
71000173 0
71000174 0
71000175 0
71000176 0
71000177 0
71500005 0
71500006 0
71500016 0
71500017 0
72100301 0 72100301 0
72100302 0 72100302 0
72100303 0 72100303 0
...@@ -1220,6 +1258,23 @@ ...@@ -1220,6 +1258,23 @@
72100536 0 72100536 0
72100537 0 72100537 0
72100538 0 72100538 0
74600005 0
74600010 0
74600015 0
74600020 0
74600025 0
74600030 0
74600035 0
74600040 0
74600045 0
74600050 0
74600055 0
74600057 0
74600059 0
74600061 0
74600065 0
74600067 0
74600069 0
75646401 0 75646401 0
75646402 0 75646402 0
75646403 0 75646403 0
...@@ -1478,6 +1533,41 @@ ...@@ -1478,6 +1533,41 @@
88188408 0 88188408 0
88188409 0 88188409 0
88188410 0 88188410 0
88480000 0
88480005 0
88480010 0
88480015 0
88480020 0
88480025 0
88480030 0
88480035 0
88480101 0
88480103 0
88480105 0
88480107 0
88480109 0
88480111 0
88480113 0
88480115 0
88480117 0
88480119 0
88480121 0
88480123 0
88480125 0
88480127 0
88480129 0
88480131 0
88480133 0
88480135 0
88480137 0
88480139 0
88480141 0
88480143 0
88480145 0
88480147 0
88480150 0
88480151 0
88480153 0
88881043 0 88881043 0
88881044 0 88881044 0
88881045 0 88881045 0
...@@ -1614,6 +1704,11 @@ ...@@ -1614,6 +1704,11 @@
90701013 0 90701013 0
90701015 0 90701015 0
90701016 0 90701016 0
91000101 0
91010080 0
91011010 0
91011012 0
91011014 0
91060009 0 91060009 0
91060011 0 91060011 0
91060013 0 91060013 0
...@@ -1834,6 +1929,11 @@ ...@@ -1834,6 +1929,11 @@
98941054 0 98941054 0
98941055 0 98941055 0
98941056 0 98941056 0
98941057 0
98941058 0
98941059 0
98941060 0
98941061 0
98942059 0 98942059 0
99550610 0 99550610 0
99700125 0 99700125 0
...@@ -2036,9 +2136,6 @@ ...@@ -2036,9 +2136,6 @@
260013028 0 260013028 0
260013029 0 260013029 0
260013035 0 260013035 0
70001023 0
70001024 0
70001025 0
#Semi-Wild 1003 #Semi-Wild 1003
31409200 0 31409200 0
31409201 0 31409201 0
......
No preview for this file type
expansions/pics/89390000.jpg

211 KB | W: | H:

expansions/pics/89390000.jpg

17.2 KB | W: | H:

expansions/pics/89390000.jpg
expansions/pics/89390000.jpg
expansions/pics/89390000.jpg
expansions/pics/89390000.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390001.jpg

247 KB | W: | H:

expansions/pics/89390001.jpg

18.1 KB | W: | H:

expansions/pics/89390001.jpg
expansions/pics/89390001.jpg
expansions/pics/89390001.jpg
expansions/pics/89390001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390002.jpg

243 KB | W: | H:

expansions/pics/89390002.jpg

18.7 KB | W: | H:

expansions/pics/89390002.jpg
expansions/pics/89390002.jpg
expansions/pics/89390002.jpg
expansions/pics/89390002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390003.jpg

227 KB | W: | H:

expansions/pics/89390003.jpg

16.4 KB | W: | H:

expansions/pics/89390003.jpg
expansions/pics/89390003.jpg
expansions/pics/89390003.jpg
expansions/pics/89390003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390004.jpg

241 KB | W: | H:

expansions/pics/89390004.jpg

19.2 KB | W: | H:

expansions/pics/89390004.jpg
expansions/pics/89390004.jpg
expansions/pics/89390004.jpg
expansions/pics/89390004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390005.jpg

235 KB | W: | H:

expansions/pics/89390005.jpg

17.3 KB | W: | H:

expansions/pics/89390005.jpg
expansions/pics/89390005.jpg
expansions/pics/89390005.jpg
expansions/pics/89390005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390006.jpg

221 KB | W: | H:

expansions/pics/89390006.jpg

16.7 KB | W: | H:

expansions/pics/89390006.jpg
expansions/pics/89390006.jpg
expansions/pics/89390006.jpg
expansions/pics/89390006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390007.jpg

224 KB | W: | H:

expansions/pics/89390007.jpg

16.8 KB | W: | H:

expansions/pics/89390007.jpg
expansions/pics/89390007.jpg
expansions/pics/89390007.jpg
expansions/pics/89390007.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390008.jpg

194 KB | W: | H:

expansions/pics/89390008.jpg

14.6 KB | W: | H:

expansions/pics/89390008.jpg
expansions/pics/89390008.jpg
expansions/pics/89390008.jpg
expansions/pics/89390008.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390009.jpg

227 KB | W: | H:

expansions/pics/89390009.jpg

16.3 KB | W: | H:

expansions/pics/89390009.jpg
expansions/pics/89390009.jpg
expansions/pics/89390009.jpg
expansions/pics/89390009.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390010.jpg

205 KB | W: | H:

expansions/pics/89390010.jpg

15.8 KB | W: | H:

expansions/pics/89390010.jpg
expansions/pics/89390010.jpg
expansions/pics/89390010.jpg
expansions/pics/89390010.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390011.jpg

216 KB | W: | H:

expansions/pics/89390011.jpg

15.6 KB | W: | H:

expansions/pics/89390011.jpg
expansions/pics/89390011.jpg
expansions/pics/89390011.jpg
expansions/pics/89390011.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390012.jpg

227 KB | W: | H:

expansions/pics/89390012.jpg

16.8 KB | W: | H:

expansions/pics/89390012.jpg
expansions/pics/89390012.jpg
expansions/pics/89390012.jpg
expansions/pics/89390012.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/89390013.jpg

215 KB | W: | H:

expansions/pics/89390013.jpg

16.8 KB | W: | H:

expansions/pics/89390013.jpg
expansions/pics/89390013.jpg
expansions/pics/89390013.jpg
expansions/pics/89390013.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -20,7 +20,7 @@ function c71000171.initial_effect(c) ...@@ -20,7 +20,7 @@ function c71000171.initial_effect(c)
e12:SetCode(EFFECT_SPSUMMON_PROC) e12:SetCode(EFFECT_SPSUMMON_PROC)
e12:SetProperty(EFFECT_FLAG_UNCOPYABLE) e12:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e12:SetCountLimit(2,71000171) e12:SetCountLimit(2,71000171)
e12:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED) e12:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e12:SetCondition(c71000171.spcon) e12:SetCondition(c71000171.spcon)
c:RegisterEffect(e12) c:RegisterEffect(e12)
end end
......
...@@ -6,8 +6,8 @@ function c71000172.initial_effect(c) ...@@ -6,8 +6,8 @@ function c71000172.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(3,71000172) e1:SetCountLimit(2,71000172)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(c71000172.spcon) e1:SetCondition(c71000172.spcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
...@@ -17,7 +17,7 @@ function c71000172.initial_effect(c) ...@@ -17,7 +17,7 @@ function c71000172.initial_effect(c)
e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(3,71000172) e2:SetCountLimit(2,71000172)
e2:SetCondition(c71000172.con) e2:SetCondition(c71000172.con)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --
...@@ -26,10 +26,22 @@ function c71000172.initial_effect(c) ...@@ -26,10 +26,22 @@ function c71000172.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(3,71000172) e3:SetCountLimit(2,71000172)
e3:SetTarget(c71000172.sptg) e3:SetTarget(c71000172.sptg)
e3:SetOperation(c71000172.spop) e3:SetOperation(c71000172.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetAbsoluteRange(tp,1,0)
e4:SetTarget(c71000172.splimit)
c:RegisterEffect(e4)
end
function c71000172.splimit(e,c)
return not c:IsSetCard(0xe73) and c:IsLocation(LOCATION_EXTRA)
end end
function c71000172.filter(c,e,tp) function c71000172.filter(c,e,tp)
return c:IsSetCard(0xe73) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xe73) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -6,10 +6,32 @@ function c71000173.initial_effect(c) ...@@ -6,10 +6,32 @@ function c71000173.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(3,71000173) e1:SetCountLimit(2,71000173)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(c71000173.spcon) e1:SetCondition(c71000173.spcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(2,71000173)
e2:SetTarget(c71000173.tg)
e2:SetOperation(c71000173.op)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetAbsoluteRange(tp,1,0)
e4:SetTarget(c71000173.splimit)
c:RegisterEffect(e4)
end
function c71000173.splimit(e,c)
return not c:IsSetCard(0xe73) and c:IsLocation(LOCATION_EXTRA)
end end
function c71000173.cfilter(c) function c71000173.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe73) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsSetCard(0xe73) and c:IsType(TYPE_MONSTER)
...@@ -19,3 +41,13 @@ function c71000173.spcon(e,c) ...@@ -19,3 +41,13 @@ function c71000173.spcon(e,c)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c71000173.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c71000173.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end end
function c71000173.tg(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 c71000173.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
...@@ -18,6 +18,13 @@ function c71000175.initial_effect(c) ...@@ -18,6 +18,13 @@ function c71000175.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c71000175.chainop) e1:SetOperation(c71000175.chainop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetValue(1)
c:RegisterEffect(e3)
end end
--===== 效果①处理 =====-- --===== 效果①处理 =====--
......
...@@ -27,7 +27,7 @@ function c71000176.initial_effect(c) ...@@ -27,7 +27,7 @@ function c71000176.initial_effect(c)
e12:SetCode(EFFECT_SPSUMMON_PROC) e12:SetCode(EFFECT_SPSUMMON_PROC)
e12:SetProperty(EFFECT_FLAG_UNCOPYABLE) e12:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e12:SetCountLimit(1,71000176) e12:SetCountLimit(1,71000176)
e12:SetRange(LOCATION_GRAVE+LOCATION_REMOVED) e12:SetRange(LOCATION_GRAVE)
e12:SetCondition(c71000176.spcon) e12:SetCondition(c71000176.spcon)
c:RegisterEffect(e12) c:RegisterEffect(e12)
......
--七仟陌 --七仟陌
function c71000177.initial_effect(c) local s,id,o=GetID()
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),7,3) function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),7,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop)
c:EnableReviveLimit() c:EnableReviveLimit()
-- spsummon condition --macro cosmos
-- cannot releaase
aux.EnableChangeCode(c,71000100,LOCATION_MZONE)
--atk,def
--
local e22=Effect.CreateEffect(c) local e22=Effect.CreateEffect(c)
e22:SetCategory(CATEGORY_TODECK) e22:SetCategory(CATEGORY_TODECK)
e22:SetType(EFFECT_TYPE_IGNITION) e22:SetType(EFFECT_TYPE_IGNITION)
e22:SetRange(LOCATION_MZONE) e22:SetRange(LOCATION_MZONE)
e22:SetCountLimit(1) e22:SetCountLimit(1)
e22:SetCost(c71000177.cost) e22:SetCost(s.cost)
e22:SetTarget(c71000177.tg) e22:SetTarget(s.tg)
e22:SetOperation(c71000177.op) e22:SetOperation(s.op)
c:RegisterEffect(e22) c:RegisterEffect(e22)
--material
aux.EnableChangeCode(c,71000100,LOCATION_MZONE)
--remove
-- --
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
function s.chainfilter(re,tp,cid)
return not re:GetHandler():IsCode(71000175)
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe73)
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0
and (Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)>0
or Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0) end
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function c71000177.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
local rt=Duel.GetFieldGroupCount(tp,LOCATION_GRAVE+LOCATION_REMOVED,0) local rt=Duel.GetFieldGroupCount(tp,LOCATION_GRAVE+LOCATION_REMOVED,0)
local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST) local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST)
e:SetLabel(ct) e:SetLabel(ct)
end end
function c71000177.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,e:GetLabel(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,e:GetLabel(),0,0)
end end
function c71000177.stfilter(c) function s.stfilter(c)
return c:IsSetCard(0xe73) and c:IsSSetable() return c:IsSetCard(0xe73) and c:IsSSetable()
end end
function c71000177.op(e,tp,eg,ep,ev,re,r,rp) function s.op(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,ct,nil) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,ct,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,CATEGORY_TODECK,REASON_EFFECT) Duel.SendtoDeck(g,nil,CATEGORY_TODECK,REASON_EFFECT)
local st=Duel.GetMatchingGroup(c71000177.stfilter,tp,LOCATION_DECK,0,nil) local st=Duel.GetMatchingGroup(s.stfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71000177,0)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=st:Select(tp,1,1,nil) local sg=st:Select(tp,1,1,nil)
......
--陷阱反击防护罩
local cm,m=GetID()
function c71500005.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+2)
e2:SetCost(cm.thcost)
e2:SetOperation(cm.cdop)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10045474,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(cm.handcon)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.tdcon2)
e3:SetTarget(cm.tdtg2)
e3:SetOperation(cm.tdop2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetRange(LOCATION_REMOVED)
c:RegisterEffect(e4)
if cm.counter==nil then
cm.counter=true
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAINING)
e3:SetOperation(cm.addcount)
Duel.RegisterEffect(e3,0)
end
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
end
function cm.addcount(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
if re:GetHandlerPlayer()==tp then
local rc=re:GetHandler()
local g71500005=Group.CreateGroup()
if e:GetLabelObject()==nil then
g71500005:AddCard(rc)
else
g71500005:Merge(e:GetLabelObject())
g71500005:AddCard(rc)
end
g71500005:KeepAlive()
e:SetLabelObject(g71500005)
if g71500005:GetClassCount(Card.GetCode)>=3 then Duel.RegisterFlagEffect(tp,m,0,0,0) end
else
local rc=re:GetHandler()
local g71500006=Group.CreateGroup()
if e:GetLabelObject()==nil then
g71500006:AddCard(rc)
else
g71500006:Merge(e:GetLabelObject())
g71500006:AddCard(rc)
end
g71500006:KeepAlive()
e:SetLabelObject(g71500006)
if g71500006:GetClassCount(Card.GetCode)>=3 then Duel.RegisterFlagEffect(1-tp,m,0,0,0) end
end
end
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.cdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(cm.damval1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_LPCOST_CHANGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetValue(cm.costchange)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetValue(1)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.aclimit(e,re,tp)
return not re:GetHandler():IsType(TYPE_TRAP)
end
function cm.damval1(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 and rp==1-e:GetOwnerPlayer() then return 0
else return val end
end
function cm.costchange(e,re,rp,val)
if re and not re:GetHandler():IsCode(9236985,57496978) then
return 0
else
return val
end
end
function cm.fit(c)
return not c:IsType(TYPE_TRAP)
end
function cm.handcon(e)
return Duel.GetMatchingGroupCount(cm.fit,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)==0
end
function cm.tdcon2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m)==nil then return false
else return Duel.GetFlagEffect(tp,m)>0 end
end
function cm.stfilter(c)
return c:IsSSetable() and not c:IsForbidden() and c:IsType(TYPE_TRAP) and c:IsFaceup()
end
function cm.tdtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.stfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsAbleToHand() end
end
function cm.tdop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) end
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.stfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
local tg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
if #tg<1 then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local sg=tg:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--集结!陷阱风暴
local cm,m=GetID()
function c71500006.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+1)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.stfilter(c)
return c:IsSSetable() and not c:IsForbidden() and c:IsType(TYPE_TRAP)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.stfilter,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetChainLimit(aux.FALSE)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,cm.stfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTarget(cm.target)
e1:SetValue(cm.indct)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PREDRAW)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.condition1)
e2:SetTarget(cm.target1)
e2:SetOperation(cm.operation1)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetCondition(cm.actcon1)
e3:SetValue(cm.aclimit)
Duel.RegisterEffect(e3,tp)
local e5=Effect.CreateEffect(e:GetHandler())
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAINING)
e5:SetCondition(cm.checkcon)
e5:SetOperation(cm.checkop)
Duel.RegisterEffect(e5,tp)
local e10=Effect.CreateEffect(e:GetHandler())
e10:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e10:SetCode(EVENT_SPSUMMON_SUCCESS)
e10:SetCondition(cm.spcon)
e10:SetOperation(cm.spop)
Duel.RegisterEffect(e10,tp)
local e11=e10:Clone()
e11:SetCode(EVENT_SUMMON_SUCCESS)
Duel.RegisterEffect(e11,tp)
local e12=e10:Clone()
e12:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
Duel.RegisterEffect(e12,tp)
local e14=Effect.CreateEffect(c)
e14:SetType(EFFECT_TYPE_FIELD)
e14:SetCode(EFFECT_SET_ATTACK_FINAL)
e14:SetTargetRange(LOCATION_MZONE,0)
e14:SetValue(0)
Duel.RegisterEffect(e14,tp)
local e15=e14:Clone()
e15:SetCode(EFFECT_SET_DEFENSE_FINAL)
Duel.RegisterEffect(e15,tp)
end
end
function cm.checkcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_MONSTER)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(rp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.fit(c)
return c:GetType()&TYPE_EFFECT~=0
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and eg:IsExists(cm.fit,1,nil)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(1,0)
e6:SetTarget(cm.limittg)
e6:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e6,tp)
local e7=e6:Clone()
e7:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
Duel.RegisterEffect(e7,tp)
local e8=e6:Clone()
e8:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e8,tp)
end
function cm.target(e,c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function cm.stfilter(c)
return c:IsType(TYPE_TRAP) and not c:IsForbidden() and c:IsSSetable()
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.stfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>1 end
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
if not aux.IsPlayerCanNormalDraw(tp) then return end
aux.GiveUpNormalDraw(e,tp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.stfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,2,2,nil)
Duel.SSet(tp,sg)
local tc=sg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=sg:GetNext()
end
end
function cm.actcon1(e)
local tp=e:GetHandlerPlayer()
local n=Duel.GetFlagEffect(tp,m)
if n==nil then return false end
return Duel.GetFlagEffect(tp,m)>0
end
function cm.aclimit(e,re,tp)
return re:IsActiveType(TYPE_SPELL+TYPE_MONSTER)
end
function cm.limittg(e,c,sump,sumtype,sumpos,targetp)
return c:GetOriginalType()&TYPE_EFFECT>0
end
--战术先决
local cm,m=GetID()
function c71500016.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m+1+EFFECT_COUNT_CODE_DUEL)
e2:SetCost(cm.discost)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.operation2)
c:RegisterEffect(e2)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(bit.band(re:GetActiveType(),0x7))
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
if e:GetLabel()==0x1 then
e1:SetDescription(aux.Stringid(m,2))
e1:SetValue(cm.aclimit1)
elseif e:GetLabel()==0x2 then
e1:SetDescription(aux.Stringid(m,3))
e1:SetValue(cm.aclimit2)
else
e1:SetDescription(aux.Stringid(m,4))
e1:SetValue(cm.aclimit3)
end
e1:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e1,tp)
end
function cm.aclimit1(e,re,tp)
return not re:IsActiveType(TYPE_MONSTER)
end
function cm.aclimit2(e,re,tp)
return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL))
end
function cm.aclimit3(e,re,tp)
return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP))
end
function cm.discost(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 cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
e:SetLabel(Duel.AnnounceType(tp))
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
if e:GetLabel()==0 then
e1:SetDescription(aux.Stringid(m,5))
e1:SetValue(cm.aclimit11)
elseif e:GetLabel()==1 then
e1:SetDescription(aux.Stringid(m,6))
e1:SetValue(cm.aclimit12)
else
e1:SetDescription(aux.Stringid(m,7))
e1:SetValue(cm.aclimit13)
end
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e11=e1:Clone()
e11:SetTargetRange(1,0)
e11:SetReset(RESET_PHASE+PHASE_END,999)
Duel.RegisterEffect(e11,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetTargetRange(0,1)
e3:SetValue(0)
e3:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e3,tp)
local e4=e3:Clone()
e4:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e4:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e4,tp)
end
function cm.aclimit11(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function cm.aclimit12(e,re,tp)
return (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL))
end
function cm.aclimit13(e,re,tp)
return (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP))
end
--陷阱大崩落
local cm,m=GetID()
function c71500017.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
--e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10045474,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(cm.handcon)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
end
function cm.fit0(c)
return not c:IsType(TYPE_TRAP)
end
function cm.handcon(e)
return Duel.GetMatchingGroupCount(cm.fit0,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)==0
end
function cm.chainfilter(re,tp,cid)
return re:GetHandler():IsType(TYPE_TRAP)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.aclimit(e,re,tp)
return not re:GetHandler():IsType(TYPE_TRAP)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function cm.fit(c)
return c:IsType(TYPE_TRAP) and c:IsFaceup() and c:IsSSetable()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local sg1=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg1,REASON_EFFECT)
local a=Duel.GetOperatedGroup():Filter(Card.IsType,nil,TYPE_TRAP):GetCount()
local sg2=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg2,REASON_EFFECT)
local b=Duel.GetOperatedGroup():Filter(Card.IsType,nil,TYPE_TRAP):GetCount()
local s1=Duel.GetLocationCount(tp,LOCATION_SZONE)
local s2=a+b
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.fit),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,math.min(s1,s2),math.min(s1,s2),nil)
Duel.SSet(tp,g)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--织弦律·俱装使
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon rule
local e1=Effect.CreateEffect(c)
e1:SetDescription(1118)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(s.sprcon)
e1:SetTarget(s.sprtg)
e1:SetOperation(s.sprop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(1191)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.sstg)
e2:SetOperation(s.ssop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,id+2)
e3:SetCondition(s.szcon)
e3:SetTarget(s.sztg)
e3:SetOperation(s.szop)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:IsSetCard(0x3e70) and c:IsAbleToGraveAsCost() and c:IsType(TYPE_MONSTER)
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK,0,1,nil)
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
end
function s.ssfilter(c,e,tp)
return c:IsFaceup() and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp)
and Duel.GetMZoneCount(tp,c)>0
end
function s.filter(c,e,tp)
return c:IsSetCard(0x3e70) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.ssfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.ssfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function s.ssop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function s.szcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetType()==TYPE_SPELL+TYPE_CONTINUOUS
end
function s.mzfilter(c,tp)
return not c:IsCode(id) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function s.sztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.mzfilter(chkc,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(s.mzfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectTarget(tp,s.mzfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.szop(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
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--织弦律·咏叹使
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon rule
local e1=Effect.CreateEffect(c)
e1:SetDescription(1118)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(s.sprcon)
e1:SetTarget(s.sprtg)
e1:SetOperation(s.sprop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(1190)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+1)
e2:SetCost(s.tdcost)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(1118)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_LEAVE_GRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,id+2)
e3:SetCondition(s.szcon)
e3:SetTarget(s.sztg)
e3:SetOperation(s.szop)
c:RegisterEffect(e3)
end
function s.cfilter(c,tp,f)
return f(c) and Duel.GetMZoneCount(tp,c)>0 and c:IsType(TYPE_MONSTER)
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,tp,Card.IsAbleToGraveAsCost)
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c,tp,Card.IsAbleToGraveAsCost)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
end
function s.filter(c)
return c:IsSetCard(0x3e70) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.tdfilter(c)
return not c:IsCode(id) and c:IsType(TYPE_MONSTER) and (c:IsAbleToExtraAsCost() or c:IsAbleToDeckAsCost())
end
function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if #sg>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function s.szcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetType()==TYPE_SPELL+TYPE_CONTINUOUS
end
function s.mzfilter(c,tp)
return c:IsType(TYPE_MONSTER) and not c:IsForbidden() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function s.sztg(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 s.szop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(s.mzfilter,tp,LOCATION_GRAVE,0,1,nil,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,s.mzfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
if #g>0 then
local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--织弦律·终焉咏叹使
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,s.lcheck)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(1118)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1)
e2:SetCost(s.mzcost)
e2:SetTarget(s.mztg)
e2:SetOperation(s.mzop)
c:RegisterEffect(e2)
end
function s.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x3e70)
end
function s.spfilter(c,e,tp)
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and
c:GetOriginalType()&TYPE_MONSTER>0 and c:GetType()&TYPE_CONTINUOUS+TYPE_SPELL==TYPE_CONTINUOUS+TYPE_SPELL
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.tdfilter(c)
return c:IsAbleToExtraAsCost() or c:IsAbleToDeckAsCost()
end
function s.mzcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function s.mztg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not c:IsForbidden() end
end
function s.mzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--织弦律·终焉俱装使
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,s.lcheck)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_LEAVE_GRAVE)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.mztg)
e1:SetOperation(s.mzop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.szcon)
e2:SetTarget(s.sztg)
e2:SetOperation(s.szop)
c:RegisterEffect(e2)
end
function s.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x3e70)
end
function s.mzfilter(c)
return c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function s.mztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.mzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.mzfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectTarget(tp,s.mzfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function s.mzop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
function s.szcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetType()==TYPE_SPELL+TYPE_CONTINUOUS
end
function s.szfilter(c,tp)
local r=LOCATION_REASON_TOFIELD
if not c:IsControler(c:GetOwner()) then
if not c:IsAbleToChangeControler() then return false end
r=LOCATION_REASON_CONTROL
end
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and ((c:IsLocation(LOCATION_GRAVE)
and not c:IsForbidden()) or (c:IsLocation(LOCATION_MZONE) and Duel.GetMZoneCount(tp,c)>0 and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp,r)>0))
end
function s.sztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.szfilter(chkc,tp) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(s.szfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local g=Duel.SelectTarget(tp,s.szfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp)
if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.szop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
if Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_SZONE,POS_FACEUP,true)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--织弦律·超新星终焉咏叹使
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,4,s.lcheck)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.mvtg)
e1:SetOperation(s.mvop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.reptg)
e2:SetValue(s.repval)
e2:SetOperation(s.repop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(s.indcon)
e3:SetOperation(s.indop)
c:RegisterEffect(e3)
end
function s.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x3e70)
end
function s.filter(c,tp)
local r=LOCATION_REASON_TOFIELD
if not c:IsControler(c:GetOwner()) then r=LOCATION_REASON_CONTROL end
return (c:IsType(TYPE_MONSTER) or c:IsLocation(LOCATION_MZONE)) and c:IsFaceupEx()
and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp,r)>0
end
function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and s.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=aux.SelectTargetFromFieldFirst(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil,tp)
if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
end
function s.mvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e)
and Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
function s.repfilter1(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsSetCard(0x3e70) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function s.repfilter2(c,e)
return c:IsFaceup() and c:IsDestructable(e) and c:GetOriginalType()&TYPE_MONSTER>0
and c:GetType()&TYPE_CONTINUOUS+TYPE_SPELL==TYPE_CONTINUOUS+TYPE_SPELL
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(s.repfilter1,1,nil,tp) and
Duel.IsExistingMatchingCard(s.repfilter2,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e) end
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,s.repfilter2,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e)
e:SetLabelObject(g:GetFirst())
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true
else return false end
end
function s.repval(e,c)
return s.repfilter1(c,e:GetHandlerPlayer())
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end
function s.indcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_LINK
end
function s.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetOwnerPlayer(ep)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
rc:RegisterEffect(e4,true)
end
\ No newline at end of file
--织弦律·超新星终焉俱装使
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,4,s.lcheck)
c:EnableReviveLimit()
--spsummon spell
local e1=Effect.CreateEffect(c)
e1:SetDescription(1118)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.spstg)
e1:SetOperation(s.spsop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+1)
e2:SetCost(s.discost)
e2:SetCondition(s.discon)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(s.indcon)
e3:SetOperation(s.indop)
c:RegisterEffect(e3)
end
function s.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x3e70)
end
function s.sfilter(c,e,tp)
return c:GetOriginalType()&TYPE_MONSTER>0 and c:GetType()&TYPE_CONTINUOUS+TYPE_SPELL==TYPE_CONTINUOUS+TYPE_SPELL
and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.spstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.sfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.sfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.sfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spsop(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 s.cfilter(c)
return c:GetOriginalType()&TYPE_MONSTER>0 and c:GetType()&TYPE_CONTINUOUS+TYPE_SPELL==TYPE_CONTINUOUS+TYPE_SPELL
and c:IsFaceup()
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
Duel.Release(g,REASON_COST)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function s.distg(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 s.disop(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 s.indcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_LINK
end
function s.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgoval)
e1:SetOwnerPlayer(ep)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
\ No newline at end of file
--织弦律·终末俱咏调律机
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,5,s.lcheck)
c:EnableReviveLimit()
--atk up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.atkcon)
e1:SetTarget(s.atktg)
e1:SetOperation(s.atkop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCost(s.mzcost)
e2:SetTarget(s.mztg)
e2:SetOperation(s.mzop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.negcon)
e3:SetCost(s.negcost)
e3:SetTarget(s.negtg)
e3:SetOperation(s.negop)
c:RegisterEffect(e3)
end
function s.lcheck(g)
return g:IsExists(s.lfilter,1,nil)
end
function s.lfilter(c)
return c:IsLinkType(TYPE_LINK) and c:IsLinkSetCard(0x3e70)
end
function s.atkfilter(c,e)
return c:IsType(TYPE_LINK) and (c:IsLocation(LOCATION_GRAVE) or (c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()))
and c:IsCanBeEffectTarget(e)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mg=e:GetHandler():GetMaterial()
if mg:GetCount()<1 then return false end
if chkc then return mg:IsContains(chkc) and s.atkfilter(chkc,e) end
if chk==0 then return mg:IsExists(s.atkfilter,1,nil,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=mg:FilterSelect(tp,s.atkfilter,1,1,nil,e)
Duel.SetTargetCard(g)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(tc:GetLink()*1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function s.tdfilter(c)
return c:IsSetCard(0x3e70) and c:IsType(TYPE_MONSTER) and (c:IsAbleToExtraAsCost() or c:IsAbleToDeckAsCost())
end
function s.mzcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function s.filter(c,tp)
local r=LOCATION_REASON_TOFIELD
if not c:IsControler(c:GetOwner()) then r=LOCATION_REASON_CONTROL end
return (c:IsType(TYPE_MONSTER) or c:IsLocation(LOCATION_MZONE)) and c:IsFaceup()
and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp,r)>0
end
function s.mztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil,tp) end
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil,tp)
if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
end
function s.mzop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,tp)
if #sg>0 and Duel.GetLocationCount(sg:GetFirst():GetOwner(),LOCATION_SZONE)>0 then
local tc=sg:GetFirst()
Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and ep~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function s.cfilter(c)
return c:GetOriginalType()&TYPE_MONSTER>0 and c:GetType()&TYPE_CONTINUOUS+TYPE_SPELL==TYPE_CONTINUOUS+TYPE_SPELL
and c:IsFaceup()
end
function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
Duel.Release(g,REASON_COST)
end
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAttackAbove(1000) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
if not c:IsHasEffect(EFFECT_REVERSE_UPDATE) then
Duel.NegateActivation(ev)
end
end
\ No newline at end of file
--天织弦律鸣域
function c74600040.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(1152)
e1:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_FZONE)
--e1:SetCountLimit(1)
e1:SetCondition(c74600040.spcon)
e1:SetTarget(c74600040.sptg)
e1:SetOperation(c74600040.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(1190)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,74600040)
e2:SetCost(c74600040.thcost)
e2:SetTarget(c74600040.thtg)
e2:SetOperation(c74600040.thop)
c:RegisterEffect(e2)
end
function c74600040.chkfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsSetCard(0x3e70) and c:IsFaceup() and c:IsType(TYPE_LINK)-- and c:IsSummonType(SUMMON_TYPE_LINK)
end
function c74600040.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c74600040.chkfilter,1,nil,tp)
end
function c74600040.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,74600045,nil,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_CYBERSE,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c74600040.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsType(TYPE_LINK)) and c:IsLocation(LOCATION_EXTRA)
end
function c74600040.spop(e,tp,eg,ep,ev,re,r,rp)
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetTarget(c74600040.splimit)
e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,74600045,nil,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_CYBERSE,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,74600045)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)~=0 then
local fid=e:GetHandler():GetFieldID()
token:RegisterFlagEffect(74600040,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(token)
e1:SetCondition(c74600040.descon)
e1:SetOperation(c74600040.desop)
Duel.RegisterEffect(e1,tp)
end
end
function c74600040.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(74600040)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c74600040.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
function c74600040.tffilter(c,tp)
return aux.AtkEqualsDef(c) and c:IsRace(RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsFaceupEx() and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c74600040.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c74600040.tffilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c74600040.tffilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e1)
end
end
function c74600040.thfilter(c)
return c:IsSetCard(0x3e70) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c74600040.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74600040.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c74600040.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c74600040.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--织弦律汇编
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(1190)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetCost(s.thcost1)
e1:SetTarget(s.thtg1)
e1:SetOperation(s.thop1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(1190)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1)
e2:SetCost(s.thcost2)
e2:SetTarget(s.thtg2)
e2:SetOperation(s.thop2)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_LINK)
end
function s.thcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and
Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
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(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_LINK)
end
function s.thfilter1(c)
return c:IsSetCard(0x3e70) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.tdfilter(c)
return c:IsSetCard(0x3e70) and c:IsType(TYPE_MONSTER) and (c:IsAbleToDeckAsCost() or c:IsAbleToExtraAsCost())
end
function s.thcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
if Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
end
function s.thfilter2(c)
return c:IsSetCard(0x3e70) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #sg>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--织弦律·仰慕的少女
function c74600055.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(74600055,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,74600055)
e1:SetTarget(c74600055.thtg)
e1:SetOperation(c74600055.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(74600055,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,74600056)
e3:SetCost(c74600055.spcost)
e3:SetTarget(c74600055.sptg)
e3:SetOperation(c74600055.spop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(74600055,ACTIVITY_SPSUMMON,c74600055.counterfilter)
end
function c74600055.counterfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function c74600055.thfilter(c)
return c:IsSetCard(0x3e70) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c74600055.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74600055.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c74600055.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c74600055.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c74600055.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return Duel.GetCustomActivityCount(74600055,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsNonAttribute,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c74600055.disfilter(c,e,tp)
return c:IsDiscardable()
and Duel.IsExistingMatchingCard(c74600055.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,c,e,tp)
end
function c74600055.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c74600055.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c74600055.disfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
end
Duel.DiscardHand(tp,c74600055.disfilter,1,1,REASON_COST+REASON_DISCARD,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c74600055.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 sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c74600055.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
--织弦律·钦慕的少女
function c74600057.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(74600057,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,74600057)
e1:SetCondition(c74600057.spcon)
e1:SetTarget(c74600057.sptg)
e1:SetOperation(c74600057.spop)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DISCARD)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,74600058)
e2:SetTarget(c74600057.settg)
e2:SetOperation(c74600057.setop)
c:RegisterEffect(e2)
end
function c74600057.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetType()==TYPE_CONTINUOUS+TYPE_SPELL
end
function c74600057.thfilter(c)
return c:IsSetCard(0x3e70) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c74600057.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c74600057.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c74600057.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c74600057.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
function c74600057.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsForbidden() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c74600057.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsForbidden() or c:IsImmuneToEffect(e) or not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
end
--织弦律·交织乐魂
function c74600059.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,3,c74600059.lcheck)
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,74600059)
e1:SetCondition(c74600059.drcon)
e1:SetCost(c74600059.drcost)
e1:SetTarget(c74600059.drtg)
e1:SetOperation(c74600059.drop)
c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c74600059.valcheck)
e0:SetLabelObject(e1)
c:RegisterEffect(e0)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74600059,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,74600060)
e2:SetCost(c74600059.spcost)
e2:SetTarget(c74600059.sptg)
e2:SetOperation(c74600059.spop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(74600059,ACTIVITY_SPSUMMON,c74600059.counterfilter)
end
function c74600059.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsType(TYPE_LINK)
end
function c74600059.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x3e70)
end
function c74600059.valcheck(e,c)
local ct=c:GetMaterial():FilterCount(Card.IsType,nil,TYPE_NORMAL)
e:GetLabelObject():SetLabel(ct)
end
function c74600059.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c74600059.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(74600059,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(c74600059.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c74600059.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsType(TYPE_LINK)) and c:IsLocation(LOCATION_EXTRA)
end
function c74600059.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel()
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c74600059.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c74600059.tgfilter(c)
return c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function c74600059.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74600059.tgfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c74600059.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c74600059.spfilter(c,e,tp)
return c:IsSetCard(0x3e70) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c74600059.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c74600059.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c74600059.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 sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c74600059.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
sc:RegisterFlagEffect(74600059,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabelObject(sc)
e1:SetCondition(c74600059.descon)
e1:SetOperation(c74600059.desop)
Duel.RegisterEffect(e1,tp)
end
end
function c74600059.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(74600059)~=0 then
return true
else
e:Reset()
return false
end
end
function c74600059.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
--织弦律·辉影之鸣律神
function c74600061.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,6,c74600061.lcheck)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c74600061.atkval)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,74600061)
e2:SetCondition(c74600061.setcon)
e2:SetTarget(c74600061.settg)
e2:SetOperation(c74600061.setop)
c:RegisterEffect(e2)
--mat check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(c74600061.valcheck)
c:RegisterEffect(e3)
--synchro success
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(c74600061.regcon)
e4:SetOperation(c74600061.regop)
c:RegisterEffect(e4)
e4:SetLabelObject(e3)
end
function c74600061.mfilter(c)
return c:IsLinkSetCard(0x3e70) and c:IsLinkType(TYPE_LINK)
end
function c74600061.lcheck(g,lc)
return g:IsExists(c74600061.mfilter,1,nil)
end
function c74600061.atkfilter(c)
return c:GetType()==TYPE_CONTINUOUS+TYPE_SPELL and bit.band(c:GetOriginalType(),TYPE_MONSTER)==TYPE_MONSTER and c:IsFaceup()
end
function c74600061.atkval(e,c)
return Duel.GetMatchingGroupCount(c74600061.atkfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*1000
end
function c74600061.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c74600061.setfilter(c)
local p=c:GetOwner()
return c:IsType(TYPE_MONSTER) and not c:IsForbidden() and Duel.GetLocationCount(p,LOCATION_SZONE)>0 and c:IsFaceupEx()
end
function c74600061.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74600061.setfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
end
function c74600061.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c74600061.setfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil):GetFirst()
if tc then
Duel.HintSelection(Group.FromCards(tc))
if tc:IsImmuneToEffect(e) then return end
Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
function c74600061.valcheck(e,c)
local g=c:GetMaterial()
local att=0
if not g then return end
for tc in aux.Next(g) do
att=bit.bor(att,tc:GetOriginalAttribute())
end
e:SetLabel(att)
end
function c74600061.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabelObject():GetLabel()~=0
end
function c74600061.regop(e,tp,eg,ep,ev,re,r,rp)
local att=e:GetLabelObject():GetLabel()
local c=e:GetHandler()
if bit.band(att,ATTRIBUTE_LIGHT)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(1131)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c74600061.discon)
e1:SetTarget(c74600061.distg)
e1:SetOperation(c74600061.disop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(74600061,0))
end
if bit.band(att,ATTRIBUTE_DARK)~=0 then
local e2=Effect.CreateEffect(c)
e2:SetDescription(1131)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(2)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c74600061.negcon)
e2:SetCost(c74600061.negcost)
e2:SetTarget(aux.nbtg)
e2:SetOperation(c74600061.negop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(74600061,1))
end
end
function c74600061.discon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c74600061.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c74600061.setfilter(re:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c74600061.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and c74600061.setfilter(rc) then
if rc:IsImmuneToEffect(e) then return end
Duel.MoveToField(rc,tp,rc:GetOwner(),LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
rc:RegisterEffect(e1)
end
end
function c74600061.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function c74600061.rfilter(c,tp)
return c:GetType()==TYPE_CONTINUOUS+TYPE_SPELL and bit.band(c:GetOriginalType(),TYPE_MONSTER)==TYPE_MONSTER and (c:IsFaceup() or c:IsControler(tp)) and c:IsReleasable()
end
function c74600061.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74600061.rfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c74600061.rfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c74600061.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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