Commit abe8b3d8 authored by Nemo Ma's avatar Nemo Ma

wild+

parent 25173dcc
...@@ -10,6 +10,20 @@ ...@@ -10,6 +10,20 @@
130002004 0 130002004 0
130002005 0 130002005 0
#WILD, I say WILD, WAHAHA #WILD, I say WILD, WAHAHA
14824018 0
14824033 0
25000000 0
25000001 0
25000403 0
60001158 0
60001159 0
60001160 0
60001161 0
60001162 0
60001163 0
60001164 0
60001165 0
60001166 0
77693580 0 77693580 0
94380880 0 94380880 0
15000318 0 15000318 0
...@@ -41,15 +55,11 @@ ...@@ -41,15 +55,11 @@
14050000 0 14050000 0
27582500 0 27582500 0
16170003 0 16170003 0
25000001 0
25000049 0
50005205 0 50005205 0
86510002 0 86510002 0
86510003 0 86510003 0
86510004 0 86510004 0
14012021 0 14012021 0
25000001 0
25000049 0
700021 0 700021 0
700022 0 700022 0
700023 0 700023 0
...@@ -67,7 +77,6 @@ ...@@ -67,7 +77,6 @@
16200006 0 16200006 0
16200007 0 16200007 0
16200008 0 16200008 0
25010000 0
30000001 0 30000001 0
30000004 0 30000004 0
30000005 0 30000005 0
...@@ -748,6 +757,22 @@ ...@@ -748,6 +757,22 @@
30002065 0 30002065 0
30010000 0 30010000 0
30012000 0 30012000 0
#220508
60000056 0
60000063 0
60000057 0
60000058 0
60000059 0
60000060 0
60000061 0
60000062 0
12057802 0
12057819 0
30000325 0
30005095 0
60002025 0
83000068 0
19198102 1
#220501 #220501
12057603 0 12057603 0
22520006 0 22520006 0
...@@ -871,7 +896,6 @@ ...@@ -871,7 +896,6 @@
31400077 0 31400077 0
31414002 0 31414002 0
53799104 0 53799104 0
60000016 0
72412020 0 72412020 0
88990192 0 88990192 0
114427368 0 114427368 0
...@@ -1572,7 +1596,6 @@ ...@@ -1572,7 +1596,6 @@
64800043 0 64800043 0
9910051 2 9910051 2
9910710 2 9910710 2
25000157 2
#210613 #210613
33405100 0 33405100 0
9300315 0 9300315 0
...@@ -1666,9 +1689,6 @@ ...@@ -1666,9 +1689,6 @@
14000204 0 14000204 0
14000205 0 14000205 0
14000206 0 14000206 0
25000154 0
25000155 0
25000156 0
72100316 0 72100316 0
72100317 0 72100317 0
72100318 0 72100318 0
...@@ -1695,7 +1715,6 @@ ...@@ -1695,7 +1715,6 @@
14010039 0 14010039 0
22070230 0 22070230 0
22544155 0 22544155 0
25000055 0
30000200 0 30000200 0
31470002 0 31470002 0
31470011 0 31470011 0
...@@ -1759,7 +1778,6 @@ ...@@ -1759,7 +1778,6 @@
79034052 0 79034052 0
14010062 1 14010062 1
22020490 1 22020490 1
25000127 1
33330080 1 33330080 1
79029233 1 79029233 1
#210404 #210404
...@@ -1820,7 +1838,6 @@ ...@@ -1820,7 +1838,6 @@
#210131 #210131
14010116 0 14010116 0
22020090 0 22020090 0
25010013 0
33401202 0 33401202 0
65010561 0 65010561 0
79029333 0 79029333 0
...@@ -1891,7 +1908,6 @@ ...@@ -1891,7 +1908,6 @@
131000013 0 131000013 0
131000016 0 131000016 0
131000019 0 131000019 0
25000132 1
79029350 1 79029350 1
#forbidden #forbidden
31400042 0 --超热血跑者,无限手卡跳,跳出来至少抓3,基本上是个陀螺 31400042 0 --超热血跑者,无限手卡跳,跳出来至少抓3,基本上是个陀螺
...@@ -1959,7 +1975,6 @@ ...@@ -1959,7 +1975,6 @@
72100035 0 72100035 0
72100112 0 72100112 0
30001007 0 30001007 0
25010012 0
90700058 0 90700058 0
90700057 0 90700057 0
82208118 0 82208118 0
...@@ -2006,8 +2021,6 @@ ...@@ -2006,8 +2021,6 @@
14010231 0 14010231 0
130002101 0 130002101 0
130002102 0 130002102 0
25000063 0
25000064 0
30000235 0 30000235 0
30000230 0 30000230 0
31400050 0 31400050 0
...@@ -2085,23 +2098,6 @@ ...@@ -2085,23 +2098,6 @@
22510013 0 22510013 0
22510014 0 22510014 0
22510015 0 22510015 0
25000000 0
25000005 0
25000006 0
25000007 0
25000008 0
25000009 0
25000010 0
25000022 0
25000023 0
25000002 0
25000003 0
25000004 0
25000001 0
25000053 0
25000061 0
25000049 0
25000024 0
30000300 0 30000300 0
30000305 0 30000305 0
30000310 0 30000310 0
...@@ -2152,7 +2148,6 @@ ...@@ -2152,7 +2148,6 @@
72100033 0 72100033 0
72100038 0 72100038 0
72100034 0 72100034 0
25010005 0
79029011 0 79029011 0
79029034 0 79029034 0
79029078 0 79029078 0
...@@ -2391,8 +2386,6 @@ ...@@ -2391,8 +2386,6 @@
14001011 0 14001011 0
14001012 0 14001012 0
14001051 0 14001051 0
25000059 0
25000065 0
79029514 0 79029514 0
82221016 0 82221016 0
77770002 0 77770002 0
...@@ -2715,14 +2708,6 @@ ...@@ -2715,14 +2708,6 @@
9950147 0 9950147 0
33403501 0 33403501 0
9981580 0 9981580 0
25000005 0
25000006 0
25000007 0
25000008 0
25000009 0
25000010 0
25000022 0
25000023 0
114620013 0 114620013 0
9950748 0 9950748 0
9950749 0 9950749 0
...@@ -2756,7 +2741,6 @@ ...@@ -2756,7 +2741,6 @@
9950728 0 9950728 0
9950718 0 9950718 0
9950723 0 9950723 0
25010005 0
9950294 0 9950294 0
9950467 0 9950467 0
14010223 0 14010223 0
...@@ -2929,8 +2913,6 @@ ...@@ -2929,8 +2913,6 @@
82208114 0 82208114 0
82208115 0 82208115 0
82208116 0 82208116 0
25000063 0
25000064 0
130002102 0 130002102 0
130002101 0 130002101 0
9950011 0 9950011 0
...@@ -2980,10 +2962,6 @@ ...@@ -2980,10 +2962,6 @@
33403513 1 33403513 1
65000000 1 65000000 1
82204250 1 82204250 1
25000014 1
25000015 1
25000016 1
25000017 1
79029038 1 79029038 1
79029050 1 79029050 1
9980400 1 9980400 1
...@@ -3167,10 +3145,6 @@ ...@@ -3167,10 +3145,6 @@
9950448 1 9950448 1
9950452 1 9950452 1
#33403500 1 #33403500 1
25000018 1
25000019 1
25000020 1
25000021 1
9950624 1 9950624 1
9950681 0 9950681 0
9950425 1 9950425 1
...@@ -3178,7 +3152,6 @@ ...@@ -3178,7 +3152,6 @@
9950989 1 9950989 1
9950289 1 9950289 1
9950285 1 9950285 1
25000049 0
9950038 1 9950038 1
9951101 1 9951101 1
9951328 1 9951328 1
...@@ -3454,7 +3427,6 @@ ...@@ -3454,7 +3427,6 @@
73915051 2 --Scapegoat 73915051 2 --Scapegoat
!THE WILD LIST !THE WILD LIST
25000001 0
20000 0 20000 0
14050000 0 14050000 0
79029836 0 79029836 0
...@@ -3524,7 +3496,6 @@ ...@@ -3524,7 +3496,6 @@
#forbidden #forbidden
72100025 0 72100025 0
72100125 0 72100125 0
25010012 0
90700058 0 90700058 0
90700057 0 90700057 0
#210919 #210919
...@@ -3557,8 +3528,6 @@ ...@@ -3557,8 +3528,6 @@
14010231 0 14010231 0
130002101 0 130002101 0
130002102 0 130002102 0
25000063 0
25000064 0
30000235 0 30000235 0
30000230 0 30000230 0
31400050 0 31400050 0
...@@ -3712,8 +3681,6 @@ ...@@ -3712,8 +3681,6 @@
82208103 0 82208103 0
130002101 0 130002101 0
130002102 0 130002102 0
25000064 0
25000063 0
31400050 0 --归亡死恶魔,无任何限制的单卡抛瓦 31400050 0 --归亡死恶魔,无任何限制的单卡抛瓦
90700001 0 --霜火要塞,系列剑指west环境,ban此卡即可 90700001 0 --霜火要塞,系列剑指west环境,ban此卡即可
#limit #limit
......
No preview for this file type
No preview for this file type
expansions/pics/25000001.jpg

39.6 KB | W: | H:

expansions/pics/25000001.jpg

168 KB | W: | H:

expansions/pics/25000001.jpg
expansions/pics/25000001.jpg
expansions/pics/25000001.jpg
expansions/pics/25000001.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -14,7 +14,7 @@ function c10700459.initial_effect(c) ...@@ -14,7 +14,7 @@ function c10700459.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetCondition(c10700459.atcon) e4:SetCondition(c10700459.atcon2)
e4:SetValue(1) e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--search --search
...@@ -43,9 +43,15 @@ end ...@@ -43,9 +43,15 @@ end
function c10700459.cfilter(c,atk) function c10700459.cfilter(c,atk)
return c:IsFaceup() and c:GetAttack()>atk return c:IsFaceup() and c:GetAttack()>atk
end end
function c10700459.cfilter2(c,atk)
return c:IsFaceup() and c:GetAttack()<atk
end
function c10700459.atcon(e,tp,eg,ep,ev,re,r,rp) function c10700459.atcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10700459.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) return Duel.IsExistingMatchingCard(c10700459.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack())
end end
function c10700459.atcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10700459.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack())
end
function c10700459.spfilter(c,e,tp) function c10700459.spfilter(c,e,tp)
return c:GetAttack()==1700 and c:GetDefense()==1000 and c:IsRace(RACE_BEASTWARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:GetAttack()==1700 and c:GetDefense()==1000 and c:IsRace(RACE_BEASTWARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
...@@ -55,7 +61,7 @@ function c10700459.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,7 +61,7 @@ function c10700459.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end end
function c10700459.spop(e,tp,eg,ep,ev,re,r,rp) function c10700459.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c10700459.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c10700459.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
--红绘卷
function c1100001.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_BOTH_BATTLE_DAMAGE)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1100001,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetCondition(c1100001.con2)
e2:SetOperation(c1100001.op2)
c:RegisterEffect(e2)
--
end
--
function c1100001.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc and bc:IsFaceup() and bc:IsRelateToBattle() and bc:GetAttack()>=Duel.GetLP(tp)
end
function c1100001.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e2_1:SetValue(1)
e2_1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2_1)
end
--
\ No newline at end of file
--魔符『拿来吧你』
function c1100003.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1100003,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,1100003+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c1100003.con1)
e1:SetTarget(c1100003.tg1)
e1:SetOperation(c1100003.op1)
c:RegisterEffect(e1)
--
end
--
function c1100003.ProtectedRun(f,...)
if not f then return true end
local params={...}
local ret={}
local res_test=pcall(function()
ret={f(table.unpack(params))}
end)
if not res_test then return false end
return table.unpack(ret)
end
function c1100003.con1(e,tp,eg,ep,ev,re,r,rp)
local te=re:GetHandler():GetActivateEffect()
if not te then return false end
local con=te:GetCondition()
local tg=te:GetTarget()
local res=false
if not c1100003.ProtectedRun(con,e,tp,eg,ep,ev,re,r,rp) then res=1 end
if not c1100003.ProtectedRun(tg,e,tp,eg,ep,ev,re,r,rp,0) then res=2 end
return ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsChainNegatable(ev)
and not res
and re:GetHandler():CheckActivateEffect(false,true,false)~=nil
end
function c1100003.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
if bit.band(re:GetHandler():GetOriginalType(),TYPE_MONSTER)~=0 then
e:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
else
e:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
end
end
function c1100003.op1(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not Duel.NegateActivation(ev) then return end
if not rc:IsRelateToEffect(re) then return end
if Duel.Destroy(eg,REASON_EFFECT)~=0 and not rc:IsLocation(LOCATION_HAND+LOCATION_DECK) and aux.NecroValleyFilter()(rc) then
if rc:IsType(TYPE_MONSTER)
and (not rc:IsLocation(LOCATION_EXTRA) and Duel.GetMZoneCount(tp)>0 or rc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,rc)>0)
and rc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
and Duel.SelectYesNo(tp,aux.Stringid(1100003,1)) then
Duel.BreakEffect()
Duel.SpecialSummon(rc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,rc)
elseif (rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and rc:IsSSetable()
and Duel.SelectYesNo(tp,aux.Stringid(1100003,2)) then
Duel.BreakEffect()
Duel.SSet(tp,rc)
end
end
end
--
\ No newline at end of file
muxu=muxu or {}
local cm=muxu
muxu.loaded_metatable_list={}
--
--c-code:1195103 当前回合发动的卡
--
--p-code:1195103 这个回合发动过效果
--
function muxu.load_metatable(code)
local m1=_G["c"..code]
if m1 then return m1 end
local m2=muxu.loaded_metatable_list[code]
if m2 then return m2 end
_G["c"..code]={}
if pcall(function() dofile("expansions/script/c"..code..".lua") end) or pcall(function() dofile("script/c"..code..".lua") end) then
local mt=_G["c"..code]
_G["c"..code]=nil
if mt then
muxu.loaded_metatable_list[code]=mt
return mt
end
else
_G["c"..code]=nil
end
end
--
function muxu.check_set(c,setcode,v,f,...)
local codet=nil
if type(c)=="number" then
codet={c}
elseif type(c)=="table" then
codet=c
elseif type(c)=="userdata" then
local f=f or Card.GetCode
codet={f(c)}
end
local ncodet={...}
for i,code in pairs(codet) do
for i,ncode in pairs(ncodet) do
if code==ncode then return true end
end
local mt=muxu.load_metatable(code)
if mt and mt["named_with_"..setcode] and (not v or mt["named_with_"..setcode]==v) then return true end
end
return false
end
--
function muxu.check_set_Soul(c) --灵曲
return muxu.check_set(c,"Soul")
end
function muxu.check_set_Border(c) --交界
return muxu.check_set(c,"Border")
end
function muxu.check_set_Legend(c) --秘谈
return muxu.check_set(c,"Legend")
end
--
function muxu.check_set_Urban(c) --灵都
return muxu.check_set(c,"Urban")
end
function muxu.check_fusion_set_Urban(c)
if c:IsHasEffect(6205579) then return false end
local codet={c:GetFusionCode()}
for j,code in pairs(codet) do
local mt=muxu.load_metatable(code)
if mt then
for str,v in pairs(mt) do
if type(str)=="string" and str:find("_Urban") and v then return true end
end
end
end
return false
end
--
function muxu.check_set_Butterfly(c) --蝶舞
return muxu.check_set(c,"Butterfly")
end
function muxu.check_set_Lines(c) --灵纹
return muxu.check_set(c,"Lines")
end
function muxu.check_set_Hinbackc(c) --莱姆狐
return muxu.check_set(c,"Hinbackc")
end
function muxu.check_set_Medicine(c) --梅蒂欣
return muxu.check_set(c,"Medicine")
end
function muxu.check_set_Poison(c) --毒符
return muxu.check_set(c,"Poison")
end
function muxu.check_set_Materdim(c)
return muxu.check_set(c,"Materdim")
end
--
function muxu.check_set_NozaLeah(c)
return muxu.check_set(c,"NozaLeah")
end
function muxu.check_link_set_NozaLeah(c)
local codet={c:GetLinkCode()}
for j,code in pairs(codet) do
local mt=muxu.load_metatable(code)
if mt then
for str,v in pairs(mt) do
if type(str)=="string" and str:find("_NozaLeah") and v then return true end
end
end
end
return false
end
--
--muxu_ih_KTatara 有「小伞」记述的卡
function muxu.check_set_Tatara(c) --小伞
return muxu.check_set(c,"Tatara")
end
function muxu.check_fusion_set_Tatara(c)
if c:IsHasEffect(6205579) then return false end
local codet={c:GetFusionCode()}
for j,code in pairs(codet) do
local mt=muxu.load_metatable(code)
if mt then
for str,v in pairs(mt) do
if type(str)=="string" and str:find("_Tatara") and v then return true end
end
end
end
return false
end
function muxu.check_link_set_Tatara(c)
local codet={c:GetLinkCode()}
for j,code in pairs(codet) do
local mt=muxu.load_metatable(code)
if mt then
for str,v in pairs(mt) do
if type(str)=="string" and str:find("_Tatara") and v then return true end
end
end
end
return false
end
--
function muxu.check_set_Umbrella(c) --伞符
return muxu.check_set(c,"Umbrella")
end
function muxu.check_set_Scenersh(c) --景愿
return muxu.check_set(c,"Scenersh")
end
--
--
if not muxu.chk then
muxu.chk=true
--1111050 EVENT_TO_DECK
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_DECK)
e1:SetCondition(
function(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists((function(c)
return c:GetFlagEffect(1111050)~=0 end),1,nil)
end)
e1:SetOperation(
function(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetTurnPlayer()
local tg=eg:Filter((function(c)
return c:GetFlagEffect(1111050)~=0 end),nil)
if tg:GetCount()<1 then return end
local b1=tg:IsExists(Card.IsControler,1,nil,p)
local b2=tg:IsExists(Card.IsControler,1,nil,1-p)
if b1 then Duel.ShuffleDeck(p) end
if b2 then Duel.ShuffleDeck(1-p) end
local tc=tg:GetFirst()
while tc do
tc:ReverseInDeck()
tc=tg:GetNext()
end
end)
Duel.RegisterEffect(e1,0)
--TURN ACTIVITY
local e2=Effect.GlobalEffect()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetOperation(
function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(rp,1195103)<1 then
Duel.RegisterFlagEffect(tp,1195103,RESET_PHASE+PHASE_END,0,1)
end
end)
Duel.RegisterEffect(e2,0)
--当前回合发动的卡
local e3=Effect.GlobalEffect()
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetOperation(
function(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if re:IsHasType(EFFECT_TYPE_ACTIVATE) then
rc:RegisterFlagEffect(1195103,RESET_EVENT+0x1fe0000,0,0,Duel.GetTurnCount())
end
end)
Duel.RegisterEffect(e3,0)
--
end
--
--可怜的非法投弃物·多多良小伞
local m=1141002
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c1110198") end,function() require("script/c1110198") end)
cm.named_with_Tatara=true
--
function c1141002.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1141002,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c1141002.tg1)
e1:SetOperation(c1141002.op1)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e3:SetOperation(c1141002.op3)
c:RegisterEffect(e3)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1141002,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCost(c1141002.cost2)
e2:SetTarget(c1141002.tg2)
e2:SetOperation(c1141002.op2)
c:RegisterEffect(e2)
--
end
--
c1141002.muxu_ih_KTatara=1
--
function c1141002.tfilter1(c)
return c.muxu_ih_KTatara and c:IsAbleToHand()
and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end
function c1141002.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1141002.tfilter1,tp,LOCATION_DECK,0,1,nil) end
if e:GetHandler():GetFlagEffect(1141002)~=0 then
e:SetLabel(1)
e:GetHandler():ResetFlagEffect(1141002)
else
e:SetLabel(0)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
--
function c1141002.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c1141002.tfilter1,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
local tc=sg:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
if not tc:IsLocation(LOCATION_HAND) then return end
if e:GetLabel()==1 and Duel.SelectYesNo(tp,aux.Stringid(1141002,2)) then return end
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)
end
end
--
function c1141002.op3(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(1141002,0,0,0)
end
--
function c1141002.cost2(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 c1141002.allfilter2(c)
return c:IsLocation(LOCATION_MZONE)
end
function c1141002.ollfilter2(c,e)
return not c:IsImmuneToEffect(e)
end
function c1141002.decfilter2(c,e)
return not c:IsImmuneToEffect(e)
end
--
function c1141002.CheckRecursive2(c,mg,sg,exg,tp,fc,chkf)
sg:AddCard(c)
local res=false
if sg:GetCount()>=fc.muxu_mat_count then
res=Duel.GetLocationCountFromEx(chkf,tp,sg,fc)>0 and fc:CheckFusionMaterial(sg,nil,chkf)
else
res=mg:IsExists(c1141002.CheckRecursive2,1,sg,mg,sg,exg,tp,fc,chkf)
end
sg:RemoveCard(c)
return res
end
--
function c1141002.tfilter2(c,e,tp,mg,exg,f,chkf)
mg:Merge(exg)
local sg=Group.CreateGroup()
return c:IsType(TYPE_FUSION)
and muxu.check_set_Tatara(c) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and mg:IsExists(c1141002.CheckRecursive2,1,sg,mg,sg,exg,tp,c,chkf)
end
function c1141002.mfilter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION)
and muxu.check_set_Tatara(c) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
--
function c1141002.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetFusionMaterial(tp)
mg=mg:Filter(c1141002.allfilter2,nil)
mg=mg:Filter(c1141002.ollfilter2,nil,e)
Duel.RegisterFlagEffect(1-tp,1141002,0,0,0)
local exg=Duel.GetMatchingGroup(c1141002.decfilter2,tp,0,LOCATION_MZONE,mg,e)
local res=Duel.IsExistingMatchingCard(c1141002.tfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,exg,nil,chkf)
Duel.ResetFlagEffect(1-tp,1141002)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c1141002.mfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
--
function c1141002.op2(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetFusionMaterial(tp)
mg=mg:Filter(c1141002.allfilter2,nil)
mg=mg:Filter(c1141002.ollfilter2,nil,e)
Duel.RegisterFlagEffect(1-tp,1141002,0,0,0)
local exg=Duel.GetMatchingGroup(c1141002.decfilter2,tp,0,LOCATION_MZONE,mg,e)
local sg1=Duel.GetMatchingGroup(c1141002.tfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,exg,nil,chkf)
Duel.ResetFlagEffect(1-tp,1141002)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
lg=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c1141002.tfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local lg=Group.CreateGroup()
Duel.RegisterFlagEffect(1-tp,1141002,0,0,0)
mg:Merge(exg)
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=mg:FilterSelect(tp,c1141002.CheckRecursive2,1,1,lg,mg,lg,exg,tp,tc,chkf)
lg:Merge(g)
until lg:GetCount()>=tc.muxu_mat_count
tc:SetMaterial(lg)
Duel.ResetFlagEffect(1-tp,1141002)
Duel.SendtoGrave(lg,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--
--万年备用的唐伞·多多良小伞
local m=1141004
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c1110198") end,function() require("script/c1110198") end)
cm.named_with_Tatara=true
--
function c1141004.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c1141004.con1)
e1:SetTarget(c1141004.tg1)
e1:SetOperation(c1141004.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1141004,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c1141004.tg2)
e2:SetOperation(c1141004.op2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e3:SetOperation(c1141004.op3)
c:RegisterEffect(e3)
--
end
--
c1141004.muxu_ih_KTatara=1
--
function c1141004.con1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,0x4040)~=0 and c:IsPreviousLocation(LOCATION_HAND)
end
--
function c1141004.tfilter1(c)
return (muxu.check_set_Umbrella(c) or (c.muxu_ih_KTatara and c:IsType(TYPE_TRAP))) and c:IsAbleToHand()
end
function c1141004.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1141004.tfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
--
function c1141004.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c1141004.tfilter1,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()<1 then return end
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
--
function c1141004.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
if c:GetFlagEffect(1141004)~=0 then
e:SetLabel(1)
c:ResetFlagEffect(1141004)
else
e:SetLabel(0)
end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
--
function c1141004.ofilter2(c,e,tp,num)
return muxu.check_set_Tatara(c)
and ((num==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetMZoneCount(tp)>0)
or c:IsAbleToHand())
end
function c1141004.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(1141004,0)) then Duel.SendtoHand(c,nil,REASON_EFFECT) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RESOLVECARD)
local sg=Duel.SelectMatchingCard(tp,c1141004.ofilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetLabel())
if sg:GetCount()>0 then
local tc=sg:GetFirst()
local b1=tc:IsAbleToHand()
local b2=(e:GetLabel()==1 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetMZoneCount(tp)>0)
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(1141004,1)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(1141004,2)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
if sel==2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,tc)
end
end
end
--
function c1141004.op3(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(1141004,0,0,0)
end
--夜间游荡的唐伞妖怪
local m=1141005
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c1110198") end,function() require("script/c1110198") end)
--
function c1141005.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c1141005.cost1)
e1:SetTarget(c1141005.tg1)
e1:SetOperation(c1141005.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1141005,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_FLIP)
e2:SetTarget(c1141005.tg2)
e2:SetOperation(c1141005.op2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e3:SetOperation(c1141005.op3)
c:RegisterEffect(e3)
--
end
--
c1141005.muxu_ih_KTatara=1
--
function c1141005.cost1(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(),REASON_COST) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,e:GetHandler(),REASON_COST)
Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD)
end
--
function c1141005.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsStatus(STATUS_CHAINING)
and Duel.GetMZoneCount(tp)>0
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
--
function c1141005.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local pos1=c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and POS_FACEUP_ATTACK or 0
local pos2=c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and POS_FACEDOWN_DEFENSE or 0
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,pos1+pos2)
if c:IsFacedown() then Duel.ConfirmCards(1-tp,c) end
end
--
function c1141005.tfilter2(c)
return c.muxu_ih_KTatara and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c1141005.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c1141005.tfilter2,tp,LOCATION_HAND,0,1,nil)
local c=e:GetHandler()
if chk==0 then
local b1=Duel.IsExistingMatchingCard(c1141005.tfilter2,tp,LOCATION_HAND,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c1141005.tfilter2,tp,LOCATION_DECK,0,1,nil) and c:GetFlagEffect(1141005)>0
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and (b1 or b2)
end
if e:GetHandler():GetFlagEffect(1141005)~=0 then
e:SetLabel(1)
e:GetHandler():ResetFlagEffect(1141005)
else
e:SetLabel(0)
end
end
--
function c1141005.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local loc=LOCATION_HAND
if e:GetLabel()==1 then loc=LOCATION_DECK+LOCATION_HAND end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,c1141005.tfilter2,tp,loc,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SSet(tp,sg)
Duel.ConfirmCards(1-tp,sg)
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2_1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2_1:SetReset(RESET_EVENT+0x1fe0000)
sg:GetFirst():RegisterEffect(e2_1,true)
end
end
--
function c1141005.op3(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(1141005,0,0,0)
end
\ No newline at end of file
--融合测试伞
local m=1141021
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c1110198") end,function() require("script/c1110198") end)
cm.named_with_Tatara=true
--
function c1141021.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddFusionProcMix(c,true,true,c1141021.FusFilter1,c1141021.FusFilter2)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1141021,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetTarget(c1141021.tg1)
e1:SetOperation(c1141021.op1)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e3:SetOperation(c1141021.op3)
c:RegisterEffect(e3)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1141021,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c1141021.cost2)
e2:SetTarget(c1141021.tg2)
e2:SetOperation(c1141021.op2)
c:RegisterEffect(e2)
--
end
--
function c1141021.FusFilter1(c)
return muxu.check_fusion_set_Tatara(c)
end
function c1141021.FusFilter2(c)
local p=c:GetControler()
return c:IsFusionType(TYPE_FLIP)
or (Duel.GetFlagEffect(p,1141002)>0 and c:IsFacedown())
end
--
c1141021.muxu_mat_count=2
c1141021.muxu_ih_KTatara=1
--
function c1141021.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_MZONE,1,nil) end
if e:GetHandler():GetFlagEffect(1141021)~=0 then
e:SetLabel(1)
e:GetHandler():ResetFlagEffect(1141021)
else
e:SetLabel(0)
end
local sg=Group.CreateGroup()
if e:GetLabel()==1 then
sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
else
sg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil)
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
--
function c1141021.op1(e,tp,eg,ep,ev,re,r,rp)
local sg=Group.CreateGroup()
if e:GetLabel() and e:GetLabel()==1 then
sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
else
sg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil)
end
if sg:GetCount()<1 then return end
Duel.Destroy(sg,REASON_EFFECT)
end
--
function c1141021.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() end
Duel.Release(c,REASON_COST)
end
--
function c1141021.tfilter2(c)
return c:IsFacedown() and c:IsCanChangePosition()
end
function c1141021.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1141021.tfilter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1141021.tfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
Duel.SelectTarget(tp,c1141021.tfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
--
function c1141021.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if tc:IsPosition(POS_FACEUP_DEFENSE) then return end
if Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)<1 then return end
if not muxu.check_set_Tatara(tc) then return end
if not c:IsType(TYPE_FUSION) then return end
if not c:IsType(TYPE_MONSTER) then return end
tc:CopyEffect(c:GetCode(),RESET_EVENT+0x1fe0000)
end
--
function c1141021.op3(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(1141021,0,0,0)
end
--
--虹符『飞跃彩虹』
local m=1141101
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c1110198") end,function() require("script/c1110198") end)
--
function c1141101.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1141101.tg1)
e1:SetOperation(c1141101.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c1141101.tg2)
e2:SetOperation(c1141101.op2)
c:RegisterEffect(e2)
--
end
--
c1141101.muxu_ih_KTatara=1
--
function c1141101.tfilter1(c)
return c:IsType(TYPE_FLIP) and c:IsType(TYPE_MONSTER)
and not c:IsPublic()
end
function c1141101.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1141101.tfilter1,tp,LOCATION_HAND,0,1,nil) end
end
function c1141101.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local sg=Duel.SelectMatchingCard(tp,c1141101.tfilter1,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
local tc=sg:GetFirst()
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_PUBLIC)
e1_1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1_1)
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1_2:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1_2:SetRange(LOCATION_HAND)
e1_2:SetValue(function(e,c,mg) return true end)
e1_2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1_2)
end
end
--
function c1141101.allfilter2(c)
return c:IsLocation(LOCATION_MZONE)
end
function c1141101.ollfilter2(c,e)
return not c:IsImmuneToEffect(e)
end
function c1141101.decfilter2(c,e)
return c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
--
function c1141101.CheckRecursive2(c,mg,sg,exg,tp,fc,chkf)
local b1=Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_MZONE,1,nil)
local b2=sg:GetCount()>0 and sg:IsExists((function(c) return (c:IsFacedown() and c:IsLocation(LOCATION_MZONE)) end),1,nil)
if exg and exg:IsContains(c) and not (b1 and b2) then return false end
sg:AddCard(c)
local res=false
if sg:GetCount()>=fc.muxu_mat_count then
res=Duel.GetLocationCountFromEx(chkf,tp,sg,fc)>0 and fc:CheckFusionMaterial(sg,nil,chkf)
else
res=mg:IsExists(c1141101.CheckRecursive2,1,sg,mg,sg,exg,tp,fc,chkf)
end
sg:RemoveCard(c)
return res
end
--
function c1141101.tfilter2(c,e,tp,mg,exg,f,chkf)
mg:Merge(exg)
local sg=Group.CreateGroup()
return c:IsType(TYPE_FUSION)
and muxu.check_set_Tatara(c) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and mg:IsExists(c1141101.CheckRecursive2,1,sg,mg,sg,exg,tp,c,chkf)
end
function c1141101.mfilter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION)
and muxu.check_set_Tatara(c) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
--
function c1141101.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetFusionMaterial(tp)
mg=mg:Filter(c1141101.allfilter2,nil)
mg=mg:Filter(c1141101.ollfilter2,nil,e)
local exg=Duel.GetMatchingGroup(c1141101.decfilter2,tp,LOCATION_DECK,0,mg,e)
local res=Duel.IsExistingMatchingCard(c1141101.tfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,exg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c1141101.mfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
--
function c1141101.op2(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetFusionMaterial(tp)
mg=mg:Filter(c1141101.allfilter2,nil)
mg=mg:Filter(c1141101.ollfilter2,nil,e)
local exg=Duel.GetMatchingGroup(c1141101.decfilter2,tp,LOCATION_DECK,0,mg,e)
local sg1=Duel.GetMatchingGroup(c1141101.tfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,exg,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
lg=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c1141101.tfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local lg=Group.CreateGroup()
mg:Merge(exg)
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=mg:FilterSelect(tp,c1141101.CheckRecursive2,1,1,lg,mg,lg,exg,tp,tc,chkf)
lg:Merge(g)
until lg:GetCount()==tc.muxu_mat_count
tc:SetMaterial(lg)
local qg=lg:Filter(Card.IsLocation,nil,LOCATION_MZONE)
qg=qg:Filter(Card.IsFacedown,nil)
Duel.ConfirmCards(1-tp,qg)
Duel.SendtoGrave(lg,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--
--雨符『雨夜怪谈』
local m=1141701
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c1110198") end,function() require("script/c1110198") end)
--
function c1141701.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1141701.tg1)
e1:SetOperation(c1141701.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c1141701.con2)
e2:SetTarget(c1141701.tg2)
e2:SetOperation(c1141701.op2)
c:RegisterEffect(e2)
--
end
--
c1141701.muxu_ih_KTatara=1
--
function c1141701.tfilter1(c,e,tp)
return muxu.check_set_Tatara(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1141701.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b2=Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c1141701.tfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp)
if chk==0 then return (b1 or b2) end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(1141701,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(1141701,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_POSITION)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,LOCATION_MZONE)
end
if sel==2 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
end
--
function c1141701.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sg=Duel.SelectMatchingCard(tp,Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if sg:GetCount()<1 then return end
Duel.ChangePosition(sg,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
if sel==2 then
if Duel.GetLocationCountFromEx(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sg=Duel.SelectMatchingCard(tp,c1141701.tfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
Duel.SendtoDeck(sg,tp,2,REASON_RULE)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
end
--
function c1141701.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,0x4040)~=0 and c:IsPreviousLocation(LOCATION_HAND)
end
--
function c1141701.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
--
function c1141701.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsSSetable() then return end
if not c:IsRelateToEffect(e) then return end
Duel.SSet(tp,c)
Duel.ConfirmCards(1-tp,c)
end
--
--光晕『唐伞惊吓闪光』
local m=1141702
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c1110198") end,function() require("script/c1110198") end)
--
function c1141702.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c1141702.con1)
e1:SetTarget(c1141702.tg1)
e1:SetOperation(c1141702.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c1141702.cost2)
e2:SetCondition(c1141702.con2)
e2:SetOperation(c1141702.op2)
c:RegisterEffect(e2)
--
end
--
c1141702.muxu_ih_KTatara=1
--
function c1141702.con1(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
--
function c1141702.tfilter1(c,e,tp)
local b1=c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
local b2=c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
return b1 or b2
end
function c1141702.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c1141702.tfilter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c1141702.tfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) and re:GetHandler():IsCanTurnSet() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c1141702.tfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
if re:GetHandler():IsCanTurnSet() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,1,0,0)
end
end
--
function c1141702.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local Pos1=tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and POS_FACEUP_ATTACK or 0
local Pos2=tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and POS_FACEDOWN_DEFENSE or 0
if Duel.SpecialSummon(c,0,tp,tp,false,false,Pos1+Pos2)>0 then
Duel.NegateActivation(ev)
if not re:GetHandler():IsRelateToEffect(re) then return end
Duel.Destroy(eg,REASON_EFFECT)
end
end
--
function c1141702.cost2(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 c1141702.tfilter2(c,tp)
return c:GetSummonPlayer()==tp and muxu.check_set_Tatara(c) and c:GetPreviousLocation()==LOCATION_EXTRA
end
function c1141702.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_MAIN1 and eg:IsExists(c1141702.tfilter2,1,nil,tp)
end
--
function c1141702.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(1-tp,PHASE_MAIN1,RESET_PHASE+PHASE_MAIN1,1)
end
--
...@@ -61,7 +61,8 @@ function cm.debcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,8 @@ function cm.debcon(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.debug(e,tp,eg,ep,ev,re,r,rp) function cm.debug(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,nil)
Debug.Message("场上的表侧表示怪兽合计等级:"..g:GetSum(Card.GetLevel)) --Debug.Message("场上的表侧表示怪兽合计等级:"..g:GetSum(Card.GetLevel))
assert(false,"场上的表侧表示怪兽合计等级:"..g:GetSum(Card.GetLevel))
end end
function cm.mzfilter(c) function cm.mzfilter(c)
return c:IsLinkRace(RACE_PSYCHO) and c:IsLinkAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()>=3 and c:GetLevel()<=10 return c:IsLinkRace(RACE_PSYCHO) and c:IsLinkAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()>=3 and c:GetLevel()<=10
......
...@@ -6,7 +6,7 @@ cm.named_with_Arknight=1 ...@@ -6,7 +6,7 @@ cm.named_with_Arknight=1
function cm.initial_effect(c) function cm.initial_effect(c)
--pendulum summon --pendulum summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_LINK),2,2,cm.lcheck) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_LINK),2,99,cm.lcheck)
--skill --skill
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
......
...@@ -62,7 +62,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(cm.splimit) e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
...@@ -63,7 +63,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +63,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(cm.splimit) e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
...@@ -63,7 +63,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +63,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(cm.splimit) e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
...@@ -63,7 +63,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +63,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(cm.splimit) e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
...@@ -58,7 +58,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(cm.splimit) e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
...@@ -58,7 +58,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(cm.splimit) e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -99,7 +99,7 @@ function cm.filter4(c,e) ...@@ -99,7 +99,7 @@ function cm.filter4(c,e)
return c:IsFaceup() and c:IsAbleToRemove() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return c:IsFaceup() and c:IsAbleToRemove() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function cm.filter5(c,e,tp,m,f,chkf) function cm.filter5(c,e,tp,m,f,chkf)
return (c:IsType(TYPE_FUSION) or _G["c"..c:GetOriginalCode()].IsFusionSpellTrap) and (not f or f(c)) and (c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEDOWN_DEFENSE) or c:IsSSetable()) and c:CheckFusionMaterial(m,nil,chkf) return (c:IsType(TYPE_FUSION) or c.IsFusionSpellTrap) and (not f or f(c)) and (c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEDOWN_DEFENSE) or c:IsSSetable()) and c:CheckFusionMaterial(m,nil,chkf)
end end
function cm.filter6(c) function cm.filter6(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
......
...@@ -58,7 +58,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(cm.splimit) e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
...@@ -59,7 +59,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(cm.splimit) e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_LIMIT_SPECIAL_SUMMON_POSITION)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
...@@ -40,7 +40,7 @@ function cm.initial_effect(c) ...@@ -40,7 +40,7 @@ function cm.initial_effect(c)
ge0:SetCondition(cm.spcon) ge0:SetCondition(cm.spcon)
ge0:SetTarget(cm.sptg) ge0:SetTarget(cm.sptg)
ge0:SetOperation(cm.spop) ge0:SetOperation(cm.spop)
Duel.RegisterEffect(ge0,0) --Duel.RegisterEffect(ge0,0)
end end
end end
function cm.effcon(e,tp,eg,ep,ev,re,r,rp) function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -48,6 +48,16 @@ function cm.effcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,6 +48,16 @@ function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.regop(e,tp,eg,ep,ev,re,r,rp) function cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetDescription(aux.Stringid(m,0))
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetProperty(EFFECT_FLAG_DELAY)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e0:SetCode(EVENT_LEAVE_GRAVE)
e0:SetCondition(cm.spcon)
e0:SetTarget(cm.sptg)
e0:SetOperation(cm.spop)
Duel.RegisterEffect(e0,tp)
end end
function cm.valcheck(e,c) function cm.valcheck(e,c)
local g=c:GetMaterial() local g=c:GetMaterial()
...@@ -93,3 +103,18 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,3 +103,18 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function cm.xyzfilter(c)
return c:IsXyzSummonable(nil) and c:IsSetCard(0x172)
end
function cm.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
\ No newline at end of file
--辉光之针的魔法少女
function c1146016.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,c1146016.FusFilter1,c1146016.FusFilter2,false)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_FUSION+REASON_MATERIAL)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c1146016.splimit)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1146016,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c1146016.con2)
e2:SetOperation(c1146016.op2)
c:RegisterEffect(e2)
--
if not c1146016.global_check then
c1146016.global_check=true
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_LEVEL_UP)
e3:SetLabelObject(c)
e3:SetOperation(c1146016.op3)
local e4=Effect.GlobalEffect()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(function (e,c) return c:IsFaceup() end)
e4:SetLabelObject(e3)
Duel.RegisterEffect(e4,0)
end
--
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_CUSTOM+1146016)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,1146016)
e5:SetTarget(c1146016.tg5)
e5:SetOperation(c1146016.op5)
c:RegisterEffect(e5)
--
end
--
function c1146016.FusFilter1(c)
return c:IsRace(RACE_FIEND)
end
function c1146016.FusFilter2(c)
return c:IsRace(RACE_SPELLCASTER)
end
--
function c1146016.splimit(e,se,sp,st)
local c=e:GetHandler()
return not c:IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
--
function c1146016.con2(e,tp,eg,ep,ev,re,r,rp)
local b1=eg and eg:IsExists(aux.TRUE,1,e:GetHandler())
local b2=(Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
return b1 and b2
end
--
function c1146016.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if mg:GetCount()<1 then return end
local tc=mg:GetFirst()
while tc do
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_UPDATE_ATTACK)
e2_1:SetReset(RESET_EVENT+RESETS_STANDARD)
e2_1:SetValue(-1200)
tc:RegisterEffect(e2_1)
tc=mg:GetNext()
end
Duel.BreakEffect()
local dg=mg:Filter(Card.IsAttack,nil,0)
if dg:GetCount()<1 then return end
Duel.Destroy(dg,REASON_EFFECT)
end
--
function c1146016.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
Duel.RaiseEvent(c,EVENT_CUSTOM+1146016,re,r,rp,ep,ev)
end
--
function c1146016.tg5(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
--
function c1146016.op5(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)<1 then return end
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--
--秋意渐浓的唐伞妖怪
function c1146018.initial_effect(c)
--
c:EnableReviveLimit()
--
local val={aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_WIND),aux.FilterBoolFunction(Card.IsRace,RACE_ZOMBIE)}
local fun={}
local mat={}
for i=1,#val do
if type(val[i])=='function' then
fun[i]=function(c,fc,sub,mg,sg) return val[i](c,fc,sub,mg,sg) and not c:IsHasEffect(6205579) end
else
fun[i]=function(c,fc,sub) return c:IsFusionCode(val[i]) or (sub and c:CheckFusionSubstitute(fc)) end
table.insert(mat,val[i])
end
end
if #mat>0 and c.material_count==nil then
local mt=getmetatable(c)
mt.material_count=#mat
mt.material=mat
end
local mt=getmetatable(c)
mt.material_count=2
mt.material=mat
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetCondition(c1146018.FConditionMix(false,true,table.unpack(fun)))
e1:SetOperation(c1146018.FOperationMix(false,true,table.unpack(fun)))
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1146018,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c1146018.cost2)
e2:SetTarget(c1146018.tg2)
e2:SetOperation(c1146018.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1146018,1))
e3:SetCategory(CATEGORY_POSITION+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(c1146018.tg3)
e3:SetOperation(c1146018.op3)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e4:SetOperation(c1146018.op4)
c:RegisterEffect(e4)
--
end
--
function c1146018.FSelectMix(c,tp,mg,sg,fc,sub,chkf,...)
sg:AddCard(c)
local res
if sg:GetCount()<#{...} then
res=mg:IsExists(c1146018.FSelectMix,1,sg,tp,mg,sg,fc,sub,chkf,...)
else
res=aux.FCheckMixGoal(sg,tp,fc,sub,chkf,...)
end
sg:RemoveCard(c)
return res
end
--
function c1146018.FExtraMaterialFilter(c,fc)
return c:IsCanBeFusionMaterial(fc) and c:IsFusionAttribute(ATTRIBUTE_WIND) and not c:IsHasEffect(6205579)
end
function c1146018.exzonefilter(c)
return c:GetSequence()>4
end
--
function c1146018.FConditionMix(insf,sub,...)
local funs={...}
return
function(e,g,gc,chkfnf)
if g==nil then return insf and aux.MustMaterialCheck(nil,e:GetHandlerPlayer(),EFFECT_MUST_BE_FMATERIAL) end
local chkf=chkfnf&0xff
local c=e:GetHandler()
local tp=c:GetControler()
local notfusion=chkfnf>>8~=0
local sub=sub or notfusion
local mg=g:Filter(aux.FConditionFilterMix,c,c,sub,table.unpack(funs))
local exg=Duel.GetMatchingGroup(c1146018.FExtraMaterialFilter,tp,LOCATION_DECK,0,mg,c)
if #exg>0 and mg:IsExists(c1146018.exzonefilter,1,nil) then
mg:Merge(exg)
end
if gc then
if not mg:IsContains(gc) then return false end
local sg=Group.CreateGroup()
return c1146018.FSelectMix(gc,tp,mg,sg,c,sub,chkf,table.unpack(funs))
end
local sg=Group.CreateGroup()
local res=mg:IsExists(c1146018.FSelectMix,1,nil,tp,mg,sg,c,sub,chkf,table.unpack(funs))
return res
end
end
--
function c1146018.exgfilter(c,exg)
return exg:IsContains(c)
end
function c1146018.FOperationMix(insf,sub,...)
local funs={...}
return
function(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local chkf=chkfnf&0xff
local c=e:GetHandler()
local tp=c:GetControler()
local notfusion=chkfnf>>8~=0
local sub=sub or notfusion
local mg=eg:Filter(aux.FConditionFilterMix,c,c,sub,table.unpack(funs))
local exg=Duel.GetMatchingGroup(c1146018.FExtraMaterialFilter,tp,LOCATION_DECK,0,mg,c)
if #exg>0 and mg:IsExists(c1146018.exzonefilter,1,nil) then
mg:Merge(exg)
end
local sg=Group.CreateGroup()
if gc then sg:AddCard(gc) end
while sg:GetCount()<#funs do
if #sg==1 and not sg:IsExists(c1146018.exzonefilter,1,nil) then
mg:Sub(exg)
end
if sg:IsExists(c1146018.exgfilter,1,nil,exg) then
mg=mg:Filter(c1146018.exzonefilter,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=mg:FilterSelect(tp,c1146018.FSelectMix,1,1,sg,tp,mg,sg,c,sub,chkf,table.unpack(funs))
sg:Merge(g)
end
Duel.SetFusionMaterial(sg)
end
end
--
function c1146018.cost2(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 c1146018.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 and c:IsCanTurnSet() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0)
end
--
function c1146018.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsControler(tp) then return end
if Duel.GetMZoneCount(tp)<1 then return end
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.MoveSequence(c,math.log(s,2))
Duel.BreakEffect()
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
end
--
function c1146018.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if e:GetHandler():GetFlagEffect(1146018)~=0 then
e:SetLabel(1)
e:GetHandler():ResetFlagEffect(1146018)
else
e:SetLabel(0)
end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler())
and Duel.GetFlagEffect(tp,1146018)<1 end
Duel.RegisterFlagEffect(tp,1146018,RESET_PHASE+PHASE_END,0,1)
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
if e:GetLabel()~=1 then
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
end
--
function c1146018.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if g:GetCount()<1 then return end
if e:GetLabel()==1 and Duel.SelectYesNo(tp,aux.Stringid(1146018,2)) then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
else
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
--
function c1146018.op4(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(1146018,0,0,0)
end
--
--跨越时空之船的船长
function c1146020.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2,c1146020.lcheck)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1146020,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c1146020.con1)
e1:SetTarget(c1146020.tg1)
e1:SetOperation(c1146020.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1146020,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetTarget(c1146020.tg2)
e2:SetOperation(c1146020.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_REMOVE)
e3:SetCondition(c1146020.con3)
e3:SetOperation(c1146020.op3)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1146020,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_REMOVED)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_DUEL)
e4:SetCondition(c1146020.con4)
e4:SetTarget(c1146020.tg4)
e4:SetOperation(c1146020.op4)
c:RegisterEffect(e4)
--
end
--
function c1146020.lcheck(g,lc)
return g:IsExists(Card.IsRace,1,nil,RACE_ZOMBIE)
end
--
function c1146020.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
--
function c1146020.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local gc=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,gc,gc:GetCount(),0,0)
end
--
function c1146020.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local gc=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
if Duel.Remove(gc,POS_FACEUP,REASON_EFFECT)>0 then
local tg=Duel.GetOperatedGroup()
local tc=tg:GetFirst()
for tc in aux.Next(tg) do
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CANNOT_TRIGGER)
e1_1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1_1:SetRange(LOCATION_REMOVED)
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1_1)
end
if c:IsFacedown() then return end
if c:GetControler()~=tp then return end
if not c:IsRelateToEffect(e) then return end
if not c:IsLocation(LOCATION_MZONE) then return end
local fid=c:GetFieldID()
local tc=tg:GetFirst()
for tc in aux.Next(tg) do
tc:RegisterFlagEffect(1146020,RESET_EVENT+0x1fe0000,0,0,fid)
end
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1_2:SetCode(EVENT_LEAVE_FIELD)
e1_2:SetLabel(fid)
e1_2:SetLabelObject(c)
e1_2:SetCondition(c1146020.con1_2)
e1_2:SetOperation(c1146020.op1_2)
Duel.RegisterEffect(e1_2,tp)
end
end
--
function c1146020.con1_2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return tc and eg:IsContains(tc)
end
function c1146020.ofilter1_2(c,fid)
return c:GetFlagEffectLabel(1146020)==fid
end
function c1146020.op1_2(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c1146020.ofilter1_2,tp,LOCATION_REMOVED,0,nil,e:GetLabel())
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end
e:Reset()
end
--
function c1146020.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
--
function c1146020.op2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
--
function c1146020.con3(e,tp,eg,ep,ev,re,r,rp)
return r and bit.band(r,REASON_EFFECT)~=0
end
--
function c1146020.op3(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsFacedown() then return end
e:GetHandler():RegisterFlagEffect(1146021,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
--
function c1146020.con4(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(1146021)~=0
end
--
function c1146020.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
--
function c1146020.op4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e4_1=Effect.CreateEffect(c)
e4_1:SetDescription(aux.Stringid(1146020,3))
e4_1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4_1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4_1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4_1:SetRange(LOCATION_REMOVED)
e4_1:SetCountLimit(1)
e4_1:SetOperation(c1146020.op4_1)
e4_1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e4_1)
end
--
function c1146020.op4_1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=(Duel.GetMZoneCount(tp)>0)
local b2=c:IsCanBeSpecialSummoned(e,0,tp,false,false)
if b1 and b2 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
e:Reset()
end
--
--饮食艺术·三色猫
function c1184001.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1184001,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c1184001.tg1)
e1:SetOperation(c1184001.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c1184001.tg2)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--
end
--
function c1184001.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and not e:GetHandler():IsForbidden() end
end
--
function c1184001.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1_1=Effect.CreateEffect(c)
e1_1:SetCode(EFFECT_CHANGE_TYPE)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1_1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1_1)
end
--
function c1184001.tg2(e,c)
local seq=c:GetSequence()
return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x3e12)
and seq<5 and math.abs(e:GetHandler():GetSequence()-seq)==1
end
--
--饮食艺术·狸子面包
function c1184003.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1184003,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,1184003)
e1:SetTarget(c1184003.tg1)
e1:SetOperation(c1184003.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1184003,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,1184003)
e2:SetCost(c1184003.cost2)
e2:SetTarget(c1184003.tg1)
e2:SetOperation(c1184003.op1)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1184003,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_LEAVE_GRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c1184003.tg3)
e3:SetOperation(c1184003.op3)
c:RegisterEffect(e3)
--
end
--
function c1184003.tfilter1_1(c)
return c:IsSetCard(0x3e12) and c:IsType(TYPE_MONSTER)
and not c:IsForbidden()
end
function c1184003.tfilter1_2(c)
return c:IsSetCard(0x3e12) and c:IsFaceup()
end
function c1184003.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE,0)
local dt=Duel.GetMatchingGroup(c1184003.tfilter1_1,tp,LOCATION_DECK,0,nil):GetClassCount(Card.GetCode)
local mt=Duel.GetMatchingGroupCount(c1184003.tfilter1_2,tp,LOCATION_MZONE,0,nil)
return mt>0 and dt>=mt and ft>=mt
end
end
--
function c1184003.ofilter1(sg)
return sg:GetClassCount(Card.GetCode)==sg:GetCount()
end
function c1184003.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE,0)
local dg=Duel.GetMatchingGroup(c1184003.tfilter1_1,tp,LOCATION_DECK,0,nil)
local dt=dg:GetClassCount(Card.GetCode)
local mt=Duel.GetMatchingGroupCount(c1184003.tfilter1_2,tp,LOCATION_MZONE,0,nil)
if mt>0 and dt>=mt and ft>=mt then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local sg=dg:SelectSubGroup(tp,c1184003.ofilter1,false,mt,mt)
for tc in aux.Next(sg) do
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1_1=Effect.CreateEffect(c)
e1_1:SetCode(EFFECT_CHANGE_TYPE)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1_1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1_1)
end
end
end
--
function c1184003.cost2(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 c1184003.tfilter3(c)
return c:IsSetCard(0x3e12) and c:IsAbleToHand()
end
function c1184003.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1184003.tfilter3,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c1184003.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1184003.tfilter3,tp,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 c1184004.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1184004+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c1184004.con1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1184004,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c1184004.cost2)
e2:SetTarget(c1184004.tg2)
e2:SetOperation(c1184004.op2)
c:RegisterEffect(e2)
--
end
--
function c1184004.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x3e12)
end
function c1184004.con1(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c1184004.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
--
function c1184004.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c1184004.tfilter2(c,e,tp)
return ((c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsLevel(3)) or c:IsSetCard(0x3e12)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1184004.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c1184004.tfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c1184004.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1184004.tfilter2,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 c1184005.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1184005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,1184005)
e1:SetRange(LOCATION_HAND)
e1:SetLabel(0)
e1:SetCost(c1184005.cost1)
e1:SetTarget(c1184005.tg1)
e1:SetOperation(c1184005.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1184005,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c1184005.tg2)
e2:SetOperation(c1184005.op2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--
end
--
function c1184005.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function c1184005.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=1 then return false end
return e:GetHandler():IsAbleToGraveAsCost()
end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
e:GetHandler():RegisterFlagEffect(1184005,RESET_EVENT+0x1fe0000,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c1184005.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(1184005)>0 then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--
function c1184005.tfilter2(c)
return c:IsSetCard(0x3e12) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(1184005)
end
function c1184005.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1184005.tfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1184005.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1184005.tfilter2,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 c1184007.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1184007,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,1184007)
e1:SetTarget(c1184007.tg1)
e1:SetOperation(c1184007.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1184007,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(c1184007.cost2)
e2:SetTarget(c1184007.tg2)
e2:SetOperation(c1184007.op2)
c:RegisterEffect(e2)
--
end
--
function c1184007.tfilter1(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c1184007.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1184007.tfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1184007.tfilter1,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c1184007.tfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c1184007.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) then
local og=c:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(tc,Group.FromCards(c))
end
end
--
function c1184007.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c1184007.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1184007.op2(e,tp,eg,ep,ev,re,r,rp)
local e2_1=Effect.CreateEffect(e:GetHandler())
e2_1:SetDescription(aux.Stringid(1184007,2))
e2_1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2_1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2_1:SetCountLimit(1)
e2_1:SetLabel(Duel.GetTurnCount())
e2_1:SetCondition(c1184007.con2_1)
e2_1:SetOperation(c1184007.op2_1)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then
e2_1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
else
e2_1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
end
Duel.RegisterEffect(e2_1,tp)
end
function c1184007.cfilter2_1(c,e,tp)
return c:IsSetCard(0x3e12) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c1184007.con2_1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
and Duel.GetTurnCount()~=e:GetLabel()
and Duel.IsExistingMatchingCard(c1184007.cfilter2_1,tp,LOCATION_EXTRA,0,1,nil,e,tp)
end
function c1184007.op2_1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,1184007)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local mg=Duel.SelectMatchingCard(tp,c1184007.cfilter2_1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if mg:GetCount()>0 then
Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP)
end
end
--
\ No newline at end of file
--饮食艺术·和菓子
function c1184010.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1184010,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_ANNOUNCE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c1184010.cost1)
e1:SetTarget(c1184010.tg1)
e1:SetOperation(c1184010.op1)
c:RegisterEffect(e1)
--
end
--
function c1184010.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c1184010.tfilter1_1(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsSetCard(0x3e12) and c:IsType(TYPE_MONSTER)
end
function c1184010.tfilter1_2(c)
return c:IsSetCard(0x3e12) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c1184010.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c1184010.tfilter1_1,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return ct~=1 or Duel.IsExistingMatchingCard(c1184010.tfilter1_2,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function c1184010.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetMatchingGroupCount(c1184010.tfilter1_1,tp,LOCATION_GRAVE,0,nil)
if ct==0 then
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetLabel(ac)
e2:SetValue(c1184010.aclimit2)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
if ct==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c1184010.tfilter1_2,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
if ct==2 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_ADD_ATTRIBUTE)
e3:SetRange(LOCATION_GRAVE)
e3:SetValue(ATTRIBUTE_WATER)
e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetDescription(aux.Stringid(1184010,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetCountLimit(1)
e4:SetLabel(Duel.GetTurnCount())
e4:SetCondition(c1184010.con4)
e4:SetOperation(c1184010.op4)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then
e4:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
else
e4:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
end
Duel.RegisterEffect(e4,tp)
end
end
function c1184010.aclimit2(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
and re:GetHandler():IsCode(e:GetLabel())
end
function c1184010.cfilter4(c,e,tp)
return c:IsSetCard(0x3e12) and c:IsAttribute(ATTRIBUTE_EARTH)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c1184010.con4(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
and Duel.GetTurnCount()~=e:GetLabel()
and Duel.IsExistingMatchingCard(c1184010.cfilter4,tp,LOCATION_EXTRA,0,1,nil,e,tp)
end
function c1184010.op4(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,1184010)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local mg=Duel.SelectMatchingCard(tp,c1184010.cfilter4,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if mg:GetCount()>0 then
Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP)
end
end
--
\ No newline at end of file
--饮食艺术·小牛乳
function c1184011.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1184011,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1184011)
e1:SetCost(c1184011.cost1)
e1:SetTarget(c1184011.tg1)
e1:SetOperation(c1184011.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1184011,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(c1184011.op2)
c:RegisterEffect(e2)
--
end
--
function c1184011.tfilter1_1(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3e12)
and not c:IsForbidden()
end
function c1184011.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE,0)>0
and Duel.IsExistingMatchingCard(c1184011.tfilter1_1,tp,LOCATION_HAND,0,1,e:GetHandler()) end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE,0)
local dg=Duel.GetMatchingGroup(c1184011.tfilter1_1,tp,LOCATION_HAND,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local sg=dg:Select(tp,1,math.min(ft,dg:GetCount()),e:GetHandler())
for tc in aux.Next(sg) do
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetCode(EFFECT_CHANGE_TYPE)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1_1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1_1)
end
end
function c1184011.tg1(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 c1184011.op1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
--
function c1184011.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_DUAL_SUMMONABLE)
c:RegisterEffect(e2_1)
local e2_2=Effect.CreateEffect(c)
e2_2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2_2:SetTargetRange(LOCATION_MZONE,0)
e2_2:SetTarget(c1184011.tg2_2)
e2_2:SetLabelObject(e2_1)
e2_2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_2,tp)
end
function c1184011.tg2_2(e,c)
return c:IsSetCard(0x3e12) and c:IsFaceup()
end
\ No newline at end of file
--饮食艺术·樱叶糕
function c1184014.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1184014,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetTarget(c1184014.tg1)
e1:SetOperation(c1184014.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1184014,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1184014)
e2:SetCondition(c1184014.con2)
e2:SetTarget(c1184014.tg2)
e2:SetOperation(c1184014.op2)
c:RegisterEffect(e2)
--
end
--
function c1184014.tfilter1(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c1184014.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1184014.tfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1184014.tfilter1,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c1184014.tfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c1184014.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) then
local og=c:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(tc,Group.FromCards(c))
end
end
--
function c1184014.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSetCard(0x3e12)
end
function c1184014.tfilter2(c,e,tp,mg)
return c:IsSynchroSummonable(nil,mg)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c1184014.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=c:GetOverlayGroup()
if chk==0 then return Duel.IsExistingMatchingCard(c1184014.tfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1184014.ofilter2(mg,tp,lc)
return lc:IsSynchroSummonable(nil,mg,#mg-1,#mg-1)
and Duel.GetLocationCountFromEx(tp,tp,mg,lc)>0
end
function c1184014.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=c:GetOverlayGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c1184014.tfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg)
if sg:GetCount()>0 then
local lc=sg:GetFirst()
--
local rg=mg:SelectSubGroup(tp,c1184014.ofilter2,false,1,#mg,tp,lc)
lc:SetMaterial(rg)
Duel.SendtoGrave(rg,REASON_SYNCHRO+REASON_MATERIAL)
local e2_1=Effect.CreateEffect(c)
e2_1:SetDescription(aux.Stringid(1184014,2))
e2_1:SetType(EFFECT_TYPE_FIELD)
e2_1:SetCode(EFFECT_SPSUMMON_PROC)
e2_1:SetRange(LOCATION_EXTRA)
e2_1:SetValue(SUMMON_TYPE_SYNCHRO)
e2_1:SetReset(RESET_EVENT+0x1fe0000)
lc:RegisterEffect(e2_1,true)
Duel.SpecialSummonRule(tp,lc,SUMMON_TYPE_SYNCHRO)
e2_1:Reset()
--
end
end
--
--饮食艺术·秋色拿铁
function c1184022.initial_effect(c)
--
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(1165)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c1184022.XyzLevelFreeCondition(c1184022.f,nil,2,2))
e1:SetTarget(c1184022.XyzLevelFreeTarget(c1184022.f,nil,2,2))
e1:SetOperation(aux.XyzLevelFreeOperation(c1184022.f,nil,2,2))
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1184022,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,1184022)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c1184022.cost3)
e3:SetTarget(c1184022.tg3)
e3:SetOperation(c1184022.op3)
c:RegisterEffect(e3)
--
end
--
function c1184022.f(c,xyzcard)
return c:IsXyzLevel(xyzcard,3) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c1184022.XyzExgFilter(c,xyzcard)
return c:IsSetCard(0x3e12) and c:IsCanBeXyzMaterial(xyzcard)
and c:IsFaceup() and c:GetOriginalLevel()==3
and bit.band(c:GetOriginalAttribute(),ATTRIBUTE_EARTH)~=0
end
function c1184022.XyzLevelFreeCondition(f,gf,minct,maxct)
return
function(e,c,og,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=minct
local maxc=maxct
if min then
minc=math.max(minc,min)
maxc=math.min(maxc,max)
end
if maxc<minc then return false end
local mg=nil
if og then
mg=og:Filter(aux.XyzLevelFreeFilter,nil,c,f)
else
mg=Duel.GetMatchingGroup(aux.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f)
exg=Duel.GetMatchingGroup(c1184022.XyzExgFilter,tp,LOCATION_SZONE,0,nil,c)
mg:Merge(exg)
end
local sg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg)
aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
local res=mg:CheckSubGroup(aux.XyzLevelFreeGoal,minc,maxc,tp,c,gf)
aux.GCheckAdditional=nil
return res
end
end
function c1184022.XyzLevelFreeTarget(f,gf,minct,maxct)
return
function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og and not min then return true end
local minc=minct
local maxc=maxct
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local mg=nil
if og then
mg=og:Filter(aux.XyzLevelFreeFilter,nil,c,f)
else
mg=Duel.GetMatchingGroup(aux.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f)
exg=Duel.GetMatchingGroup(c1184022.XyzExgFilter,tp,LOCATION_SZONE,0,nil,c)
mg:Merge(exg)
end
local sg=aux.GetMustMaterialGroup(tp,EFFECT_MUST_BE_XMATERIAL)
Duel.SetSelectedCard(sg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local cancel=Duel.IsSummonCancelable()
aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
local g=mg:SelectSubGroup(tp,aux.XyzLevelFreeGoal,cancel,minc,maxc,tp,c,gf)
Auxiliary.GCheckAdditional=nil
if g and g:GetCount()>0 then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
end
--
function c1184022.cfilter3_1(c,e,tp,og)
return c:IsAbleToGraveAsCost()
and og:IsExists(c1184022.cfilter3_2,1,c,e,tp)
end
function c1184022.cfilter3_2(c,e,tp)
return c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1184022.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local og=c:GetOverlayGroup()
if chk==0 then return og:IsExists(c1184022.cfilter3_1,1,nil,e,tp,og) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=og:FilterSelect(tp,c1184022.cfilter3_1,1,1,nil,e,tp,og)
Duel.SendtoGrave(sg,REASON_COST)
end
--
function c1184022.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local og=c:GetOverlayGroup()
if chk==0 then return Duel.GetMZoneCount(tp)>0
and og:IsExists(c1184022.cfilter3_2,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end
--
function c1184022.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local og=c:GetOverlayGroup()
if Duel.GetMZoneCount(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=og:FilterSelect(tp,c1184022.cfilter3_2,1,1,nil,e,tp)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
--
--饮食艺术·苏打水
function c1184031.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c1184031.FusFilter,1,true,true)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c1184031.con2)
e2:SetOperation(c1184031.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1184031,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetOperation(c1184031.op3)
c:RegisterEffect(e3)
--
end
--
function c1184031.FusFilter(c)
return c:IsAttack(1800) and c:IsLevel(3)
end
--
function c1184031.cfilter2(c,fc)
return bit.band(c:GetOriginalType(),TYPE_XYZ)~=0
and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0
and c:IsAbleToGraveAsCost()
and c:IsFusionSetCard(0x3e12)
and c:IsCanBeFusionMaterial(fc,SUMMON_TYPE_SPECIAL)
end
function c1184031.con2(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c1184031.cfilter2,tp,LOCATION_SZONE,0,1,nil,c)
end
--
function c1184031.op2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,c1184031.cfilter2,tp,LOCATION_SZONE,0,1,1,nil,c)
c:SetMaterial(sg)
Duel.SendtoGrave(sg,REASON_COST)
end
--
function c1184031.op3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,1184031)~=0 then return end
if not Duel.IsPlayerCanAdditionalSummon(tp) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1184031,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3e12))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,1184031,RESET_PHASE+PHASE_END,0,1)
end
--
--饮食艺术·儿童列车
function c1184041.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c1184041.lfilter,2,2,c1184041.lcheck)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1184041,0))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c1184041.con2)
e2:SetCost(c1184041.cost2)
e2:SetTarget(c1184041.tg2)
e2:SetOperation(c1184041.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1184041,0))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c1184041.tg2)
e3:SetOperation(c1184041.op2)
c:RegisterEffect(e3)
--
end
--
function c1184041.lfilter(c)
return c:IsLevel(3)
end
function c1184041.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x3e12)
end
--
function c1184041.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c1184041.cost2(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 c1184041.tfilter2(c)
return c:IsSetCard(0x3e12) and c:IsAbleToHand()
end
function c1184041.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) and c:GetFlagEffect(1184041)==0
local b2=Duel.IsExistingMatchingCard(c1184041.tfilter2,tp,LOCATION_DECK,0,1,nil) and c:GetFlagEffect(1184042)==0
if chk==0 then return b1 or b2 end
end
function c1184041.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) and c:GetFlagEffect(1184041)==0
local b2=Duel.IsExistingMatchingCard(c1184041.tfilter2,tp,LOCATION_DECK,0,1,nil) and c:GetFlagEffect(1184042)==0
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(1184041,1),aux.Stringid(1184041,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(1184041,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(1184041,2))+1
else return end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
c:RegisterFlagEffect(1184041,RESET_PHASE+PHASE_END,0,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c1184041.tfilter2,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
c:RegisterFlagEffect(1184042,RESET_PHASE+PHASE_END,0,1)
end
end
--
\ No newline at end of file
--饮食艺术·黑猫蛋糕
function c1184051.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1,1)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,1184051)
e1:SetCondition(c1184051.con1)
e1:SetOperation(c1184051.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1184051,0))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,1184051+100)
e2:SetTarget(c1184051.tg2)
e2:SetOperation(c1184051.op2)
c:RegisterEffect(e2)
--
end
--
function c1184051.cfilter1(c)
return c:IsSetCard(0x3e12) and c:IsAbleToExtraAsCost()
end
function c1184051.con1(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(c1184051.cfilter1,tp,LOCATION_GRAVE,0,2,nil)
end
function c1184051.op1(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,c1184051.cfilter1,tp,LOCATION_GRAVE,0,2,Duel.GetMatchingGroup(c1184051.cfilter1,tp,LOCATION_GRAVE,0,nil):GetCount(),nil)
Duel.DisableShuffleCheck()
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
--
function c1184051.tfilter2(c)
return c:IsSetCard(0x3e12) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c1184051.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local sg=Duel.GetMatchingGroup(c1184051.tfilter2,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1184051.ofilter2(c)
return c:IsSetCard(0x3e12) and c:IsType(TYPE_TRAP) and c:IsAbleToHand()
end
function c1184051.op2(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c1184051.tfilter2,tp,LOCATION_GRAVE,0,nil)
if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c1184051.ofilter2,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
--
--饮食艺术·鲜红蛋糕
function c1184052.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1,1)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,1184052)
e1:SetCondition(c1184052.con1)
e1:SetOperation(c1184052.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1184052,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,1184052+100)
e2:SetOperation(c1184052.op2)
c:RegisterEffect(e2)
--
end
--
function c1184052.cfilter1(c)
return c:IsSetCard(0x3e12) and c:IsFaceup() and c:IsReleasable()
end
function c1184052.gfilter1(sg)
return sg:GetClassCount(Card.GetCode)==2
end
function c1184052.con1(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c1184052.cfilter1,tp,LOCATION_MZONE,0,nil)
return mg:CheckSubGroup(c1184052.gfilter1,2,2,nil)
end
function c1184052.op1(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c1184052.cfilter1,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=mg:SelectSubGroup(tp,c1184052.gfilter1,false,2,2,nil)
Duel.Release(sg,REASON_COST)
end
--
function c1184052.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,0)
for tc in aux.Next(mg) do
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_UPDATE_ATTACK)
e2_1:SetValue(1000)
e2_1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_1)
end
local e2_2=Effect.CreateEffect(c)
e2_2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2_2:SetCode(EVENT_PHASE+PHASE_END)
e2_2:SetCountLimit(1)
e2_2:SetCondition(c1184052.con2_2)
e2_2:SetOperation(c1184052.op2_2)
e2_2:SetReset(EVENT_PHASE+PHASE_END)
Duel.RegisterEffect(e2_2,tp)
end
function c1184052.con2_2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c1184052.ofilter2_2(c)
return c:IsFaceup() and c:GetAttack()==c:GetBaseAttack()
end
function c1184052.op2_2(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(c1185052.ofilter2_2,tp,LOCATION_MZONE,LOCATION_MZONE,0)
if mg:GetCount()>0 then Duel.SendtoGrave(mg,REASON_RULE) end
end
--
\ No newline at end of file
--饮食艺术·巧克力香精
function c1184061.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1184061,0))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,1184061)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c1184061.tg2)
e2:SetOperation(c1184061.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1184061,1))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCost(c1184061.cost3)
e3:SetTarget(c1184061.tg3)
e3:SetOperation(c1184061.op3)
c:RegisterEffect(e3)
--
end
--
function c1184061.tfilter2(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsSummonable(true,nil)
end
function c1184061.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1184061.tfilter2,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c1184061.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c1184061.tfilter2,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
--
function c1184061.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c1184061.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end
function c1184061.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,1,2,e:GetHandler())
if sg:GetCount()>0 then
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
--
--梦之始
function c1184062.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1184062.tg1)
e1:SetOperation(c1184062.op1)
c:RegisterEffect(e1)
--
end
--
function c1184062.tfilter1(c)
return c:IsSetCard(0x3e12) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1184062.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_DECK,0,1,e:GetHandler())
and Duel.GetMatchingGroup(c1184062.tfilter1,tp,LOCATION_DECK,0,nil):GetClassCount(Card.GetCode)>1 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c1184062.ofilter1(sg)
return sg:GetClassCount(Card.GetCode)==sg:GetCount()
end
function c1184062.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 and Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)>0 then
local dg=Duel.GetMatchingGroup(c1184062.tfilter1,tp,LOCATION_DECK,0,nil)
if dg:GetClassCount(Card.GetCode)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local lg=dg:SelectSubGroup(tp,c1184062.ofilter1,false,2,2)
Duel.SendtoHand(lg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,lg)
end
end
--
--饮食艺术·冰淇淋
function c1184063.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1184063,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1184063.tg1)
e1:SetOperation(c1184063.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1184063,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c1184063.con2)
e2:SetTarget(c1184063.tg2)
e2:SetOperation(c1184063.op2)
c:RegisterEffect(e2)
--
end
--
function c1184063.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0,0x11,1800,1800,3,RACE_FAIRY,ATTRIBUTE_WATER+ATTRIBUTE_EARTH)
and not c:IsLocation(LOCATION_MZONE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c1184063.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)<1 then return end
if not c:IsRelateToEffect(e) then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x11,1800,1800,3,RACE_FAIRY,ATTRIBUTE_WATER+ATTRIBUTE_EARTH) then
c:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_WATER+ATTRIBUTE_EARTH)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
end
end
--
function c1184063.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_MONSTER)
end
function c1184063.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c1184063.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SendtoHand(c,nil,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.Recover(tp,1000,REASON_EFFECT)
end
end
--
--缤纷假日
function c1184064.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1184064.tg1)
e1:SetOperation(c1184064.op1)
c:RegisterEffect(e1)
--
end
--
function c1184064.BthFilter(c,e,tp)
return c:IsSetCard(0x3e12) and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c1184064.FusFilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function c1184064.FusFilter(c,e,tp,tc)
return Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
and c:IsSetCard(0x3e12) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function c1184064.AthFilter(c)
return c:IsSetCard(0x3e12) and c:IsType(TYPE_MONSTER)
and c:GetLevel()>0 and c:IsAbleToHand()
end
function c1184064.RitCheckFilter(sg,lv)
return sg:GetSum(Card.GetLevel)==lv
end
function c1184064.RitFilter(c,e,tp,mg)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
if bit.band(c:GetType(),0x81)~=0x81 or not c:IsSetCard(0x3e12)
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
return mg:CheckSubGroup(c1184064.RitCheckFilter,1,#mg,c:GetLevel())
end
function c1184064.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c1184064.BthFilter,tp,LOCATION_MZONE,0,1,nil,e,tp)
local mg=Duel.GetMatchingGroup(c1184064.AthFilter,tp,LOCATION_DECK,0,nil)
local b2=Duel.IsExistingMatchingCard(c1184064.RitFilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg)
if chk==0 then return (b1 or b2) end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(1184064,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(1184064,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
else
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
end
function c1184064.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tc=Duel.SelectMatchingCard(tp,c1184064.BthFilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c1184064.FusFilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
if sg:GetCount()<1 then return end
Duel.SpecialSummon(sg,0,tp,tp,true,true,POS_FACEUP)
end
else
local mg=Duel.GetMatchingGroup(c1184064.AthFilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c1184064.RitFilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg):GetFirst()
if tc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=mg:SelectSubGroup(tp,c1184064.RitCheckFilter,false,1,#mg,tc:GetLevel())
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
Duel.ShuffleHand(tp)
end
end
end
--
\ No newline at end of file
--饮食艺术·金海蜇
function c1184071.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c1184071.tg1)
e1:SetOperation(c1184071.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c1184071.cost2)
e2:SetTarget(c1184071.tg2)
e2:SetOperation(c1184071.op2)
c:RegisterEffect(e2)
--
end
--
function c1184071.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c1184071.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--
function c1184071.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.HintSelection(Group.FromCards(e:GetHandler()))
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c1184071.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c1184071.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)
end
--
--饮食艺术·肉桂卷
function c1184073.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1184073,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1184073.tg1)
e1:SetOperation(c1184073.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1184073,1))
e2:SetCategory(CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c1184073.cost2)
e2:SetTarget(c1184073.tg2)
e2:SetOperation(c1184073.op2)
c:RegisterEffect(e2)
--
end
--
function c1184073.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsFacedown() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil)
end
function c1184073.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CANNOT_TRIGGER)
e1_1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e1_1:SetRange(LOCATION_ONFIELD)
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1_1,true)
end
end
--
function c1184073.cfilter2(c,tc)
return bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0
and c:IsSetCard(0x3e12)
and c:IsAbleToDeckAsCost() and c:IsFaceup()
and (tc:IsSSetable() or c:IsLocation(LOCATION_SZONE))
end
function c1184073.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c1184073.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,c1184073.cfilter2,tp,LOCATION_ONFIELD,0,1,1,nil,c)
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
function c1184073.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSSetable()
or (c:IsSSetable(false) and Duel.IsExistingMatchingCard(c1184073.cfilter2,tp,LOCATION_SZONE,0,1,nil)) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c1184073.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsSSetable() and c:IsRelateToEffect(e) then Duel.SSet(tp,c) end
end
--
\ No newline at end of file
--饮食艺术·奶油点心
function c1184081.initial_effect(c)
--
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.imval1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1184081,0))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,1184081)
e2:SetCost(c1184081.cost2)
e2:SetOperation(c1184081.op2)
c:RegisterEffect(e2)
--
end
--
function c1184081.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c1184081.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2_1:SetCode(EVENT_TO_GRAVE)
e2_1:SetCondition(c1184081.con2_1)
e2_1:SetOperation(c1184081.op2_1)
e2_1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_1,tp)
local e2_2=Effect.CreateEffect(c)
e2_2:SetDescription(aux.Stringid(1184081,1))
e2_2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2_2:SetCode(EVENT_CHAIN_SOLVED)
e2_2:SetCondition(c1184081.con2_2)
e2_2:SetOperation(c1184081.op2_2)
e2_2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_2,tp)
end
function c1184081.cfilter2_1(c)
return c:IsSetCard(0x3e12) and c:IsReason(REASON_EFFECT+REASON_COST)
end
function c1184081.con2_1(e,tp,eg,ep,ev,re,r,rp)
return rp==Duel.GetTurnPlayer()
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
and eg:IsExists(c1184081.cfilter2_1,1,nil)
end
function c1184081.op2_1(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,1184081,RESET_CHAIN,0,1)
end
function c1184081.con2_2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,1184081)>0
end
function c1184081.op2_2(e,tp,eg,ep,ev,re,r,rp)
local al=Duel.GetFlagEffect(tp,1184081)
local num=Duel.GetMatchingGroupCount(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
Duel.ResetFlagEffect(tp,1184081)
local ct=math.min(al,num)
if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,ct,ct,nil)
if sg:GetCount()>0 then
Duel.Hint(HINT_CARD,tp,1184081)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
end
--
\ No newline at end of file
...@@ -27,7 +27,7 @@ function cm.initial_effect(c) ...@@ -27,7 +27,7 @@ function cm.initial_effect(c)
cm[c]=elements cm[c]=elements
end end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return tama.tamas_isExistElement(c,TAMA_ELEMENT_WIND) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) and Duel.IsPlayerCanDraw(tp,2)) return tama.tamas_isExistElement(c,TAMA_ELEMENT_WIND) and c:IsAbleToGraveAsCost() and (not c:IsLocation(LOCATION_HAND) or (Duel.IsPlayerCanDraw(tp,2)))
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
......
...@@ -27,7 +27,7 @@ function cm.initial_effect(c) ...@@ -27,7 +27,7 @@ function cm.initial_effect(c)
cm[c]=elements cm[c]=elements
end end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return tama.tamas_isExistElement(c,TAMA_ELEMENT_EARTH) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) and Duel.IsPlayerCanDraw(tp,2)) return tama.tamas_isExistElement(c,TAMA_ELEMENT_EARTH) and c:IsAbleToGraveAsCost() and (not c:IsLocation(LOCATION_HAND) or (Duel.IsPlayerCanDraw(tp,2)))
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
......
...@@ -28,7 +28,7 @@ function cm.initial_effect(c) ...@@ -28,7 +28,7 @@ function cm.initial_effect(c)
end end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return tama.tamas_isExistElement(c,TAMA_ELEMENT_WATER) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) and Duel.IsPlayerCanDraw(tp,2)) return tama.tamas_isExistElement(c,TAMA_ELEMENT_WATER) and c:IsAbleToGraveAsCost() and (not c:IsLocation(LOCATION_HAND) or (Duel.IsPlayerCanDraw(tp,2)))
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
......
...@@ -28,7 +28,7 @@ function cm.initial_effect(c) ...@@ -28,7 +28,7 @@ function cm.initial_effect(c)
end end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return tama.tamas_isExistElement(c,TAMA_ELEMENT_FIRE) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) and Duel.IsPlayerCanDraw(tp,2)) return tama.tamas_isExistElement(c,TAMA_ELEMENT_FIRE) and c:IsAbleToGraveAsCost() and (not c:IsLocation(LOCATION_HAND) or (Duel.IsPlayerCanDraw(tp,2)))
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
......
...@@ -27,7 +27,7 @@ function cm.initial_effect(c) ...@@ -27,7 +27,7 @@ function cm.initial_effect(c)
end end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return tama.tamas_isExistElement(c,TAMA_ELEMENT_ORDER) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) and Duel.IsPlayerCanDraw(tp,2)) return tama.tamas_isExistElement(c,TAMA_ELEMENT_ORDER) and c:IsAbleToGraveAsCost() and (not c:IsLocation(LOCATION_HAND) or (Duel.IsPlayerCanDraw(tp,2)))
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
......
...@@ -28,7 +28,7 @@ function cm.initial_effect(c) ...@@ -28,7 +28,7 @@ function cm.initial_effect(c)
end end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return tama.tamas_isExistElement(c,TAMA_ELEMENT_CHAOS) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) and Duel.IsPlayerCanDraw(tp,2)) return tama.tamas_isExistElement(c,TAMA_ELEMENT_CHAOS) and c:IsAbleToGraveAsCost() and (not c:IsLocation(LOCATION_HAND) or (Duel.IsPlayerCanDraw(tp,2)))
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
......
...@@ -14,15 +14,6 @@ function cm.initial_effect(c) ...@@ -14,15 +14,6 @@ function cm.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit) e1:SetValue(cm.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.sprcon)
e2:SetOperation(cm.sprop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0)) e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_SUMMON) e3:SetCategory(CATEGORY_SUMMON)
......
...@@ -122,7 +122,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -122,7 +122,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=sg:GetFirst() local tc=sg:GetFirst()
while tc do while tc do
tc:CancelToGrave() tc:CancelToGrave()
tc:GetNext() tc=sg:GetNext()
end end
Duel.ChangePosition(sg,POS_FACEDOWN) Duel.ChangePosition(sg,POS_FACEDOWN)
Duel.RaiseEvent(sg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(sg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
......
...@@ -95,10 +95,9 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,10 +95,9 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
e2:SetDescription(aux.Stringid(m,2)) e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetOperation(cm.disop) e2:SetOperation(cm.disop)
c:RegisterEffect(e2) Duel.RegisterEffect(e2,tp)
--[[ --[[
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2)) e2:SetDescription(aux.Stringid(m,2))
......
...@@ -39,7 +39,7 @@ function cm.ffilter(c,fc,sub,mg,sg) ...@@ -39,7 +39,7 @@ function cm.ffilter(c,fc,sub,mg,sg)
g=sg:Clone() g=sg:Clone()
g:AddCard(c) g:AddCard(c)
end end
return tama.tamas_isExistElements(c,el) and (not sg or tama.tamas_isCanSelectElementsForAbove(g,el) return tama.tamas_isExistElements(c,el) and (not sg or tama.tamas_isCanSelectElementsForAbove(g,el))
end end
function cm.discon(e,tp,eg,ep,ev,re,r,rp) function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
......
...@@ -75,7 +75,7 @@ function cm.rfilter1(c,code) ...@@ -75,7 +75,7 @@ function cm.rfilter1(c,code)
return code==0 or c:IsCode(code) return code==0 or c:IsCode(code)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_MZONE) end if chk==0 then return Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
local code=0 local code=0
local g1=Duel.GetMatchingGroup(cm.rfilter,tp,LOCATION_MZONE,0,e:GetHandler()) local g1=Duel.GetMatchingGroup(cm.rfilter,tp,LOCATION_MZONE,0,e:GetHandler())
local g2=Duel.GetMatchingGroup(cm.rfilter,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(cm.rfilter,tp,LOCATION_HAND,0,nil)
......
--了不起的杰弗里斯
function c14824018.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14824018,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_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetTarget(c14824018.shtg)
e1:SetOperation(c14824018.shop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c14824018.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if chk==0 then return g:GetClassCount(Card.GetCode)==g:GetCount() end
Duel.ConfirmCards(tp,g)
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0)
end
function c14824018.shop(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local token=Duel.CreateToken(tp,ac)
Duel.SendtoHand(token,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,token)
end
--魔导神士 朱诺
function c14824033.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),7,3)
c:EnableReviveLimit()
--xyz summon2
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(14824033,0))
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_QUICK_O)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_END_PHASE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCountLimit(1,14824033)
e0:SetCost(c14824033.spcost)
e0:SetTarget(c14824033.sptg)
e0:SetOperation(c14824033.spop)
c:RegisterEffect(e0)
--change effect type
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(14824033)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
c:RegisterEffect(e1)
--activate from hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x106e))
e2:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e2)
--overlay
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c14824033.ovlcon)
e3:SetOperation(c14824033.ovlop)
c:RegisterEffect(e3)
--search
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(14824033,2))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_END_PHASE)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,14824034)
e5:SetCost(c14824033.thcost)
e5:SetTarget(c14824033.thtg)
e5:SetOperation(c14824033.thop)
c:RegisterEffect(e5)
--
if not c14824033.globle_check then
c14824033.globle_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetCode(EFFECT_ACTIVATE_COST)
ge1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
ge1:SetCost(c14824033.costchk)
ge1:SetTargetRange(1,0)
ge1:SetTarget(c14824033.actarget)
ge1:SetOperation(c14824033.costop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
Duel.RegisterEffect(ge2,1)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD)
ge3:SetCode(EFFECT_ACTIVATE_COST)
ge3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
ge3:SetCost(aux.FALSE)
ge3:SetTargetRange(1,1)
ge3:SetTarget(c14824033.actarget2)
Duel.RegisterEffect(ge3,0)
local g=Duel.GetMatchingGroup(c14824033.filter2,0,0xff,0xff,nil)
for tc in aux.Next(g) do
local te=tc:GetActivateEffect()
local ge2=te:Clone()
ge2:SetDescription(aux.Stringid(14824033,1))
ge2:SetType(EFFECT_TYPE_QUICK_O)
ge2:SetCode(EVENT_FREE_CHAIN)
ge2:SetRange(LOCATION_HAND)
ge2:SetHintTiming(TIMING_STANDBY_PHASE+TIMING_END_PHASE,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
tc:RegisterEffect(ge2)
end
end
end
function c14824033.cffilter(c)
return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and not c:IsPublic()
end
function c14824033.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14824033.cffilter,tp,LOCATION_HAND,0,3,nil) and Duel.GetFlagEffect(tp,14824033)==0 end
Duel.RegisterFlagEffect(tp,14824033,RESET_CHAIN,0,1)
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c14824033.cffilter,tp,LOCATION_HAND,0,3,3,nil)
e:SetLabelObject(g)
g:KeepAlive()
Duel.ConfirmCards(1-tp,g)
end
function c14824033.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c14824033.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if not (Duel.GetLocationCountFromEx(tp)>0) then return end
Duel.SpecialSummon(c,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
Duel.ShuffleHand(tp)
end
function c14824033.costchk(e,te_or_c,tp)
return Duel.IsPlayerAffectedByEffect(tp,14824033)
end
function c14824033.actarget(e,te,tp)
local tc=te:GetHandler()
e:SetLabelObject(te)
return tc:IsSetCard(0x106e) and te:IsHasType(EFFECT_TYPE_QUICK_O) and tc:IsLocation(LOCATION_HAND)
end
function c14824033.costop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
local tc=te:GetHandler()
local tp=te:GetHandlerPlayer()
te:SetType(EFFECT_TYPE_ACTIVATE)
if tc:IsType(TYPE_FIELD) then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,false)
else
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
end
local ge3=Effect.CreateEffect(tc)
ge3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ge3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
ge3:SetCode(EVENT_CHAIN_SOLVED)
ge3:SetLabelObject(te)
ge3:SetReset(RESET_PHASE+PHASE_END)
ge3:SetOperation(c14824033.resetop)
Duel.RegisterEffect(ge3,tp)
local ge4=ge3:Clone()
ge4:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(ge4,tp)
end
function c14824033.actarget2(e,te,tp)
local tc=te:GetHandler()
return tc:IsSetCard(0x106e) and te:IsHasType(EFFECT_TYPE_QUICK_O) and tc:IsLocation(LOCATION_SZONE)
end
function c14824033.resetop(e,tp,eg,ep,ev,re,r,rp)
if re==e:GetLabelObject() and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
re:SetType(EFFECT_TYPE_QUICK_O)
e:Reset()
end
end
function c14824033.filter2(c)
return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and not c:IsType(TYPE_QUICKPLAY)
end
function c14824033.ovlcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return Duel.GetFlagEffect(tp,952523)==0 and rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and rc:IsRelateToEffect(re) and rc:IsCanOverlay() and rc:IsStatus(STATUS_LEAVE_CONFIRMED) and rc:GetLocation()~=LOCATION_OVERLAY
end
function c14824033.ovlop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
rc:CancelToGrave()
Duel.Overlay(e:GetHandler(),rc)
end
function c14824033.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
local rt=Duel.GetMatchingGroupCount(c14824033.thfilter,tp,LOCATION_DECK,0,nil)
local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST)
e:SetLabel(ct)
end
function c14824033.thfilter(c)
return c:IsSetCard(0x106e) and c:IsAbleToHand()
end
function c14824033.spfilter(c,lv,e,tp)
return c:IsLevelBelow(lv) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c14824033.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14824033.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,e:GetLabel(),tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end
function c14824033.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c14824033.thfilter,tp,LOCATION_DECK,0,e:GetLabel(),e:GetLabel(),nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c14824033.spfilter,tp,LOCATION_DECK,0,1,nil,g:GetCount(),e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(14824033,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c14824033.spfilter,tp,LOCATION_DECK,0,1,1,nil,g:GetCount(),e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
...@@ -9,7 +9,6 @@ function c22020720.initial_effect(c) ...@@ -9,7 +9,6 @@ function c22020720.initial_effect(c)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c22020720.condition)
e1:SetValue(c22020720.atkval) e1:SetValue(c22020720.atkval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy --destroy
...@@ -39,11 +38,11 @@ function c22020720.initial_effect(c) ...@@ -39,11 +38,11 @@ function c22020720.initial_effect(c)
e3:SetOperation(c22020720.desop) e3:SetOperation(c22020720.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c22020720.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function c22020720.atkval(e,c) function c22020720.atkval(e,c)
return math.abs(Duel.GetLP(0)-Duel.GetLP(1)) local lps=Duel.GetLP(c:GetControler())
local lpo=Duel.GetLP(1-c:GetControler())
if lps>=lpo then return 0
else return lpo-lps end
end end
function c22020720.descon(e,tp,eg,ep,ev,re,r,rp) function c22020720.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
......
...@@ -24,7 +24,6 @@ function c22020740.initial_effect(c) ...@@ -24,7 +24,6 @@ function c22020740.initial_effect(c)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c22020740.condition)
e1:SetValue(c22020740.atkval) e1:SetValue(c22020740.atkval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--immune --immune
...@@ -63,6 +62,10 @@ function c22020740.initial_effect(c) ...@@ -63,6 +62,10 @@ function c22020740.initial_effect(c)
e7:SetOperation(c22020740.rpop) e7:SetOperation(c22020740.rpop)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c22020740.condition(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function c22020740.sumsuc(e,tp,eg,ep,ev,re,r,rp) function c22020740.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -75,11 +78,11 @@ function c22020740.atop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,11 +78,11 @@ function c22020740.atop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("诚字大旗不灭......挥刀,前进。挥刀......!前进......!我便是!新选组!") Debug.Message("诚字大旗不灭......挥刀,前进。挥刀......!前进......!我便是!新选组!")
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c22020740.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function c22020740.atkval(e,c) function c22020740.atkval(e,c)
return math.abs(Duel.GetLP(0)-Duel.GetLP(1)) local lps=Duel.GetLP(c:GetControler())
local lpo=Duel.GetLP(1-c:GetControler())
if lps>=lpo then return 0
else return lpo-lps end
end end
function c22020740.efilter(e,te) function c22020740.efilter(e,te)
return te:GetOwner()~=e:GetOwner() return te:GetOwner()~=e:GetOwner()
......
...@@ -51,25 +51,6 @@ function c22020810.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,25 +51,6 @@ function c22020810.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c22020810.eqlimit) e1:SetValue(c22020810.eqlimit)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
--atk/def
if atk>0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(atk)
tc:RegisterEffect(e2)
end
if def>0 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(def)
tc:RegisterEffect(e3)
end
end end
function c22020810.eqlimit(e,c) function c22020810.eqlimit(e,c)
return e:GetOwner()==c return e:GetOwner()==c
......
--芬尼根的守灵夜
local m=25000000
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(cm.condition)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
if not cm.chain_rev then
cm.chain_rev=true
cm.chain_rev_tab={}
cm.skip_check={{0,0,0,0,0},{0,0,0,0,0}}
local re1=Effect.CreateEffect(c)
re1:SetType(EFFECT_TYPE_FIELD)
re1:SetCode(EFFECT_ACTIVATE_COST)
re1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
re1:SetTargetRange(1,1)
re1:SetTarget(cm.actarget)
re1:SetCost(cm.costchk)
re1:SetCondition(cm.condition2)
re1:SetOperation(cm.costop)
Duel.RegisterEffect(re1,tp)
end
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(0,m)>0 or Duel.GetFlagEffect(1,m)>0
end
function cm.actarget(e,te,tp)
e:SetLabelObject(te)
return true
end
function cm.costchk(e,te_or_c,tp)
local ct=Duel.GetFlagEffect(tp,79323590)
return true
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
local cost=te:GetCost()
local target=te:GetTarget()
local operation=te:GetOperation()
local code=te:GetHandler():GetOriginalCode()
local evr=Duel.GetCurrentChain()+1
if cost then
te:SetCost(function(ce,ctp,ceg,cep,cev,cre,cr,crp,chk,chkc)
if cost(ce,ctp,ceg,cep,cev,cre,cr,crp,0) then
cm.chain_rev_tab[#cm.chain_rev_tab+1]={evr,ce,ctp,cost,target,operation,code}
te:SetCost(cost)
return true
end
end)
end
if target then
te:SetTarget(function(ce,ctp,ceg,cep,cev,cre,cr,crp,chk,chkc)
if target(ce,ctp,ceg,cep,cev,cre,cr,crp,0) then
if not cost then
cm.chain_rev_tab[#cm.chain_rev_tab+1]={evr,ce,ctp,cost,target,operation,code}
end
te:SetTarget(target)
return true
end
end)
end
if not target and not cost then
cm.chain_rev_tab[#cm.chain_rev_tab+1]={evr,ce,ctp,cost,target,operation,code}
end
end
function cm.condition(e,tp)
return true
end
function cm.activate(e,tp)
Duel.ConfirmCards(1-tp,e:GetHandler())
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,m)>0 or Duel.GetFlagEffect(1-tp,m)>0 then
return
end
Duel.RegisterFlagEffect(tp,m,0,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetOperation(cm.opdo)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAIN_END)
e2:SetOperation(cm.opdo3)
Duel.RegisterEffect(e2,tp)
end
function cm.opdo(e,tp,eg,ep,ev,re,r,rp)
local cev,effect_do,rtp,cost,target,operation,code=table.unpack(cm.chain_rev_tab[1])
local reg,rep,rev,cre,cr,crp=Duel.GetChainEvent(cev)
if cost then
effect_do:SetCost(cost)
end
if target then
effect_do:SetTarget(target)
end
Duel.ChangeChainOperation(0,cm.op2)
Duel.ClearTargetCard()
Duel.Hint(HINT_CARD,0,code)
if cost then cost(effect_do,rtp,reg,rep,rev,cre,cr,crp,1) end
if target then target(effect_do,rtp,reg,rep,rev,cre,cr,crp,1) end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g and g:GetCount()>0 then
local ac=g:GetFirst()
while ac do
ac:CreateEffectRelation(effect_do)
ac=g:GetNext()
end
end
if cev==1 then
Duel.RaiseEvent(e:GetHandler(),m,cre,cr,crp,cep,cev)
end
if operation then operation(effect_do,rtp,reg,rep,rev,cre,cr,crp) end
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsType(TYPE_PENDULUM) then
re:GetHandler():CancelToGrave(true)
end
if g and g:GetCount()>0 then
local sc=g:GetFirst()
while sc do
sc:ReleaseEffectRelation(effect_do)
sc=g:GetNext()
end
end
table.remove(cm.chain_rev_tab,1)
end
function cm.op2(e,tp)
return false
end
function cm.opdo3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local full_flag=true
local code_pack={EFFECT_SKIP_DP,EFFECT_SKIP_SP,EFFECT_SKIP_M1,EFFECT_SKIP_BP,EFFECT_SKIP_M2}
local phase_pack={PHASE_STANDBY,PHASE_MAIN1,PHASE_BATTLE_START,PHASE_BATTLE,PHASE_END}
local cp=Duel.GetTurnPlayer()
for k,v in ipairs(code_pack) do
if Duel.GetCurrentPhase()<phase_pack[k] and cm.skip_check[cp+1][k]==0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetCondition(cm.reset)
e2:SetCode(v)
e2:SetLabel(k)
Duel.RegisterEffect(e2,cp)
cm.skip_check[cp+1][k]=1
full_flag=false
return
end
end
if full_flag==true then
cm.skip_check[cp+1]={0,0,0,0,0}
for k,v in ipairs(code_pack) do
if Duel.GetCurrentPhase()<phase_pack[k] and cm.skip_check[cp+1][k]==0 then
cm.skip_check[cp+1][k]=1
return
end
end
end
--
end
function cm.reset(e,tp)
local flag=false
for k,v in ipairs(cm.skip_check[e:GetHandlerPlayer()+1]) do
if v==0 then
flag=true
end
end
return flag and cm.skip_check[e:GetHandlerPlayer()+1][e:GetLabel()]==1
end
\ No newline at end of file
...@@ -11,7 +11,7 @@ function cm.initial_effect(c) ...@@ -11,7 +11,7 @@ function cm.initial_effect(c)
e1:SetOperation(cm.op) e1:SetOperation(cm.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
cm.codelist={EFFECT_CANNOT_SPECIAL_SUMMON,EFFECT_CANNOT_SUMMON,EFFECT_CANNOT_FLIP_SUMMON,EFFECT_CANNOT_ACTIVATE,EFFECT_CANNOT_MSET,EFFECT_CANNOT_SSET,EFFECT_SPSUMMON_COUNT_LIMIT,EFFECT_ACTIVATE_COST,EFFECT_SUMMON_COST,EFFECT_MSET_COST,EFFECT_SSET_COST,EFFECT_FLIPSUMMON_COST,EFFECT_MAX_MZONE,EFFECT_MAX_SZONE,EFFECT_LEFT_SPSUMMON_COUNT,EFFECT_DEVINE_LIGHT,59822133,63060238,97148796,29724053,92345028,67120578} cm.codelist={EFFECT_CANNOT_SPECIAL_SUMMON,EFFECT_CANNOT_SUMMON,EFFECT_CANNOT_FLIP_SUMMON,EFFECT_CANNOT_ACTIVATE,EFFECT_CANNOT_MSET,EFFECT_CANNOT_SSET,EFFECT_SPSUMMON_COUNT_LIMIT,EFFECT_ACTIVATE_COST,EFFECT_SUMMON_COST,EFFECT_MSET_COST,EFFECT_SSET_COST,EFFECT_FLIPSUMMON_COST,EFFECT_MAX_MZONE,EFFECT_MAX_SZONE,EFFECT_LEFT_SPSUMMON_COUNT,EFFECT_DEVINE_LIGHT,EFFECT_LIMIT_SPECIAL_SUMMON_POSITION,59822133,63060238,97148796,29724053,92345028,67120578}
function cm.con(e,tp) function cm.con(e,tp)
return Duel.GetFlagEffect(tp,m)==0 return Duel.GetFlagEffect(tp,m)==0
end end
......
--此即人人
local m=25000403
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(cm.condition)
e1:SetOperation(cm.operation)
Duel.RegisterEffect(e1,0)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(25000000)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(cm.condition2)
e2:SetOperation(cm.operation)
Duel.RegisterEffect(e2,0)
end
function cm.condition(e,tp)
return Duel.GetFlagEffect(tp,25000000)==0 and Duel.GetFlagEffect(1-tp,25000000)==0
end
function cm.condition2(e,tp)
return Duel.GetFlagEffect(tp,25000000)>0 or Duel.GetFlagEffect(1-tp,25000000)>0
end
function cm.spcheck(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,true) and c:GetOriginalCode()==25000000
end
function cm.check(c)
return c:GetOriginalCode()==m and c:IsAbleToExtra()
end
function cm.operation(e,tp)
local rg=Duel.GetMatchingGroup(cm.check,tp,LOCATION_PZONE,0,nil)
if rg:GetCount()==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)==0 or not Duel.IsExistingMatchingCard(cm.spcheck,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) then
return
end
local c=rg:Select(tp,1,1,nil):GetFirst()
Duel.SendtoExtraP(c,tp,REASON_COST)
getmetatable(e:GetHandler()).announce_filter={TYPE_EFFECT,OPCODE_ISTYPE,code,OPCODE_ISCODE,OPCODE_NOT,OPCODE_AND}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,cm.spcheck,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if Duel.SpecialSummonStep(sc,0,tp,tp,true,true,POS_FACEUP) then
sc:CopyEffect(ac,RESET_EVENT+0x7e0000)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetValue(TYPE_MONSTER+TYPE_EFFECT)
e1:SetReset(RESET_EVENT+0x7e0000)
sc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--规则修改者 未来
local id = 3001010
local s = _G["c"..id]
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1)
--special summon condition
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCode(EFFECT_SPSUMMON_CONDITION)
e5:SetRange(LOCATION_EXTRA)
e5:SetValue(aux.synlimit)
c:RegisterEffect(e5)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(s.discon)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(s.cost)
e2:SetTarget(s.dstg)
e2:SetOperation(s.dsop)
c:RegisterEffect(e2)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DRAW_COUNT)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetValue(2)
Duel.RegisterEffect(e2,tp)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,0,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(s.retop)
Duel.RegisterEffect(e1,tp)
end
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function s.disfilter(c)
return c:IsFaceup() and not c:IsDisabled()
end
function s.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.disfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_ONFIELD)
end
function s.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE)
local g=Duel.SelectMatchingCard(tp,s.disfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
--Negate effects
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
end
\ No newline at end of file
--规则修改者 现在
local id = 3001011
local s = _G["c"..id]
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1)
--special summon condition
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCode(EFFECT_SPSUMMON_CONDITION)
e5:SetRange(LOCATION_EXTRA)
e5:SetValue(aux.synlimit)
c:RegisterEffect(e5)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(s.discon)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(s.cost)
e2:SetTarget(s.dstg)
e2:SetOperation(s.dsop)
c:RegisterEffect(e2)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(2)
Duel.RegisterEffect(e1,tp)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,0,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(s.retop)
Duel.RegisterEffect(e1,tp)
end
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function s.disfilter(c)
return c:IsFaceup() and not c:IsDisabled()
end
function s.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.disfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_ONFIELD)
end
function s.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE)
local g=Duel.SelectMatchingCard(tp,s.disfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
--Negate effects
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
end
\ No newline at end of file
--规则修改者 过去
local id = 3001012
local s = _G["c"..id]
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1)
--special summon condition
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCode(EFFECT_SPSUMMON_CONDITION)
e5:SetRange(LOCATION_EXTRA)
e5:SetValue(aux.synlimit)
c:RegisterEffect(e5)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(s.discon)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(s.cost)
e2:SetTarget(s.dstg)
e2:SetOperation(s.dsop)
c:RegisterEffect(e2)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(s.accon)
e1:SetOperation(s.activate)
Duel.RegisterEffect(e1,tp)
end
function s.cfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.accon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
local g1=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g1>0 then
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,0,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(s.retop)
Duel.RegisterEffect(e1,tp)
end
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function s.disfilter(c)
return c:IsFaceup() and not c:IsDisabled()
end
function s.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.disfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_ONFIELD)
end
function s.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE)
local g=Duel.SelectMatchingCard(tp,s.disfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
--Negate effects
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
end
\ No newline at end of file
...@@ -41,12 +41,15 @@ function cm.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,12 +41,15 @@ function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil) local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SSet(tp,tc) Duel.SSet(tp,tc)
if Duel.IsExistingMatchingCard(cm.ckfilter,tp,0,LOCATION_ONFIELD,1,nil) then if Duel.IsExistingMatchingCard(cm.ckfilter,tp,0,LOCATION_ONFIELD,1,nil) then
if tc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end
if tc:IsType(TYPE_QUICKPLAY) then
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
...@@ -54,6 +57,7 @@ function cm.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,6 +57,7 @@ function cm.setop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end
end end
function cm.matfilter(c) function cm.matfilter(c)
......
...@@ -56,5 +56,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,5 +56,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m) SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end end
...@@ -42,5 +42,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,5 +42,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
end end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m) SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end end
...@@ -42,5 +42,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,5 +42,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveToField(sg:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(sg:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end end
end end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m) SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end end
...@@ -34,5 +34,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,5 +34,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
end end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m) SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end end
...@@ -40,5 +40,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,5 +40,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoExtraP(sg,tp,REASON_EFFECT) Duel.SendtoExtraP(sg,tp,REASON_EFFECT)
end end
end end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m) SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end end
...@@ -35,5 +35,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,5 +35,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
end end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m) SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end end
...@@ -33,5 +33,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,5 +33,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoExtraP(sg,tp,REASON_EFFECT) Duel.SendtoExtraP(sg,tp,REASON_EFFECT)
end end
end end
SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m) SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end end
...@@ -19,6 +19,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,6 +19,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDestructable(e) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if e:GetHandler():IsDestructable(e) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 and Duel.IsChainDisablable(ev) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then Duel.NegateEffect(ev) end if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 and Duel.IsChainDisablable(ev) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then Duel.NegateEffect(ev) end
SNNM.HTFPlacePZone(e:GetHandler(),2,LOCATION_EXTRA,1,EVENT_PHASE+PHASE_END,m) SNNM.HTFPlacePZone(e:GetHandler(),2,LOCATION_EXTRA,1,EVENT_PHASE+PHASE_END,m,tp)
end end
end end
...@@ -19,6 +19,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,6 +19,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDestructable(e) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if e:GetHandler():IsDestructable(e) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 and Duel.IsChainDisablable(ev) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then Duel.NegateEffect(ev) end if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 and Duel.IsChainDisablable(ev) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then Duel.NegateEffect(ev) end
SNNM.HTFPlacePZone(e:GetHandler(),2,LOCATION_EXTRA,1,EVENT_PHASE+PHASE_END,m) SNNM.HTFPlacePZone(e:GetHandler(),2,LOCATION_EXTRA,1,EVENT_PHASE+PHASE_END,m,tp)
end end
end end
...@@ -48,5 +48,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,5 +48,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
end end
SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m) SNNM.HTFPlacePZone(c,4,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end end
...@@ -48,5 +48,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,5 +48,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoExtraP(pg1,tp,REASON_EFFECT) Duel.SendtoExtraP(pg1,tp,REASON_EFFECT)
end end
end end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m) SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end end
...@@ -31,5 +31,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,5 +31,5 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
end end
end end
SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m) SNNM.HTFPlacePZone(c,2,LOCATION_GRAVE,0,EVENT_FREE_CHAIN,m,tp)
end end
...@@ -15,6 +15,7 @@ function c60000006.initial_effect(c) ...@@ -15,6 +15,7 @@ function c60000006.initial_effect(c)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
aux.xyz_number[60000006]=1
function c60000006.ovfilter(c) function c60000006.ovfilter(c)
return c:IsFaceup() return c:IsFaceup()
and c:IsType(TYPE_LINK) and c:IsType(TYPE_LINK)
......
...@@ -46,8 +46,12 @@ function Color_Song.AddCount(c) ...@@ -46,8 +46,12 @@ function Color_Song.AddCount(c)
end end
end end
function Color_Song.AddCount_Op(e,tp,eg,ep,ev,re,r,rp) function Color_Song.AddCount_Op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m-1)>=4 then extraCount[1+tp]=extraCount[1+tp]+1 end if Duel.GetFlagEffect(tp,m-1)>=4 then Color_Song.AddC(tp) end
if Duel.GetFlagEffect(1-tp,m-1)>=4 then extraCount[tp]=extraCount[tp]+1 end if Duel.GetFlagEffect(1-tp,m-1)>=4 then Color_Song.AddC(1-tp) end
end
function Color_Song.AddC(tp)
if not Color_Song.AddCount_check then return end
extraCount[1+tp]=extraCount[1+tp]+1
end end
--适用--------------------------------------------------------- --适用---------------------------------------------------------
function Color_Song.UseEffect(e,tp) function Color_Song.UseEffect(e,tp)
...@@ -318,7 +322,7 @@ end ...@@ -318,7 +322,7 @@ end
--Memory --Memory
function Color_Song.Memory_Op(e,tp) function Color_Song.Memory_Op(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
if tc then if tc then
Duel.GetControl(tc,tp,PHASE_END,2) Duel.GetControl(tc,tp,PHASE_END,2)
end end
...@@ -362,6 +366,7 @@ function Color_Song.Hunter_drcon1(e,tp,eg,ep,ev,re,r,rp) ...@@ -362,6 +366,7 @@ function Color_Song.Hunter_drcon1(e,tp,eg,ep,ev,re,r,rp)
end end
function Color_Song.Hunter_drop1(e,tp,eg,ep,ev,re,r,rp) function Color_Song.Hunter_drop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
end end
function Color_Song.Hunter_regcon(e,tp,eg,ep,ev,re,r,rp) function Color_Song.Hunter_regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Color_Song.Hunter_drFilter,1,nil,1-tp) return eg:IsExists(Color_Song.Hunter_drFilter,1,nil,1-tp)
...@@ -377,6 +382,7 @@ function Color_Song.Hunter_drop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -377,6 +382,7 @@ function Color_Song.Hunter_drop2(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetFlagEffect(tp,m-3) local n=Duel.GetFlagEffect(tp,m-3)
Duel.ResetFlagEffect(tp,m-3) Duel.ResetFlagEffect(tp,m-3)
Duel.Draw(tp,n,REASON_EFFECT) Duel.Draw(tp,n,REASON_EFFECT)
Duel.Draw(1-tp,n,REASON_EFFECT)
end end
function Color_Song.Hunter_Op(e,tp) function Color_Song.Hunter_Op(e,tp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -431,6 +437,7 @@ function cm.initial_effect(c) ...@@ -431,6 +437,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con1) e1:SetCondition(cm.con1)
e1:SetTarget(cm.tg1) e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1) e1:SetOperation(cm.op1)
...@@ -440,6 +447,7 @@ function cm.initial_effect(c) ...@@ -440,6 +447,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.tg2) e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2) e2:SetOperation(cm.op2)
......
...@@ -53,7 +53,7 @@ function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,7 +53,7 @@ function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,x,nil) end if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,x,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,x,1-tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,x,1-tp,LOCATION_MZONE)
end end
function cm.op1(e,tp,eg,ep,ev,re,r,rp) function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local x=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):FilterCount(cm.tgf1,nil) local x=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):FilterCount(cm.tgf1,nil)
if not Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,x,nil) then return end if not Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,x,nil) then return end
......
...@@ -19,6 +19,7 @@ function cm.initial_effect(c) ...@@ -19,6 +19,7 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2) e2:SetOperation(cm.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
Color_Song.AddCount(c) Color_Song.AddCount(c)
...@@ -57,14 +58,13 @@ end ...@@ -57,14 +58,13 @@ end
function cm.tgf2(c) function cm.tgf2(c)
return c:IsAbleToDeck() and c.isColorSong return c:IsAbleToDeck() and c.isColorSong
end end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.tgf1),tp,LOCATION_GRAVE,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.tgf1),tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.tgf2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end and Duel.IsExistingMatchingCard(cm.tgf2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end end
function cm.op1(e,tp,eg,ep,ev,re,r,rp) function cm.op2(e,tp,eg,ep,ev,re,r,rp)
Color_Song.Record_Op(e,tp,eg,ep,ev,re,r,rp)
local max=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0):FilterCount(aux.NecroValleyFilter(cm.tgf1),nil) local max=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0):FilterCount(aux.NecroValleyFilter(cm.tgf1),nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tgf2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,max,nil) local g=Duel.SelectMatchingCard(tp,cm.tgf2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,max,nil)
...@@ -73,7 +73,7 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +73,7 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local count=Duel.SendtoDeck(g,nil,2,REASON_EFFECT) local count=Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tgf1),tp,LOCATION_GRAVE,0,count,count,nil) local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tgf1),tp,LOCATION_GRAVE,0,count,count,nil)
if g2:GetCount()>0 then if g2:GetCount()==count then
Duel.SendtoHand(g2,nil,REASON_EFFECT) Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2) Duel.ConfirmCards(1-tp,g2)
end end
......
...@@ -28,7 +28,7 @@ function cm.initial_effect(c) ...@@ -28,7 +28,7 @@ function cm.initial_effect(c)
end end
--e1 --e1
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>5 and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>5 end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,6) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,6)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,6) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,6)
end end
......
...@@ -94,7 +94,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,7 +94,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
if Duel.SendtoGrave(sg,REASON_EFFECT)>0 then if Duel.SendtoGrave(sg,REASON_EFFECT)>0 then
Duel.BreakEffect() Duel.BreakEffect()
extraCount[1+tp]=extraCount[1+tp]+1 Color_Song.AddC(tp)
end end
end end
Color_Song.UseEffect(e,tp) Color_Song.UseEffect(e,tp)
...@@ -110,8 +110,9 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp) ...@@ -110,8 +110,9 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCurrentChain() local ct=Duel.GetCurrentChain()
if ct<2 then return end if ct<2 then return end
if not Duel.IsPlayerCanDraw(tp,1) or not Duel.IsPlayerCanDraw(1-tp,1) then return false end if not Duel.IsPlayerCanDraw(tp,1) or not Duel.IsPlayerCanDraw(1-tp,1) then return false end
local te,p,loc=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION) local te,p=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te and te:GetHandler().isColorSong and loc==LOCATION_ONFIELD and p==tp and rp==1-tp local tc=te:GetHandler()
return te and tc.isColorSong and tc:IsLocation(LOCATION_ONFIELD) and p==tp and rp==1-tp
end end
function cm.op2(e,tp,eg,ep,ev,re,r,rp) function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup() local g=Group.CreateGroup()
......
--多元卫星闪灵 喷流灵
local m=60001158
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon1)
e1:SetTarget(cm.sptg1)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_HAND)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,12345678)
e3:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_CHAIN_END+TIMING_END_PHASE)
e3:SetCost(cm.sumcost)
e3:SetTarget(cm.sumtg)
e3:SetOperation(cm.sumop)
c:RegisterEffect(e3)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,m+10000000)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--link summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.lkcon)
e1:SetTarget(cm.lktg)
e1:SetOperation(cm.lkop)
c:RegisterEffect(e1)
--xyz summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.lkcon)
e4:SetTarget(cm.xyztg)
e4:SetOperation(cm.xyzop)
c:RegisterEffect(e4)
end
function cm.cfilter(c)
return c:IsFaceup() and (c:IsLevel(2) or c:IsRank(2))
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cmcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop1(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 cm.thfilter(c)
return c:IsSetCard(0x180) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonable(true,nil) or e:GetHandler():IsMSetable(true,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Summon(tp,c,true,nil)
end
function cm.lkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function cm.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
function cm.xyzfilter(c)
return c:IsXyzSummonable(nil)
end
function cm.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
--多元卫星闪灵 蓝色喷流灵
local m=60001159
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon1)
e1:SetTarget(cm.sptg1)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_HAND)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,12345678)
e3:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_CHAIN_END+TIMING_END_PHASE)
e3:SetCost(cm.sumcost)
e3:SetTarget(cm.sumtg)
e3:SetOperation(cm.sumop)
c:RegisterEffect(e3)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,m+10000000)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--link summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.lkcon)
e1:SetTarget(cm.lktg)
e1:SetOperation(cm.lkop)
c:RegisterEffect(e1)
--xyz summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.lkcon)
e4:SetTarget(cm.xyztg)
e4:SetOperation(cm.xyzop)
c:RegisterEffect(e4)
end
function cm.cfilter(c)
return c:IsFaceup() and (c:IsLevel(2) or c:IsRank(2))
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cmcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop1(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 cm.thfilter(c)
return c:IsSetCard(0x180) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonable(true,nil) or e:GetHandler():IsMSetable(true,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Summon(tp,c,true,nil)
end
function cm.lkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function cm.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
function cm.xyzfilter(c)
return c:IsXyzSummonable(nil)
end
function cm.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
--多元卫星闪灵 萝卜精灵
local m=60001160
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon1)
e1:SetTarget(cm.sptg1)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_HAND)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,12345678)
e3:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_CHAIN_END+TIMING_END_PHASE)
e3:SetCost(cm.sumcost)
e3:SetTarget(cm.sumtg)
e3:SetOperation(cm.sumop)
c:RegisterEffect(e3)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,m+10000000)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.discon)
e2:SetCost(cm.discost)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--link summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.lkcon)
e1:SetTarget(cm.lktg)
e1:SetOperation(cm.lkop)
c:RegisterEffect(e1)
--xyz summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.lkcon)
e4:SetTarget(cm.xyztg)
e4:SetOperation(cm.xyzop)
c:RegisterEffect(e4)
end
function cm.cfilter(c)
return c:IsFaceup() and (c:IsLevel(2) or c:IsRank(2))
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cmcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop1(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 cm.discon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainDisablable(ev)
end
function cm.cfilter(c)
return c:IsLevel(2) or c:IsRank(2) or c:IsLink(2)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,e:GetHandler()) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,e:GetHandler())
Duel.Release(g,REASON_COST)
local tc=Duel.GetOperatedGroup():GetFirst()
e:SetLabelObject(tc)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) and rc:IsDestructable()
and (e:GetLabelObject():IsRank(2) or e:GetLabelObject():IsLink(2))
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Destroy(rc,REASON_EFFECT)
end
end
function cm.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonable(true,nil) or e:GetHandler():IsMSetable(true,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Summon(tp,c,true,nil)
end
function cm.lkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function cm.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
function cm.xyzfilter(c)
return c:IsXyzSummonable(nil)
end
function cm.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
--多元卫星闪灵 红色精灵
local m=60001161
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon1)
e1:SetTarget(cm.sptg1)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_HAND)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,12345678)
e3:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_CHAIN_END+TIMING_END_PHASE)
e3:SetCost(cm.sumcost)
e3:SetTarget(cm.sumtg)
e3:SetOperation(cm.sumop)
c:RegisterEffect(e3)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,m+10000000)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.discon)
e2:SetCost(cm.discost)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--link summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.lkcon)
e1:SetTarget(cm.lktg)
e1:SetOperation(cm.lkop)
c:RegisterEffect(e1)
--xyz summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.lkcon)
e4:SetTarget(cm.xyztg)
e4:SetOperation(cm.xyzop)
c:RegisterEffect(e4)
end
function cm.cfilter(c)
return c:IsFaceup() and (c:IsLevel(2) or c:IsRank(2))
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cmcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop1(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 cm.discon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
end
function cm.cfilter(c)
return c:IsLevel(2) or c:IsRank(2) or c:IsLink(2)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,e:GetHandler()) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,e:GetHandler())
Duel.Release(g,REASON_COST)
local tc=Duel.GetOperatedGroup():GetFirst()
e:SetLabelObject(tc)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) and rc:IsDestructable()
and (e:GetLabelObject():IsRank(2) or e:GetLabelObject():IsLink(2))
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Destroy(rc,REASON_EFFECT)
end
end
function cm.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonable(true,nil) or e:GetHandler():IsMSetable(true,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Summon(tp,c,true,nil)
end
function cm.lkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function cm.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
function cm.xyzfilter(c)
return c:IsXyzSummonable(nil)
end
function cm.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
--多元卫星闪灵 皮克精队
local m=60001162
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon1)
e1:SetTarget(cm.sptg1)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_HAND)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,12345678)
e3:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_CHAIN_END+TIMING_END_PHASE)
e3:SetCost(cm.sumcost)
e3:SetTarget(cm.sumtg)
e3:SetOperation(cm.sumop)
c:RegisterEffect(e3)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCountLimit(1,m+10000000)
e2:SetCondition(cm.atkcon)
e2:SetCost(cm.atkcost)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
--link summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.lkcon)
e1:SetTarget(cm.lktg)
e1:SetOperation(cm.lkop)
c:RegisterEffect(e1)
--xyz summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(cm.lkcon)
e4:SetTarget(cm.xyztg)
e4:SetOperation(cm.xyzop)
c:RegisterEffect(e4)
end
function cm.cfilter(c)
return c:IsFaceup() and (c:IsLevel(2) or c:IsRank(2))
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cmcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop1(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 cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(tp)
return a and d and (a:IsLevel(2) or a:IsRank(2) or a:IsLink(2)) and a~=e:GetHandler()
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(tp)
if not a:IsRelateToBattle() or not d:IsRelateToBattle() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(d:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
a:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
a:RegisterEffect(e2)
end
function cm.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonable(true,nil) or e:GetHandler():IsMSetable(true,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Summon(tp,c,true,nil)
end
function cm.lkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function cm.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
function cm.xyzfilter(c)
return c:IsXyzSummonable(nil)
end
function cm.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
--巨大喷流多元卫星闪灵
local m=60001163
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,cm.mfilter,nil,2,2)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetCondition(cm.adcon)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.mfilter(c,xyzc)
return c:IsXyzLevel(xyzc,2) or c:IsLink(2)
end
function cm.adcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function cm.atkval(e,c)
return c:GetBaseAttack()*2
end
function cm.spfilter(c,e,tp)
return c:IsLevel(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,1)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsLevel(2) and not c:IsRank(2) and not c:IsLink(2)
end
--多元卫星闪灵·淘气精灵
local m=60001164
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2,cm.lcheck)
--cannot link material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(cm.lmlimit)
c:RegisterEffect(e1)
--cannot be effect target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(cm.etlimit)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.lcheck(g,lc)
return g:IsExists(Card.IsLevel,1,nil,2) or g:IsExists(Card.IsRank,1,nil,2) or g:IsExists(Card.IsLink,1,nil,2)
end
function cm.lmlimit(e)
local c=e:GetHandler()
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function cm.etlimit(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.spfilter(c,e,tp,check)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLevel(2) or (check and (c:IsRank(2) or c:IsLink(2))))
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local check=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp,check) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,check) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,check)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--多元卫星闪灵启辉器
local m=60001165
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
c:RegisterEffect(e2)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x180) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-tc:GetBaseAttack())
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsLevel(2) and not c:IsRank(2) and not c:IsLink(2)
end
--多元卫星闪灵伽马暴
local m=60001166
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCondition(aux.dscon)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.atktg)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
c:RegisterEffect(e3)
end
function cm.filter(c)
return (c:IsLevel(2) or c:IsRank(2) or c:IsLink(2)) and c:IsFaceup()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1400)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function cm.atkfilter(c)
return (c:IsLevel(2) or c:IsRank(2) or c:IsLink(2)) and c:IsFaceup()
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.atkfilter(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) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1400)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e1)
end
end
...@@ -55,7 +55,7 @@ function c79029505.initial_effect(c) ...@@ -55,7 +55,7 @@ function c79029505.initial_effect(c)
e6:SetValue(1) e6:SetValue(1)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
c79029505.xyz_number=88 aux.xyz_number[79029505]=88
function c79029505.sprfilter(c) function c79029505.sprfilter(c)
return c:GetOriginalLevel()==10 and c:IsFaceup() and c:IsCanOverlay() return c:GetOriginalLevel()==10 and c:IsFaceup() and c:IsCanOverlay()
end end
......
...@@ -59,7 +59,7 @@ function c79029506.initial_effect(c) ...@@ -59,7 +59,7 @@ function c79029506.initial_effect(c)
e7:SetOperation(c79029506.spop) e7:SetOperation(c79029506.spop)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
c79029506.xyz_number=5 aux.xyz_number[79029506]=5
function c79029506.atkval(e,c) function c79029506.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup() local g=e:GetHandler():GetOverlayGroup()
return g:GetCount()*1500 return g:GetCount()*1500
......
...@@ -49,7 +49,7 @@ function c79029515.initial_effect(c) ...@@ -49,7 +49,7 @@ function c79029515.initial_effect(c)
e1:SetValue(c79029515.splimit) e1:SetValue(c79029515.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c79029515.xyz_number=103 aux.xyz_number[79029515]=103
function c79029515.splimit(e,se,sp,st) function c79029515.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x95) and se:GetHandler():IsType(TYPE_SPELL) return se:GetHandler():IsSetCard(0x95) and se:GetHandler():IsType(TYPE_SPELL)
end end
......
...@@ -41,7 +41,7 @@ function c79029516.initial_effect(c) ...@@ -41,7 +41,7 @@ function c79029516.initial_effect(c)
e4:SetOperation(c79029516.spop) e4:SetOperation(c79029516.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c79029516.xyz_number=53 aux.xyz_number[79029516]=53
function c79029516.ovfilter(c) function c79029516.ovfilter(c)
return c:IsFaceup() and c:IsCode(23998625) return c:IsFaceup() and c:IsCode(23998625)
end end
......
...@@ -45,7 +45,7 @@ function c79029520.initial_effect(c) ...@@ -45,7 +45,7 @@ function c79029520.initial_effect(c)
e3:SetOperation(c79029520.spop1) e3:SetOperation(c79029520.spop1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c79029520.xyz_number=62 aux.xyz_number[79029520]=62
function c79029520.atkval(e,c) function c79029520.atkval(e,c)
return c:GetOverlayCount()*500 return c:GetOverlayCount()*500
end end
......
...@@ -38,7 +38,7 @@ function c79029521.initial_effect(c) ...@@ -38,7 +38,7 @@ function c79029521.initial_effect(c)
e5:SetCode(EVENT_BECOME_TARGET) e5:SetCode(EVENT_BECOME_TARGET)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c79029521.xyz_number=69 aux.xyz_number[79029521]=69
function c79029521.effilter(c) function c79029521.effilter(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() return c:IsType(TYPE_MONSTER) and c:IsFaceup()
end end
......
...@@ -33,6 +33,7 @@ function c79029525.initial_effect(c) ...@@ -33,6 +33,7 @@ function c79029525.initial_effect(c)
e3:SetOperation(c79029525.op) e3:SetOperation(c79029525.op)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
aux.xyz_number[79029525]=65
function c79029525.eqcon(e,tp,eg,ep,ev,re,r,rp) function c79029525.eqcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject() local ec=e:GetLabelObject()
return ec==nil or ec:GetFlagEffect(79029525)==0 and e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return ec==nil or ec:GetFlagEffect(79029525)==0 and e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
......
...@@ -53,7 +53,7 @@ function c79029526.initial_effect(c) ...@@ -53,7 +53,7 @@ function c79029526.initial_effect(c)
e1:SetValue(c79029526.splimit) e1:SetValue(c79029526.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c79029526.xyz_number=101 aux.xyz_number[79029526]=101
function c79029526.splimit(e,se,sp,st) function c79029526.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x95) and se:GetHandler():IsType(TYPE_SPELL) return se:GetHandler():IsSetCard(0x95) and se:GetHandler():IsType(TYPE_SPELL)
end end
......
...@@ -5,6 +5,13 @@ function c79029566.initial_effect(c) ...@@ -5,6 +5,13 @@ function c79029566.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,c79029566.matfilter1,c79029566.matfilter2,1,99,true) aux.AddFusionProcFunFunRep(c,c79029566.matfilter1,c79029566.matfilter2,1,99,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,LOCATION_MZONE,Duel.SendtoGrave,REASON_COST) aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,LOCATION_MZONE,Duel.SendtoGrave,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c79029566.xsplimit)
c:RegisterEffect(e1)
--negate --negate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79029566,0)) e1:SetDescription(aux.Stringid(79029566,0))
...@@ -38,12 +45,8 @@ function c79029566.initial_effect(c) ...@@ -38,12 +45,8 @@ function c79029566.initial_effect(c)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c79029566.checkop(e,tp,eg,ep,ev,re,r,rp) function c79029566.xsplimit(e,se,sp,st)
local tc=eg:GetFirst() return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),79029566,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end end
function c79029566.matfilter1(c) function c79029566.matfilter1(c)
return c:GetSequence()>4 return c:GetSequence()>4
......
--真龙的护灵术
function c88990222.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88990222,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,88990222)
e2:SetCost(c88990222.cost)
e2:SetCondition(c88990222.sccon)
e2:SetOperation(c88990222.spop)
c:RegisterEffect(e2)
--tribute summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88990222,1))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,35125880)
e3:SetCondition(c88990222.sumcon)
e3:SetCost(c88990222.cost)
e3:SetTarget(c88990222.sumtg)
e3:SetOperation(c88990222.sumop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(88990222,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,35125881)
e4:SetCondition(c88990222.descon)
e4:SetTarget(c88990222.destg)
e4:SetOperation(c88990222.desop)
c:RegisterEffect(e4)
end
function c88990222.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,88990222)==0 end
Duel.RegisterFlagEffect(tp,88990222,RESET_CHAIN,0,1)
end
function c88990222.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2
end
function c88990222.spop(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c88990222.indtg)
e1:SetReset(RESET_PHASE+ph)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c88990222.indtg)
e2:SetReset(RESET_PHASE+ph)
e2:SetValue(1)
Duel.RegisterEffect(e2,tp)
end
function c88990222.indtg(e,c)
return c:IsSetCard(0xf9) and c:IsFaceup()
end
function c88990222.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c88990222.sumfilter(c)
return c:IsSetCard(0xf9) and c:IsSummonable(true,nil,1)
end
function c88990222.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88990222.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c88990222.sumop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c88990222.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil,1)
end
end
function c88990222.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_SZONE)
end
function c88990222.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c88990222.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
[LocalizedFileNames] [LocalizedFileNames]
c19980109.lua=@c19980109.lua,0 c74506078.lua=@c74506078.lua,0
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