Commit dbaea568 authored by TanakaKotoha's avatar TanakaKotoha

update

parent 3fc11b58
#created by ...
#main
9910295
9910297
9910501
9910503
9910504
9910505
9910507
9910509
9910510
9910511
9910512
9910514
9910515
9910517
9910519
9910521
12026013
12026028
12044011
12044019
12044034
12044044
12044060
12044083
12044088
#extra
9910246
9910294
12008008
12008025
12008035
12030021
12044001
12044003
12044052
!side
#created by ...
#main
16105000
16105004
16105008
16105010
16105020
16105026
16105030
16105110
16400022
16400023
16400024
17061500
26810024
26810025
26810026
26818003
26818004
26818044
26818045
26818070
28303001
28315011
31300000
33710901
33710902
33710903
33710904
33710905
33710906
33710907
33710909
33710910
33710913
33710920
33710921
33710924
#extra
16105012
16105014
16105024
16105028
16105038
16105108
16400020
33710908
33710911
33710912
33710915
33710916
33710917
33710918
33710922
!side
#created by ...
#main
60150501
60150502
60150503
60150504
60150505
60150506
60150507
60150508
60150509
60150518
60150525
60150533
60150534
60150540
60150545
60150547
60150548
60150549
60150550
60150551
60150801
60150802
60150803
60150804
60150805
60150806
60150810
60150811
60150812
60150813
60150815
60150817
60150819
60150822
#extra
60150510
60150511
60150513
60150514
60150515
60150516
60150519
60150520
60150522
60150530
60150535
60150536
60150537
60150538
60150541
!side
60150542
60150543
60150544
60150546
60150807
60150808
60150809
60150814
60150816
60150818
60150820
60150821
60159906
60159945
#created by ...
#main
72410080
72410090
72410180
72410220
72410230
72410240
81005072
81008015
81008016
81011050
81016001
81016002
81016003
81016005
81016009
81016010
81016013
81016014
81016015
81016017
81016018
81016019
81016020
81016025
81016027
81018054
81024031
81024032
81027033
81027034
81027035
81027036
81040066
#extra
72410100
72410110
72410120
72410130
72410140
72410150
75641008
81005037
81011030
81013012
81013026
81048001
!side
#created by ...
#main
1170018
16160004
16160005
16161010
26803020
26807003
33310216
33330048
33330050
33330052
33330053
33330055
33330057
33330058
33405001
33405003
33405004
33405007
33405009
33711004
33711005
33711006
33711007
33711008
33711010
#extra
16105014
26816020
33330049
33330056
33330060
33711001
33711003
33711009
!side
#created by ...
#main
44000001
44000002
44000003
44000004
44000005
44000007
44000008
44000009
44000011
44000012
44000015
44000017
44000018
44000019
65001030
65001032
65001033
65001034
65001035
#extra
44000006
44000010
44000013
44000016
!side
#created by ...
#main
81003023
81011067
81011068
81011069
81013059
81013060
81013061
81013063
81013064
81013065
81013066
81013067
81013068
81013069
81016028
81016029
81016030
81016031
81016032
81016033
81016034
81016035
81016036
81022051
81042011
81042012
81046027
81048021
#extra
81005016
81011070
81013062
81013070
81046028
!side
#created by ...
#main
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
12029400
#extra
12029401
12029401
12029401
12029401
12029401
12029401
12029401
12029401
12029401
12029401
12029401
12029401
12029401
12029401
12029401
!side
No preview for this file type
......@@ -56,6 +56,7 @@
01160043 2 --梦游仙境·柴郡猫
01160201 0 --混沌形态·贞德
01160203 0 --混沌形态·朱丽叶
01170018 2 --天阁
01171001 1 --诺札利亚 辉琉里
01171006 0 --诺札利亚 奥尔黛西亚
#42
......@@ -65,6 +66,9 @@
04210028 2 --猫耳天堂-猫耳的仪式
04210031 1 --猫耳天堂-偶像红豆
04210035 1 --猫耳天堂-偶像巧克力
04210049 0 --手冲魔女-救救猫猫
04210051 0 --冬幽狐白雪回音
04210159 2 --念气波导喵喵拳
04212301 2 --罗罗娜的工作室-罗罗娜
04212306 2 --罗罗娜的工作室
04212307 2 --托托莉的工作室
......@@ -75,7 +79,6 @@
04241002 2 --魅魔的后辈是手冲魔女
04241010 1 --手冲魔女-白兔爱丽丝
04241011 1 --手冲魔女-白兔爱丽丝
04210159 2 --念气波导喵喵拳
#99
09910238 1 --澄澈飞翔 有坂真白
09910276 1 --星幽使 在原七海
......@@ -294,8 +297,8 @@
14801271 0 --星际战舰 电力干扰器
14801734 0 --星际战舰 环绕级工业舰
#150
15000252 0 --永寂之旅人·安德萝
15000258 0 --永寂之先锋·乔碧萝
15000252 1 --永寂之旅人·安德萝
15000258 0 --永寂之先祷·安提诺亚
15002000 0 --神名浅海
15002011 0 --郁屈的哀乐
15002020 0 --墟伪的审判
......@@ -312,9 +315,9 @@
16101147 0 --统括的指名者
16101153 0 --一点也不苦涩的选择
16101157 0 --神秘召唤前准备
16102003 1 --SCP基金会 Doctors
16102003 2 --SCP基金会 Doctors
16102007 1 --SCP-247 无害的小猫
16102011 0 --SCP-2000 机械降神
16102011 1 --SCP-2000 机械降神
16104206 0 --不灭的圣光教团国
16104218 1 --教团骑士的行军
16104220 0 --直到最后一刻
......@@ -322,6 +325,7 @@
16104240 0 --此为不屈之荣光
16104242 0 --不屈的一战
16104400 0 --与天界的链接
16104410 0 --天界的瓦尔基里
16104600 0 --异种 达摩不倒翁
16104602 0 --异种 白
16104604 0 --异种 罔魂
......@@ -336,6 +340,8 @@
16104624 0 --异种 兔子
16105016 1 --对Mystic的探究
16105036 0 --记录的神因子
16160004 1 --憎恶的狂战士 兰斯洛特
16161010 0 --卡多克·泽姆露普斯
#162
16200000 1 --单推人询问
16200001 1 --单推人宣言
......@@ -359,6 +365,7 @@
17060840 1 --苍空的少女·露莉雅
17060940 0 --苍空的狙击手·席尔瓦
17061410 0 --魅眼的星晶兽 斯忒诺
17061900 0 --PBFA 苏醒的亚兹拉尔
#180
18001001 1 --能量的冒险遗产
18001006 1 --搜寻的冒险遗产
......@@ -436,7 +443,7 @@
26801004 0 --樱木真乃的卡拉OK
26801005 1 --樱木真乃的读书之秋
26801009 1 --樱木真乃的小礼物
26802007 1 --Nation Blue·高垣枫
26802007 2 --Nation Blue·高垣枫
26803002 1 --真实的一瞬
26803013 1 --无火的尘埃
26803014 0 --小巷探秘
......@@ -561,7 +568,7 @@
33330602 1 --相对性理性缺失
33331100 1 --小狐
33331106 1 --神祭小狐 狐说草
33331110 1 --天降小狐 狐星雨
33331110 2 --天降小狐 狐星雨
33339011 2 --星锁之环 跃迁之门
33339013 2 --星锁精灵 降生
33340002 1 --增殖的瓜
......@@ -678,6 +685,8 @@
33701317 0 --卓越融合
33710909 0 --快乐八重彩
33710913 0 --永恒的约定
33711003 1 --疑虚拟YouTuber 星野尼亚
33711004 1 --感官超载
#375
37564012 0 --元灵毁灭者·Aya Ayane
37564041 0 --阎-少女之梦·虚无的世界
......@@ -853,13 +862,14 @@
57320013 1 --少女人偶师·幽幽
57340001 0 --灵樱的永眠
#601
60150504 1 --幻想曲 极北的冻境
60150541 1 --幻想曲的回转乐章
60150616 1 --千夜 黑白
60150617 2 --千夜 女王
60150624 1 --千夜 天堂武装
60150802 2 --爱莎-虚无坍缩
60150810 2 --终焉的约定
60150811 1 --转生之翼
60150817 2 --爱莎-最佳拍档
60150919 2 --FantasiaT the Temptation of Mona
60150931 1 --Unlimited Cloister
60150932 1 --FT the Ice Sill
......@@ -896,7 +906,7 @@
65010018 0 --斩尽杀绝凶猛龙
65010020 0 --『Lost One的号哭』美竹兰
65010022 0 --水晶之歌 凑友希那
65010032 0 --『Shuwarin' Dreamin』丸山彩
65010032 1 --『Shuwarin' Dreamin』丸山彩
65010036 0 --幻梦迷境 维斯
65010038 0 --幻梦迷境 超高速
65010040 0 --幻梦迷境 斯坦奇卡
......@@ -1040,14 +1050,15 @@
81005053 0 --黑野紫
81005076 1 --白雪安娜·夏恋
81008016 1 --不被吓个半死是不可能的
81009006 2 --不悦目光·橘爱丽丝
81010021 1 --高空坠落
81011028 0 --白雪安娜·天蓝
81011053 0 --水晶艾蕾娜·花海
81011102 1 --橘花音·午后之音
81011120 2 --橘花音·淡蓝之音
81012012 1 --浅绿时间·爱米莉
81013017 1 --薇薇安·伊文捷琳 θ
81013050 0 --原田秋叶·夏祭
81013060 1 --克里斯汀·罗森塔尔-c239b3
81014012 0 --极光导雷弹
81015002 1 --剧场·北上丽花
81015011 1 --MS-765改·北上丽花
......@@ -1090,8 +1101,8 @@
82204262 1 --灵魂锁链
82204263 0 --充能棒
82204264 1 --冥界花
82206078 1 --邪界幻灵·天邪龙王
82206079 1 --邪界幻灵·咤克斯
82206078 2 --邪界幻灵·天邪龙王
82206079 2 --邪界幻灵·咤克斯
82228497 0 --战之精灵王 盖亚
82228498 0 --暗之精灵王 布莱克
82228499 1 --超能之精灵王 缪斯
......
expansions/pics/44000001.jpg

140 KB | W: | H:

expansions/pics/44000001.jpg

161 KB | W: | H:

expansions/pics/44000001.jpg
expansions/pics/44000001.jpg
expansions/pics/44000001.jpg
expansions/pics/44000001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/44000002.jpg

125 KB | W: | H:

expansions/pics/44000002.jpg

141 KB | W: | H:

expansions/pics/44000002.jpg
expansions/pics/44000002.jpg
expansions/pics/44000002.jpg
expansions/pics/44000002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/44000003.jpg

148 KB | W: | H:

expansions/pics/44000003.jpg

169 KB | W: | H:

expansions/pics/44000003.jpg
expansions/pics/44000003.jpg
expansions/pics/44000003.jpg
expansions/pics/44000003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/44000004.jpg

129 KB | W: | H:

expansions/pics/44000004.jpg

144 KB | W: | H:

expansions/pics/44000004.jpg
expansions/pics/44000004.jpg
expansions/pics/44000004.jpg
expansions/pics/44000004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/44000005.jpg

108 KB | W: | H:

expansions/pics/44000005.jpg

123 KB | W: | H:

expansions/pics/44000005.jpg
expansions/pics/44000005.jpg
expansions/pics/44000005.jpg
expansions/pics/44000005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/44000006.jpg

178 KB | W: | H:

expansions/pics/44000006.jpg

156 KB | W: | H:

expansions/pics/44000006.jpg
expansions/pics/44000006.jpg
expansions/pics/44000006.jpg
expansions/pics/44000006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/44000007.jpg

142 KB | W: | H:

expansions/pics/44000007.jpg

205 KB | W: | H:

expansions/pics/44000007.jpg
expansions/pics/44000007.jpg
expansions/pics/44000007.jpg
expansions/pics/44000007.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/44000008.jpg

174 KB | W: | H:

expansions/pics/44000008.jpg

183 KB | W: | H:

expansions/pics/44000008.jpg
expansions/pics/44000008.jpg
expansions/pics/44000008.jpg
expansions/pics/44000008.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/44000009.jpg

126 KB | W: | H:

expansions/pics/44000009.jpg

159 KB | W: | H:

expansions/pics/44000009.jpg
expansions/pics/44000009.jpg
expansions/pics/44000009.jpg
expansions/pics/44000009.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/44000010.jpg

140 KB | W: | H:

expansions/pics/44000010.jpg

191 KB | W: | H:

expansions/pics/44000010.jpg
expansions/pics/44000010.jpg
expansions/pics/44000010.jpg
expansions/pics/44000010.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/44000011.jpg

161 KB | W: | H:

expansions/pics/44000011.jpg

199 KB | W: | H:

expansions/pics/44000011.jpg
expansions/pics/44000011.jpg
expansions/pics/44000011.jpg
expansions/pics/44000011.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/44000012.jpg

170 KB | W: | H:

expansions/pics/44000012.jpg

144 KB | W: | H:

expansions/pics/44000012.jpg
expansions/pics/44000012.jpg
expansions/pics/44000012.jpg
expansions/pics/44000012.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81005016.jpg

66.8 KB | W: | H:

expansions/pics/81005016.jpg

183 KB | W: | H:

expansions/pics/81005016.jpg
expansions/pics/81005016.jpg
expansions/pics/81005016.jpg
expansions/pics/81005016.jpg
  • 2-up
  • Swipe
  • Onion skin
--天阁
function c1170018.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1170018,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1170018)
e1:SetCost(c1170018.cost1)
e1:SetTarget(c1170018.tg1)
e1:SetOperation(c1170018.op1)
c:RegisterEffect(e1)
--
end
--
function c1170018.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 c1170018.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(aux.FALSE)
end
--
function c1170018.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1_2:SetCode(EVENT_CHAIN_SOLVING)
e1_2:SetCondition(c1170018.con1_2)
e1_2:SetOperation(c1170018.op1_2)
e1_2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1_2,tp)
end
--
function c1170018.con1_2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_MONSTER) and bit.band(re:GetActivateLocation(),LOCATION_HAND)~=0
end
--
function c1170018.op1_2(e,tp,eg,ep,ev,re,r,rp)
if not re:GetHandler():IsRelateToEffect(re) then return end
if not re:GetHandler():IsLocation(LOCATION_HAND) then return end
if not Duel.NegateEffect(ev) then return end
Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end
--
Ustable={12033006,37564348,65010020,75732622,21377582,82385847,17035030,14010257,9929398,14010236,12033001,12033015,12008000,33330602,81000000,33330601,12040002,12031001,9047460,78706415,10174057,15341821,82224056,14010148,77707703,33508719,25533642,67441435,12029010,12005018,1111018,1475311,12580477,18144506,26803023,33782437,37520316,37564308,60159910,72892473,44095762,83764718,960007,960010,10700030,81013045,12033012,24224830,52340444,65071030,47475363,73915051,98338152,70342110,76375976,21076084,32828002,5851097,61740673,12008031,41420027,91501248,29401950,8910971,81008000,14785765,33184167,78663366,8814959,97396380,71564252,15397015,63845230,14532163,71197066,31036355,30426226,3549275,33508719,35261759,55144522,67169062,98672567,78474168,51452091,82732705,93016201,40605147,77538567,84749824,25259669,26802001,94656263,17955766,18063928,65367484,53573406,67696066,1833916,81005044,14943837,2460565,77252217,78658564,85306040,71453557,81013010,97077563,81011010,70828912,4031928,15310033,54306223,71645242,269510,38143903,21598948,5318639,81010007,5133471,8267140,3493058,19613556,32723153,95308449,72989439,82301904,9596126,29904964,12044012,12044030,12004006,81014004,12006004,12008027,74064212,60150904,72181263,46247282,41091257,26803038,12037000,12037001,12037002,65848811,59546797,12059000,12059001,60303688,40502912,20584712,71413901,57624336,33330071,25795273,57568840,64034255,63977008,78422252,81044010,2009101,97021916,12011002,12031002,12004002,12004004,3233859,27660735,14558127,52038441,59438931,40975574,98777036,17988746,55326322,9742784,12062001,12062002,12062003,65010069,76865611,65020011,67270095,16632144,60159932,12009043,86784733,97268402,54447022,65010211}
local m=12029400
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetTarget(cm.thtg)
e0:SetOperation(cm.activate)
c:RegisterEffect(e0)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(cm.chlimit)
end
function cm.chlimit(e,ep,tp)
return false
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local code1=readRandomValueInTable(Ustable)
local code2=readRandomValueInTable(Ustable)
local code3=readRandomValueInTable(Ustable)
local token1=Duel.CreateToken(tp,code1)
local token2=Duel.CreateToken(tp,code2)
local token3=Duel.CreateToken(tp,code3)
local tdg=Group.CreateGroup()
tdg:AddCard(token1)
tdg:AddCard(token2)
tdg:AddCard(token3)
local thg=tdg:Select(tp,1,1,nil)
local tc=thg:GetFirst()
Duel.Remove(tc,POS_FACEDOWN,0x20400)
Duel.BreakEffect()
tc:CompleteProcedure()
Duel.ShuffleDeck(tp)
Duel.SendtoHand(tc,tp,0x20400)
end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local code1=readRandomValueInTable(Ustable)
local code2=readRandomValueInTable(Ustable)
local code3=readRandomValueInTable(Ustable)
local token1=Duel.CreateToken(tp,code1)
local token2=Duel.CreateToken(tp,code2)
local token3=Duel.CreateToken(tp,code3)
local tdg=Group.CreateGroup()
tdg:AddCard(token1)
tdg:AddCard(token2)
tdg:AddCard(token3)
local thg=tdg:Select(tp,1,1,nil)
local tcode=thg:GetFirst():GetOriginalCodeRule()
local c=e:GetHandler()
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
c:CancelToGrave()
Duel.SendtoHand(c,nil,REASON_EFFECT)
c:CompleteProcedure()
end
function readRandomValueInTable(Table)
return Table[math.random(1,#Table)]
end
\ No newline at end of file
Ustable1={98127546,82224035,26807007,47530171,21887175,31833038,85289965,86066372,81000001,38342335,45819647,2857636,81013052,81011048,81011049,26819002,75452921,81005014,50588353,81009001,65741786,81009002,47590893,60159931,94259633}
Ustable2={12029002,12029031,12009062,42421606,71594310,16195942,84013237,80796456,54719828,61399402,90590303,26808005,59071624,51735257,48739166,55470553,81048001,62709239,93730230,15914410,81005037,78156759,37564346,82633039}
Ustable3={25862681,29071332,70913714,81011005,26593852,76359406,88033975,42110604,97007933,12003019,76547525,82044279,26807006,33698022,40509732,26806046,73580471,63533837,98506199,27548199,39765958,83994433,44508095,52687916,8561192,41517789,80321197,33701324}
--暴风连接
local m=12029401
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(cm.chlimit)
end
function cm.chlimit(e,ep,tp)
return false
end
function cm.thop1(e,tp,eg,ep,ev,re,r,rp)
local code1=readRandomValueInTable(Ustable1)
local code2=readRandomValueInTable(Ustable2)
local code3=readRandomValueInTable(Ustable3)
local token1=Duel.CreateToken(tp,code1)
local token2=Duel.CreateToken(tp,code2)
local token3=Duel.CreateToken(tp,code3)
local tdg=Group.CreateGroup()
tdg:AddCard(token1)
tdg:AddCard(token2)
tdg:AddCard(token3)
local thg=tdg:Select(tp,1,1,nil)
local tcode=thg:GetFirst():GetOriginalCodeRule()
local c=e:GetHandler()
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
c:CompleteProcedure()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,1,m)
Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_RULE)
local code1=readRandomValueInTable(Ustable1)
local code2=readRandomValueInTable(Ustable2)
local code3=readRandomValueInTable(Ustable3)
local token1=Duel.CreateToken(tp,code1)
local token2=Duel.CreateToken(tp,code2)
local token3=Duel.CreateToken(tp,code3)
local tdg=Group.CreateGroup()
tdg:AddCard(token1)
tdg:AddCard(token2)
tdg:AddCard(token3)
local thg=tdg:Select(tp,1,1,nil)
local tc=thg:GetFirst()
Duel.Remove(tc,POS_FACEDOWN,REASON_RULE)
Duel.BreakEffect()
tc:CompleteProcedure()
Duel.ShuffleDeck(tp)
Duel.SendtoDeck(tc,tp,2,REASON_EFFECT)
end
function readRandomValueInTable(Table)
return Table[math.random(1,#Table)]
end
\ No newline at end of file
......@@ -4,96 +4,4 @@ function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.mfilter,1,1)
--SendtoGrave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.tgcon)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.mfilter(c)
return c:IsLinkType(TYPE_XYZ) and ((c:GetRank()>=10 and c:IsRace(RACE_FAIRY)) or c:IsSetCard(0xcc3))
end
function cm.tgfilter(c,e,tp)
return c:IsLevelAbove(10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsRace(RACE_FAIRY)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil,e,tp) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
end
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function cm.thfilter(c,e,tp)
return c:IsRace(RACE_FAIRY) and c:IsLevelAbove(10) and c:IsAbleToHand()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,2,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local thg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,2,2,nil)
if thg:GetCount()==2 then
if Duel.SendtoHand(thg,nil,REASON_EFFECT)~=2 then return end
Duel.ConfirmCards(1-tp,thg)
local og=Duel.GetOperatedGroup()
local sc=og:GetFirst()
while sc do
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(1,1)
e5:SetTarget(cm.distg)
e5:SetLabelObject(sc)
e:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e5,tp)
sc=og:GetNext()
end
end
end
function cm.distg(e,c)
local sc=e:GetLabelObject()
return c:IsOriginalCodeRule(sc:GetOriginalCodeRule())
end
\ No newline at end of file
--创命的大魔术师
if not pcall(function() require("expansions/script/c16104200") end) then require("script/c16104200") end
function c16160004.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
--------------"Pendulum EFFECT"----------------
--cannot sendtohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16160004,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c16160004.condition)
e1:SetCost(c16160004.cscost)
e1:SetTarget(c16160004.cstarget)
e1:SetOperation(c16160004.csoperation)
c:RegisterEffect(e1)
--Token im
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(c16160004.eftg)
e2:SetValue(c16160004.efilter)
c:RegisterEffect(e2)
--cannot release
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_RELEASE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_PZONE)
e3:SetTargetRange(0,1)
e3:SetTarget(c16160004.rellimit)
c:RegisterEffect(e3)
--------------"Monster EFFECT"----------------
--Removed Card Cannot Effect
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_FIELD)
e1_1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1_1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1_1:SetRange(LOCATION_MZONE)
e1_1:SetTargetRange(1,1)
e1_1:SetValue(c16160004.aclimit)
c:RegisterEffect(e1_1)
--SpecialSummon Gensyonohoto Token
local e2_1=Effect.CreateEffect(c)
e2_1:SetDescription(aux.Stringid(16160001,1))
e2_1:SetCategory(CATEGORY_DESTROY)
e2_1:SetType(EFFECT_TYPE_QUICK_O)
e2_1:SetRange(LOCATION_MZONE)
e2_1:SetCode(EVENT_FREE_CHAIN)
e2_1:SetCountLimit(1)
e2_1:SetCost(c16160004.tkcost)
e2_1:SetTarget(c16160004.tktg)
e2_1:SetOperation(c16160004.tkop)
c:RegisterEffect(e2_1)
--equip
local e3_1=Effect.CreateEffect(c)
e3_1:SetDescription(aux.Stringid(16160004,2))
e3_1:SetCategory(CATEGORY_EQUIP)
e3_1:SetCode(EVENT_DESTROYED)
e3_1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3_1:SetRange(LOCATION_MZONE)
e3_1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3_1:SetCondition(c16160004.eqcon)
e3_1:SetTarget(c16160004.eqtg)
e3_1:SetOperation(c16160004.eqop)
c:RegisterEffect(e3_1)
end
function c16160004.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function c16160004.cscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c16160004.cstarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c16160004.csoperation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
if Duel.SendtoHand(e:GetHandler(),tp,REASON_EFFECT)~=0 then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(0,1)
e2:SetCondition(c16160004.condition1)
e2:SetValue(c16160004.aclimit1)
e2:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e2,tp)
end
end
end
function c16160004.condition1(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
--
function c16160004.aclimit1(e,re,tp)
return true
end
function c16160004.thtarget()
return true
end
function c16160004.eftg(e,c)
return true
end
function c16160004.efilter(e,te)
return e:GetHandlerPlayer()~=te:GetHandlerPlayer() and (Duel.GetCurrentPhase()>PHASE_BATTLE or Duel.GetCurrentPhase()<PHASE_BATTLE_START)
end
function c16160004.rellimit(e,c,tp,sumtp)
return c:IsType(TYPE_TOKEN) and c:IsControler(e:GetHandlerPlayer())
end
function c16160004.aclimit(e,re,tp)
local rc=re:GetHandler()
return rc:IsStatus(STATUS_BATTLE_DESTROYED) or rc:IsComplexReason(REASON_DESTROY,true,REASON_EFFECT,REASON_BATTLE)
end
function c16160004.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,3000) end
Duel.PayLPCost(tp,3000)
end
function c16160004.desfilter1(c,g)
return g:IsContains(c)
end
function c16160004.desfilter(c,sc)
local sg=sc:GetEquipGroup()
sg:AddCard(sc)
for tc in aux.Next(sg) do
local cg=tc:GetColumnGroup()
local num=Duel.GetMatchingGroupCount(c16160004.desfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,sg,cg)
if num>0 then
return true end
end
end
function c16160004.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipCount()>0 and Duel.IsExistingMatchingCard(c16160004.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,nil,0,0)
end
function c16160004.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=c:GetEquipGroup()
local deg=Group.CreateGroup()
local gg=Group.FromCards(c)
gg:Merge(sg)
if c:IsRelateToEffect(e) and sg:GetCount()>0 then
for tc in aux.Next(sg) do
local cg=tc:GetColumnGroup()
local g1=Duel.GetMatchingGroup(c16160004.desfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,gg,cg)
if g1 then
deg:Merge(g1)
end
end
Duel.Destroy(deg,REASON_EFFECT)
end
end
function c16160004.eqfilter(c,sc)
if c:GetReasonCard() and sc then
return c:GetReasonCard()==sc
elseif c:GetReasonEffect():GetHandler() and sc then
return c:GetReasonEffect():GetHandler()==sc
else
return false
end
end
function c16160004.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:FilterCount(c16160004.eqfilter,nil,e:GetHandler())>0
end
function c16160004.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c16160004.eqfilter,1,nil,e:GetHandler()) end
local sg=eg:Filter(c16160004.eqfilter,nil,e:GetHandler())
Duel.SetTargetCard(sg)
end
function c16160004.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
for tc in aux.Next(g) do
if tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c16160004.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(1000)
tc:RegisterEffect(e2)
local e3=e3:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e3)
end
end
end
function c16160004.eqlimit(e,c)
return e:GetOwner()==c
end
--狂野的爆发
function c16160005.initial_effect(c)
aux.AddCodeList(c,16160004)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16160005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c16160005.target)
e1:SetOperation(c16160005.activate)
c:RegisterEffect(e1)
--Set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16160005,2))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCondition(c16160005.rmcon)
e2:SetTarget(c16160005.rmtg)
e2:SetOperation(c16160005.rmop)
c:RegisterEffect(e2)
end
function c16160005.dfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsAbleToGrave() and c:IsLevelAbove(1)
end
function c16160005.filter(c,e,tp)
return c:IsCode(16160004)
end
function c16160005.rcheck(tp,g,c)
return g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=99
end
function c16160005.rgcheck(g)
return g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=99
end
function c16160005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
local dg=Duel.GetMatchingGroup(c16160005.dfilter,tp,LOCATION_EXTRA,0,nil)
aux.RCheckAdditional=c16160005.rcheck
aux.RGCheckAdditional=c16160005.rgcheck
local res=Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil,c16160005.filter,e,tp,mg,dg,Card.GetLevel,"Equal")
aux.RCheckAdditional=nil
aux.RGCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_EXTRA)
end
function c16160005.activate(e,tp,eg,ep,ev,re,r,rp)
local m=Duel.GetRitualMaterial(tp)
local dg=Duel.GetMatchingGroup(c16160005.dfilter,tp,LOCATION_EXTRA,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
aux.RCheckAdditional=c16160005.rcheck
aux.RGCheckAdditional=c16160005.rgcheck
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(aux.RitualUltimateFilter),tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,nil,c16160005.filter,e,tp,m,dg,Card.GetLevel,"Equal")
local tc=tg:GetFirst()
if tc then
local mg=m:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:Merge(dg)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(16160005,1))
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Equal")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Equal")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then
aux.RCheckAdditional=nil
aux.RGCheckAdditional=nil
return
end
tc:SetMaterial(mat)
local dmat=mat:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
if dmat:GetCount()>0 then
mat:Sub(dmat)
Duel.SendtoGrave(dmat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
end
if mat:GetCount()>0 then
Duel.ReleaseRitualMaterial(mat)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
aux.RCheckAdditional=nil
aux.RGCheckAdditional=nil
end
function c16160005.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=eg:GetFirst()
return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE)
and rc:IsFaceup() and rc:IsControler(tp)
end
function c16160005.rmtg(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,LOCATION_GRAVE)
end
function c16160005.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if not e:GetHandler():IsRelateToEffect(e) then return end
if tc and e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.ChainAttack()
Duel.SendtoHand(e:GetHandler(),tp,REASON_EFFECT)
end
end
\ No newline at end of file
--卡多克·泽姆露普斯
function c16161010.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
-------------P effect
--cannot sendtohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16161010,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,16161010)
e1:SetCost(c16161010.cscost)
e1:SetTarget(c16161010.cstarget)
e1:SetOperation(c16161010.csoperation)
c:RegisterEffect(e1)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(1,0)
e2:SetTarget(c16161010.splimit)
c:RegisterEffect(e2)
-----------Monster Effect
local e1_1=Effect.CreateEffect(c)
e1_1:SetDescription(aux.Stringid(16161010,1))
e1_1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_RECOVER)
e1_1:SetType(EFFECT_TYPE_IGNITION)
e1_1:SetCode(EVENT_FREE_CHAIN)
e1_1:SetRange(LOCATION_MZONE)
e1_1:SetCountLimit(1)
e1_1:SetTarget(c16161010.thtarget)
e1_1:SetOperation(c16161010.thoperation)
c:RegisterEffect(e1_1)
local e2_1=Effect.CreateEffect(c)
e2_1:SetDescription(aux.Stringid(16161010,4))
e2_1:SetCategory(CATEGORY_TOHAND)
e2_1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2_1:SetCode(EVENT_BE_MATERIAL)
e2_1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2_1:SetCondition(c16161010.reccon)
e2_1:SetTarget(c16161010.rectg)
e2_1:SetOperation(c16161010.recop)
c:RegisterEffect(e2_1)
end
function c16161010.cscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.Release(g,REASON_COST)
end
function c16161010.thfilter(c)
return c:IsAbleToHand() and c:IsLevel(10) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM)
end
function c16161010.cstarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16161010.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0)
end
function c16161010.csoperation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
if Duel.IsExistingMatchingCard(c16161010.thfilter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16161010.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
end
end
function c16161010.splimit(e,c,tp,sumtp,sumpos)
return not c:IsLevel(10) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c16161010.thfilter2(c)
return c:IsAbleToHand() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL)
end
function c16161010.tefilter(c)
return c:IsAbleToExtra() and c:IsType(TYPE_PENDULUM)
end
function c16161010.thtarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16161010.thfilter2,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c16161010.tefilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,nil,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,0)
end
function c16161010.thoperation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c16161010.thfilter2,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToExtra,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(16161010,2))
local g=Duel.SelectMatchingCard(tp,c16161010.tefilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoExtraP(g,tp,REASON_EFFECT)~=0 then
Duel.Recover(tp,(g:GetFirst():GetLevel()+g:GetFirst():GetRank())*500,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local thg=Duel.SelectMatchingCard(tp,c16161010.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
if thg:GetCount()>0 then
Duel.SendtoHand(thg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,thg)
end
end
end
end
end
function c16161010.reccon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
return rc:IsType(TYPE_RITUAL) and r & REASON_RITUAL+REASON_SPSUMMON ~=0
end
function c16161010.filter(c)
return c:IsAbleToHand() and c:IsType(TYPE_RITUAL)
end
function c16161010.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16161010.filter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
end
function c16161010.recop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c16161010.filter,tp,LOCATION_EXTRA,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16161010.filter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
tc=g:GetFirst()
if not tc:IsForbidden() and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and Duel.SelectYesNo(tp,aux.Stringid(16161010,3)) then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
else
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(tp,tc)
end
end
end
--THANK YOU FOR PLAYING
local m=26803020
local cm=_G["c"..m]
function cm.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.damtg)
e1:SetOperation(cm.damop)
c:RegisterEffect(e1)
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(tp,0)
end
--终幕旧约
local m=26807003
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DRAW_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(cm.fuslimit)
Duel.RegisterEffect(e3,tp)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
Duel.RegisterEffect(e4,tp)
local e5=e1:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
Duel.RegisterEffect(e5,tp)
local e6=e1:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
Duel.RegisterEffect(e6,tp)
end
function cm.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
--扶摇直上·苍穹
local m=26816020
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,3)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.target(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(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_HAND)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
function cm.thfilter(c)
return c:IsAttack(2200) and c:IsDefense(600) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
local m=33310216
local cm=_G["c"..m]
cm.name="空想印记 龙栖图腾"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
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)
end
function cm.filter(c)
return c:IsSetCard(0x551) and c:IsAbleToDeck()
end
function cm.count(c)
return c:IsLocation(LOCATION_DECK)
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x551)
end
function cm.thfilter(c)
return c:IsSetCard(0x551) and c:IsAbleToHand()
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x551) 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.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,5)
Duel.HintSelection(sg)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
local ct=Duel.GetOperatedGroup():FilterCount(cm.count,nil)
Duel.ShuffleDeck(tp)
if ct==0 then return end
--Atk Up
local g1=Duel.GetMatchingGroup(cm.atkfilter,tp,LOCATION_MZONE,0,nil)
local sc=g1:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
sc=g1:GetNext()
end
if ct<3 then return end
--Search
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
if ct<5 or Duel.GetMZoneCount(tp)<1 then return end
--Special Summon
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g3=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g3:GetCount()>0 and Duel.SpecialSummon(g3,0,tp,tp,false,false,POS_FACEUP)~=0 then
local atk=g3:GetFirst():GetBaseAttack()
if atk>0 then
local g4=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local sc=g4:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
sc=g4:GetNext()
end
end
end
end
\ No newline at end of file
--天基兵器 达摩克利斯之剑
function c33330048.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_DRAW)
e0:SetCondition(c33330048.regcon)
e0:SetOperation(c33330048.regop)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c33330048.spcon)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--spsummon succes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(c33330048.spsop)
c:RegisterEffect(e2)
--attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLE_START)
e3:SetCondition(c33330048.damcon)
e3:SetOperation(c33330048.damop)
c:RegisterEffect(e3)
end
function c33330048.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()~=0 and Duel.GetAttacker()==e:GetHandler()
end
function c33330048.damop(e,tp,eg,ep,ev,re,r,rp)
local num=e:GetHandler():GetAttack()+Duel.GetAttackTarget():GetAttack()
if Duel.Damage(1-tp,num,REASON_EFFECT)~=0 and Duel.SelectYesNo(tp,aux.Stringid(33330048,1)) then
Duel.SendtoDeck(e:GetHandler():GetBattleTarget(),nil,0,REASON_EFFECT)
end
end
function c33330048.spsop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetColumnGroup()
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and Duel.SelectYesNo(tp,aux.Stringid(33330048,0)) then
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_BATTLE_START,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,1)
e2:SetValue(1)
e2:SetReset(RESET_PHASE+PHASE_BATTLE)
Duel.RegisterEffect(e2,tp)
end
end
function c33330048.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetFlagEffect(tp,33330048)==0 and Duel.GetCurrentPhase()==PHASE_DRAW and c:IsReason(REASON_RULE)
end
function c33330048.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(33330048,0)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1)
c:RegisterEffect(e1)
c:RegisterFlagEffect(33330048,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1,EFFECT_FLAG_CLIENT_HINT,1,0,66)
end
end
function c33330048.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and e:GetHandler():GetFlagEffect(33330048)~=0 and Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
\ No newline at end of file
local m=33330049
local cm=_G["c"..m]
cm.name="造神计划Ⅻ 天刻像"
function cm.initial_effect(c)
c:EnableReviveLimit()
--Link Summon
aux.AddLinkProcedure(c,nil,2,99,cm.lcheck)
--Disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.discon)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetCondition(cm.immcon)
e3:SetTarget(cm.immtg)
e3:SetValue(cm.immval)
c:RegisterEffect(e3)
--Disable Effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DISABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e4:SetCondition(cm.discon2)
e4:SetTarget(cm.distg2)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_DISABLE_TRAPMONSTER)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_CHAIN_SOLVING)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(cm.discon2)
e6:SetOperation(cm.disop2)
c:RegisterEffect(e6)
--Level
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_CHANGE_LEVEL)
e7:SetRange(LOCATION_MZONE)
e7:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e7:SetTarget(cm.lvtg)
e7:SetValue(12)
c:RegisterEffect(e7)
end
--Link Summon
function cm.lcheck(g)
return g:IsExists(Card.IsLevel,1,nil,12)
end
--Disable
function cm.cfilter(c,ec)
if c:IsLocation(LOCATION_MZONE) then
return ec:GetLinkedGroup():IsContains(c)
else
return bit.extract(ec:GetLinkedZone(c:GetPreviousControler()),c:GetPreviousSequence())~=0
end
end
function cm.disfilter(c)
return c:IsFaceup() and c:IsLinkState()
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,e:GetHandler())
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
--Immune
function cm.count(c)
return c:IsFaceup() and (c:IsLevel(12) or c:IsRank(12))
end
function cm.immcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.count,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil)
end
function cm.immtg(e,c)
return e:GetHandler()==c or e:GetHandler():GetLinkedGroup():IsContains(c)
end
function cm.immval(e,te)
return te:GetHandlerPlayer()~=e:GetHandlerPlayer() and not (te:GetOwner():IsLevel(12) or te:GetOwner():IsRank(12))
end
--Disable Effect
function cm.discon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.count,tp,LOCATION_MZONE,LOCATION_MZONE,3,nil)
end
function cm.distg2(e,c)
return not (c:IsLevel(12) or c:IsRank(12))
end
function cm.disop2(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if not (tc:IsLevel(12) or tc:IsRank(12)) then
Duel.NegateEffect(ev)
end
end
--Level
function cm.lvtg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
\ No newline at end of file
local m=33330050
local cm=_G["c"..m]
cm.name="天车之轨"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--Xyz Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
--Activate
function cm.filter(c)
return c:IsLevel(4)
end
function cm.codefilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function cm.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
if Duel.IsExistingMatchingCard(cm.codefilter,tp,0,LOCATION_MZONE,1,nil,tc:GetCode())
and Duel.GetMZoneCount(tp)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--Xyz Summon
function cm.spfilter(c)
return c:IsFaceup() and c:IsLevel(4)
end
function cm.mgfilter(c)
return c:IsFaceup() and c:IsLevel(4)
end
function cm.xyzfilter(c,mg)
return c:IsXyzSummonable(mg,1,99)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spfilter,1,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(cm.mgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,mg) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local mg=Duel.GetMatchingGroup(cm.mgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg)
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(),mg,1,99)
end
end
\ No newline at end of file
local m=33330052
local cm=_G["c"..m]
cm.name="时行沙漏 谬误空间"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Change Effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(cm.chcon)
e2:SetOperation(cm.chop)
c:RegisterEffect(e2)
end
--Change Effect
function cm.chcon(e,tp,eg,ep,ev,re,r,rp)
return re~=e and (Duel.GetFlagEffect(0,m)==0 or Duel.GetFlagEffect(0,m+1)==0
or Duel.GetFlagEffect(0,m+2)==0 or Duel.GetFlagEffect(0,m+3)==0)
end
function cm.chop(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetMZoneCount(rp)>0 and Duel.GetFlagEffect(0,m)==0
and (Duel.GetFieldGroupCount(rp,LOCATION_HAND,0)>0
or Duel.IsExistingMatchingCard(cm.spfilter,rp,LOCATION_GRAVE,0,1,nil,e,tp))
local b2=Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,rp,0,LOCATION_MZONE,1,nil)
and Duel.GetFlagEffect(0,m+1)==0
local b3=Duel.IsPlayerCanDraw(rp,2) and Duel.GetFlagEffect(0,m+2)==0
local b4=Duel.GetFlagEffect(0,m+3)==0
if (b1 or b2 or b3 or b4) and Duel.SelectEffectYesNo(1-rp,e:GetHandler()) then
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(m,2)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(m,3)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(m,4)
opval[off-1]=3
off=off+1
end
if b4 then
ops[off]=aux.Stringid(m,5)
opval[off-1]=4
off=off+1
end
Duel.Hint(HINT_SELECTMSG,1-rp,HINTMSG_EFFECT)
local op=Duel.SelectOption(1-rp,table.unpack(ops))
if opval[op]==1 then
Duel.Hint(HINT_CARD,0,m)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.spsummon)
Duel.RegisterFlagEffect(0,m,RESET_PHASE+PHASE_END,0,1)
elseif opval[op]==2 then
Duel.Hint(HINT_CARD,0,m)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.control)
Duel.RegisterFlagEffect(0,m+1,RESET_PHASE+PHASE_END,0,1)
elseif opval[op]==3 then
Duel.Hint(HINT_CARD,0,m)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.draw)
Duel.RegisterFlagEffect(0,m+2,RESET_PHASE+PHASE_END,0,1)
elseif opval[op]==4 then
Duel.Hint(HINT_CARD,0,m)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.skip)
Duel.RegisterFlagEffect(0,m+3,RESET_PHASE+PHASE_END,0,1)
end
end
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spsummon(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--Control
function cm.control(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(1-tp,Card.IsControlerCanBeChanged,1-tp,LOCATION_MZONE,0,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.GetControl(g:GetFirst(),tp,PHASE_END,1)
end
end
--Draw
function cm.draw(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,2,REASON_EFFECT)
end
--Skip
function cm.skip(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
if Duel.GetTurnPlayer()==1-tp then
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(cm.skipcon)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
end
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e3,tp)
end
function cm.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
end
\ No newline at end of file
local m=33330053
local cm=_G["c"..m]
cm.name="相原白芷"
function cm.initial_effect(c)
--Set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
c:RegisterEffect(e1)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,m+1)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
--Set
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp)
end
function cm.setfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true)
and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
end
function cm.setcheck(g,ct)
local field=g:FilterCount(Card.IsType,nil,TYPE_FIELD)
return field<=1 and g:GetCount()-field<=ct
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,0,LOCATION_GRAVE,1,nil,1-tp)
or (Duel.GetMZoneCount(1-tp)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp)) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetMZoneCount(1-tp)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(cm.setfilter,tp,0,LOCATION_GRAVE,1,nil,1-tp)
if b1 and (not b2 or Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))==0) then
local ct=Duel.GetMZoneCount(1-tp)
if ct>2 then ct=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,0,LOCATION_GRAVE,1,ct,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,g)
end
else
local ct=Duel.GetLocationCount(1-tp,LOCATION_SZONE)
if ct>2 then ct=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.setfilter),tp,0,LOCATION_GRAVE,nil,1-tp)
local sg=g:SelectSubGroup(tp,cm.setcheck,false,1,2,ct)
if sg:GetCount()>0 then
Duel.SSet(tp,sg,1-tp)
end
end
end
--Special Summon
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
local tc=re:GetHandler()
return bit.band(loc,LOCATION_HAND)~=0 and re:IsActiveType(TYPE_MONSTER)
and not tc:IsCode(m) and tc:IsAttack(1800) and tc:IsDefense(0) and tc:IsType(TYPE_TUNER)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(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 cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetOperation(cm.thop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1,true)
if c:IsAttackPos() then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
\ No newline at end of file
local m=33330056
local cm=_G["c"..m]
cm.name="幼白之剑 狐咲弥生"
function cm.initial_effect(c)
c:EnableReviveLimit()
--Fusion
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionType,TYPE_TUNER),2,true)
--Direct Attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--To Hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--Special Summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCost(cm.spcost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
--To Hand
function cm.thfilter(c)
return c:IsAttack(1800) and c:IsDefense(0) and c:IsLevel(3) and c:IsType(TYPE_TUNER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
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_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ev)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EXTRA_ATTACK)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e3)
end
end
end
--Special Summon
function cm.spfilter(c)
return c:IsType(TYPE_TUNER) and c:IsAbleToGraveAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(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 cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--十械之树
function c33330057.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33330057,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,33330057)
e1:SetCondition(c33330057.spcon)
e1:SetTarget(c33330057.sptg)
e1:SetOperation(c33330057.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e2)
--cont
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(c33330057.acop)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_CHAINING)
e4:SetCondition(c33330057.con)
e4:SetTarget(c33330057.tg)
e4:SetOperation(c33330057.op)
c:RegisterEffect(e4)
end
function c33330057.con(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():IsLevelAbove(10)
end
function c33330057.sbfil(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk)
end
function c33330057.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(tp,c33330057.sbfil,tp,0,LOCATION_MZONE,nil,e:GetHandler():GetAttack())
if chk==0 then return g:GetCount()>0 and e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c33330057.op(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(tp,c33330057.sbfil,tp,0,LOCATION_MZONE,nil,e:GetHandler():GetAttack())
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c33330057.thcon)
e1:SetOperation(c33330057.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c33330057.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_SZONE,1,nil)
end
function c33330057.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,33330057)
local g=Duel.GetFieldGroup(tp,0,LOCATION_SZONE)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
function c33330057.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetValue(500)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c33330057.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0
end
function c33330057.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c33330057.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--对立性感知之梦
function c33330058.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,33330058)
e1:SetTarget(c33330058.target)
e1:SetOperation(c33330058.activate)
c:RegisterEffect(e1)
end
function c33330058.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,nil,e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c33330058.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,1,nil,e,0,tp,false,false)
local gc=g:GetFirst()
if g:GetCount()>0 and Duel.SpecialSummonStep(gc,0,tp,tp,false,false,POS_FACEUP)~=0 then
--cannot be target
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e7:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e7:SetRange(LOCATION_MZONE)
e7:SetReset(RESET_EVENT+RESETS_STANDARD)
e7:SetValue(aux.imval1)
gc:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e8:SetValue(aux.tgoval)
gc:RegisterEffect(e8)
Duel.SpecialSummonComplete()
gc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33330058,0))
gc:RegisterFlagEffect(33330058,RESET_EVENT+RESET_TOFIELD,0,1)
--effect2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,33330058)
e2:SetCondition(c33330058.con)
e2:SetTarget(c33330058.tg)
e2:SetOperation(c33330058.op)
c:RegisterEffect(e2,true)
end
end
function c33330058.fil(c)
return c:GetFlagEffect(33330058)~=0
end
function c33330058.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33330058.fil,1,nil)
end
function c33330058.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() and Duel.IsPlayerCanDraw(tp) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,0,0,tp,1)
end
function c33330058.op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.Draw(tp,1,REASON_EFFECT)~=0 and e:GetHandler():IsSSetable() then
Duel.SSet(tp,e:GetHandler())
end
end
\ No newline at end of file
local m=33330060
local cm=_G["c"..m]
cm.name="对立性天星之环"
function cm.initial_effect(c)
c:EnableReviveLimit()
--Link Summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3)
--To Deck
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(cm.tdop)
c:RegisterEffect(e1)
--To Hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e2)
end
--To Deck
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(LOCATION_DECKSHF)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--To Hand
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsType(TYPE_MONSTER)
and tc:GetBaseAttack()>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(math.ceil(tc:GetBaseAttack()/2))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--『星光歌剧』台本-星罪Revue
local m=33405001
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--lv
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.condition)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.activate2)
c:RegisterEffect(e2)
end
function cm.desfilter(c,tp)
return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_EXTRA,0,1,nil)
end
function cm.refilter(c)
return c:IsSetCard(0x9da0) and c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.desfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.refilter,tp,LOCATION_EXTRA,0,1,1,nil)
local gc=g:GetFirst()
if gc and Duel.Remove(gc,POS_FACEUP,REASON_EFFECT)~=0 and gc:IsLocation(LOCATION_REMOVED) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
function cm.filter0(c)
return c:IsSetCard(0x9da0) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.filter0,tp,LOCATION_MZONE,0,1,nil)
end
function cm.filter(c)
return c:IsSetCard(0x9da0) and c:IsAbleToGrave()
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--『星光歌剧』台本-摘星Revue
local m=33405003
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--lv
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.condition)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.thfilter(c,tp)
return c:IsSetCard(0x9da0) and c:IsType(TYPE_CONTINUOUS+TYPE_FIELD)
and c:GetActivateEffect():IsActivatable(tp)
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,tp) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
local b2=tc:GetActivateEffect():IsActivatable(tp)
if b2 then
if tc:IsType(TYPE_FIELD) then
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
else
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
end
end
end
function cm.filter0(c)
return c:IsSetCard(0x9da0) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.filter0,tp,LOCATION_MZONE,0,1,nil)
end
function cm.filter1(c)
return c:IsSetCard(0x9da0) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.filter2(c,e,tp)
return c:IsSetCard(0x9da0) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.filter3(c)
return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) or
Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)or
Duel.IsExistingMatchingCard(cm.filter3,tp,LOCATION_HAND,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local off=1
local ops={}
local opval={}
if Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) then
ops[off]=aux.Stringid(m,0)
opval[off-1]=1
off=off+1
end
if Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) then
ops[off]=aux.Stringid(m,1)
opval[off-1]=2
off=off+1
end
if Duel.IsExistingMatchingCard(cm.filter3,tp,LOCATION_HAND,0,1,nil) then
ops[off]=aux.Stringid(m,2)
opval[off-1]=3
off=off+1
end
if off==1 then return end
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
elseif opval[op]==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
elseif opval[op]==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter3,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil,1)
else
Duel.MSet(tp,tc,true,nil,1)
end
end
end
end
--『星光歌剧』台本-渴望Revue
local m=33405004
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon2)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.thtg2)
e2:SetOperation(cm.thop2)
c:RegisterEffect(e2)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.cfilter(c,tp)
return c:IsReason(REASON_DESTROY)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>Duel.GetFlagEffect(tp,m+1) and eg:IsExists(cm.cfilter,1,nil) and ((re and (re:GetOwner():IsSetCard(0x9da0)) or c:GetReasonCard():IsSetCard(0x9da0) ))
end
function cm.filter(c)
return c:IsSetCard(0x9da0) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE+LOCATION_DECK and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.filter2(c)
return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) then return end
if not Duel.SelectYesNo(tp,aux.Stringid(m,0)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
if Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil,1)
else
Duel.MSet(tp,tc,true,nil,1)
end
end
end
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
end
function cm.cfilter2(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetPreviousControler()==1-tp and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter2,1,nil,tp)
end
function cm.thfilter(c)
return c:IsSetCard(0x9da0) and not c:IsCode(m) and c:IsAbleToHand()
end
function cm.thtg2(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 cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED+LOCATION_GRAVE)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--『星光歌剧』台本-渴望Revue
local m=33405007
local cm=_G["c"..m]
function cm.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.condition2)
e2:SetCost(aux.bfgcost)
e2:SetOperation(cm.activate2)
c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p=tc:GetControler()
if tc:GetFlagEffect(m)==0 then
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
if Duel.GetFlagEffect(p,m)==0 then
Duel.RegisterFlagEffect(p,m,RESET_PHASE+PHASE_END,0,1)
else
Duel.RegisterFlagEffect(p,m+1,RESET_PHASE+PHASE_END,0,1)
end
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
--cannot attack
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(cm.atkcon)
e1:SetTarget(cm.atktg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.atkcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),m)~=0
end
function cm.atktg(e,c)
return c:GetFlagEffect(m)==0
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0x9da0)
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,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
if not tc then return end
if tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) then
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ATTACK_ALL)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local atk=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,c):GetSum(Card.GetAttack)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(atk)
tc:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,2,nil)
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.indtg)
e1:SetReset(RESET_PHASE+PHASE_END)
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_ONFIELD,0)
e2:SetTarget(cm.indtg)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(1)
Duel.RegisterEffect(e2,tp)
end
function cm.indtg(e,c)
return c:IsSetCard(0x9da0)
end
\ No newline at end of file
--星光歌剧 星见纯那
local m=33405009
local cm=_G["c"..m]
function cm.initial_effect(c)
--summon proc
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(cm.sumcon)
e0:SetOperation(cm.sumop)
e0:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--atkdef 0
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.condition)
e2:SetCost(cm.cost)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.refil(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x9da0)
end
function cm.sumcon(e,c)
local tp=e:GetHandler():GetControler()
return Duel.IsExistingMatchingCard(cm.refil,tp,LOCATION_EXTRA,0,1,nil)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectMatchingCard(tp,cm.refil,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and Card.IsFaceup(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1000)
tc:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(cm.distg)
Duel.RegisterEffect(e3,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(cm.discon)
e2:SetOperation(cm.disop)
Duel.RegisterEffect(e2,tp)
end
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetTargetRange(0,1)
e4:SetCondition(cm.actcon)
e4:SetValue(1)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
function cm.distg(e,c)
return c:GetFlagEffect(m)>0
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetFlagEffect(m)>0
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function cm.actcon(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not d then return false end
if a:IsControler(1-tp) then a,d=d,a end
return a:IsSummonType(SUMMON_TYPE_ADVANCE) and a:IsRelateToBattle()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a:IsControler(1-tp) then a,d=d,a end
if not a:IsRelateToBattle() or a:IsFacedown() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1000)
a:RegisterEffect(e1)
end
--苍白月下 纯真之眼
function c33711001.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c33711001.mfilter,5,3)
c:EnableReviveLimit()
--special summon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(33711001,4))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetValue(SUMMON_TYPE_XYZ)
e0:SetCondition(c33711001.spcon1)
e0:SetOperation(c33711001.spop1)
c:RegisterEffect(e0)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c33711001.imtg)
e1:SetValue(c33711001.efilter)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c33711001.indtg)
e2:SetValue(1)
c:RegisterEffect(e2)
--cannot release
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_RELEASE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(1,1)
e3:SetTarget(c33711001.rellimit)
c:RegisterEffect(e3)
--token
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(33711001,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1)
e4:SetCost(c33711001.spcost)
e4:SetTarget(c33711001.sptg)
e4:SetOperation(c33711001.spop)
c:RegisterEffect(e4)
--leave field
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(33711001,2))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(c33711001.setcon)
e5:SetTarget(c33711001.settg)
e5:SetOperation(c33711001.setop)
c:RegisterEffect(e5)
end
function c33711001.mfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup()
end
function c33711001.ovfilter1(c,sc)
return c:IsFaceup() and c:IsSetCard(0x440) and c:IsCanBeXyzMaterial(sc)
end
function c33711001.ovfilter(c,sc)
return c:IsFaceup() and c:IsCode(33700033,33700051,33701072) and c:IsCanBeXyzMaterial(sc)
end
function c33711001.spcon1(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetMatchingGroupCount(c33711001.ovfilter,tp,LOCATION_MZONE,0,nil,c)>0
and Duel.GetMatchingGroupCount(c33711001.ovfilter1,tp,LOCATION_MZONE,0,nil,c)>0
end
function c33711001.spzfilter(g,sc)
return g:IsExists(c33711001.ovfilter,1,nil,sc) and g:IsExists(c33711001.ovfilter,1,nil,sc)
end
function c33711001.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(c33711001.ovfilter,tp,LOCATION_MZONE,0,nil,c)
local g2=Duel.GetMatchingGroup(c33711001.ovfilter1,tp,LOCATION_MZONE,0,nil,c)
g1:Merge(g2)
local sg=g1:SelectSubGroup(tp,c33711001.spzfilter,false,2,2,e:GetHandler())
local og=Group.CreateGroup()
for tc in aux.Next(sg) do
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(c,mg)
end
c:SetMaterial(Group.FromCards(tc))
Duel.Overlay(c,Group.FromCards(tc))
end
end
function c33711001.setcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c33711001.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c33711001.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsRelateToEffect(e) then
if Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e0=Effect.CreateEffect(c)
e0:SetCode(EFFECT_CHANGE_TYPE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetReset(RESET_EVENT+0x1fe0000)
e0:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e0)
--avoid damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetRange(LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
end
end
end
function c33711001.imtg(e,c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup() and c:IsLevel(5)
end
function c33711001.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c33711001.indtg(e,c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup() and c:IsLevel(5)
end
function c33711001.rellimit(e,c,tp,sumtp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup() and c:IsLevel(5)
end
function c33711001.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c33711001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,33711002,nil,0x4011,nil,nil,5,RACE_WARRIOR,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c33711001.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=c:GetAttack()
local def=c:GetDefense()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,33711002,0,0x4011,atk,def,5,RACE_WARRIOR,ATTRIBUTE_EARTH) then return end
local token=Duel.CreateToken(tp,33711002)
c:CreateRelation(token,RESET_EVENT+RESETS_STANDARD)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c33711001.tokenatk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(c33711001.tokendef)
token:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
end
function c33711001.tokenatk(e,c)
return e:GetOwner():GetAttack()
end
function c33711001.tokendef(e,c)
return e:GetOwner():GetDefense()
end
\ No newline at end of file
--疑虚拟YouTuber 星野尼亚
function c33711003.initial_effect(c)
--fusion
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c33711003.ffilter,2,true)
--SpecialSummonLIMIT
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c33711003.sslimit)
c:RegisterEffect(e1)
--Special Summon other
local e2 = Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33711003, 0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c33711003.sptg2)
e2:SetOperation(c33711003.spop2)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33711003,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c33711003.spcost)
e3:SetTarget(c33711003.sptg)
e3:SetOperation(c33711003.spop)
c:RegisterEffect(e3)
end
function c33711003.ffilter(c,fc,sub,mg,sg)
return not sg or not sg:IsExists(Card.IsFusionAttribute,1,c,c:GetFusionAttribute())
end
function c33711003.sslimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsCode(e:GetHandler():GetCode())
end
function c33711003.spfilter(c, e, tp, code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
end
function c33711003.sptg2(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and
Duel.IsExistingMatchingCard(c33711003.spfilter, tp, LOCATION_EXTRA, 0, 1, nil, e, tp, e:GetHandler():GetCode())
end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, nil, tp, LOCATION_HAND + LOCATION_GRAVE)
end
function c33711003.spop2(e, tp, eg, ep, ev, re, r, rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
return
end
local num=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then num=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g = Duel.SelectMatchingCard(tp,c33711003.spfilter,tp,LOCATION_EXTRA,0,1,num,nil,e,tp,e:GetHandler():GetCode())
if #g > 0 then
Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP)
end
end
function c33711003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,33711003) end
local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,33711003)
Duel.Release(g,REASON_COST)
end
function c33711003.spfilter(c,e,tp)
return c:IsCode(33711003) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsAttack(2000) and c:IsDefense(2000)
end
function c33711003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c33711003.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c33711003.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33711003.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
end
end
\ No newline at end of file
--感官超载
function c33711004.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c33711004.condition)
e1:SetTarget(c33711004.target)
e1:SetOperation(c33711004.activate)
c:RegisterEffect(e1)
if not c33711004.global_check then
c33711004.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DRAW)
ge1:SetOperation(c33711004.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
end
end
function c33711004.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetControler(),33711004,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function c33711004.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(1-tp,33711004)>4
end
function c33711004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(1-tp,21) end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(21)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,21)
end
function c33711004.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==21 then
if Duel.SelectYesNo(tp,aux.Stringid(33711004,1)) then
local thg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.SendtoHand(thg,1-tp,REASON_EFFECT)
local num=Duel.GetOperatedGroup():GetCount()
Duel.Draw(p,(21+num)*2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--幽波纹之力
function c33711005.initial_effect(c)
c:SetUniqueOnField(LOCATION_SZONE,0,33711005)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Cal cost
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetOperation(c33711005.costop)
c:RegisterEffect(e2)
end
function c33711005.actarget(e,te,tp)
return true
end
function c33711005.atkcostfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove(tp,POS_FACEUP,REASON_RULE)
end
function c33711005.costop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,33711005)
local num1=0
local num2=0
local num3=0
local num4=0
local a=Duel.GetAttacker()
local b=Duel.GetAttackTarget()
local sg=Group.CreateGroup()
sg:AddCard(a)
sg:AddCard(b)
local sg1=sg:Filter(Card.IsControler,nil,tp)
local sg2=sg:Filter(Card.IsControler,nil,1-tp)
local tc=Duel.SelectMatchingCard(tp,c33711005.atkcostfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc2=Duel.SelectMatchingCard(1-tp,c33711005.atkcostfilter,1-tp,LOCATION_DECK,0,1,1,nil,1-tp)
if tc:GetCount()>0 then
tc=tc:GetFirst()
num1=tc:GetTextAttack()
num2=tc:GetTextDefense()
end
if tc2:GetCount()>0 then
tc2=tc2:GetFirst()
num3=tc2:GetTextAttack()
num4=tc2:GetTextDefense()
end
Duel.Remove(tc,POS_FACEUP,REASON_RULE)
Duel.Remove(tc2,POS_FACEUP,REASON_RULE)
for i in aux.Next(sg1) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(num1)
i:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(num2)
i:RegisterEffect(e2)
end
for i in aux.Next(sg2) do
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
e3:SetValue(num3)
i:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
e4:SetValue(num4)
i:RegisterEffect(e4)
end
end
\ No newline at end of file
--正正堂堂 动物朋友
function c33711006.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c33711006.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_REVERSE_DECK)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,1)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_PUBLIC)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e4)
--announce
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33711006,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetTarget(c33711006.target)
e3:SetOperation(c33711006.operation)
c:RegisterEffect(e3)
end
function c33711006.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
Duel.ConfirmCards(tp,g)
if g:GetCount()>0 then
g=g:Filter(Card.IsAbleToHand,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,sg)
end
end
end
function c33711006.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1)
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function c33711006.desfilter(c)
return c:IsCode(33711006) and c:IsFaceup()
end
function c33711006.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tc:IsCode(ac) and tc:IsAbleToHand() then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
else
Duel.DisableShuffleCheck()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_REVEAL)
local sc=Duel.GetOperatedGroup()
sc=sc:GetFirst()
if not sc:IsSetCard(0x442) then
local deg=Duel.GetMatchingGroup(c33711006.desfilter,tp,LOCATION_SZONE,0,nil)
Duel.Destroy(deg,REASON_EFFECT)
end
end
end
\ No newline at end of file
--罪恶的牺牲
function c33711007.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e00=Effect.CreateEffect(c)
e00:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e00:SetProperty(EFFECT_FLAG_DELAY)
e00:SetCode(EVENT_CUSTOM+33711007)
e00:SetRange(LOCATION_SZONE)
e00:SetCondition(c33711007.con)
e00:SetOperation(c33711007.op)
c:RegisterEffect(e00)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(1,0)
e3:SetValue(c33711007.damval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e4:SetCondition(c33711007.damcon)
c:RegisterEffect(e4)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetCondition(c33711007.valcon)
e2:SetValue(c33711007.val)
c:RegisterEffect(e2)
end
function c33711007.valcon(e)
return true
end
function c33711007.val(e,re,dam,r,rp,rc)
return dam*2
end
function c33711007.damval(e,re,val,r,rp,rc)
local c=e:GetHandler()
local tp=Duel.GetTurnPlayer()
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 and c:GetFlagEffect(33711007)==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 then
c:RegisterFlagEffect(33711007,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.DisableActionCheck(true)
Duel.RaiseEvent(c,EVENT_CUSTOM+33711007,e,val,tp,rp,re)
end
end
Duel.DisableActionCheck(false)
return val
end
function c33711007.con(e,tp,eg)
return e:GetHandler():GetFlagEffect(33711007)~=0 and e:GetHandler():GetFlagEffect(33711008)==0
end
function c33711007.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 and Duel.SelectYesNo(tp,aux.Stringid(33711007,1)) then
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if hg:GetCount()>0 then
hg:Merge(g)
hg=hg:Filter(Card.IsType,nil,TYPE_MONSTER)
if hg:GetCount()>0 then
local tc=hg:Select(tp,1,1,nil):GetFirst()
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c33711007.sumlimit)
e1:SetLabel(tc:GetCode())
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
local c=e:GetHandler()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetTargetRange(0x7f,0x7f)
e3:SetTarget(c33711007.distg)
e3:SetLabelObject(tc)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetCondition(c33711007.discon)
e4:SetOperation(c33711007.disop)
e4:SetLabelObject(tc)
Duel.RegisterEffect(e4,tp)
Duel.Damage(tp,math.max(0,r-tc:GetTextDefense()),REASON_EFFECT)
e:GetHandler():RegisterFlagEffect(33711008,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
else
Duel.Damage(tp,r/2^(Duel.GetMatchingGroupCount(c33711007.filter2,tp,LOCATION_SZONE,0,nil)-1),REASON_EFFECT)
e:GetHandler():RegisterFlagEffect(33711008,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function c33711007.filter2(c)
return c:IsFaceup() and c:GetOriginalCode()==33711007
end
function c33711007.distg(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c33711007.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c33711007.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c33711007.sumlimit(e,c)
return c:IsCode(e:GetLabel())
end
function c33711007.damcon(e)
return e:GetHandler():GetFlagEffect(33711007)==0
end
\ No newline at end of file
--虚拟主播 乙女音 SP
function c33711008.initial_effect(c)
c:EnableReviveLimit()
--sp1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33711008,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCountLimit(1)
e1:SetCondition(c33711008.spcon)
e1:SetTarget(c33711008.sptg)
e1:SetOperation(c33711008.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33711008,2))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLED)
e2:SetCountLimit(1)
e2:SetCondition(c33711008.thcon)
e2:SetTarget(c33711008.thtg)
e2:SetOperation(c33711008.thop)
c:RegisterEffect(e2)
end
function c33711008.spcon(e,tp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c33711008.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c33711008.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) then return end
if Duel.SpecialSummonStep(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0xff0000)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(c:GetTextAttack()/2)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0xff0000)
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(c:GetTextDefense()/2)
c:RegisterEffect(e2)
Duel.SpecialSummonComplete()
if Duel.GetTurnCount()<2 then
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_END,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_TURN)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
Duel.SkipPhase(tp,PHASE_DRAW,RESET_PHASE+PHASE_END,2)
Duel.SkipPhase(tp,PHASE_STANDBY,RESET_PHASE+PHASE_END,2)
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_EP)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_MAIN1+RESET_SELF_TURN)
Duel.RegisterEffect(e2,tp)
else
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e1)
end
end
function c33711008.thcon(e)
return Duel.GetAttacker()==e:GetHandler()
end
function c33711008.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c33711008.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
if Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 and e:GetHandler():IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(33711008,0)) then
Duel.SendtoHand(e:GetHandler(),tp,REASON_EFFECT)
end
end
\ No newline at end of file
--动物朋友 二色薮猫
function c33711009.initial_effect(c)
--xyz summon
aux.AddXyzProcedureLevelFree(c,aux.FilterBoolFunction(Card.IsSetCard,0x442),aux.FilterBoolFunction(Card.IsFaceup),2,2)
c:EnableReviveLimit()
--code
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(33700055)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33711009,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c33711009.cost)
e2:SetTarget(c33711009.target)
e2:SetOperation(c33711009.operation)
c:RegisterEffect(e2)
end
function c33711009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c33711009.tgfilter(c)
return c:IsSetCard(0x442) and c:IsAbleToGrave()
end
function c33711009.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33711009.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c33711009.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33711009.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--对极之心
function c33711010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(c33711010.con)
e1:SetCost(c33711010.cost)
e1:SetTarget(c33711010.tg)
e1:SetOperation(c33711010.op)
c:RegisterEffect(e1)
end
function c33711010.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END
end
function c33711010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,5000) end
Duel.PayLPCost(tp,5000)
end
function c33711010.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,LOCATION_HAND)>0 end
end
function c33711010.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_TURN)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_PREDRAW)
e2:SetTargetRange(1,0)
e2:SetCondition(c33711010.condition1)
e2:SetOperation(c33711010.drawop)
Duel.RegisterEffect(e2,tp)
local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g1:GetCount()==0 and g2:GetCount()==0 then return end
Duel.ConfirmCards(tp,g2)
Duel.ConfirmCards(1-tp,g1)
Duel.SendtoHand(g1,1-tp,REASON_EFFECT)
Duel.SendtoHand(g2,tp,REASON_EFFECT)
Duel.ShuffleHand(tp)
Duel.ShuffleHand(1-tp)
end
function c33711010.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c33711010.drawop(e,tp,eg,ep,ev,re,r,rp)
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
if Duel.SelectYesNo(tp,aux.Stringid(33711010,1)) then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
local g=Duel.GetDecktopGroup(1-tp,dt)
Duel.DisableShuffleCheck()
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return true
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.ConfirmCards(tp,g2)
Duel.ConfirmCards(1-tp,g1)
Duel.SendtoHand(g1,1-tp,REASON_EFFECT)
Duel.SendtoHand(g2,tp,REASON_EFFECT)
Duel.ShuffleHand(tp)
Duel.ShuffleHand(1-tp)
local tfg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
for tc in aux.Next(tfg) do
if tc:IsAbleToChangeControler() then
if tc:IsLocation(LOCATION_MZONE) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.GetControl(tc,1-tp)
elseif tc:IsLocation(LOCATION_FZONE) then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
local pos=tc:GetPosition()
Duel.MoveToField(tc,tp,1-tp,LOCATION_FZONE,pos,true)
else
if Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 then
local pos=tc:GetPosition()
Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,pos,true)
end
end
end
end
end)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
e:Reset()
end
\ No newline at end of file
......@@ -5,11 +5,49 @@ if rsmd then return end
rsmd = cm
rscf.DefineSet(rsmd,"MrsDice",1)
rscf.DefineSet(rsmd,"MrsDice_Taught",2)
rsmd.acteffect={}
function rsmd.SetActCount(e1,...)
local elist={e1,...}
for _,e in pairs(elist) do
e:SetCountLimit(99)
e:SetCondition(cm.ctcon(e:GetCondition()))
e:SetTarget(cm.cttg(e:GetTarget()))
end
end
function cm.ctcon(con)
return function(e,tp,...)
if con and not con(e,tp,...) then return false end
local c=e:GetHandler()
local flag=c:GetFlagEffect(m)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
if c:IsHasEffect(44000013) then
return flag<ct
else
return flag==0
end
end
end
function cm.cttg(tg)
return function(e,tp,eg,ep,ev,re,r,rp,chk,chkc,...)
if chkc or chk==0 then return not tg or tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc,...) end
tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc,...)
local c=e:GetHandler()
c:RegisterFlagEffect(m,rsreset.est_pend,0,1)
end
end
function rsmd.ToGraveFun(c,code)
local e1=rsef.STO(c,EVENT_TO_GRAVE,"sp",{1,code+100},"sp","de",nil,nil,rsop.target(rscf.spfilter2(rsmd.IsSet2),"sp",rsloc.hdg),cm.tgspop)
return e1
end
function cm.tgspop(e,tp)
rsop.SelectSpecialSummon(tp,aux.NecroValleyFilter(rscf.spfilter2(rsmd.IsSet2)),tp,rsloc.hdg,0,1,1,nil,{},e,tp)
end
-----------------------------------------------
function cm.initial_effect(c)
local e1=rsef.FTO(c,EVENT_SUMMON_SUCCESS,{m,0},1,"dice,ctrl,se,th",nil,LOCATION_MZONE,cm.con,nil,cm.tg,cm.op)
local e2=rsef.RegisterClone(c,e1,"code",EVENT_SPSUMMON_SUCCESS)
local e3=rsef.RegisterClone(c,e1,"code",EVENT_FLIP_SUMMON_SUCCESS)
rsmd.SetActCount(e1,e2,e3)
end
cm.toss_dice=true
function cm.cfilter(c,tp)
......
......@@ -3,6 +3,7 @@ if not pcall(function() require("expansions/script/c44000001") end) then require
local m,cm=rscf.DefineCard(44000002,"MrsDice_Taught")
function cm.initial_effect(c)
local e1=rsef.QO(c,EVENT_CHAINING,{m,0},1,"dice,rec,neg,des","dcal,dsp",LOCATION_MZONE,cm.con,nil,cm.tg,cm.op)
rsmd.SetActCount(e1)
end
cm.toss_dice=true
function cm.con(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -3,6 +3,7 @@ if not pcall(function() require("expansions/script/c44000001") end) then require
local m,cm=rscf.DefineCard(44000003,"MrsDice_Taught")
function cm.initial_effect(c)
local e1=rsef.FTO(c,EVENT_ATTACK_ANNOUNCE,{m,0},1,"dice,atk,dam",nil,LOCATION_MZONE,rscon.turno,nil,cm.tg,cm.op)
rsmd.SetActCount(e1)
end
cm.toss_dice=true
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
......
--当骰娘焕发生机之时
--骰娘炼成 鱼仙
if not pcall(function() require("expansions/script/c44000001") end) then require("script/c44000001") end
local m,cm=rscf.DefineCard(44000006,"MrsDice_Taught")
function cm.initial_effect(c)
local e1=aux.AddRitualProcGreaterCode(c,44000011,LOCATION_HAND+LOCATION_GRAVE)
e1:SetTarget(cm.tg(e1:GetTarget()))
c:EnableReviveLimit()
aux.AddLinkProcedure(c,rsmd.IsSet2,1)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},"se,dice","de,dsp",rscon.sumtype("link"),nil,cm.tg,cm.op)
--dice
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
e2:SetCode(EVENT_TOSS_DICE_NEGATE)
e2:SetCondition(cm.dicecon)
e2:SetOperation(cm.diceop)
c:RegisterEffect(e2)
rsmd.acteffect[m]={e1}
end
function cm.tg(tg)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return tg(e,tp,eg,ep,ev,re,r,rp,chk) end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
cm.toss_coin=true
function cm.spfilter(c,e,tp)
return rsmd.IsSetM2(c) and rscf.spfilter2()(c,e,tp)
end
function cm.thfilter(c)
return rsmd.IsSetST2(c) and c:IsAbleToHand()
return rsmd.IsSetM2(c) and c:IsAbleToHand()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local dc=Duel.TossDice(tp,1)
if dc<4 then
rsop.SelectSpecialSummon(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,{},e,tp)
elseif dc<7 then
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
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)
function cm.dicecon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and e:GetHandler():IsAbleToRemove() and rsmd.IsSetM2(re:GetHandler())
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>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
function cm.diceop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectEffectYesNo(tp,c,aux.Stringid(m,1)) then
Duel.Hint(HINT_CARD,0,m)
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
local ct1=bit.band(ev,0xff)
local ct2=bit.rshift(ev,16)
Duel.TossDice(ep,ct1,ct2)
end
end
\ No newline at end of file
--骰娘源码
--当骰娘焕发生机之时
if not pcall(function() require("expansions/script/c44000001") end) then require("script/c44000001") end
local m,cm=rscf.DefineCard(44000007,"MrsDice")
local m,cm=rscf.DefineCard(44000007,"MrsDice_Taught")
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,nil,"se,th",nil,nil,rscost.cost(cm.tgfilter,"tg",LOCATION_HAND),rsop.target({cm.thfilter,aux.dncheck},"th",rsloc.dg,0,2),cm.act)
local e1=aux.AddRitualProcGreaterCode(c,44000008,LOCATION_HAND+LOCATION_GRAVE)
e1:SetTarget(cm.tg(e1:GetTarget()))
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.tg(tg)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return tg(e,tp,eg,ep,ev,re,r,rp,chk) end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
end
function cm.thfilter(c)
return c:IsCode(44000006,44000011) and c:IsAbleToHand()
return rsmd.IsSetST2(c) and c:IsAbleToHand()
end
function cm.act(e,tp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.thfilter),tp,rsloc.dg,0,nil)
rshint.Select(tp,"th")
local tg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
if #tg==2 then
rsop.SendtoHand(tg,nil,REASON_EFFECT)
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>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--骰娘齐聚 腐鱼云城
--众骰之始 溯洄
if not pcall(function() require("expansions/script/c44000001") end) then require("script/c44000001") end
local m,cm=rscf.DefineCard(44000008,"MrsDice")
local m,cm=rscf.DefineCard(44000008,"MrsDice_Taught")
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2,e3=rsef.FV_UPDATE(c,"atk,def",400,aux.TargetBoolFunction(rsmd.IsSet1),{ LOCATION_MZONE,LOCATION_MZONE })
local e4=rsef.FTO(c,EVENT_SPSUMMON_SUCCESS,{m,0},1,nil,"tg,de",LOCATION_FZONE,cm.setcon,nil,rstg.target(cm.setfilter,nil,LOCATION_GRAVE),cm.setop)
local e5=rsef.STO(c,EVENT_TO_GRAVE,{m,1},nil,"td","tg",cm.tdcon,nil,rstg.target(cm.tdfilter,"td",LOCATION_REMOVED,0,2),cm.tdop)
rscf.SetSummonCondition(c,false,aux.ritlimit)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},"sp","de,dsp",rscon.sumtype("rit"),nil,rsop.target(cm.spfilter,"sp",rsloc.hg),cm.spop)
local e2=rsef.I(c,{m,1},{1,m+1},nil,"tg",LOCATION_MZONE,nil,nil,rstg.target(rscf.fufilter(rsmd.IsSet2),nil,LOCATION_MZONE),cm.indop)
local e3=rsef.QO(c,nil,{m,2},1,"rm","tg",LOCATION_MZONE,cm.ctcon(2),nil,rstg.target(Card.IsAbleToRemove,"rm",0,LOCATION_MZONE),cm.rmop)
local e4=rsef.QO_NEGATE(c,"neg",1,"rm",LOCATION_MZONE,aux.AND(rscon.negcon(0),cm.ctcon(4)))
rsmd.acteffect[m]={e1,e2,e3,e4}
end
function cm.cfilter(c,tp)
return rsmd.IsSet1(c) and c:IsSummonType(SUMMON_TYPE_LINK) and c:GetSummonPlayer()==tp
function cm.spfilter(c,e,tp)
return rscf.spfilter2(rsmd.IsSet2)(c,e,tp)
end
function cm.setcon(e,tp,eg)
return eg:IsExists(cm.cfilter,1,nil,tp)
function cm.spop(e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,rsloc.hg,0,nil,e,tp)
local sct=math.min(ft,#sg)
if sct<=0 then return end
sct = rscon.bsdcheck(tp) and 1 or sct
rsgf.SelectSpecialSummon(sg,tp,aux.TRUE,sct,sct,nil,{})
end
function cm.setfilter(c)
return c:IsSSetable() and rsmd.IsSetST1(c)
end
function cm.setop(e,tp)
function cm.indop(e,tp)
local c=e:GetHandler()
local tc=rscf.GetTargetCard()
if tc and Duel.SSet(tp,tc)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
if not tc then return end
local resetct= (Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_STANDBY) and 2 or 1
local e1=rsef.SV_INDESTRUCTABLE({c,tc},"effect",aux.indoval,nil,{rsreset.est+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,resetct},"cd")
end
function cm.ctcon(ct)
return function(e,tp)
local g=Duel.GetMatchingGroup(rsmd.IsSet2,tp,LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)>=ct
end
end
function cm.tdcon(e,tp)
local c=e:GetHandler()
return c:IsComplexReason(REASON_DESTROY+REASON_EFFECT) and c:GetReasonPlayer()~=tp
end
function cm.tdfilter(c)
return rsmd.IsSetM1(c) and c:IsAbleToDeck() and c:IsFaceup()
function cm.rmop(e,tp)
local c,tc=e:GetHandler(),rscf.GetTargetCard()
local fid=c:GetFieldID()
if not tc or Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)<=0 then return end
tc:RegisterFlagEffect(m,rsreset.est_pend,0,1)
local e1=rsef.FC({c,tp},EVENT_PHASE+PHASE_END,nil,1,nil,nil,cm.retcon,cm.retop,rsreset.pend)
e1:SetLabelObject(tc)
end
function cm.tdop(e,tp)
local tg=rsgf.GetTargetGroup()
if #tg>0 then
Duel.SendtoDeck(tg,nil,REASON_EFFECT)
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(m)~=0
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
\ No newline at end of file
--骰娘的超负荷运作
--骰娘源码
if not pcall(function() require("expansions/script/c44000001") end) then require("script/c44000001") end
local m,cm=rscf.DefineCard(44000009,"MrsDice_Taught")
local m,cm=rscf.DefineCard(44000009,"MrsDice")
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,nil,"tg",nil,nil,cm.cost,rsop.target(Card.IsAbleToGrave,"tg",0,LOCATION_ONFIELD,true),cm.act)
local e1=rsef.ACT(c,nil,nil,nil,"se,th",nil,nil,rscost.cost(cm.tgfilter,"tg",LOCATION_HAND,0,1,1,c),rsop.target({cm.thfilter,cm.ritcheck},"th",rsloc.dg,0,2),cm.act)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,c)
if chk==0 then return #g>0 and g:FilterCount(Card.IsAbleToGraveAsCost,nil)==#g and g:IsExists(rsmd.IsSet1,3,nil) end
Duel.SendtoGrave(g,REASON_COST)
local og=Duel.GetOperatedGroup()
local ctype=0
for tc in aux.Next(og) do
for i,type in ipairs({TYPE_MONSTER,TYPE_SPELL,TYPE_TRAP}) do
if tc:GetOriginalType() & type ~= 0 then
ctype=ctype | type
end
end
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(cm.chlimit(ctype))
end
function cm.tgfilter(c)
return c:IsAbleToGraveAsCost() and rsmd.IsSet1(c)
end
function cm.chlimit(ctype)
return function(e,ep,tp)
return tp==ep or e:GetHandler():GetOriginalType() & ctype==0
end
function cm.thfilter(c)
return c:IsType(TYPE_RITUAL) and rsmd.IsSet2(c) and c:IsAbleToHand()
end
function cm.ritcheck(g)
return g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) and g:IsExists(Card.IsType,1,nil,TYPE_SPELL)
end
function cm.act(e,tp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
Duel.SendtoGrave(g,REASON_EFFECT)
end
\ No newline at end of file
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.thfilter),tp,rsloc.dg,0,nil)
rshint.Select(tp,"th")
local tg=g:SelectSubGroup(tp,cm.ritcheck,false,2,2)
if #tg==2 then
rsop.SendtoHand(tg,nil,REASON_EFFECT)
end
end
--骰娘炼成 鱼仙
--广播骰娘 辉夜
if not pcall(function() require("expansions/script/c44000001") end) then require("script/c44000001") end
local m,cm=rscf.DefineCard(44000010,"MrsDice_Taught")
local m,cm=rscf.DefineCard(44000010,"MrsDice")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,rsmd.IsSet2,1)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},"se,dice","de,dsp",rscon.sumtype("link"),nil,cm.tg,cm.op)
--dice
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_TOSS_DICE_NEGATE)
e2:SetCondition(cm.dicecon)
e2:SetOperation(cm.diceop)
c:RegisterEffect(e2)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE),2,3,cm.gf)
local e1=rsef.SV_CANNOT_BE_TARGET(c,"effect")
--local e2,e3=rsef.FV_CANNOT_DISABLE(c,"dise,neg",rsval.cdisneg(cm.filter))
local e4=rsef.FTO(c,EVENT_SUMMON_SUCCESS,{m,0},1,"des","de",LOCATION_MZONE,rscon.sumtolz(true),nil,rsop.target(aux.TRUE,"des",0,LOCATION_ONFIELD),cm.desop)
local e5=rsef.RegisterClone(c,e4,"code",EVENT_SPSUMMON_SUCCESS)
end
cm.toss_coin=true
function cm.spfilter(c,e,tp)
return rsmd.IsSetM2(c) and rscf.spfilter2()(c,e,tp)
function cm.gf(g)
return g:IsExists(rsmd.IsLinkSet2,1,nil)
end
function cm.thfilter(c)
return rsmd.IsSetM2(c) and c:IsAbleToHand()
function cm.filter(e,p,te,tp)
return rsmd.IsSet2(te:GetHandler()) and te:IsActiveType(TYPE_MONSTER)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local dc=Duel.TossDice(tp,1)
if dc<4 then
rsop.SelectSpecialSummon(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,{},e,tp)
elseif dc<7 then
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
end
function cm.dicecon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and e:GetHandler():IsAbleToRemove() and rsmd.IsSetM2(re:GetHandler())
end
function cm.diceop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectEffectYesNo(tp,c,aux.Stringid(m,1)) then
Duel.Hint(HINT_CARD,0,m)
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
local ct1=bit.band(ev,0xff)
local ct2=bit.rshift(ev,16)
Duel.TossDice(ep,ct1,ct2)
end
function cm.desop(e,tp)
rsop.SelectDestroy(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil,{})
end
\ No newline at end of file
--众骰之始 溯洄
--骰娘齐聚 腐鱼云城
if not pcall(function() require("expansions/script/c44000001") end) then require("script/c44000001") end
local m,cm=rscf.DefineCard(44000011,"MrsDice_Taught")
local m,cm=rscf.DefineCard(44000011,"MrsDice")
function cm.initial_effect(c)
rscf.SetSummonCondition(c,false,aux.ritlimit)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},"sp","de,dsp",rscon.sumtype("rit"),nil,rsop.target(cm.spfilter,"sp",rsloc.hg),cm.spop)
local e2=rsef.I(c,{m,1},{1,m+1},nil,"tg",LOCATION_MZONE,nil,nil,rstg.target(rscf.fufilter(rsmd.IsSet2),nil,LOCATION_MZONE),cm.indop)
local e3=rsef.QO(c,nil,{m,2},1,"rm","tg",LOCATION_MZONE,cm.ctcon(2),nil,rstg.target(Card.IsAbleToRemove,"rm",0,LOCATION_MZONE),cm.rmop)
local e4=rsef.QO_NEGATE(c,"neg",1,"rm",LOCATION_MZONE,aux.AND(rscon.negcon(0),cm.ctcon(4)))
local e1=rsef.ACT(c)
local e2,e3=rsef.FV_UPDATE(c,"atk,def",400,aux.TargetBoolFunction(rsmd.IsSet1),{ LOCATION_MZONE,LOCATION_MZONE })
local e4=rsef.FTO(c,EVENT_SPSUMMON_SUCCESS,{m,0},1,nil,"tg,de",LOCATION_FZONE,cm.setcon,nil,rstg.target(cm.setfilter,nil,LOCATION_GRAVE),cm.setop)
local e5=rsef.STO(c,EVENT_TO_GRAVE,{m,1},nil,"td","tg",cm.tdcon,nil,rstg.target(cm.tdfilter,"td",LOCATION_REMOVED,0,2),cm.tdop)
end
function cm.spfilter(c,e,tp)
return rscf.spfilter2(rsmd.IsSet2)(c,e,tp)
function cm.cfilter(c,tp)
return rsmd.IsSet1(c) and c:IsSummonType(SUMMON_TYPE_LINK) and c:GetSummonPlayer()==tp
end
function cm.spop(e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,rsloc.hg,0,nil,e,tp)
local sct=math.min(ft,#sg)
if sct<=0 then return end
sct = rscon.bsdcheck(tp) and 1 or sct
rsgf.SelectSpecialSummon(sg,tp,aux.TRUE,sct,sct,nil,{})
function cm.setcon(e,tp,eg)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.indop(e,tp)
local c=e:GetHandler()
local tc=rscf.GetTargetCard()
if not tc then return end
local resetct= (Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_STANDBY) and 2 or 1
local e1=rsef.SV_INDESTRUCTABLE({c,tc},"effect",aux.indoval,nil,{rsreset.est+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,resetct},"cd")
function cm.setfilter(c)
return c:IsSSetable() and rsmd.IsSetST1(c)
end
function cm.ctcon(ct)
return function(e,tp)
local g=Duel.GetMatchingGroup(rsmd.IsSet2,tp,LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)>=ct
function cm.setop(e,tp)
local tc=rscf.GetTargetCard()
if tc and Duel.SSet(tp,tc)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function cm.tdcon(e,tp)
local c=e:GetHandler()
return c:IsComplexReason(REASON_DESTROY+REASON_EFFECT) and c:GetReasonPlayer()~=tp
end
function cm.rmop(e,tp)
local c,tc=e:GetHandler(),rscf.GetTargetCard()
local fid=c:GetFieldID()
if not tc or Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)<=0 then return end
tc:RegisterFlagEffect(m,rsreset.est_pend,0,1)
local e1=rsef.FC({c,tp},EVENT_PHASE+PHASE_END,nil,1,nil,nil,cm.retcon,cm.retop,rsreset.pend)
e1:SetLabelObject(tc)
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(m)~=0
function cm.tdfilter(c)
return rsmd.IsSetM1(c) and c:IsAbleToDeck() and c:IsFaceup()
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
function cm.tdop(e,tp)
local tg=rsgf.GetTargetGroup()
if #tg>0 then
Duel.SendtoDeck(tg,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--广播骰娘 辉夜
--骰娘的超负荷运作
if not pcall(function() require("expansions/script/c44000001") end) then require("script/c44000001") end
local m,cm=rscf.DefineCard(44000012,"MrsDice")
local m,cm=rscf.DefineCard(44000012,"MrsDice_Taught")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_CYBERSE),2,3,cm.gf)
local e1=rsef.SV_CANNOT_BE_TARGET(c,"effect")
--local e2,e3=rsef.FV_CANNOT_DISABLE(c,"dise,neg",rsval.cdisneg(cm.filter))
local e4=rsef.FTO(c,EVENT_SUMMON_SUCCESS,{m,0},1,"des","de",LOCATION_MZONE,rscon.sumtolz(true),nil,rsop.target(aux.TRUE,"des",LOCATION_ONFIELD,LOCATION_ONFIELD),cm.desop)
local e5=rsef.RegisterClone(c,e4,"code",EVENT_SPSUMMON_SUCCESS)
local e1=rsef.ACT(c,nil,nil,nil,"tg",nil,nil,cm.cost,rsop.target(Card.IsAbleToGrave,"tg",0,LOCATION_ONFIELD,true),cm.act)
end
function cm.gf(g)
return g:IsExists(rsmd.IsLinkSet2,1,nil)
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,c)
if chk==0 then return #g>0 and g:FilterCount(Card.IsAbleToGraveAsCost,nil)==#g and g:IsExists(rsmd.IsSet1,3,nil) end
Duel.SendtoGrave(g,REASON_COST)
local og=Duel.GetOperatedGroup()
local ctype=0
for tc in aux.Next(og) do
for i,type in ipairs({TYPE_MONSTER,TYPE_SPELL,TYPE_TRAP}) do
if tc:GetOriginalType() & type ~= 0 then
ctype=ctype | type
end
end
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(cm.chlimit(ctype))
end
end
function cm.filter(e,p,te,tp)
return rsmd.IsSet2(te:GetHandler()) and te:IsActiveType(TYPE_MONSTER)
function cm.chlimit(ctype)
return function(e,ep,tp)
return tp==ep or e:GetHandler():GetOriginalType() & ctype==0
end
end
function cm.desop(e,tp)
rsop.SelectDestroy(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,{})
function cm.act(e,tp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
Duel.SendtoGrave(g,REASON_EFFECT)
end
\ No newline at end of file
--骰娘心选 神田
if not pcall(function() require("expansions/script/c44000001") end) then require("script/c44000001") end
local m,cm=rscf.DefineCard(44000013,"MrsDice_Taught")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,rsmd.IsLinkSet2,2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(m)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTarget(cm.efftg)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
c:RegisterEffect(e2)
local e3=rsef.QO(c,EVENT_CHAINING,{m,0},1,"dice,dr,neg","dcal,dsp",LOCATION_MZONE,cm.con,nil,cm.tg,cm.op)
rsmd.SetActCount(e3)
end
cm.toss_dice=true
function cm.efftg(e,c)
return rsmd.IsOriSet2(c)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsHasCategory(CATEGORY_SEARCH)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp,chk)
local dc=Duel.TossDice(tp,1)
if dc==1 or dc==4 then
Duel.Draw(1-tp,1,REASON_EFFECT)
elseif dc==2 or dc==5 then
local e1=rsef.FV_LIMIT_PLAYER({e:GetHandler(),tp},"act",cm.aclimit,nil,{0,1},nil,rsreset.pend)
elseif dc==3 or dc==6 then
Duel.NegateActivation(ev)
end
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsLocation(LOCATION_HAND)
end
\ No newline at end of file
--骰娘的流派分化
if not pcall(function() require("expansions/script/c44000001") end) then require("script/c44000001") end
local m,cm=rscf.DefineCard(44000015,"MrsDice")
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,nil,"dr,rm,tg,td",nil,nil,nil,rsop.target(1,"dr",0,1),cm.act)
end
function cm.act(e,tp)
Duel.ShuffleDeck(1-tp)
if Duel.Draw(1-tp,1,REASON_EFFECT)<=0 then return end
local dc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(tp,dc)
if dc:IsType(TYPE_MONSTER) then
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if #g>0 and g:FilterCount(Card.IsAbleToRemove,nil)==#g and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 then
Duel.Draw(1-tp,Duel.GetOperatedGroup():GetCount(),REASON_EFFECT)
end
elseif dc:IsType(TYPE_SPELL) then
local g=Duel.GetFieldGroup(tp,0,LOCATION_REMOVED)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)
end
elseif dc:IsType(TYPE_TRAP) then
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil)
if #g>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--异构同骰 铃心
if not pcall(function() require("expansions/script/c44000001") end) then require("script/c44000001") end
local m,cm=rscf.DefineCard(44000016,"MrsDice")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3,6,cm.gf)
local e0=rsef.SC(c,EVENT_SPSUMMON_SUCCESS,nil,nil,"cd,uc",rscon.sumtype("link"),cm.speak)
local e1=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,"tg",nil,"tg","de",rscon.sumtype("link"),nil,rsop.target2(rsef.chainlimit(0,0),cm.tgfilter,"tg",0,LOCATION_ONFIELD,true),cm.tgop)
local e2=rsef.SV_IMMUNE_EFFECT(c)
--cannot activate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetCondition(cm.lcon)
e3:SetValue(aux.TRUE)
c:RegisterEffect(e3)
end
function cm.speak()
Debug.Message("“无用者应予废弃,无能者施以规矩。方圆轮转,再分界限!连接召唤,「异构同骰 铃心」!”")
end
function cm.gf(g)
return g:IsExists(rsmd.IsLinkSet2,1,nil)
end
function cm.tgfilter(c)
return c:IsAbleToGrave() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.setfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function cm.tgop(e,tp)
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,0,LOCATION_ONFIELD,nil)
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
rsop.SelectOC("set",true)
rsop.SelectSSet(tp,cm.setfilter,tp,0,LOCATION_GRAVE,1,1,nil,{})
end
end
function cm.lcon(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and e:GetHandler():GetMutualLinkedGroupCount()>0
end
\ No newline at end of file
--骰娘之主 古
if not pcall(function() require("expansions/script/c44000001") end) then require("script/c44000001") end
local m,cm=rscf.DefineCard(44000017,"MrsDice_Taught")
function cm.initial_effect(c)
local e1=rsmd.ToGraveFun(c,m)
local e2=rsef.QO(c,nil,"td",{1,m},"td",nil,LOCATION_GRAVE,nil,aux.bfgcost,rsop.target(Card.IsAbleToDeck,"td",0,LOCATION_ONFIELD),cm.tdop)
end
function cm.tdop(e,tp)
rsop.SelectToDeck(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil,{})
end
--骰娘之主 追仙
if not pcall(function() require("expansions/script/c44000001") end) then require("script/c44000001") end
local m,cm=rscf.DefineCard(44000018,"MrsDice_Taught")
function cm.initial_effect(c)
local e1=rsmd.ToGraveFun(c,m)
local e2=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,"se",{1,m},"se,th","de",nil,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e3=rsef.RegisterClone(c,e2,"code",EVENT_SUMMON_SUCCESS)
end
function cm.thfilter(c)
return c:IsAbleToHand() and rsmd.IsSet1(c)
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
--骰娘之主 多多
if not pcall(function() require("expansions/script/c44000001") end) then require("script/c44000001") end
local m,cm=rscf.DefineCard(44000019,"MrsDice_Taught")
function cm.initial_effect(c)
local e1=rsmd.ToGraveFun(c,m)
--end battle phase
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()~=tp
end
function cm.cost(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 cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then
Duel.BreakEffect()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
end
--界食虫穴
function c65001030.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65001030,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,65001030)
e2:SetCost(c65001030.scost)
e2:SetTarget(c65001030.stg)
e2:SetOperation(c65001030.sop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetDescription(aux.Stringid(65001030,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE+LOCATION_GRAVE)
e3:SetCountLimit(1,65001031)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c65001030.sptg)
e3:SetOperation(c65001030.spop)
c:RegisterEffect(e3)
end
function c65001030.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and c:IsSetCard(0x3daa) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
end
function c65001030.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65001030.spfilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_REMOVED)
end
function c65001030.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65001030.spfilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
end
function c65001030.scostfil(c,e,tp)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x3daa) and c:IsType(TYPE_MONSTER)
end
function c65001030.scost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c65001030.scostfil,tp,LOCATION_MZONE,0,nil,e,tp)
if chk==0 then return g:GetCount()>0 end
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function c65001030.sfilter(c,e,tp)
return c:IsSetCard(0x3daa) and c:IsSSetable() and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(65001030)
end
function c65001030.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c65001030.sfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
end
function c65001030.sop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
local g=Duel.SelectMatchingCard(tp,c65001030.sfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SSet(tp,g)
end
end
\ No newline at end of file
--激昂色 万华镜
function c65001032.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65001032,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,65001032)
e1:SetCost(c65001032.cost)
e1:SetTarget(c65001032.tg)
e1:SetOperation(c65001032.op)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetDescription(aux.Stringid(65001032,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,65001032)
e3:SetCondition(c65001032.spcon)
e3:SetCost(c65001032.spcost)
e3:SetTarget(c65001032.sptg)
e3:SetOperation(c65001032.spop)
c:RegisterEffect(e3)
end
function c65001032.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()==tp
and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
end
function c65001032.spcostfil(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x6da3)
end
function c65001032.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65001032.spcostfil,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65001032.spcostfil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c65001032.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x6da3)
end
function c65001032.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65001032.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c65001032.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65001032.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c65001032.thfil(c,e,tp)
return c:IsSetCard(0x6da3) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(65001032)
end
function c65001032.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c65001032.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65001032.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c65001032.op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,c65001032.thfil,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
\ No newline at end of file
--梦想色 万华镜
function c65001033.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65001033,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,65001033)
e1:SetCost(c65001033.cost)
e1:SetTarget(c65001033.tg)
e1:SetOperation(c65001033.op)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetDescription(aux.Stringid(65001033,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,65001033)
e3:SetCondition(c65001033.spcon)
e3:SetCost(c65001033.spcost)
e3:SetTarget(c65001033.sptg)
e3:SetOperation(c65001033.spop)
c:RegisterEffect(e3)
end
function c65001033.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()==tp
and (ph==PHASE_MAIN1 or ph==PHASE_END or ph==PHASE_MAIN2)
end
function c65001033.spcostfil(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x6da3)
end
function c65001033.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65001033.spcostfil,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65001033.spcostfil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c65001033.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x6da3)
end
function c65001033.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65001033.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c65001033.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65001033.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c65001033.thfil(c,e,tp)
return c:IsCode(65001032) and not c:IsForbidden()
end
function c65001033.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c65001033.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65001033.thfil,tp,LOCATION_DECK,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
end
function c65001033.op(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
or not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,c65001033.thfil,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--响色的和奏节声
function c65001034.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCountLimit(1,65001034+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c65001034.cost)
e1:SetTarget(c65001034.tg)
e1:SetOperation(c65001034.op)
c:RegisterEffect(e1)
end
function c65001034.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c65001034.spfilter(c,e,tp)
return c:IsSetCard(0xcda4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65001034.refilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsReleasable()
end
function c65001034.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c65001034.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(c65001034.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c65001034.refilter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return (b1 or b2) and Duel.GetMZoneCount(tp)>0 end
local off=1
local ops,opval={},{}
if b1 then
ops[off]=aux.Stringid(65001034,0)
opval[off]=0
off=off+1
end
if b2 then
ops[off]=aux.Stringid(65001034,1)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
e:SetLabel(sel)
if sel==0 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_HAND+LOCATION_GRAVE)
else
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_DECK)
local g=Duel.SelectMatchingCard(tp,c65001034.refilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
end
function c65001034.op(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
if op==0 then
local g=Duel.SelectMatchingCard(tp,c65001034.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
elseif op==1 then
local g=Duel.SelectMatchingCard(tp,c65001034.spfilter,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
end
\ No newline at end of file
--响色的共鸣绽放
function c65001035.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65001035,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,65001035)
e1:SetTarget(c65001035.target)
e1:SetOperation(c65001035.activate)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetDescription(aux.Stringid(65001035,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE+LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,65001036)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c65001035.sptg)
e3:SetOperation(c65001035.spop)
c:RegisterEffect(e3)
end
function c65001035.ffilter(c,e,tp)
return c:IsType(TYPE_FUSION) and Duel.IsExistingMatchingCard(c65001035.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,c,e,tp)
end
function c65001035.spfilter(c,fc,e,tp)
return aux.IsMaterialListCode(fc,c:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65001035.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c65001035.ffilter(chkc,e,tp) and chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c65001035.ffilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.SelectTarget(tp,c65001035.ffilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c65001035.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local num=tc:GetLevel()
while num>=3 and Duel.GetMZoneCount(tp)>0 do
if not Duel.SelectYesNo(tp,aux.Stringid(65001035,2)) then break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65001035.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tc,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
num=num-3
end
end
end
function c65001035.filter0(c)
return c:IsOnField() and c:IsAbleToRemove()
end
function c65001035.filter1(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c65001035.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xcda4) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c65001035.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c65001035.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c65001035.filter0,nil)
local mg2=Duel.GetMatchingGroup(c65001035.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c65001035.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c65001035.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c65001035.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c65001035.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c65001035.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c65001035.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c65001035.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
\ No newline at end of file
......@@ -19,7 +19,7 @@ function c66913801.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,66913801)
e3:SetCountLimit(1,66913801+10000)
e3:SetTarget(c66913801.tgtg)
e3:SetOperation(c66913801.tgop)
c:RegisterEffect(e3)
......
......@@ -20,7 +20,7 @@ c66913802.dfc_back_side=66913830
c:RegisterEffect(e2)
end
function c66913802.changecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>=30 and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==1
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>=20 and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==1
end
function c66913802.changetg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -23,7 +23,6 @@ function c66913804.initial_effect(c)
e2:SetCountLimit(1,66913804+EFFECT_COUNT_CODE_DUEL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(c66913804.con)
e2:SetCost(c66913804.cost)
e2:SetTarget(c66913804.tg)
e2:SetOperation(c66913804.op)
c:RegisterEffect(e2)
......
......@@ -17,7 +17,7 @@ function c66913809.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,66913809)
e2:SetCountLimit(1,66913809+10000)
e2:SetTarget(c66913809.rmtg)
e2:SetOperation(c66913809.rmop)
c:RegisterEffect(e2)
......
......@@ -19,7 +19,7 @@ function c66913810.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,66913810)
e2:SetCountLimit(1,66913810+10000)
e2:SetTarget(c66913810.tgtg)
e2:SetOperation(c66913810.opop)
c:RegisterEffect(e2)
......
......@@ -54,7 +54,7 @@ function c66913813.spop1(e,tp,eg,ep,ev,re,r,rp)
end
end
function c66913813.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>=20
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>=10
end
function c66913813.thfilter(c)
return c:IsAbleToHand() and c:IsFaceup()
......
--青涩言叶 森永Miu
local m=81003023
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.setcon)
e1:SetCost(cm.setcost)
e1:SetTarget(cm.settg)
e1:SetOperation(cm.setop)
c:RegisterEffect(e1)
--disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.discon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
end
function cm.sstfilter(c)
return c:IsFaceup() and c:IsSetCard(0x817) and not c:IsLevel(4)
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.sstfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.setfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.setfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.setfilter,tp,0,LOCATION_GRAVE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,cm.setfilter,tp,0,LOCATION_GRAVE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and (tc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e0:SetReset(RESET_EVENT+RESETS_REDIRECT)
e0:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e0,true)
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
if tc:IsType(TYPE_TRAP) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
function cm.cfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:GetOwner()==1-tp
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) and Duel.GetTurnPlayer()==1-tp
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
......@@ -6,7 +6,7 @@ cm.named_with_Urban=true
function cm.initial_effect(c)
aux.AddCodeList(c,81011027)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
aux.AddSynchroMixProcedure(c,aux.FilterBoolFunction(Card.IsCode,81011027),nil,nil,cm.mfilter,1,1)
c:EnableReviveLimit()
--code
local e0=Effect.CreateEffect(c)
......@@ -37,75 +37,48 @@ function cm.initial_effect(c)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetOperation(cm.checkop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetOperation(cm.desop)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
--double tuner check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(cm.valcheck)
c:RegisterEffect(e3)
end
function cm.tffilter(c,tp)
return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and not c:IsForbidden() and not Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
function cm.mfilter(c)
return muxu.check_set_Urban(c) and c:IsType(TYPE_MONSTER)
end
function cm.dfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
function cm.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsType,2,nil,TYPE_TUNER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(21142671)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.tffilter(c,tp,thchk)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden() and (muxu.check_set_Soul(c) or thchk) and c:CheckUniqueOnField(tp)
end
function cm.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
local thchk=Duel.IsEnvironment(1111502,PLAYER_ALL,LOCATION_FZONE)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp,thchk) end
end
function cm.tfop(e,tp,eg,ep,ev,re,r,rp)
local thchk=Duel.IsEnvironment(1111502,PLAYER_ALL,LOCATION_FZONE)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,cm.tffilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tffilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp,thchk):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,0)
e:GetHandler():SetCardTarget(tc)
if not (muxu.check_set_Soul(tc) or muxu.check_set_Urban(tc)) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(cm.con)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetCondition(cm.con)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2,true)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,0)
e:GetHandler():SetCardTarget(tc)
end
end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=c:GetColumnGroup()
sg:AddCard(c)
return not sg:IsExists(cm.efilter,1,nil)
end
function cm.efilter(c)
return c:IsFaceup() and c:IsCode(81011027)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) or rp==tp then return false end
if re:IsHasCategory(CATEGORY_NEGATE)
and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0
return ex and tg~=nil and tc>0
end
function cm.vfilter(c)
return (bit.band(c:GetOriginalType(),TYPE_SPELL)~=0 or bit.band(c:GetOriginalType(),TYPE_TRAP)~=0) and c:IsAbleToGraveAsCost()
......@@ -128,15 +101,3 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(eg,REASON_EFFECT)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=0 then return end
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_SZONE) then
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end
......@@ -37,15 +37,15 @@ function cm.cafilter(c)
return not c:IsCode(m)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or not re:IsActiveType(TYPE_MONSTER) or Duel.GetFlagEffect(tp,m)~=0 then return end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
if rp==tp or not re:IsActiveType(TYPE_MONSTER) then return end
local sg=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
if (sg:GetCount()==0 or (sg:GetCount()>0 and not sg:IsExists(cm.cafilter,1,nil))) and Duel.GetFlagEffect(tp,m)==0 then
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()<1 or Duel.GetFlagEffect(tp,m)~=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local rg=g:Select(tp,1,1,nil)
Duel.SendtoHand(rg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,rg)
end
--八宫一月·寂
local m=81011067
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
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_HAND)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--banish deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e3:SetCondition(cm.dscon)
e3:SetCost(cm.cost)
e3:SetTarget(cm.dstg)
e3:SetOperation(cm.dsop)
c:RegisterEffect(e3)
--banish deck
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_REMOVE)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e4:SetCondition(cm.dkcon)
e4:SetCost(cm.cost)
e4:SetTarget(cm.dktg)
e4:SetOperation(cm.dkop)
c:RegisterEffect(e4)
end
function cm.spfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end
function cm.spcon(e,c)
if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end
local g=Duel.GetMatchingGroup(cm.spfilter,c:GetControler(),LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
return ct>=8
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
aux.GCheckAdditional=aux.dncheck
local rg=g:SelectSubGroup(tp,aux.TRUE,false,7,7)
aux.GCheckAdditional=nil
Duel.Remove(rg,POS_FACEUP,REASON_COST)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.dsfilter(c,p)
return c:IsFaceup() and c:IsControler(p)
end
function cm.dscon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.dsfilter,1,nil,tp)
end
function cm.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(cm.dsfilter,tp,LOCATION_REMOVED,0,nil,tp)
local tg=Duel.GetDecktopGroup(tp,ct)
if chk==0 then return ct>0
and tg:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEUP)==ct end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,ct,tp,LOCATION_DECK)
end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(cm.dsfilter,tp,0,LOCATION_REMOVED,nil,tp)
if ct==0 then return end
local tg=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck()
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
function cm.dkfilter(c,p)
return c:IsFacedown() and c:IsControler(p)
end
function cm.dkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.dkfilter,1,nil,tp)
end
function cm.dktg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(cm.dkfilter,tp,LOCATION_REMOVED,0,nil,tp)
local tg=Duel.GetDecktopGroup(tp,ct)
if chk==0 then return ct>0
and tg:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)==ct end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,ct,tp,LOCATION_DECK)
end
function cm.dkop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(cm.dkfilter,tp,0,LOCATION_REMOVED,nil,tp)
if ct==0 then return end
local tg=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck()
Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT)
end
--水晶艾蕾娜·夜蝶
local m=81011068
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetCost(cm.cost)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
end
function cm.spfilter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.spfilter(chkc) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetValue(1)
tc:RegisterEffect(e2)
end
end
function cm.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.filter(c)
return c:IsLevelAbove(5) and c:IsSummonable(true,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
--原田秋叶·雨后
local m=81011069
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(aux.exccon)
e2:SetCost(cm.drcost)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsRank(7) and c:IsType(TYPE_XYZ)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and not c:IsAttribute(ATTRIBUTE_DARK)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(7)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
end
function cm.drfilter(c)
return c:IsCode(81011057,81005077) and c:IsAbleToRemoveAsCost()
end
function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(cm.drfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.drfilter,tp,LOCATION_GRAVE,0,1,1,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--难言之隐·星希花音
local m=81011070
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c20100000") end,function() require("script/c20100000") end)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,6,2,cm.ovfilter,aux.Stringid(m,3),99,cm.xyzop)
--attack up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,m)
e1:SetCost(cm.atkcost)
e1:SetTarget(cm.atktg)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--Chain Attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.asktg)
e2:SetOperation(cm.askop)
c:RegisterEffect(e2)
--spsummon bgm
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e8:SetCode(EVENT_SPSUMMON_SUCCESS)
e8:SetCondition(cm.sumcon)
e8:SetOperation(cm.sumsuc)
c:RegisterEffect(e8)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(81005054)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,cm.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst()
if tc then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function cm.asktg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ac=Duel.GetAttacker()
if chk==0 then return ac:IsControler(tp) and ac:IsRace(RACE_WARRIOR) and ac~=c
and c:GetAttackAnnouncedCount()==0 and c:IsAttackable() end
Duel.SetTargetCard(c)
end
function cm.askop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ac=Duel.GetAttacker()
local atk=c:GetAttack()
if atk<1 then return end
if ac:IsFaceup() and ac:IsRelateToBattle() and c:IsRelateToEffect(e) then
local e1=nef(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=nef(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.askcon)
e2:SetValue(atk)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
ac:RegisterEffect(e2)
end
end
function cm.askcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and c:IsRelateToBattle()
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,2))
end
--克里斯汀·罗森塔尔-ffffff
local m=81013059
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(cm.spcon)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--todeck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(aux.bfgcost)
e1:SetTarget(cm.tdtg)
e1:SetOperation(cm.tdop)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,m+900)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.spfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_WYRM) and c:IsAbleToRemoveAsCost()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.tdfilter(c)
return c:IsAbleToDeck() and not c:IsCode(m)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0
and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
if tc:IsLocation(LOCATION_DECK) then Duel.ShuffleDeck(tc:GetControler()) end
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(cm.rmop2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.rmop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function cm.thfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_WYRM) and c:IsAbleToRemoveAsCost()
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
--克里斯汀·罗森塔尔-c239b3
local m=81013060
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(cm.spcon)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(aux.bfgcost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
end
function cm.spfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_WYRM)
end
function cm.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,c:GetControler(),LOCATION_REMOVED,0,3,nil)
end
function cm.thfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_WYRM) and not c:IsCode(m) and c:IsAbleToHand()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToDeck()
and Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function cm.tgfilter(c)
return c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local tc=g:GetFirst()
if tc:IsLocation(LOCATION_REMOVED) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
--克里斯汀·罗森塔尔-ffb900
local m=81013061
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon rule
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(cm.spcon)
e0:SetOperation(cm.spop)
c:RegisterEffect(e0)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(aux.bfgcost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--to deck and draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,m+900)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
end
function cm.spfilter(c,tp)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_WYRM)
and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c,tp)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,c,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,nil)
local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 and g3:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=g1:RandomSelect(1-tp,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg2=g2:Select(1-tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg3=g3:Select(1-tp,1,1,nil)
sg1:Merge(sg2)
sg1:Merge(sg3)
Duel.HintSelection(sg1)
Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT)
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
end
function cm.thfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_WYRM) and c:IsAbleToRemoveAsCost() and not c:IsCode(m)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,1,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--克里斯汀·罗森塔尔-8764b8
local m=81013062
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,cm.mfilter,1,1)
c:EnableReviveLimit()
--banish & search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TOEXTRA)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_EFFECT)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
end
function cm.mfilter(c)
return c:IsLevelAbove(10) and c:IsLinkRace(RACE_WYRM) and c:IsLinkAttribute(ATTRIBUTE_DARK)
end
function cm.rmfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.thfilter(c)
return c:IsLevelAbove(10) and c:IsRace(RACE_WYRM) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.rmfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.rmfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function cm.rsfilter(c)
return c:IsFaceup() and c:IsAbleToRemove() and c:IsRace(RACE_WYRM) and c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.rsfilter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToDeck()
and Duel.IsExistingTarget(cm.rsfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.rsfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT)>0 then
if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end
end
--凯瑟琳·罗森塔尔 α
local m=81013063
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.sumcon)
e2:SetCost(cm.sscost)
e2:SetTarget(cm.sstg)
e2:SetOperation(cm.ssop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsRace(RACE_WYRM) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevelAbove(10) and c:IsAbleToRemoveAsCost()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function cm.scfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevelBelow(8) and c:IsAbleToRemoveAsCost()
end
function cm.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(cm.scfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,cm.scfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
rg:AddCard(e:GetHandler())
Duel.Remove(rg,POS_FACEUP,REASON_COST)
end
function cm.ssfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsFaceup() and c:IsLevelAbove(9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and cm.ssfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.ssfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.ssfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--感知现实破碎
local m=81013064
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.rfilter(c)
return c:IsRace(RACE_WYRM) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rfilter,tp,LOCATION_DECK,0,1,1,nil)
local tg=g:GetFirst()
if tg==nil then return end
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
function cm.thfilter(c)
return c:IsRace(RACE_WYRM) and c:IsAttribute(ATTRIBUTE_DARK) 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
--感知现实复原
local m=81013065
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WYRM) and c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
end
end
function cm.thfilter(c)
return c:IsRace(RACE_WYRM) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() and c:IsFaceup()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
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_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--Medicine of Sing
local m=81013066
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--remove
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(0xff,0xff)
e1:SetValue(LOCATION_REMOVED)
e1:SetTarget(cm.rmtg)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.rmtg(e,c)
return c:GetOwner()==e:GetHandlerPlayer()
end
function cm.tgfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND+RACE_WYRM) and c:IsAbleToDeck()
end
function cm.thfilter(c)
return c:IsCode(81013064,81013065) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_REMOVED,0,2,nil)
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_REMOVED,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,cm.thfilter,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 cm.filter(c,e,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND+RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--心之天使 糖歌
local m=81013068
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(cm.condition)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.cfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and (not c:IsType(TYPE_EFFECT)) and c:IsControler(tp)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return e:GetHandler():GetFlagEffect(m)==0 and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
and g and g:IsExists(cm.cfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectEffectYesNo(tp,e:GetHandler()) then
Duel.Hint(HINT_CARD,0,m)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
if Duel.NegateEffect(ev) and e:GetHandler():IsAbleToDeck() then
Duel.BreakEffect()
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
end
--梦野·无烬之门
local m=81013069
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--overlay
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.ovtg)
e1:SetOperation(cm.ovop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.drcon)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function cm.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.ovfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(cm.ovfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.ovfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function cm.ovop(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 cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ)
and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
--浅见空子 the Perfect
local m=81013070
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsXyzType,TYPE_NORMAL),4,2)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.spcost1)
e1:SetTarget(cm.sptg1)
e1:SetOperation(cm.spop1)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsRank(4)
end
function cm.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not c:IsRank(4)
end
function cm.spfilter1(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--熟睡的望月杏奈
local m=81016028
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function cm.thfilter(c)
return c:IsSetCard(0x81d) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,3,3,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local tg=sg:Select(1-tp,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
--秘密作战·望月杏奈
local m=81016029
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.regcon)
e2:SetOperation(cm.regop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x81d)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,2,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(cm.damop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local cta=Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)
local ctb=Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)
if cta==0 and ctb==0 then return end
Duel.Hint(HINT_CARD,0,m)
Duel.Damage(tp,cta*200,REASON_EFFECT)
Duel.Damage(1-tp,ctb*200,REASON_EFFECT)
end
--望月杏奈的神回答
local m=81016030
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e2:SetCondition(cm.drcon)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x81d) and c:IsLevel(8)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function cm.drfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local i=Duel.GetMatchingGroupCount(cm.drfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then return Duel.IsPlayerCanDraw(tp,i+1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(i+1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,i+1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,i)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local i=Duel.GetMatchingGroupCount(cm.drfilter,p,LOCATION_MZONE,LOCATION_MZONE,nil)
if Duel.Draw(p,i+1,REASON_EFFECT)==0 then return end
if i>0 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,i,i,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
end
function cm.filter2(c)
return c:IsSetCard(0x81d) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and rp==1-tp and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_ONFIELD)
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_MZONE,0,1,nil)
end
function cm.tfilter(c)
return c:IsControlerCanBeChanged() and c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function cm.tsfilter(c)
return c:IsAbleToChangeControler() and c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(1-tp,cm.tsfilter,1-tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if not tc then return end
Duel.GetControl(tc,tp)
end
--眼疾手快·望月杏奈
local m=81016031
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--draw
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.target)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
end
function cm.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_EXTRA,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
Duel.SetTargetParam(Duel.SelectOption(tp,1056,1063,1073,1076))
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local opt=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local ct=nil
if opt==0 then ct=TYPE_FUSION end
if opt==1 then ct=TYPE_SYNCHRO end
if opt==2 then ct=TYPE_XYZ end
if opt==3 then ct=TYPE_LINK end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(cm.distg)
e2:SetLabel(ct)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
function cm.distg(e,c)
return c:IsType(e:GetLabel())
end
--飞越未来·望月杏奈
local m=81016032
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(cm.spcon)
c:RegisterEffect(e0)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.eqcon)
e1:SetTarget(cm.eqtg)
e1:SetOperation(cm.eqop)
c:RegisterEffect(e1)
--Destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetTarget(cm.desreptg)
e2:SetOperation(cm.desrepop)
c:RegisterEffect(e2)
end
function cm.dcfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function cm.spcon(e,c)
if c==nil then return true end
return not Duel.IsExistingMatchingCard(cm.dcfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.dcfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.eqcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function cm.eqfilter(c)
return c:IsFaceup() and c:GetSummonLocation()==LOCATION_EXTRA and c:IsAbleToChangeControler()
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(cm.eqfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,cm.eqfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_MONSTER)) then return end
local atk=tc:GetTextAttack()
if tc:IsFacedown() or atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c) then return end
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(cm.eqlimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
end
function cm.eqlimit(e,c)
return e:GetOwner()==c
end
function cm.eqeqfilter(c,ec)
return c:GetFlagEffect(m)~=0 and c:IsHasCardTarget(ec)
end
function cm.repfilter(c,e,ec)
return cm.eqeqfilter(c,ec) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsReason(REASON_REPLACE) and Duel.IsExistingMatchingCard(cm.repfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e,c) end
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local tc=Duel.SelectMatchingCard(tp,cm.repfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e,c):GetFirst()
e:SetLabelObject(tc)
tc:SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true
else return false end
end
function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
g:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE)
end
--独自作战·望月杏奈
local m=81016033
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
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_HAND)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetCost(cm.setcost)
e3:SetTarget(cm.settg)
e3:SetOperation(cm.setop)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m+900)
e4:SetCondition(cm.negcon)
e4:SetCost(cm.negcost)
e4:SetTarget(cm.negtg)
e4:SetOperation(cm.negop)
c:RegisterEffect(e4)
end
function cm.spfilter(c,ft,tp)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(7,8)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,cm.spfilter,1,nil,ft,tp) and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_EXTRA,0)==0
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,cm.spfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
end
function cm.costfilter1(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function cm.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter1,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,cm.costfilter1,1,1,REASON_COST+REASON_DISCARD)
end
function cm.setfilter(c)
return c:IsSetCard(0x81d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
if tc:IsType(TYPE_TRAP) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function cm.cfilter(c)
return c:IsSetCard(0x81d) and c:IsDiscardable()
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,cm.cfilter,1,1,REASON_COST+REASON_DISCARD,nil)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
--望月杏奈的正月
local m=81016034
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
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:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e2:SetCondition(cm.drcon)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
--act in set turn
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetCondition(cm.actcon)
c:RegisterEffect(e3)
end
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x81d) and c:IsLevel(7) and c:IsDiscardable()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,81016999,0x81d,0x4011,765,765,7,RACE_FAIRY,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,81016999,0x81d,0x4011,765,765,7,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
for i=1,2 do
local token=Duel.CreateToken(tp,81016999)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
end
function cm.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.filter2(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x81d)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and rp==1-tp and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_ONFIELD)
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_MZONE,0,1,nil)
end
function cm.tfilter(c)
return ((c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) and c:IsFaceup()) or (c:IsLocation(LOCATION_EXTRA) and c:IsFacedown())) and c:IsAbleToGrave()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tfilter,tp,0,LOCATION_HAND+LOCATION_EXTRA,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_MZONE+LOCATION_EXTRA,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tfilter,tp,0,LOCATION_MZONE+LOCATION_EXTRA,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
function cm.actcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_EXTRA,0)==0
end
--望月杏奈的Wink
local m=81016035
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.sscon)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--To hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,m+900)
e4:SetCondition(aux.exccon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0x81d) and c:IsLevel(8) and c:IsAbleToHand()
end
function cm.dfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
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,0,1,nil)
and Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(cm.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
local sg=Duel.GetMatchingGroup(cm.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
end
function cm.thfilter(c)
return c:IsSetCard(0x81d) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--夏祭时节·望月杏奈
local m=81016036
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.sprcon)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.sprfilter(c)
return c:IsFaceup() and c:IsLevel(8) and c:IsSetCard(0x81d) and not c:IsCode(m)
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
and Duel.IsExistingMatchingCard(cm.sprfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_END
end
function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetChainLimit(cm.chlimit)
end
function cm.chlimit(e,ep,tp)
return tp==ep
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCountLimit(1)
e2:SetOperation(cm.tgop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
--深秋已过·双叶
local m=81022051
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.rmcon)
e1:SetTarget(cm.rmtg)
e1:SetOperation(cm.rmop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_EXTRA)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.tstg)
e3:SetOperation(cm.tsop)
c:RegisterEffect(e3)
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:GetBaseAttack()==1550 and c:IsControler(tp)
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.rmfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAttack(1550) and c:IsDefense(1050) and c:IsAbleToHand()
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rmfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.filter(c)
return c:IsFaceup() and c:IsAttack(1550) and c:IsDefense(1050)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
function cm.tstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGrave() end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,c,1,0,0)
end
function cm.tsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
--Twilight Ride
local m=81042011
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.gytg)
e1:SetOperation(cm.gyop)
c:RegisterEffect(e1)
--disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.rmcon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
end
function cm.tgfilter(c,tp)
return c:IsCode(37564765) and c:IsFaceup() and Duel.IsExistingMatchingCard(cm.gyfilter,tp,0,LOCATION_ONFIELD,1,nil,c:GetColumnGroup())
end
function cm.gyfilter(c,g)
return g:IsContains(c)
end
function cm.gytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_ONFIELD)
end
function cm.gyop(e,tp,eg,ep,ev,re,r,rp)
local pg=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
if pg:GetCount()==0 then return end
local g=Duel.GetMatchingGroup(cm.gyfilter,tp,0,LOCATION_ONFIELD,nil,pg:GetFirst():GetColumnGroup())
Duel.SendtoGrave(g,REASON_EFFECT)
end
function cm.rmcfilter(c)
return c:IsFaceup() and c:GetOriginalCode()==37564765
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.rmcfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),tp,POS_FACEDOWN) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),tp,POS_FACEDOWN)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e),tp,POS_FACEDOWN)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
end
--melody of the days
local m=81042012
local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
Senya.NanahiraTrap(c,e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(cm.handcon)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsCode(37564765) and c:IsRace(RACE_DRAGON)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(cm.efilter)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e2)
end
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function cm.cfilter(c)
return c:IsFaceup() and c:GetOriginalCode()==37564765
end
function cm.handcon(e)
return Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
--虚拟主播 星川莎拉
local m=81046027
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.spcon)
c:RegisterEffect(e2)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(cm.atkval)
c:RegisterEffect(e3)
--todeck
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.tdtg)
e4:SetOperation(cm.tdop)
c:RegisterEffect(e4)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.atkval(e,c)
local tp=c:GetControler()
return math.abs(Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA))*300
end
function cm.tdfilter(c)
return c:IsLevel(7,8) and c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) and c:IsAbleToExtra()
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 and Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)~=0 and tg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then
local ag=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if ag:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=ag:Select(tp,1,1,nil)
Duel.HintSelection(dg)
Duel.SendtoDeck(dg,nil,2,REASON_EFFECT)
end
end
end
--虚拟YouTuber 花园Serena
local m=81046028
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.matfilter,2)
--atk to 0
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(cm.atkcon)
e1:SetTarget(cm.atktg)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.atkcon2)
e2:SetOperation(cm.atkop2)
c:RegisterEffect(e2)
--cannot be link material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function cm.matfilter(c)
return c:IsAttack(0) and c:IsFaceup()
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.nzatk,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,aux.nzatk,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst()
if tc then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function cm.atkcon2(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return d and a:GetControler()~=d:GetControler()
end
function cm.atkop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a:IsFaceup() and a:IsRelateToBattle() and d:IsFaceup() and d:IsRelateToBattle() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(a:GetLink()*1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
a:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(d:GetLink()*1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
d:RegisterEffect(e2)
end
end
--蝶舞·溯源
local m=81048021
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c1110198") end,function() require("script/c1110198") end)
cm.named_with_Butterfly=true
function cm.initial_effect(c)
aux.AddCodeList(c,81011027)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(cm.reptg)
e2:SetValue(cm.repval)
e2:SetOperation(cm.repop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return muxu.check_fusion_set_Urban(c) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
return ct>2
end
function cm.filter(c,e,tp)
return (aux.IsCodeListed(c,81011027) or c:IsCode(81011027)) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,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,0,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)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(m)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
function cm.repfilter1(c,tp)
return (muxu.check_fusion_set_Urban(c) or c:IsCode(81011027)) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function cm.repfilter2(c)
return (c:IsOnField() or c:IsLocation(LOCATION_HAND)) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsExistingMatchingCard(cm.repfilter1,tp,LOCATION_MZONE,0,1,nil) and eg:IsExists(cm.repfilter2,1,nil) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function cm.repval(e,c)
return cm.repfilter2(c,e:GetHandlerPlayer())
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
--逆袭之斗兽 鸢泽美咲
function c9910231.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c9910231.lfilter,2,99,c9910231.lcheck)
c:EnableReviveLimit()
--zone limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_MUST_USE_MZONE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetValue(c9910231.zonelimit)
c:RegisterEffect(e1)
--cannot disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCondition(c9910231.effcon)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetTarget(c9910231.rmtg)
e3:SetOperation(c9910231.rmop)
c:RegisterEffect(e3)
end
function c9910231.zonelimit(e)
return 0x1f001f | (0x600060 & ~e:GetHandler():GetLinkedZone())
end
function c9910231.lfilter(c)
return c:IsLinkAttribute(ATTRIBUTE_WIND) and c:IsLinkType(TYPE_LINK)
end
function c9910231.lcheck(g)
return g:IsExists(Card.IsLinkMarker,1,nil,LINK_MARKER_BOTTOM)
and g:IsExists(Card.IsLinkMarker,1,nil,LINK_MARKER_TOP)
and g:IsExists(Card.IsLinkMarker,1,nil,LINK_MARKER_TOP_LEFT)
and g:IsExists(Card.IsLinkMarker,1,nil,LINK_MARKER_TOP_RIGHT)
and g:IsExists(Card.IsLinkSetCard,1,nil,0x955)
end
function c9910231.effcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c9910231.tgfilter(c,lg)
return lg:IsContains(c) and c:IsAbleToRemove()
end
function c9910231.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c9910231.tgfilter(chkc,lg) end
if chk==0 then return Duel.IsExistingTarget(c9910231.tgfilter,tp,0,LOCATION_MZONE,1,nil,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c9910231.tgfilter,tp,0,LOCATION_MZONE,1,1,nil,lg)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c9910231.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--丛雨
function c9910376.initial_effect(c)
aux.AddCodeList(c,9910376)
--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(c9910376.splimit)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,9910376)
e2:SetTarget(c9910376.thtg)
e2:SetOperation(c9910376.thop)
c:RegisterEffect(e2)
--summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,9910377)
e3:SetCost(c9910376.sumcost)
e3:SetTarget(c9910376.sumtg)
e3:SetOperation(c9910376.sumop)
c:RegisterEffect(e3)
--change effect type
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(9910376)
e4:SetRange(LOCATION_GRAVE)
e4:SetTargetRange(1,0)
c:RegisterEffect(e4)
--unreleaseable sum
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_UNRELEASABLE_SUM)
e5:SetValue(1)
e5:SetCondition(c9910376.relcon)
c:RegisterEffect(e5)
--summon with no tribute
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_SUMMON_PROC)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(LOCATION_HAND,0)
e6:SetCondition(c9910376.tricon)
c:RegisterEffect(e6)
if c9910376.counter==nil then
c9910376.counter=true
c9910376[0]=0
c9910376[1]=0
local e21=Effect.CreateEffect(c)
e21:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e21:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e21:SetOperation(c9910376.resetcount)
Duel.RegisterEffect(e21,0)
local e22=Effect.CreateEffect(c)
e22:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e22:SetCode(EVENT_RELEASE)
e22:SetOperation(c9910376.addcount)
Duel.RegisterEffect(e22,0)
end
end
function c9910376.splimit(e,se,sp,st)
return aux.IsCodeListed(se:GetHandler(),9910376)
end
function c9910376.resetcount(e,tp,eg,ep,ev,re,r,rp)
c9910376[0]=0
c9910376[1]=0
end
function c9910376.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
local pl=tc:GetPreviousLocation()
if pl==LOCATION_MZONE and aux.IsCodeListed(tc,9910376) then
local p=tc:GetReasonPlayer()
c9910376[p]=c9910376[p]+1
end
tc=eg:GetNext()
end
end
function c9910376.thfilter(c)
return aux.IsCodeListed(c,9910376) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c9910376.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=c9910376[tp]
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(c9910376.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c9910376.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=c9910376[tp]
local g=Duel.GetMatchingGroup(c9910376.thfilter,tp,LOCATION_DECK,0,nil)
if ct>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function c9910376.sumcost(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 c9910376.filter(c)
return aux.IsCodeListed(c,9910376) and c:IsSummonable(true,nil)
end
function c9910376.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,c) then
local flag=c:GetFlagEffectLabel(9910376)
if flag then
c:SetFlagEffectLabel(9910376,1)
else
c:RegisterFlagEffect(9910376,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
else
local flag=c:GetFlagEffectLabel(9910390)
if flag then
c:SetFlagEffectLabel(9910390,1)
else
c:RegisterFlagEffect(9910390,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
end
local b=Duel.IsExistingMatchingCard(c9910376.filter,tp,LOCATION_HAND,0,1,nil)
c:SetFlagEffectLabel(9910376,0)
c:SetFlagEffectLabel(9910390,0)
if chk==0 then return b end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c9910376.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c9910376.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
function c9910376.relcon(e)
local ct=e:GetHandler():GetFlagEffectLabel(9910376)
return ct and ct>0
end
function c9910376.tricon(e,c,minc)
local ct=e:GetHandler():GetFlagEffectLabel(9910390)
if c==nil then return ct and ct>0 end
return ct and ct>0 and minc==0
end
--朝武芳乃
function c9910378.initial_effect(c)
aux.AddCodeList(c,9910376)
--summon with no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910378,0))
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c9910378.ntcon)
c:RegisterEffect(e1)
--disable effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c9910378.discon)
e3:SetOperation(c9910378.disop)
c:RegisterEffect(e3)
--Negate
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SUMMON+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_F)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c9910378.condition1)
e4:SetCost(c9910378.cost)
e4:SetTarget(c9910378.target1)
e4:SetOperation(c9910378.operation)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(0)
e5:SetCondition(c9910378.condition2)
e5:SetTarget(c9910378.target2)
c:RegisterEffect(e5)
--unreleaseable sum
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_UNRELEASABLE_SUM)
e6:SetValue(1)
e6:SetCondition(c9910378.relcon)
c:RegisterEffect(e6)
--summon with no tribute
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_SUMMON_PROC)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(LOCATION_HAND,0)
e8:SetCondition(c9910378.tricon)
c:RegisterEffect(e8)
end
function c9910378.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
end
function c9910378.discon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c9910378.disop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(e:GetHandler():GetSequence())
local loc,seq2=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
if rp==1-tp and re:IsActiveType(TYPE_SPELL) and loc&LOCATION_SZONE==LOCATION_SZONE and seq1==4-seq2 then
Duel.Hint(HINT_CARD,0,9910378)
Duel.NegateEffect(ev)
end
end
function c9910378.condition1(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and (Duel.GetTurnPlayer()~=tp or not Duel.IsPlayerAffectedByEffect(tp,9910376))
end
function c9910378.condition2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.GetTurnPlayer()==tp and Duel.IsPlayerAffectedByEffect(tp,9910376)
end
function c9910378.cost(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 c9910378.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
end
function c9910378.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,c) then
local flag=c:GetFlagEffectLabel(9910378)
if flag then
c:SetFlagEffectLabel(9910378,1)
else
c:RegisterFlagEffect(9910378,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
else
local flag=c:GetFlagEffectLabel(9910391)
if flag then
c:SetFlagEffectLabel(9910391,1)
else
c:RegisterFlagEffect(9910391,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
end
local loc=LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED
local b1=Duel.IsExistingMatchingCard(c9910378.filter,tp,LOCATION_HAND,0,1,nil)
local b2=Duel.GetFlagEffect(tp,9910378)==0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9910378.spfilter,tp,loc,0,1,nil,e,tp)
c:SetFlagEffectLabel(9910378,0)
c:SetFlagEffectLabel(9910391,0)
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,loc)
end
function c9910378.filter(c)
return aux.IsCodeListed(c,9910376) and c:IsSummonable(true,nil)
end
function c9910378.spfilter(c,e,tp)
return c:IsCode(9910376) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function c9910378.operation(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c9910378.spfilter),tp,loc,0,1,nil,e,tp)
and Duel.GetFlagEffect(tp,9910378)==0 and Duel.SelectYesNo(tp,aux.Stringid(9910378,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9910378.spfilter),tp,loc,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.RegisterFlagEffect(tp,9910378,0,0,1)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c9910378.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
end
function c9910378.relcon(e)
local ct=e:GetHandler():GetFlagEffectLabel(9910378)
return ct and ct>0
end
function c9910378.tricon(e,c,minc)
local ct=e:GetHandler():GetFlagEffectLabel(9910391)
if c==nil then return ct and ct>0 end
return ct and ct>0 and minc==0
end
--常陆茉子
function c9910379.initial_effect(c)
aux.AddCodeList(c,9910376)
--summon with no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910379,0))
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c9910379.ntcon)
c:RegisterEffect(e1)
--disable effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c9910379.discon)
e3:SetOperation(c9910379.disop)
c:RegisterEffect(e3)
--Negate
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SUMMON+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_F)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c9910379.condition1)
e4:SetCost(c9910379.cost)
e4:SetTarget(c9910379.target1)
e4:SetOperation(c9910379.operation)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(0)
e5:SetCondition(c9910379.condition2)
e5:SetTarget(c9910379.target2)
c:RegisterEffect(e5)
--unreleaseable sum
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e7:SetRange(LOCATION_MZONE)
e7:SetCode(EFFECT_UNRELEASABLE_SUM)
e7:SetValue(1)
e7:SetCondition(c9910379.relcon)
c:RegisterEffect(e7)
--summon with no tribute
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_SUMMON_PROC)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(LOCATION_HAND,0)
e8:SetCondition(c9910379.tricon)
c:RegisterEffect(e8)
end
function c9910379.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
end
function c9910379.discon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c9910379.disop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(e:GetHandler():GetSequence())
local loc,seq2=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
if rp==1-tp and re:IsActiveType(TYPE_TRAP) and loc&LOCATION_SZONE==LOCATION_SZONE and seq1==4-seq2 then
Duel.Hint(HINT_CARD,0,9910379)
Duel.NegateEffect(ev)
end
end
function c9910379.condition1(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and (Duel.GetTurnPlayer()~=tp or not Duel.IsPlayerAffectedByEffect(tp,9910376))
end
function c9910379.condition2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.GetTurnPlayer()==tp and Duel.IsPlayerAffectedByEffect(tp,9910376)
end
function c9910379.cost(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 c9910379.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
end
function c9910379.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,c) then
local flag=c:GetFlagEffectLabel(9910379)
if flag then
c:SetFlagEffectLabel(9910379,1)
else
c:RegisterFlagEffect(9910379,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
else
local flag=c:GetFlagEffectLabel(9910392)
if flag then
c:SetFlagEffectLabel(9910392,1)
else
c:RegisterFlagEffect(9910392,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
end
local loc=LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED
local b1=Duel.IsExistingMatchingCard(c9910379.filter,tp,LOCATION_HAND,0,1,nil)
local b2=Duel.GetFlagEffect(tp,9910379)==0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9910379.spfilter,tp,loc,0,1,nil,e,tp)
c:SetFlagEffectLabel(9910379,0)
c:SetFlagEffectLabel(9910392,0)
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,loc)
end
function c9910379.filter(c)
return aux.IsCodeListed(c,9910376) and c:IsSummonable(true,nil)
end
function c9910379.spfilter(c,e,tp)
return c:IsCode(9910376) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function c9910379.operation(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c9910379.spfilter),tp,loc,0,1,nil,e,tp)
and Duel.GetFlagEffect(tp,9910379)==0 and Duel.SelectYesNo(tp,aux.Stringid(9910379,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9910379.spfilter),tp,loc,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.RegisterFlagEffect(tp,9910379,0,0,1)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c9910379.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
end
function c9910379.relcon(e)
local ct=e:GetHandler():GetFlagEffectLabel(9910379)
return ct and ct>0
end
function c9910379.tricon(e,c,minc)
local ct=e:GetHandler():GetFlagEffectLabel(9910392)
if c==nil then return ct and ct>0 end
return ct and ct>0 and minc==0
end
--蕾娜·莉希特娜瓦
function c9910380.initial_effect(c)
aux.AddCodeList(c,9910376)
--summon with no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910380,0))
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c9910380.ntcon)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c9910380.discon)
e2:SetOperation(c9910380.disop)
c:RegisterEffect(e2)
--Negate
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SUMMON+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_F)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c9910380.condition1)
e4:SetCost(c9910380.cost)
e4:SetTarget(c9910380.target1)
e4:SetOperation(c9910380.operation)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(0)
e5:SetCondition(c9910380.condition2)
e5:SetTarget(c9910380.target2)
c:RegisterEffect(e5)
--unreleaseable sum
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_UNRELEASABLE_SUM)
e6:SetValue(1)
e6:SetCondition(c9910380.relcon)
c:RegisterEffect(e6)
--summon with no tribute
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_SUMMON_PROC)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(LOCATION_HAND,0)
e8:SetCondition(c9910380.tricon)
c:RegisterEffect(e8)
end
function c9910380.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
end
function c9910380.discon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c9910380.disop(e,tp,eg,ep,ev,re,r,rp)
local seq1=aux.MZoneSequence(e:GetHandler():GetSequence())
local loc,seq2=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
seq2=aux.MZoneSequence(seq2)
if rp==1-tp and re:IsActiveType(TYPE_MONSTER) and loc&LOCATION_SZONE==LOCATION_MZONE and seq1==4-seq2 then
Duel.Hint(HINT_CARD,0,9910380)
Duel.NegateEffect(ev)
end
end
function c9910380.condition1(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and (Duel.GetTurnPlayer()~=tp or not Duel.IsPlayerAffectedByEffect(tp,9910376))
end
function c9910380.condition2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.GetTurnPlayer()==tp and Duel.IsPlayerAffectedByEffect(tp,9910376)
end
function c9910380.cost(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 c9910380.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
end
function c9910380.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,c) then
local flag=c:GetFlagEffectLabel(9910380)
if flag then
c:SetFlagEffectLabel(9910380,1)
else
c:RegisterFlagEffect(9910380,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
else
local flag=c:GetFlagEffectLabel(9910393)
if flag then
c:SetFlagEffectLabel(9910393,1)
else
c:RegisterFlagEffect(9910393,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
end
local loc=LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED
local b1=Duel.IsExistingMatchingCard(c9910380.filter,tp,LOCATION_HAND,0,1,nil)
local b2=Duel.GetFlagEffect(tp,9910380)==0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9910380.spfilter,tp,loc,0,1,nil,e,tp)
c:SetFlagEffectLabel(9910380,0)
c:SetFlagEffectLabel(9910393,0)
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,loc)
end
function c9910380.filter(c)
return aux.IsCodeListed(c,9910376) and c:IsSummonable(true,nil)
end
function c9910380.spfilter(c,e,tp)
return c:IsCode(9910376) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function c9910380.operation(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c9910380.spfilter),tp,loc,0,1,nil,e,tp)
and Duel.GetFlagEffect(tp,9910380)==0 and Duel.SelectYesNo(tp,aux.Stringid(9910380,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9910380.spfilter),tp,loc,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.RegisterFlagEffect(tp,9910380,0,0,1)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c9910380.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
end
function c9910380.relcon(e)
local ct=e:GetHandler():GetFlagEffectLabel(9910380)
return ct and ct>0
end
function c9910380.tricon(e,c,minc)
local ct=e:GetHandler():GetFlagEffectLabel(9910393)
if c==nil then return ct and ct>0 end
return ct and ct>0 and minc==0
end
--有地将臣
function c9910381.initial_effect(c)
aux.AddCodeList(c,9910376)
--summon with no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910381,0))
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c9910381.ntcon)
c:RegisterEffect(e1)
--disable effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c9910381.discon)
e3:SetOperation(c9910381.disop)
c:RegisterEffect(e3)
--Negate
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SUMMON+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_F)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c9910381.condition1)
e4:SetCost(c9910381.cost)
e4:SetTarget(c9910381.target1)
e4:SetOperation(c9910381.operation)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(0)
e5:SetCondition(c9910381.condition2)
e5:SetTarget(c9910381.target2)
c:RegisterEffect(e5)
--unreleaseable sum
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_UNRELEASABLE_SUM)
e6:SetValue(1)
e6:SetCondition(c9910381.relcon)
c:RegisterEffect(e6)
--summon with no tribute
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_SUMMON_PROC)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(LOCATION_HAND,0)
e8:SetCondition(c9910381.tricon)
c:RegisterEffect(e8)
end
function c9910381.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
end
function c9910381.discon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c9910381.disop(e,tp,eg,ep,ev,re,r,rp)
local loc,p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_PLAYER)
if (LOCATION_HAND+LOCATION_GRAVE)&loc~=0 and p~=tp and re:IsActiveType(TYPE_MONSTER) then
Duel.NegateEffect(ev)
end
end
function c9910381.condition1(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and (Duel.GetTurnPlayer()~=tp or not Duel.IsPlayerAffectedByEffect(tp,9910376))
end
function c9910381.condition2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.GetTurnPlayer()==tp and Duel.IsPlayerAffectedByEffect(tp,9910376)
end
function c9910381.cost(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 c9910381.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
end
function c9910381.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,c) then
local flag=c:GetFlagEffectLabel(9910381)
if flag then
c:SetFlagEffectLabel(9910381,1)
else
c:RegisterFlagEffect(9910381,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
else
local flag=c:GetFlagEffectLabel(9910394)
if flag then
c:SetFlagEffectLabel(9910394,1)
else
c:RegisterFlagEffect(9910394,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
end
local loc=LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED
local b1=Duel.IsExistingMatchingCard(c9910381.filter,tp,LOCATION_HAND,0,1,nil)
local b2=Duel.GetFlagEffect(tp,9910381)==0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9910381.spfilter,tp,loc,0,1,nil,e,tp)
c:SetFlagEffectLabel(9910381,0)
c:SetFlagEffectLabel(9910394,0)
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,loc)
end
function c9910381.filter(c)
return aux.IsCodeListed(c,9910376) and c:IsSummonable(true,nil)
end
function c9910381.spfilter(c,e,tp)
return c:IsCode(9910376) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function c9910381.operation(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c9910381.spfilter),tp,loc,0,1,nil,e,tp)
and Duel.GetFlagEffect(tp,9910381)==0 and Duel.SelectYesNo(tp,aux.Stringid(9910381,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9910381.spfilter),tp,loc,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.RegisterFlagEffect(tp,9910381,0,0,1)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c9910381.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
end
function c9910381.relcon(e)
local ct=e:GetHandler():GetFlagEffectLabel(9910381)
return ct and ct>0
end
function c9910381.tricon(e,c,minc)
local ct=e:GetHandler():GetFlagEffectLabel(9910394)
if c==nil then return ct and ct>0 end
return ct and ct>0 and minc==0
end
--寻星术的传情
function c9910382.initial_effect(c)
aux.AddCodeList(c,9910376)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,9910382+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c9910382.cost)
e1:SetTarget(c9910382.target)
e1:SetOperation(c9910382.activate)
c:RegisterEffect(e1)
end
function c9910382.costfilter(c)
return aux.IsCodeListed(c,9910376) and c:IsType(TYPE_MONSTER) and c:IsReleasable()
end
function c9910382.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c9910382.costfilter,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,c9910382.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c9910382.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end
function c9910382.thfilter(c)
return aux.IsCodeListed(c,9910376) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c9910382.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local dr=Duel.Draw(p,d,REASON_EFFECT)
local g=Duel.GetMatchingGroup(c9910382.thfilter,p,LOCATION_DECK,0,nil)
if dr~=0 and Duel.GetFlagEffect(p,9910382)==0 and Duel.GetFieldGroupCount(p,LOCATION_EXTRA,0)==0
and Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,9910376)
and g:GetCount()>0 and Duel.SelectYesNo(p,aux.Stringid(9910382,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
local sg=g:Select(p,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,sg)
Duel.RegisterFlagEffect(p,9910382,0,0,1)
end
end
--雪之光的祝福
function c9910383.initial_effect(c)
aux.AddCodeList(c,9910376)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,9910383+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c9910383.target)
e1:SetOperation(c9910383.activate)
c:RegisterEffect(e1)
end
function c9910383.filter(c,e,tp)
return aux.IsCodeListed(c,9910376) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9910383.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c9910383.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c9910383.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c9910383.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function c9910383.thfilter(c)
return aux.IsCodeListed(c,9910376) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c9910383.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
tc:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
tc:RegisterEffect(e3)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9910383.thfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,nil)
if Duel.GetFlagEffect(tp,9910383)==0 and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,9910376)
and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910383,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.RegisterFlagEffect(tp,9910383,0,0,1)
end
end
end
--丛雨丸
function c9910384.initial_effect(c)
aux.AddCodeList(c,9910376)
c:SetUniqueOnField(1,0,9910384)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c9910384.target)
e1:SetOperation(c9910384.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c9910384.eqlimit)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UNRELEASABLE_SUM)
e3:SetCondition(c9910384.indcon)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e5)
--atk
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e6:SetRange(LOCATION_SZONE)
e6:SetCondition(c9910384.atkcon)
e6:SetOperation(c9910384.atkop)
c:RegisterEffect(e6)
end
function c9910384.eqlimit(e,c)
return aux.IsCodeListed(c,9910376)
end
function c9910384.filter(c)
return c:IsFaceup() and aux.IsCodeListed(c,9910376)
end
function c9910384.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c9910384.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9910384.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c9910384.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c9910384.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c9910384.indcon(e)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end
function c9910384.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
local tc=ec:GetBattleTarget()
return ec and tc and tc:IsFaceup() and tc:IsControler(1-tp)
and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c9910384.atkop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ec=e:GetHandler():GetEquipTarget()
local tc=ec:GetBattleTarget()
if ec and tc and ec:IsFaceup() and tc:IsFaceup() then
local sum=tc:GetAttack()+tc:GetDefense()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(math.ceil(sum/2))
ec:RegisterEffect(e1)
end
end
--神乐舞的祓禊
function c9910385.initial_effect(c)
aux.AddCodeList(c,9910376)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,9910385)
e2:SetTarget(c9910385.drtg)
e2:SetOperation(c9910385.drop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_RELEASE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,9910385)
e3:SetCondition(c9910385.tgcon)
e3:SetTarget(c9910385.tgtg)
e3:SetOperation(c9910385.tgop)
c:RegisterEffect(e3)
end
function c9910385.tgfilter(c)
return aux.IsCodeListed(c,9910376) and c:IsAbleToGrave()
end
function c9910385.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingMatchingCard(c9910385.tgfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c9910385.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c9910385.tgfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c9910385.filter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp and aux.IsCodeListed(c,9910376)
end
function c9910385.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9910385.filter,1,nil,tp)
end
function c9910385.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function c9910385.tgop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--月明夜的心声
function c9910386.initial_effect(c)
aux.AddCodeList(c,9910376)
--effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(TIMING_BATTLED,TIMINGS_CHECK_MONSTER+TIMING_BATTLED)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_CHAIN_END)
e1:SetCountLimit(1,9910386+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c9910386.condition)
e1:SetTarget(c9910386.target)
e1:SetOperation(c9910386.activate)
c:RegisterEffect(e1)
end
function c9910386.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function c9910386.spfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:GetSummonPlayer()~=tp
and aux.disfilter1(c) and c:IsAbleToHand() and not c:IsDisabled()
end
function c9910386.summoncheck(tp)
if not Duel.CheckEvent(EVENT_SUMMON_SUCCESS)
and not Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS) then return false end
if Duel.CheckEvent(EVENT_SUMMON_SUCCESS) then
local flag,eg,ep,ev,re,r,rp=Duel.CheckEvent(EVENT_SUMMON_SUCCESS,true)
local tc=eg:GetFirst()
return tc:IsLocation(LOCATION_MZONE) and ep~=tp
and aux.disfilter1(tc) and tc:IsAbleToHand() and not tc:IsDisabled()
else
local flag,eg,ep,ev,re,r,rp=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true)
return eg:IsExists(c9910386.spfilter,1,nil,tp)
end
end
function c9910386.tgfilter(c)
return c:IsCode(9910376) and c:IsAbleToGrave()
end
function c9910386.thfilter(c)
return c:IsCode(9910376) and c:IsAbleToHand()
end
function c9910386.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=c9910386.summoncheck(tp)
and Duel.IsExistingMatchingCard(c9910386.tgfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c9910386.thfilter,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
local s=0
if b1 and not b2 then
s=Duel.SelectOption(tp,aux.Stringid(9910386,0))
end
if not b1 and b2 then
s=Duel.SelectOption(tp,aux.Stringid(9910386,1))+1
end
if b1 and b2 then
s=Duel.SelectOption(tp,aux.Stringid(9910386,0),aux.Stringid(9910386,1))
end
if s==0 then
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
if Duel.CheckEvent(EVENT_SUMMON_SUCCESS) then
e:SetLabel(1)
local flag,eg2,ep2,ev2,re2,r2,rp2=Duel.CheckEvent(EVENT_SUMMON_SUCCESS,true)
local tc=eg2:GetFirst()
Duel.SetTargetCard(eg2)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0)
else
e:SetLabel(2)
local flag,eg2,ep2,ev2,re2,r2,rp2=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true)
local g=eg2:Filter(c9910386.spfilter,nil,tp)
Duel.SetTargetCard(eg2)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
end
if s==1 then
e:SetLabel(3)
e:SetCategory(CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
end
function c9910386.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then
local flag,eg2,ep2,ev2,re2,r2,rp2=Duel.CheckEvent(EVENT_SUMMON_SUCCESS,true)
local tc=eg2:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c9910386.tgfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
if tg:GetCount()>0 and Duel.SendtoGrave(tg,REASON_EFFECT)~=0 and tc and not tc:IsDisabled() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
elseif e:GetLabel()==2 then
local flag,eg2,ep2,ev2,re2,r2,rp2=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true)
local g=eg2:Filter(c9910386.spfilter,nil,tp)
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c9910386.tgfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
if tg:GetCount()>0 and Duel.SendtoGrave(tg,REASON_EFFECT)~=0 and tc then
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
tc=g:Select(tp,1,1,nil):GetFirst()
end
if not tc:IsDisabled() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910386.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c9910386.chainop)
Duel.RegisterEffect(e1,tp)
end
end
function c9910386.chainop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimit(c9910386.chainlm)
end
function c9910386.chainlm(e,rp,tp)
return not e:GetHandler():IsType(TYPE_MONSTER)
end
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