Commit aad9d5d8 authored by TanakaKotoha's avatar TanakaKotoha

pre-update

parent e7ef2bb8
#created by ...
#main
113000
113001
10200520
12013055
12029035
12032001
12045000
12045010
12045011
12045012
12045013
12045014
12045020
12045021
12045040
12080001
12080002
12080010
12080011
12080012
12080013
12080014
12080015
12080017
12080020
15000240
15000241
15000242
15000243
15000244
15000245
15000251
15000252
15000253
16105032
16105034
16105036
#extra
12013020
12013021
12045030
12080030
15000254
15000255
15000256
15000257
15000258
15000259
15000260
!side
#created by ...
#main
17035190
17035500
17035510
17035520
17035530
17035540
17061340
17061350
17061360
17061370
17061380
17061390
17061400
17061420
17061421
17061430
17061440
17061450
17061460
21520161
21520162
21520163
21520164
21520165
21520166
21520167
21520168
21520169
21520170
21520176
21520177
21520178
21520179
21520180
21520181
21520184
21520185
21520186
21520187
21520188
21520189
21520190
#extra
17020110
17035150
17035160
17035170
17035180
17035600
17035610
17061410
17061470
17061900
17061970
17061971
!side
21520171
21520172
21520173
21520174
21520175
21520182
21520183
#created by ...
#main
26812005
26812006
26812007
26812008
26812009
30000500
30000510
30553001
30553003
30553009
30553010
30553011
30553012
33310350
33310351
33310375
33330151
33330152
33330153
33330154
33330155
33330156
33330157
33400552
33403500
33403501
33403502
33403503
33403504
33403505
33403506
33403507
33403508
33403509
33403510
33403512
33403513
33500981
33500982
33502301
33502302
33502303
33502311
33502400
33502401
33502402
33502403
33502404
33502405
#extra
26822002
30000505
30003030
30003040
30003050
30553005
30553006
30553008
33330086
33400818
33401309
33500605
33500983
33502406
33502407
!side
33701100
33701101
33701102
33701103
33701104
33701105
33701106
33701107
33701108
33701109
33701110
33701111
33701112
#created by ...
#main
40009236
40009237
40009238
40009240
40009241
40009245
40009386
40009401
65001005
65001013
65001014
65001016
65001017
65001018
65001019
65010585
65010586
65031001
65031003
65031005
65031007
65031009
65031011
65031013
65031014
72404109
72404119
72404121
72404123
72404125
72404127
72404129
72404133
72404135
72430399
72499000
75640052
#extra
40009242
40009244
65001015
65030068
75646550
!side
#created by ...
#main
81005022
81013049
81013051
81013053
81013054
81013055
81013057
81021019
81021020
81041058
81041059
81041060
81041061
81041062
81041063
81041064
81041065
81041066
81041069
81041070
81041071
81041072
81041073
81046015
81048031
82228638
#extra
81013050
81013052
81013056
81013058
81022045
81041067
81041068
81046016
!side
#created by ...
#main
113001
113002
113003
113004
113005
113006
113007
113008
1182001
1182002
1182003
1182005
1182051
1182053
4210110
4210151
4210152
4210153
4210154
4210155
4210156
4210159
4210160
10200866
10200867
#extra
113009
1182011
1182012
1182013
4210157
4210158
!side
#created by ...
#main
12005020
12010007
12025000
12025001
12025002
12025003
12025004
12025005
12025006
12025007
12026012
12041000
12042000
12042013
12042021
12042022
12042023
12042024
12042040
12042041
12042042
12042050
12044083
12044084
12044087
12048001
12048002
12048003
12048004
12048005
12048006
12048007
12048008
12048009
12048010
12048020
12048021
12048022
12048023
12048024
12048025
12062011
12062020
12062030
12062040
12062050
12062060
#extra
12004022
12008008
12025010
12029027
12029030
12029031
12041002
12042032
!side
#created by ...
#main
16104206
16104210
16104212
16104218
16104220
16104232
16104234
16104242
17020120
17020150
17020180
17020190
17020220
17035550
26800000
26812001
26812010
26812011
26812012
26812013
26812014
26816018
26818066
26824005
30000075
30000080
30000085
33330350
33400464
33400902
33400903
33400905
33401317
33502151
33502152
33502153
33502154
33502155
33502156
33502157
33502411
33502412
33502413
33502414
#extra
17020230
26800007
26818067
33401009
33401011
33401035
!side
#created by ...
#main
65001022
65001023
65001024
65001025
65001029
65011001
65011002
65011003
65011004
65011005
65011006
65011007
65011008
65011009
65011010
65011011
65011012
65011013
65011014
65073001
72409000
72409005
72409010
72409015
72409020
72409025
72409030
72409035
72409050
72409055
72409060
72409065
72409070
72409075
72409080
72409085
72409090
72409135
72409140
72409150
72409155
72409160
72409165
72409170
72409175
72409180
72409185
72409200
72499010
#extra
65001027
65011015
65011016
72409105
72409110
!side
#created by ...
#main
81003001
81003002
81003003
81003004
81003005
81003006
81003007
81003008
81003013
81003014
81003015
81003016
81003017
81003018
81003100
81003102
81011002
81011010
81011030
81011038
81015059
81015060
81022046
81022047
81046001
81046002
81046005
81046018
81046019
81046024
92900001
92900002
92900003
92900004
92900005
92900006
92900007
92900008
92900009
92900011
92900012
92900013
92900014
92900015
#extra
81003009
81003010
81003011
81003012
81003019
81003020
81011012
81046006
81046021
81046022
81046023
81046025
92900010
!side
No preview for this file type
......@@ -50,6 +50,7 @@
01150041 0 --蓝色世界
01150042 0 --红色世界
01156024 0 --接近神的蝴蝶妖精
01156605 0 --不自然的冷气
01160006 0 --混沌形态·爱丽丝
01160011 0 --夏日舞曲·辛德瑞拉
01160043 2 --梦游仙境·柴郡猫
......@@ -87,7 +88,7 @@
#102
10200212 1 --机板佣兵
10200855 0 --天地侵略者·贝尔弗特
10200866 0 --机甲天使
10200866 1 --机甲天使
10220011 2 --SAO 结衣
10220015 1 --SAO 神圣剑 希兹克利夫
10220021 2 --SAO 锻造师 莉兹贝特
......@@ -132,14 +133,11 @@
#111
11113171 2 --小死神
11115008 1 --魔法之御龙士
#112
11200043 0 --腹黑兔 因幡帝
11200064 0 --幸运的白兔 因幡帝
11200065 0 --因幡帝
11200086 0 --赤色制裁
#117
11700002 1 --ZEON-扎古II·F
11700012 1 --ZEON-龟霸
11700015 0 --ZEON-扎古II·R·1A黑色三连星
11700016 0 --ZEON-扎古II·S赤色彗星
11700018 1 --ZEON的军魂
#120
12001006 2 --六曜的占星
......@@ -207,6 +205,7 @@
12030002 1 --乌冬 yatori
12030009 1 --女仆 yatori
12031001 1 --幼血鬼 三葉巧可
12031010 0 --鲜血鬼姬 三葉巧可
12031011 1 --噬血魔女 三葉巧可
12031013 1 --梦境成长 三葉巧可
12032012 0 --阿古莉不高兴
......@@ -218,8 +217,8 @@
12038003 1 --偶像P 普利兹姆
12040001 1 --发圈宠儿 梅雷特
12040002 1 --发圈宠儿 娜娜妮
12041000 0 --海与少女的契约
12041002 0 --幻奏龙 斯卡辛丝
12041000 1 --海与少女的契约
12041002 1 --幻奏龙 斯卡辛丝
12044001 1 --浦罗 向梦境起誓
12054000 0 --空腹的顾拉
12054001 0 --暴食女巫 顾拉
......@@ -262,7 +261,7 @@
14010108 0 --诡诞融合
14010145 1 --狮祖巫之书
14010148 0 --亡都祭
14010150 1 --瞬杀星 奥维尔
14010150 0 --瞬杀星 奥维尔
14010210 2 --编外方舟骑士-翡翠
14010215 0 --心灵之调停者
14010236 1 --微型黑洞
......@@ -286,6 +285,7 @@
14801734 0 --星际战舰 环绕级工业舰
#150
15000252 0 --永寂之旅人·安德萝
15002000 0 --神名浅海
15002011 0 --郁屈的哀乐
15002020 0 --墟伪的审判
#160
......@@ -304,7 +304,7 @@
16102007 1 --SCP-247 无害的小猫
16102011 0 --SCP-2000 机械降神
16104206 0 --不灭的圣光教团国
16104218 0 --教团骑士的行军
16104218 1 --教团骑士的行军
16104220 0 --直到最后一刻
16104234 0 --于圣殿前起誓
16104240 0 --此为不屈之荣光
......@@ -337,8 +337,11 @@
17035030 2 --P.C. 凯露
17035120 1 --莉莫涅姆的救济
17035130 0 --P.C. 可可罗/夏日
17035150 0 --暴风军神·格尼姆尔
17035200 1 --迷你撒旦
17035510 0 --冰狱的波动
17035600 0 --断绝之妖精 多莫维依
17035610 0 --暗堕型乌莎哈 -恶梦-
17060840 1 --苍空的少女·露莉雅
17060940 0 --苍空的狙击手·席尔瓦
17061410 0 --魅眼的星晶兽 斯忒诺
......@@ -354,6 +357,7 @@
18005012 0 --拟魂电路 K2R
18007005 1 --幻量子驱动器
18007007 1 --幻量子时间波船
18007010 0 --幻量子跃迁灵
18007016 1 --幻量子转变
18008004 1 --新干线的车长
#201
......@@ -368,6 +372,7 @@
20200010 0 --彭罗斯三角 -宽恕者立方-
#214
21410100 0 --碧透漫江桃雪霖
21410101 0 --拂袂无情桃雪霖
21410105 0 --卡片汽车·F
21410106 0 --卡片汽车·R
21410107 0 --卡片汽车·NTR
......@@ -392,6 +397,8 @@
21520183 0 --曲形魔-克莱因
#220
22000270 0 --从者Ruler 夏洛克·福尔摩斯
#222
22202002 0 --无谋的放纵
#226
22600022 1 --音语—圣光洗礼之大提琴&小提琴
22600024 0 --音语—二重奏之吉他×2
......@@ -421,6 +428,7 @@
26803007 0 --惬意世界
26803013 1 --无火的尘埃
26803016 1 --终幕新约
26803017 0 --终幕微风
26803022 2 --终幕空洞
26803023 2 --水之未眠
26805012 0 --少女水天·黛冬优子
......@@ -431,7 +439,6 @@
26806013 2 --心灵之绘·海伊
26806028 1 --好久不见·海伊
26806050 1 --洁净时间·海伊
26806051 2 --海浪之舞·海伊
26807033 0 --小巷探秘
26807043 0 --燃烬的现实
26808008 1 --特别瞬间·白鹭千圣
......@@ -441,7 +448,7 @@
26809025 0 --Despair of Infinite
26809026 0 --Precious Sword
26809037 2 --人赐良机
26812001 2 --缭花绚烂
26812001 1 --缭花绚烂
26818005 1 --三上千织
26818016 1 --暗之舞姬 莎拉
26818022 1 --神社庭园·仲夏
......@@ -450,9 +457,21 @@
26818052 1 --北见纱和子
26818062 1 --泽尼娅·夏日
26818032 1 --四宫夏生·万圣
26824005 0 --知性公主·玛娅
#283
28315002 1 --极光·椎名咪玉
#300
30000200 0 --暗魔力的爆发
#305
30553001 0 --异械教国 护卫兵械
30553003 0 --异械教国 运输兵械
30553005 0 --异械教国 神具原型
30553006 0 --异械教国 神瞳遗物
30553008 0 --异械教国 神志棱锥
30553009 0 --异械教国 神端接口
30553010 0 --异械教国 神端协议
30553011 0 --异械教国 神意端连
30553012 0 --异械教国 传名授
30556001 1 --空中都市-[艾拉01]-
30556002 1 --空中都市 调查者
30556004 1 --空中都市 监察者
......@@ -490,6 +509,8 @@
33310210 1 --空想夜王 月天
33310212 1 --空想寒晶 冰凰
33310213 0 --空想祈羽 虚龙
33310250 2 --梅古梅古
33310251 1 --脏东西要清理干净
33310302 1 --幽桐的璀璨庆典
33310303 1 --幽桐的夏日活动
33310306 0 --幽桐的祝神风铃
......@@ -515,8 +536,10 @@
33330101 0 --造神计划1 伪帝
33330105 0 --造神计划5 空想原核
33330107 1 --造神计划7 赤游鱼
33330208 1 --境界交错 鸟居残阳
33330211 2 --境界交错 星花起舞
33330323 0 --希冀之魂 埃尔赫南骑士
33330350 0 --THE DRAWER
33330403 0 --恶梦启示 怀疑
33330502 0 --末氏空骨 彼临
33330503 0 --末氏空骨 救赎
......@@ -561,13 +584,14 @@
33400504 1 --四糸乃 万圣巫女
33400505 1 --四糸乃 自由之游
33400506 1 --四糸奈 出游
33400751 0 --天使-赝造魔女
33401201 1 --升阶魔法-灵结晶吸收
33401301 0 --五河士道 日常
33401304 0 --D.A.L 空间震
33403501 0 --森罗万象 万物流转
33403502 1 --森罗万象第三乐章「表象展观」
33403503 1 --森罗万象第九乐章「因果还元」
33403504 1 --森罗万象第十三乐章「摘要渊源」
33403504 2 --森罗万象第十三乐章「摘要渊源」
33403506 0 --森罗万象第二十乐章「因子模仿」
33403507 1 --森罗万象第二十三乐章「因果再筑」
33403508 1 --森罗万象第六十六乐章「实存相变移」
......@@ -576,7 +600,6 @@
33403512 2 --森罗万象 时空相移
33403513 1 --森罗万象 创造之力
#335
33500002 2 --珈百璃 软萌
33500003 1 --珈百璃 困倦
33500005 2 --珈百璃 发呆
33500010 1 --珈百璃-网瘾少女
......@@ -587,8 +610,6 @@
33500102 1 --珈百璃·薇奈特的休闲时光
33500108 1 --以恶魔之名
33500110 1 --薇奈特-魔女法术
33500115 1 --天魔反转-永远的伙伴
33500116 1 --天魔反转-魔女们的期待
33500118 1 --天魔反转-还未开始的修行
33500202 1 --萨塔妮亚-中二
33500204 2 --萨塔妮亚-校服
......@@ -610,8 +631,6 @@
33502006 2 --灰色记忆 宝石光辉
33502007 0 --灰色记忆 泪雨成痕
33502013 0 --绝望的记忆
33502101 0 --自然色彩 晴橙雏菊
33502111 0 --自然色彩 黯蓝幻蝶
#337
33700028 0 --Proto-Protoform
33700036 0 --Protoform 咲夜
......@@ -747,6 +766,7 @@
47530112 2 --水中型扎古
47530130 0 --G战车
47530149 0 --TR-1 海兹尔
47535000 0 --究极合体 伟大勇者特急
47539500 0 --里歇尔
47548001 0 --屠龙骑士 齐格弗里德
47550003 0 --苍天的守护骑士 卡塔丽娜
......@@ -809,6 +829,7 @@
53799017 1 --缠身的月影 孔斯
53799018 0 --仰望地面而诅咒幸福的桥姬
53799021 0 --束缚丝线而操纵人形的魔女
53799032 0 --抗衡
53799033 0 --草莓味巧克力
53799040 1 --第三种存在
53799041 0 --霁望龙护者
......@@ -906,6 +927,7 @@
65020212 0 --行星驱逐舰 风雪游隼号
65020213 0 --「六兆年零一夜物语」凑友希那
#650-2
65001029 0 --浮游星龙 丰神土星龙
65020008 2 --幻念的华瑕
65020044 2 --暮色居城 不祥
65030012 1 --树阴围绕的遥远耀光
......@@ -951,6 +973,7 @@
72404101 2 --繁花庭院
72404123 1 --大庭院的慈萼 邦巴妮亚
72404127 1 --大庭院的蝶舞 佩露露
72499010 1 --妖樱火
#756
75640052 0 --旅人 伊蕾娜
75646054 1 --忆梦长廊 琪亚娜
......
--普通的少女 美树沙耶加
function c11200001.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,11200001)
e1:SetCost(c11200001.thcost)
e1:SetTarget(c11200001.thtg)
e1:SetOperation(c11200001.thop)
c:RegisterEffect(e1)
--lpcost replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetDescription(aux.Stringid(11200001,0))
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EFFECT_LPCOST_REPLACE)
e2:SetCondition(c11200001.lrcon)
e2:SetOperation(c11200001.lrop)
c:RegisterEffect(e2)
end
--
function c11200001.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 c11200001.filter(c)
return c11200001.mfilter(c) and c:IsAbleToHand()
end
function c11200001.mfilter(c)
return c:IsSetCard(0x62f) and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_RITUAL)
end
function c11200001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200001.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11200001.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11200001.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--
function c11200001.lrcon(e,tp,eg,ep,ev,re,r,rp)
if tp~=ep then return false end
local lp=Duel.GetLP(ep)
if lp<=ev then return false end
if not re then return false end
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and rc:IsSetCard(0x62f) and e:GetHandler():IsAbleToRemoveAsCost()
end
function c11200001.lrop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
\ No newline at end of file
--盲目的恋情 美树沙耶加
function c11200002.initial_effect(c)
--material
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11200002)
e1:SetCost(c11200002.cost)
e1:SetOperation(c11200002.op)
c:RegisterEffect(e1)
--lpcost replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetDescription(aux.Stringid(11200002,0))
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EFFECT_LPCOST_REPLACE)
e2:SetCondition(c11200002.lrcon)
e2:SetOperation(c11200002.lrop)
c:RegisterEffect(e2)
end
function c11200002.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c11200002.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,11200002,RESET_PHASE+PHASE_END,0,1)
end
function c11200002.lrcon(e,tp,eg,ep,ev,re,r,rp)
if tp~=ep then return false end
local lp=Duel.GetLP(ep)
if lp<=ev then return false end
if not re then return false end
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and rc:IsSetCard(0x62f) and e:GetHandler():IsAbleToRemoveAsCost()
end
function c11200002.lrop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
\ No newline at end of file
--动摇的心境 美树沙耶加
function c11200003.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,11200003)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c11200003.tgcon)
e1:SetTarget(c11200003.tgtg)
e1:SetOperation(c11200003.tgop)
c:RegisterEffect(e1)
--lpcost replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetDescription(aux.Stringid(11200003,0))
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EFFECT_LPCOST_REPLACE)
e2:SetCondition(c11200003.lrcon)
e2:SetOperation(c11200003.lrop)
c:RegisterEffect(e2)
end
--
function c11200003.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c11200003.tgfilter(c)
return c:IsSetCard(0x62f) and c:IsAbleToGrave()
end
function c11200003.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200003.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c11200003.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c11200003.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
--
function c11200003.lrcon(e,tp,eg,ep,ev,re,r,rp)
if tp~=ep then return false end
local lp=Duel.GetLP(ep)
if lp<=ev then return false end
if not re then return false end
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and rc:IsSetCard(0x62f) and e:GetHandler():IsAbleToRemoveAsCost()
end
function c11200003.lrop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
\ No newline at end of file
--治愈的魔法使 美树沙耶加
function c11200004.initial_effect(c)
c:EnableReviveLimit()
--fusion material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetCondition(c11200004.fuscon)
e1:SetOperation(c11200004.fusop)
c:RegisterEffect(e1)
--Recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200004,0))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1,11200004)
e2:SetCost(c11200004.cost)
e2:SetTarget(c11200004.tg)
e2:SetOperation(c11200004.op)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetDescription(aux.Stringid(11200004,1))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,11200004)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c11200004.con)
e3:SetCost(c11200004.cost2)
e3:SetTarget(c11200004.tdtg)
e3:SetOperation(c11200004.tdop)
c:RegisterEffect(e3)
--return
local e4=e3:Clone()
e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE)
e4:SetDescription(aux.Stringid(11200004,2))
e4:SetTarget(c11200004.retg)
e4:SetOperation(c11200004.reop)
c:RegisterEffect(e4)
end
function c11200004.ffilter(c,fc)
return c11200004.ffilter1(c,fc) or c11200004.ffilter2(c,fc)
end
function c11200004.ffilter1(c,fc)
return c:IsFusionSetCard(0x62f) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial(fc)
end
function c11200004.ffilter2(c,fc)
return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeFusionMaterial(fc)
end
function c11200004.spfilter1(c,tp,mg,fc)
return mg:IsExists(c11200004.spfilter2,1,c,tp,c,fc)
end
function c11200004.spfilter2(c,tp,mc,fc)
return ((c11200004.ffilter1(c,fc) and c11200004.ffilter2(mc,fc))
or (c11200004.ffilter2(c,fc) and c11200004.ffilter1(mc,fc)))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c11200004.fuscon(e,g,gc,chkf)
if g==nil then return true end
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
local mg=g:Filter(c11200004.ffilter,nil,c)
local mg1=g:Filter(c11200004.ffilter1,nil,c)
local mg2=g:Filter(c11200004.ffilter2,nil,c)
local tg=Duel.GetMatchingGroup(c11200004.ffilter,tp,LOCATION_DECK,0,nil,c)
local tg1=Duel.GetMatchingGroup(c11200004.ffilter1,tp,LOCATION_DECK,0,nil,c)
local tg2=Duel.GetMatchingGroup(c11200004.ffilter2,tp,LOCATION_DECK,0,nil,c)
if gc then
if not mg1:IsContains(gc) and not mg2:IsContains(gc) then return false end
if Duel.GetFlagEffect(tp,11200002)~=0 then
return mg:IsExists(c11200004.spfilter2,1,gc,tp,gc,c) or tg:IsExists(c11200004.spfilter2,1,gc,tp,gc,c)
else
return mg:IsExists(c11200004.spfilter2,gc,tp,gc,c)
end
end
if Duel.GetFlagEffect(tp,11200002)~=0 and mg1:GetCount()==0 and
mg2:GetCount()~=0 then
return tg1:IsExists(c11200004.spfilter1,1,nil,tp,mg2,c)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()==0 and
mg1:GetCount()~=0 then
return tg2:IsExists(c11200004.spfilter1,1,nil,tp,mg1,c)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg:GetCount()==1 then
return tg:IsExists(c11200004.spfilter1,1,nil,tp,mg,c)
else
return mg:IsExists(c11200004.spfilter1,1,nil,tp,mg,c)
end
end
function c11200004.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local c=e:GetHandler()
local mg=eg:Filter(c11200004.ffilter,nil,c)
local mg1=eg:Filter(c11200004.ffilter1,nil,c)
local mg2=eg:Filter(c11200004.ffilter2,nil,c)
local tg=Duel.GetMatchingGroup(c11200004.ffilter,tp,LOCATION_DECK,0,nil,c)
local tg1=Duel.GetMatchingGroup(c11200004.ffilter1,tp,LOCATION_DECK,0,nil,c)
local tg2=Duel.GetMatchingGroup(c11200004.ffilter2,tp,LOCATION_DECK,0,nil,c)
local g=nil
local sg
if gc then
g=Group.FromCards(gc)
mg:RemoveCard(gc)
else
if Duel.GetFlagEffect(tp,11200002)~=0 and mg1:GetCount()~=0 and
mg2:GetCount()~=0 and tg:GetCount()>0 and mg:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(11200004,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg:FilterSelect(tp,c11200004.spfilter1,1,1,nil,tp,mg,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()==0 and mg1:GetCount()~=0 and tg2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg2:FilterSelect(tp,c11200004.spfilter1,1,1,nil,tp,mg1,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()~=0 and mg1:GetCount()==0 and tg1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg1:FilterSelect(tp,c11200004.spfilter1,1,1,nil,tp,mg2,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg:GetCount()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg:FilterSelect(tp,c11200004.spfilter1,1,1,nil,tp,mg,c)
Duel.ResetFlagEffect(tp,11200002)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=mg:FilterSelect(tp,c11200004.spfilter1,1,1,nil,tp,mg,c)
mg:Sub(g)
end
end
if Duel.GetFlagEffect(tp,11200002)~=0 and tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11200004,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=tg:FilterSelect(tp,c11200004.spfilter2,1,1,nil,tp,g:GetFirst(),c)
Duel.ResetFlagEffect(tp,11200002)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=mg:FilterSelect(tp,c11200004.spfilter2,1,1,nil,tp,g:GetFirst(),c)
end
g:Merge(sg)
Duel.SetFusionMaterial(g)
end
function c11200004.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c11200004.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000)
end
function c11200004.op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
if Duel.GetLP(p)<Duel.GetLP(1-p) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c11200004.con(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e)
end
function c11200004.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c11200004.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_REMOVED+LOCATION_GRAVE,1,e:GetHandler()) and e:GetHandler():IsAbleToDeck() end
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_REMOVED+LOCATION_GRAVE,1,3,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c11200004.tdop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==tg:GetCount() and e:GetHandler():IsRelateToEffect(e) then
sg:AddCard(e:GetHandler())
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT+REASON_RETURN)
end
end
function c11200004.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_REMOVED ,LOCATION_REMOVED,1,e:GetHandler())
and e:GetHandler():IsAbleToRemove() end
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,3,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c11200004.reop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==tg:GetCount() and e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
end
--正义的伙伴 美树沙耶加
function c11200005.initial_effect(c)
aux.AddXyzProcedure(c,nil,8,2,c11200005.ovfilter,aux.Stringid(11200005,0),2)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200005,1))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e1:SetCondition(c11200005.atkcon)
e1:SetCost(c11200005.cost)
e1:SetTarget(c11200005.atktg)
e1:SetOperation(c11200005.atkop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200005,2))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCost(c11200005.cost)
e2:SetTarget(c11200005.distg)
e2:SetOperation(c11200005.disop)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetDescription(aux.Stringid(11200005,3))
e3:SetRange(LOCATION_GRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCountLimit(1,11200005)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c11200005.descon)
e3:SetCost(c11200005.descost)
e3:SetTarget(c11200005.destg)
e3:SetOperation(c11200005.desop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetRange(LOCATION_GRAVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetCondition(c11200005.flcon)
e4:SetOperation(c11200005.flop)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_ATTACK_ANNOUNCE)
e5:SetCondition(c11200005.descon2)
c:RegisterEffect(e5)
end
function c11200005.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x62f) and c:IsType(TYPE_FUSION)
end
function c11200005.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c11200005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c11200005.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c11200005.atkop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if tg:GetCount()<=0 then return end
local tc=tg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-2000)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=tg:GetNext()
end
end
function c11200005.disfilter(c)
return c:IsFaceup() and not c:IsDisabled()
end
function c11200005.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200005.disfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c11200005.disfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c11200005.disop(e,tp,eg,ep,ev,re,r,rp)
local og=Duel.GetMatchingGroup(c11200005.disfilter,tp,0,LOCATION_MZONE,nil)
if og:GetCount()==0 then return end
local mg,matk=og:GetMaxGroup(Card.GetAttack)
Duel.NegateRelatedChain(mg:GetFirst(),RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
mg:GetFirst():RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000)
mg:GetFirst():RegisterEffect(e2)
end
function c11200005.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,11200005)>0
end
function c11200005.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c11200005.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c11200005.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c11200005.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x62f) and c:IsLocation(LOCATION_MZONE)
end
function c11200005.flcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c11200005.desfilter,1,nil)
end
function c11200005.flop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,11200005,RESET_EVENT+0xfe0000+RESET_CHAIN,0,1)
end
function c11200005.descon2(e,tp,eg,ep,ev,re,r,rp)
if tp==Duel.GetTurnPlayer() then return false end
local tc=Duel.GetAttackTarget()
return tc and tc:IsFaceup() and tc:IsSetCard(0x62f)
end
\ No newline at end of file
--魔法与奇迹的代价 美树沙耶加
function c11200006.initial_effect(c)
--fusion material
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_FUSION_MATERIAL)
e0:SetCondition(c11200006.fuscon)
e0:SetOperation(c11200006.fusop)
c:RegisterEffect(e0)
--[[ --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(c11200006.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c11200006.spcon)
e2:SetOperation(c11200006.spop)
c:RegisterEffect(e2)]]
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11200006,0))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_EXTRA)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,11200013)
e3:SetCost(c11200006.cost)
e3:SetCondition(c11200006.con)
e3:SetTarget(c11200006.tg)
e3:SetOperation(c11200006.op)
c:RegisterEffect(e3)
--sp
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,11200006)
e4:SetTarget(c11200006.retg)
e4:SetOperation(c11200006.reop)
c:RegisterEffect(e4)
end
function c11200006.ffilter(c,fc)
return c11200006.ffilter1(c,fc) or c11200006.ffilter2(c,fc)
end
function c11200006.ffilter1(c,fc)
return c:IsFusionSetCard(0x62f) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial(fc)
end
function c11200006.ffilter2(c,fc)
return c:IsFusionSetCard(0x62f) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial(fc)
end
function c11200006.spfilter1(c,tp,mg,fc)
return mg:IsExists(c11200006.spfilter2,1,c,tp,c,fc)
end
function c11200006.spfilter2(c,tp,mc,fc)
return ((c11200006.ffilter1(c,fc) and c11200006.ffilter2(mc,fc))
or (c11200006.ffilter2(c,fc) and c11200006.ffilter1(mc,fc)))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c11200006.fuscon(e,g,gc,chkf)
if g==nil then return true end
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
local mg=g:Filter(c11200006.ffilter,nil,c)
local mg1=g:Filter(c11200006.ffilter1,nil,c)
local mg2=g:Filter(c11200006.ffilter2,nil,c)
local tg=Duel.GetMatchingGroup(c11200006.ffilter,tp,LOCATION_DECK,0,nil,c)
local tg1=Duel.GetMatchingGroup(c11200006.ffilter1,tp,LOCATION_DECK,0,nil,c)
local tg2=Duel.GetMatchingGroup(c11200006.ffilter2,tp,LOCATION_DECK,0,nil,c)
if gc then
if not mg:IsContains(gc) then return false end
if Duel.GetFlagEffect(tp,11200002)~=0 then
return mg:IsExists(c11200006.spfilter2,1,gc,tp,gc,c) or tg:IsExists(c11200006.spfilter2,1,gc,tp,gc,c)
else
return mg:IsExists(c11200006.spfilter2,gc,tp,gc,c)
end
end
if Duel.GetFlagEffect(tp,11200002)~=0 and mg1:GetCount()==0 and
mg2:GetCount()~=0 then
return tg1:IsExists(c11200006.spfilter1,1,nil,tp,mg2,c)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()==0 and
mg1:GetCount()~=0 then
return tg2:IsExists(c11200006.spfilter1,1,nil,tp,mg1,c)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg:GetCount()==1 then
return tg:IsExists(c11200006.spfilter1,1,nil,tp,mg,c)
else
return mg:IsExists(c11200006.spfilter1,1,nil,tp,mg,c)
end
end
function c11200006.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local c=e:GetHandler()
local mg=eg:Filter(c11200006.ffilter,nil,c)
local mg1=eg:Filter(c11200006.ffilter1,nil,c)
local mg2=eg:Filter(c11200006.ffilter2,nil,c)
local tg=Duel.GetMatchingGroup(c11200006.ffilter,tp,LOCATION_DECK,0,nil,c)
local tg1=Duel.GetMatchingGroup(c11200006.ffilter1,tp,LOCATION_DECK,0,nil,c)
local tg2=Duel.GetMatchingGroup(c11200006.ffilter2,tp,LOCATION_DECK,0,nil,c)
local g=nil
local sg
if gc then
g=Group.FromCards(gc)
mg:RemoveCard(gc)
else
if Duel.GetFlagEffect(tp,11200002)~=0 and mg1:GetCount()~=0 and
mg2:GetCount()~=0 and tg:GetCount()>0 and mg:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(11200004,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg:FilterSelect(tp,c11200006.spfilter1,1,1,nil,tp,mg,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()==0 and mg1:GetCount()~=0 and tg2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg2:FilterSelect(tp,c11200006.spfilter1,1,1,nil,tp,mg1,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()~=0 and mg1:GetCount()==0 and tg1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg1:FilterSelect(tp,c11200006.spfilter1,1,1,nil,tp,mg2,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg:GetCount()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg:FilterSelect(tp,c11200006.spfilter1,1,1,nil,tp,mg,c)
Duel.ResetFlagEffect(tp,11200002)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=mg:FilterSelect(tp,c11200006.spfilter1,1,1,nil,tp,mg,c)
mg:Sub(g)
end
end
if Duel.GetFlagEffect(tp,11200002)~=0 and tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11200004,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=tg:FilterSelect(tp,c11200006.spfilter2,1,1,nil,tp,g:GetFirst(),c)
Duel.ResetFlagEffect(tp,11200002)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=mg:FilterSelect(tp,c11200006.spfilter2,1,1,nil,tp,g:GetFirst(),c)
end
g:Merge(sg)
Duel.SetFusionMaterial(g)
end
function c11200006.rfilter(c,fc)
return (c:IsFusionSetCard(0x62f) or c:IsRace(RACE_SPELLCASTER)) and c:IsCanBeFusionMaterial(fc)
end
function c11200006.rfilter1(c,tp,g)
return g:IsExists(c11200006.spfilter2,1,c,tp,c)
end
function c11200006.rfilter2(c,tp,mc)
return ((c:IsFusionSetCard(0x62f) and mc:IsRace(RACE_SPELLCASTER)) or
(mc:IsFusionSetCard(0x62f) and c:IsRace(RACE_SPELLCASTER))) and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c11200006.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetReleaseGroup(tp):Filter(c11200006.rfilter,nil,c)
return rg:IsExists(c11200006.rfilter1,1,nil,tp,rg)
end
function c11200006.spop(e,tp,eg,ep,ev,re,r,rp,c)
local rg=Duel.GetReleaseGroup(tp):Filter(c11200006.rfilter,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=rg:FilterSelect(tp,c11200006.rfilter1,1,1,nil,tp,rg)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=rg:FilterSelect(tp,c11200006.rfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
c:SetMaterial(g1)
Duel.Release(g1,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
function c11200006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c11200006.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11200006.tgfilter,1,nil,tp)
end
function c11200006.tgfilter(c,tp)
return c:IsRace(RACE_SPELLCASTER) and c:GetOwner()==tp
end
function c11200006.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGrave() end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,tp,LOCATION_EXTRA)
end
function c11200006.op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)>0 then
Duel.BreakEffect()
--Atk
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_SPELLCASTER))
e1:SetValue(900)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--Def
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(900)
Duel.RegisterEffect(e2,tp)
end
end
function c11200006.refilter(c)
return c:IsReleasable() and c:IsType(TYPE_MONSTER)
end
function c11200006.refilter2(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsReleasable()
end
function c11200006.retg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c11200006.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and g:GetCount()>1 and g:IsExists(c11200006.refilter2,1,nil)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,2,tp,LOCATION_HAND+LOCATION_MZONE)
end
function c11200006.reop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=Duel.SelectMatchingCard(tp,c11200006.refilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,c11200006.refilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,g1:GetFirst())
g2:Merge(g1)
if g2:GetCount()==2 and Duel.Release(g2,REASON_EFFECT)==2 and e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,true,POS_FACEUP) then
e:GetHandler():CompleteProcedure()
end
end
\ No newline at end of file
--污浊的外装 泣哭的人鱼
function c11200007.initial_effect(c)
c:EnableReviveLimit()
c:SetUniqueOnField(1,1,11200007)
--spsummon con
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(c11200007.splimit)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c11200007.cost)
e2:SetTarget(c11200007.target)
e2:SetOperation(c11200007.operation)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetTarget(c11200007.tgtg)
e3:SetOperation(c11200007.tgop)
c:RegisterEffect(e3)
end
function c11200007.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x62f)
end
function c11200007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c11200007.lovefilter(c)
return c:IsCode(11200011) and c:IsSSetable() and ((c:IsLocation(LOCATION_DECK)) or (c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()))
end
function c11200007.betrayfilter(c)
return c:IsCode(11200012) and ((c:IsLocation(LOCATION_DECK) and c:IsAbleToGrave()) or (c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()))
end
function c11200007.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c11200007.lovefilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c11200007.betrayfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil)
if chk==0 then return b1 or b2 end
local opt=0
if b1 and b2 then
opt=Duel.SelectOption(tp,aux.Stringid(11200007,0),aux.Stringid(11200007,1),aux.Stringid(11200007,2))
elseif b1 then
opt=Duel.SelectOption(tp,aux.Stringid(11200007,0))
else
opt=Duel.SelectOption(tp,aux.Stringid(11200007,1))+1
end
e:SetLabel(opt)
if opt==1 then
e:SetCategory(0)
end
end
function c11200007.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local opt=e:GetLabel()
if opt==0 or opt==2 then
local ssg=Duel.GetMatchingGroup(c11200007.lovefilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil)
if ssg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local seg=ssg:Select(tp,1,1,nil)
Duel.SSet(tp,seg)
Duel.ConfirmCards(1-tp,seg)
local ssgt=seg:GetFirst()
ssgt:SetStatus(STATUS_SET_TURN,false)
end
end
if opt==1 or opt==2 then
local stg=Duel.GetMatchingGroup(c11200007.betrayfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil)
if stg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=stg:Select(tp,1,1,nil)
if sg:GetFirst():IsLocation(LOCATION_DECK) then
Duel.SendtoGrave(sg,REASON_EFFECT)
else
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end
end
end
end
function c11200007.spfilter(c,e,tp)
return c:IsSetCard(0x62f) and not c:IsType(TYPE_RITUAL)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c11200007.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11200007.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c11200007.tgop(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,c11200007.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetReset(RESET_EVENT+0x1fe0000)
e3:SetValue(TYPE_TUNER)
tc:RegisterEffect(e3)
end
end
\ No newline at end of file
--鸟笼的提包人 美树沙耶加
function c11200009.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_FUSION_MATERIAL)
e0:SetCondition(c11200009.fuscon)
e0:SetOperation(c11200009.fusop)
c:RegisterEffect(e0)
--effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200009,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11200009)
e2:SetCost(c11200009.cost)
e2:SetOperation(c11200009.operation)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,11200009)
e3:SetTarget(c11200009.sptg)
e3:SetOperation(c11200009.spop)
c:RegisterEffect(e3)
end
function c11200009.ffilter(c,fc)
return c11200009.ffilter1(c,fc) or c11200009.ffilter2(c,fc)
end
function c11200009.ffilter1(c,fc)
return c:IsFusionSetCard(0x62f) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial(fc)
end
function c11200009.ffilter2(c,fc)
return c:IsType(TYPE_RITUAL) and c:IsCanBeFusionMaterial(fc)
end
function c11200009.spfilter1(c,tp,mg,fc)
return mg:IsExists(c11200009.spfilter2,1,c,tp,c,fc)
end
function c11200009.spfilter2(c,tp,mc,fc)
return ((c11200009.ffilter1(c,fc) and c11200009.ffilter2(mc,fc))
or (c11200009.ffilter2(c,fc) and c11200009.ffilter1(mc,fc)))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c11200009.fuscon(e,g,gc,chkf)
if g==nil then return true end
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
local mg=g:Filter(c11200009.ffilter,nil,c)
local mg1=g:Filter(c11200009.ffilter1,nil,c)
local mg2=g:Filter(c11200009.ffilter2,nil,c)
local tg=Duel.GetMatchingGroup(c11200009.ffilter,tp,LOCATION_DECK,0,nil,c)
local tg1=Duel.GetMatchingGroup(c11200009.ffilter1,tp,LOCATION_DECK,0,nil,c)
local tg2=Duel.GetMatchingGroup(c11200009.ffilter2,tp,LOCATION_DECK,0,nil,c)
if gc then
if not mg:IsContains(gc) then return false end
if Duel.GetFlagEffect(tp,11200002)~=0 then
return mg:IsExists(c11200009.spfilter2,1,gc,tp,gc,c) or tg:IsExists(c11200009.spfilter2,1,gc,tp,gc,c)
else
return mg:IsExists(c11200009.spfilter2,gc,tp,gc,c)
end
end
if Duel.GetFlagEffect(tp,11200002)~=0 and mg1:GetCount()==0 and
mg2:GetCount()~=0 then
return tg1:IsExists(c11200009.spfilter1,1,nil,tp,mg2,c)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()==0 and
mg1:GetCount()~=0 then
return tg2:IsExists(c11200009.spfilter1,1,nil,tp,mg1,c)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg:GetCount()==1 then
return tg:IsExists(c11200009.spfilter1,1,nil,tp,mg,c)
else
return mg:IsExists(c11200009.spfilter1,1,nil,tp,mg,c)
end
end
function c11200009.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local c=e:GetHandler()
local mg=eg:Filter(c11200009.ffilter,nil,c)
local mg1=eg:Filter(c11200009.ffilter1,nil,c)
local mg2=eg:Filter(c11200009.ffilter2,nil,c)
local tg=Duel.GetMatchingGroup(c11200009.ffilter,tp,LOCATION_DECK,0,nil,c)
local tg1=Duel.GetMatchingGroup(c11200009.ffilter1,tp,LOCATION_DECK,0,nil,c)
local tg2=Duel.GetMatchingGroup(c11200009.ffilter2,tp,LOCATION_DECK,0,nil,c)
local g=nil
local sg
if gc then
g=Group.FromCards(gc)
mg:RemoveCard(gc)
else
if Duel.GetFlagEffect(tp,11200002)~=0 and mg1:GetCount()~=0 and
mg2:GetCount()~=0 and tg:GetCount()>0 and mg:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(11200004,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg:FilterSelect(tp,c11200009.spfilter1,1,1,nil,tp,mg,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()==0 and mg1:GetCount()~=0 and tg2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg2:FilterSelect(tp,c11200009.spfilter1,1,1,nil,tp,mg1,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg2:GetCount()~=0 and mg1:GetCount()==0 and tg1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg1:FilterSelect(tp,c11200009.spfilter1,1,1,nil,tp,mg2,c)
Duel.ResetFlagEffect(tp,11200002)
elseif Duel.GetFlagEffect(tp,11200002)~=0 and mg:GetCount()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=tg:FilterSelect(tp,c11200009.spfilter1,1,1,nil,tp,mg,c)
Duel.ResetFlagEffect(tp,11200002)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=mg:FilterSelect(tp,c11200009.spfilter1,1,1,nil,tp,mg,c)
mg:Sub(g)
end
end
if Duel.GetFlagEffect(tp,11200002)~=0 and tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11200004,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=tg:FilterSelect(tp,c11200009.spfilter2,1,1,nil,tp,g:GetFirst(),c)
Duel.ResetFlagEffect(tp,11200002)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=mg:FilterSelect(tp,c11200009.spfilter2,1,1,nil,tp,g:GetFirst(),c)
end
g:Merge(sg)
Duel.SetFusionMaterial(g)
end
function c11200009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c11200009.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(c11200009.effectfilter)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
Duel.RegisterEffect(e2,tp)
end
function c11200009.effectfilter(e,ct)
local p=e:GetHandlerPlayer()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
local tc=te:GetHandler()
return p==tp
end
function c11200009.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c11200009.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c11200009.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x62f) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
end
function c11200009.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c11200009.filter0,tp,LOCATION_GRAVE,0,nil)
local res=Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c11200009.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c11200009.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c11200009.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetMatchingGroup(c11200009.filter1,tp,LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c11200009.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c11200009.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf)
end
if (Duel.GetLocationCountFromEx(tp)>0 and 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,c,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,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--我真是个笨蛋……
function c11200010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(11200010,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200010)
e1:SetTarget(c11200010.target)
e1:SetOperation(c11200010.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetDescription(aux.Stringid(11200010,1))
e2:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e2:SetCountLimit(1,11200010+EFFECT_COUNT_CODE_DUEL)
e2:SetCost(c11200010.thcost)
e2:SetTarget(c11200010.thtg)
e2:SetOperation(c11200010.thop)
c:RegisterEffect(e2)
end
function c11200010.rmfilter(c,fc)
return c:IsCanBeRitualMaterial(fc) or (c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemove())
end
function c11200010.filter(c,e,tp,m1,m2,ft)
if not (c:IsCode(11200007) and bit.band(c:GetType(),0x81)==0x81
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)) then return false end
m1:Merge(m2)
local mg=m1:Filter(c11200010.rmfilter,c,c)
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,9,c)
else
return ft>-1 and mg:IsExists(c11200010.mfilterf,1,nil,tp,mg,c)
end
end
function c11200010.mfilterf(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,9,rc)
else return false end
end
function c11200010.mfilter(c)
return c:GetLevel()>0 and c:IsSetCard(0x62f) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c11200010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg1=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local mg2=Duel.GetMatchingGroup(c11200010.mfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
return Duel.IsExistingMatchingCard(c11200010.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,mg1,mg2,ft)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c11200010.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(c11200010.mfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c11200010.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,mg1,mg2,ft)
local tc=tg:GetFirst()
if tc then
mg1:Merge(mg2)
local mg=mg1:Filter(c11200010.rmfilter,tc,tc)
local mat=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,9,tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c11200010.mfilterf,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,9,tc)
mat:Merge(mat2)
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
function c11200010.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c11200010.thfilter(c)
return c:IsCode(11200007) and c:IsAbleToHand()
end
function c11200010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200010.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c11200010.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11200010.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--恋慕的乐章
function c11200011.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200011,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_DRAW)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c11200011.mertg)
e1:SetOperation(c11200011.merop)
c:RegisterEffect(e1)
--fusion
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200011,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,11200011)
e2:SetCondition(c11200011.spcon)
e2:SetCost(c11200011.spcost)
e2:SetTarget(c11200011.sptg)
e2:SetOperation(c11200011.spop)
c:RegisterEffect(e2)
end
function c11200011.merfilter(c)
return c:IsSetCard(0x62f) and c:IsFaceup()
end
function c11200011.mertg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11200011.merfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11200011.merfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c11200011.merfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c11200011.merop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c11200011.efilter)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c11200011.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetOwnerPlayer()
end
function c11200011.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_HAND) or aux.exccon(e)
end
function c11200011.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c11200011.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c11200011.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_SPELLCASTER) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c11200011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg=Duel.GetMatchingGroup(c11200011.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c11200011.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c11200011.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c11200011.exmfilter(c,fc,m,chkf)
return fc:CheckFusionMaterial(m,c,chkf)
end
function c11200011.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c11200011.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c11200011.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c11200011.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,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.SendtoGrave(mat1,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,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--背叛的奏曲
function c11200012.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,11200008)
e1:SetTarget(c11200012.target)
e1:SetOperation(c11200012.activate)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11200012)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCost(c11200012.atkcost)
e2:SetTarget(c11200012.atktg)
e2:SetOperation(c11200012.atkop)
c:RegisterEffect(e2)
end
function c11200012.filter(c)
return c:IsSetCard(0x62f) and c:IsAbleToGrave()
end
function c11200012.filter2(c)
return c:IsSetCard(0x62f) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c11200012.filter3(c)
return c:IsSetCard(0x62f) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c11200012.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetMatchingGroup(c11200012.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler())
local b2=Duel.GetMatchingGroup(c11200012.filter2,tp,LOCATION_EXTRA,0,nil)
local b3=Duel.GetMatchingGroup(c11200012.filter3,tp,LOCATION_ONFIELD,0,nil)
local draw=1
if b3:GetCount()>0 then draw=2 end
if chk==0 then
return b1:GetCount()>0 and b2:GetCount()>0 and Duel.IsPlayerCanDraw(tp,draw)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,draw)
end
function c11200012.activate(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetMatchingGroup(c11200012.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler())
local b2=Duel.GetMatchingGroup(c11200012.filter2,tp,LOCATION_EXTRA,0,nil)
if b1==nil or b2==nil then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c11200012.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c11200012.filter2,tp,LOCATION_EXTRA,0,1,1,nil)
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.IsExistingMatchingCard(c11200012.filter3,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c11200012.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c11200012.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x62f) and c:GetAttack()>0
end
function c11200012.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11200012.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11200012.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
local g1=Duel.SelectTarget(tp,c11200012.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
local opt=Duel.SelectOption(tp,aux.Stringid(11200012,0),aux.Stringid(11200012,1))
e:SetLabel(opt)
end
function c11200012.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
local tg=g:GetFirst()
local atkp=tg:GetAttack()
if atkp==0 then return end
local opt=e:GetLabel()
if opt==0 then
if Duel.Recover(tp,atkp,REASON_EFFECT)>0 then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(0)
tg:RegisterEffect(e1)
end
else
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-atkp)
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(tg:GetAttack()*2)
tg:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--地上的月兔 铃仙·优昙华院·因幡
function c11200018.initial_effect(c)
--
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200018,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,11200018)
e1:SetTarget(c11200018.tg1)
e1:SetOperation(c11200018.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DICE+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11200118)
e2:SetLabelObject(e1)
e2:SetTarget(c11200018.tg2)
e2:SetOperation(c11200018.op2)
c:RegisterEffect(e2)
--
end
--
c11200018.xig_ihs_0x132=1
--
function c11200018.tfilter1(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,8,rc)
else return false end
end
function c11200018.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,c,c)
local ft=Duel.GetMZoneCount(tp)
if not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,8,c)
else
return mg:IsExists(c11200018.tfilter1,1,nil,tp,mg,c)
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
--
function c11200018.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler()
local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetMZoneCount(tp)
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local mat=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,8,tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c11200018.tfilter1,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,8,tc)
mat:Merge(mat2)
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
e:SetLabel(mat:GetCount())
if not tc:IsRelateToEffect(e) then return end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
--
function c11200018.tfilter2(c,e,tp)
return c.xig_ihs_0x132 and c:IsType(TYPE_SPELL)
and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x132,0x21,1100,1100,4,RACE_BEAST,ATTRIBUTE_LIGHT)
end
function c11200018.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rcount=e:GetLabelObject():GetLabel()
if chk==0 then
if not e:GetLabelObject() then return false end
if not e:GetLabelObject():GetLabel() then return false end
if e:GetLabelObject():GetLabel()<1 then return false end
return true
end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
--
function c11200018.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rcount=e:GetLabelObject():GetLabel()
local dc1,dc2,dc3,dc4,dc5,dc6,dc7,dc8=0
dc1,dc2,dc3,dc4,dc5,dc6=Duel.TossDice(tp,rcount)
if rcount>6 then dc7,dc8=Duel.TossDice(tp,rcount-6) end
local aldc=0
if dc1 then aldc=aldc+dc1 end
if dc2 then aldc=aldc+dc2 end
if dc3 then aldc=aldc+dc3 end
if dc4 then aldc=aldc+dc4 end
if dc5 then aldc=aldc+dc5 end
if dc6 then aldc=aldc+dc6 end
if dc7 then aldc=aldc+dc7 end
if dc8 then aldc=aldc+dc8 end
if aldc%2==1 then
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_UPDATE_ATTACK)
e2_1:SetReset(RESET_EVENT+RESETS_STANDARD)
e2_1:SetValue(aldc*450)
c:RegisterEffect(e2_1)
local e2_2=e2_1:Clone()
e2_2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2_2)
local e2_3=Effect.CreateEffect(c)
e2_3:SetType(EFFECT_TYPE_SINGLE)
e2_3:SetCode(EFFECT_IMMUNE_EFFECT)
e2_3:SetValue(c11200018.efilter2_3)
e2_3:SetOwnerPlayer(tp)
e2_3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
c:RegisterEffect(e2_3)
end
if aldc==4 then Duel.Damage(tp,1100,REASON_EFFECT) end
if aldc%2==0 then
if Duel.GetMZoneCount(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c11200018.tfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if sg:GetCount()<1 then return end
local tc=sg:GetFirst()
tc:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_LIGHT,RACE_BEAST,4,1100,1100)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
--
function c11200018.efilter2_3(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
--铃仙·优昙华院·因幡
function c11200019.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200019,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DICE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11200019)
e1:SetCost(c11200019.cost1)
e1:SetTarget(c11200019.tg1)
e1:SetOperation(c11200019.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200019,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11200119)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c11200019.tg2)
e2:SetOperation(c11200019.op2)
c:RegisterEffect(e2)
--
end
--
function c11200019.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
Duel.ConfirmCards(1-tp,e:GetHandler())
end
--
function c11200019.tfilter1(c)
return (c:IsCode(24094653)
or (c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT)))
and c:IsAbleToHand()
end
function c11200019.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
--
function c11200019.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dc=Duel.TossDice(tp,1)
if dc>0 and dc<4 then
if Duel.GetMZoneCount(tp)<1 then return end
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
if dc==4 then Duel.Damage(tp,1100,REASON_EFFECT) end
if dc>4 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c11200019.tfilter1,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()<1 then return end
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--
function c11200019.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
--
function c11200019.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local g=Group.CreateGroup()
g:AddCard(tc)
Duel.HintSelection(g)
local e1_1=Effect.CreateEffect(c)
e1_1:SetDescription(aux.Stringid(11200019,2))
e1_1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1_1:SetValue(1)
e1_1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1_1)
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1_2:SetValue(1)
e1_2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1_2)
local e1_3=Effect.CreateEffect(c)
e1_3:SetType(EFFECT_TYPE_SINGLE)
e1_3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1_3:SetValue(1)
e1_3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1_3)
local e1_4=Effect.CreateEffect(c)
e1_4:SetType(EFFECT_TYPE_SINGLE)
e1_4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1_4:SetValue(1)
e1_4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1_4)
local e1_5=Effect.CreateEffect(c)
e1_5:SetDescription(aux.Stringid(11200019,3))
e1_5:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1_5:SetType(EFFECT_TYPE_SINGLE)
e1_5:SetCode(EFFECT_MUST_ATTACK)
e1_5:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1_5)
end
--
--月上的逃兵 铃仙·优昙华院·因幡
function c11200020.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200020,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DICE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11200020)
e1:SetCost(c11200020.cost1)
e1:SetTarget(c11200020.tg1)
e1:SetOperation(c11200020.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200020,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCondition(c11200020.con2)
e2:SetCost(c11200020.cost2)
e2:SetOperation(c11200020.op2)
c:RegisterEffect(e2)
--
end
--
c11200020.xig_ihs_0x132=1
--
function c11200020.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
Duel.ConfirmCards(1-tp,e:GetHandler())
end
--
function c11200020.tfilter1(c,e,tp)
return c.xig_ihs_0x132 and c:IsType(TYPE_SPELL)
and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x132,0x21,1100,1100,4,RACE_BEAST,ATTRIBUTE_LIGHT)
end
function c11200020.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
--
function c11200020.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dc=Duel.TossDice(tp,1)
if dc>0 and dc<4 then
if Duel.GetMZoneCount(tp)<1 then return end
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
if dc==4 then Duel.Damage(tp,1100,REASON_EFFECT) end
if dc>4 then
if Duel.GetMZoneCount(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c11200020.tfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if sg:GetCount()<1 then return end
local tc=sg:GetFirst()
tc:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_LIGHT,RACE_BEAST,4,1100,1100)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
--
function c11200020.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp
end
--
function c11200020.cfilter2(c)
return c:IsAbleToRemoveAsCost()
and c:IsType(TYPE_SPELL) and c.xig_ihs_0x132
end
function c11200020.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable()
and Duel.IsExistingMatchingCard(c11200020.cfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,c11200020.cfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
Duel.Release(c,REASON_COST)
end
--
function c11200020.op2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateAttack() then return end
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
--
--狂气的月兔 铃仙·优昙华院·因幡
function c11200021.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c11200021.mfilter,nil,2,2)
--
if not c11200021.global_check then
c11200021.global_check=true
local e0=Effect.GlobalEffect()
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_CHAINING)
e0:SetCondition(c11200021.con0)
e0:SetOperation(c11200021.op0)
Duel.RegisterEffect(e0,0)
end
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200021,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_ATKCHANGE+CATEGORY_DAMAGE+CATEGORY_DICE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetLabel(0)
e1:SetCost(c11200021.cost1)
e1:SetTarget(c11200021.tg1)
e1:SetOperation(c11200021.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200021,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11200021)
e2:SetCondition(c11200021.con2)
e2:SetCost(c11200021.cost2)
e2:SetTarget(c11200021.tg2)
e2:SetOperation(c11200021.op2)
c:RegisterEffect(e2)
--
end
--
c11200021.xig_ihs_0x132=1
--
function c11200021.mfilter(c)
return c:IsCode(11200019)
end
--
function c11200021.con0(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER)
and not (rc.xig_ihs_0x132 or rc:IsCode(11200019))
end
--
function c11200021.op0(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(rp,11200021,RESET_PHASE+PHASE_END,0,1)
end
--
function c11200021.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
--
function c11200021.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return c:CheckRemoveOverlayCard(tp,1,REASON_COST)
and c:GetOverlayCount()>0
end
c:RemoveOverlayCard(tp,1,1,REASON_COST)
local mg=Duel.GetOperatedGroup()
mg:KeepAlive()
e:SetLabelObject(mg)
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
--
function c11200021.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=e:GetLabelObject()
local dc=Duel.TossDice(tp,1)
local type1=0
local type2=0
local type3=0
local tc=mg:GetFirst()
while tc do
if tc:IsType(TYPE_MONSTER) then type1=1 end
if tc:IsType(TYPE_SPELL) then type2=1 end
if tc:IsType(TYPE_TRAP) then type3=1 end
tc=mg:GetNext()
end
if type1==1 then
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_UPDATE_ATTACK)
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1_1:SetValue(dc*300)
c:RegisterEffect(e1_1)
end
if type2==1 then Duel.Draw(tp,1,REASON_EFFECT) end
if type3==1 then Duel.Damage(1-tp,dc*300,REASON_EFFECT) end
end
--
function c11200021.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,11200021)<1
end
--
function c11200021.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToExtraAsCost() end
local g=Group.CreateGroup()
g:AddCard(c)
Duel.HintSelection(g)
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
--
function c11200021.tfilter2(c)
return c:IsAbleToHand() and (c.xig_ihs_0x132 or c:IsCode(11200019))
end
function c11200021.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200021.tfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
--
function c11200021.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11200021.tfilter2,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 c11200022.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c11200022.FusFilter,2,true)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DICE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_DAMAGE+CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11200022)
e1:SetCondition(c11200022.con1)
e1:SetTarget(c11200022.tg1)
e1:SetOperation(c11200022.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TOSS_DICE_NEGATE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c11200022.con2)
e2:SetOperation(c11200022.op2)
c:RegisterEffect(e2)
--
end
--
function c11200022.FusFilter(c)
return c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
--
function c11200022.con1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION)
and c:GetMaterialCount()>0
end
--
function c11200022.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
--
function c11200022.ofilter1(c)
return c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)
end
function c11200022.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dc=Duel.TossDice(tp,1)
if dc>0 and dc<4 then
local num=dc*300
if c:IsFacedown() then return end
if not c:IsRelateToEffect(e) then return end
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_UPDATE_ATTACK)
e1_1:SetValue(num)
e1_1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1_1)
local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local sc=sg:GetFirst()
while sc do
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_UPDATE_ATTACK)
e1_2:SetValue(-num)
e1_2:SetReset(RESET_EVENT+0x1fe0000)
sc:RegisterEffect(e1_2)
local e1_3=Effect.CreateEffect(c)
e1_3:SetType(EFFECT_TYPE_SINGLE)
e1_3:SetCode(EFFECT_UPDATE_DEFENSE)
e1_3:SetValue(-num)
e1_3:SetReset(RESET_EVENT+0x1fe0000)
sc:RegisterEffect(e1_3)
sc=sg:GetNext()
end
Duel.Damage(1-tp,num,REASON_EFFECT)
end
if dc==4 then Duel.Damage(tp,1100,REASON_EFFECT) end
if dc>4 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if sg:GetCount()<1 then return end
if Duel.Destroy(sg,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c11200022.ofilter1,tp,LOCATION_DECK,0,1,1,nil)
if tg:GetCount()<1 then return end
Duel.BreakEffect()
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
--
function c11200022.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION)
and c:GetFlagEffect(11200022)==0
end
function c11200022.op2(e,tp,eg,ep,ev,re,r,rp)
local cc=Duel.GetCurrentChain()
local cid=Duel.GetChainInfo(cc,CHAININFO_CHAIN_ID)
if c11200022[0]~=cid and Duel.SelectYesNo(tp,aux.Stringid(11200022,1)) then
Duel.Hint(HINT_CARD,0,11200022)
e:GetHandler():RegisterFlagEffect(11200022,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local dc={Duel.GetDiceResult()}
local ac=1
local ct=bit.band(ev,0xff)+bit.rshift(ev,16)
if ct>1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11200022,2))
local val,idx=Duel.AnnounceNumber(tp,table.unpack(dc,1,ct))
ac=idx+1
end
dc[ac]=7
Duel.SetDiceResult(table.unpack(dc))
c11200022[0]=cid
end
end
--你已经疯了!
function c11200023.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c11200023.mfilter,3,true)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200023,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11200023)
e1:SetCondition(c11200023.con1)
e1:SetTarget(c11200023.tg1)
e1:SetOperation(c11200023.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200023,0))
e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11200023)
e2:SetCondition(c11200023.con2)
e2:SetTarget(c11200023.tg1)
e2:SetOperation(c11200023.op1)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_TOSS_DICE_NEGATE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c11200023.con3)
e3:SetOperation(c11200023.op3)
c:RegisterEffect(e3)
--
end
--
c11200023.xig_ihs_0x132=1
--
function c11200023.mfilter(c)
return c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)
end
--
function c11200023.con1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=c:GetMaterial()
return c:GetMaterialCount()>0 and c:IsSummonType(SUMMON_TYPE_FUSION)
and not sg:IsExists(Card.IsCode,1,nil,11200019)
end
function c11200023.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=c:GetMaterial()
return c:GetMaterialCount()>0 and c:IsSummonType(SUMMON_TYPE_FUSION)
and sg:IsExists(Card.IsCode,1,nil,11200019)
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
--
function c11200023.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
--
function c11200023.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dc=Duel.TossDice(tp,1)
if dc>0 and dc<6 then
if c:IsControler(1-tp) then return end
if c:IsImmuneToEffect(e) then return end
if Duel.GetMZoneCount(tp)<1 then return end
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(c,nseq)
local sg=c:GetColumnGroup(LOCATION_MZONE)
local dg=sg:Filter(Card.IsControler,nil,1-tp)
if dg:GetCount()>0 then
Duel.BreakEffect()
Duel.Destroy(dg,REASON_EFFECT)
end
end
if dc>5 then Duel.Damage(1-tp,2000,REASON_EFFECT) end
end
--
function c11200023.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION)
and c:GetFlagEffect(11200023)==0
and c:GetMaterial():IsExists(Card.IsCode,1,nil,11200065)
end
function c11200023.op3(e,tp,eg,ep,ev,re,r,rp)
local cc=Duel.GetCurrentChain()
local cid=Duel.GetChainInfo(cc,CHAININFO_CHAIN_ID)
if c11200023[0]~=cid and Duel.SelectYesNo(tp,aux.Stringid(11200023,1)) then
Duel.Hint(HINT_CARD,0,11200023)
e:GetHandler():RegisterFlagEffect(11200023,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local dc={Duel.GetDiceResult()}
local ac=1
local ct=bit.band(ev,0xff)+bit.rshift(ev,16)
if ct>1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11200023,2))
local val,idx=Duel.AnnounceNumber(tp,table.unpack(dc,1,ct))
ac=idx+1
end
dc[ac]=7
Duel.SetDiceResult(table.unpack(dc))
c11200023[0]=cid
end
end
--『月面弹跳』
function c11200024.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200024)
e1:SetTarget(c11200024.tg1)
e1:SetOperation(c11200024.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11200124)
e2:SetCondition(aux.exccon)
e2:SetCost(c11200024.cost2)
e2:SetTarget(c11200024.tg2)
e2:SetOperation(c11200024.op2)
c:RegisterEffect(e2)
--
end
--
c11200024.xig_ihs_0x132=1
--
function c11200024.tfilter1(c)
return c:IsCode(11200019)
or (c.xig_ihs_0x132 and c:IsAbleToHand())
end
function c11200024.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200024.tfilter1,tp,LOCATION_DECK,0,1,nil) end
end
--
function c11200024.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c11200024.tfilter1,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()<1 then return end
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
--
function c11200024.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
local g=Group.CreateGroup()
g:AddCard(c)
Duel.HintSelection(g)
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
--
function c11200024.tfilter2(c,e,tp)
return c.xig_ihs_0x132 and c:IsType(TYPE_SPELL)
and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x132,0x21,1100,1100,4,RACE_BEAST,ATTRIBUTE_LIGHT)
end
function c11200024.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c11200024.tfilter2,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND)
end
--
function c11200024.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c11200024.tfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if sg:GetCount()<1 then return end
local sc=sg:GetFirst()
sc:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_LIGHT,RACE_BEAST,4,1100,1100)
Duel.SpecialSummonStep(sc,0,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummonComplete()
Duel.Draw(tp,1,REASON_EFFECT)
end
--
--『地上弹跳』
function c11200025.initial_effect(c)
--
if not c11200025.global_check then
c11200025.global_check=true
local e0=Effect.GlobalEffect()
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_CHAINING)
e0:SetCondition(c11200025.con0)
e0:SetOperation(c11200025.op0)
Duel.RegisterEffect(e0,0)
end
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_LEAVE_GRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200025+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c11200025.cost1)
e1:SetTarget(c11200025.tg1)
e1:SetOperation(c11200025.op1)
c:RegisterEffect(e1)
--
end
--
c11200025.xig_ihs_0x132=1
--
function c11200025.con0(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER)
and not (rc.xig_ihs_0x132 or rc:IsCode(11200019))
end
--
function c11200025.op0(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(rp,11200025,RESET_PHASE+PHASE_END,0,1)
end
--
function c11200025.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHandAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToHandAsCost,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SendtoHand(sg,nil,REASON_COST)
end
--
function c11200025.tfilter1(c,e,tp)
return c.xig_ihs_0x132 and c:IsType(TYPE_SPELL)
and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x132,0x21,1100,1100,4,RACE_BEAST,ATTRIBUTE_LIGHT)
end
function c11200025.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c11200025.tfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND+LOCATION_GRAVE)
end
--
function c11200025.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c11200025.tfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if Duel.GetFlagEffect(tp,11200025)<1 and Duel.GetMZoneCount(tp)>1
and Duel.SelectYesNo(tp,aux.Stringid(11200025,0)) then
sg:AddCard(c)
end
if sg:GetCount()>0 then
local sc=sg:GetFirst()
while sc do
sc:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_LIGHT,RACE_BEAST,4,1100,1100)
Duel.SpecialSummonStep(sc,0,tp,tp,true,false,POS_FACEUP)
sc=sg:GetNext()
end
Duel.SpecialSummonComplete()
end
end
--
--『幻胧月睨』
function c11200026.initial_effect(c)
--
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_EQUIP_LIMIT)
e0:SetValue(1)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200026+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c11200026.tg1)
e1:SetOperation(c11200026.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_SET_CONTROL)
e4:SetCondition(c11200026.con4)
e4:SetValue(c11200026.val4)
c:RegisterEffect(e4)
--
if not c11200026.global_check then
c11200026.global_check=true
local e5=Effect.GlobalEffect()
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAINING)
e5:SetCondition(c11200026.con5)
e5:SetOperation(c11200026.op5)
Duel.RegisterEffect(e5,0)
end
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_EQUIP)
e6:SetRange(LOCATION_SZONE)
e6:SetOperation(c11200026.op6)
c:RegisterEffect(e6)
--
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_EQUIP)
e7:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e7:SetValue(ATTRIBUTE_LIGHT)
c:RegisterEffect(e7)
--
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_EQUIP)
e8:SetCode(EFFECT_CHANGE_RACE)
e8:SetValue(RACE_BEAST)
c:RegisterEffect(e8)
--
end
--
c11200026.xig_ihs_0x132=1
--
function c11200026.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
--
function c11200026.op1(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 c11200026.con4(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(e:GetHandler():GetControler(),11200026)<1
end
--
function c11200026.val4(e,c)
return e:GetHandlerPlayer()
end
--
function c11200026.con5(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER)
and not (rc.xig_ihs_0x132 or rc:IsCode(11200019))
end
--
function c11200026.op5(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(rp,11200026,RESET_PHASE+PHASE_END,0,1)
end
--
function c11200026.op6(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if eg:GetFirst()~=c then return end
local tc=c:GetEquipTarget()
if not tc then return end
local e6_1=Effect.CreateEffect(c)
e6_1:SetType(EFFECT_TYPE_SINGLE)
e6_1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6_1:SetCode(EFFECT_CHANGE_CODE)
e6_1:SetRange(LOCATION_MZONE)
e6_1:SetLabelObject(c)
e6_1:SetValue(11200019)
e6_1:SetCondition(c11200026.con6_1)
tc:RegisterEffect(e6_1)
local e6_2=Effect.CreateEffect(c)
e6_2:SetType(EFFECT_TYPE_SINGLE)
e6_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6_2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e6_2:SetValue(1)
e6_2:SetLabelObject(c)
e6_2:SetCondition(c11200026.con6_2)
tc:RegisterEffect(e6_2)
local e6_3=Effect.CreateEffect(c)
e6_3:SetType(EFFECT_TYPE_SINGLE)
e6_3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6_3:SetCode(11200026)
e6_3:SetRange(LOCATION_MZONE)
e6_3:SetLabelObject(c)
e6_3:SetCondition(c11200026.con6_2)
c:RegisterEffect(e6_3)
end
--
function c11200026.con6_1(e)
local c=e:GetHandler()
local g=c:GetEquipGroup()
if g:IsContains(e:GetLabelObject()) then
return not e:GetLabelObject():IsDisabled()
else return false end
end
--
function c11200026.con6_2(e)
local c=e:GetHandler()
local g=c:GetEquipGroup()
local p=e:GetLabelObject():GetControler()
if g:IsContains(e:GetLabelObject()) then
return c:IsControler(p) and c:GetOwner()~=p
and not e:GetLabelObject():IsDisabled()
else return false end
end
--
--乌冬
function c11200027.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200027+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c11200027.tg1)
e1:SetOperation(c11200027.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200027,0))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER+CATEGORY_DICE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,11200027)
e2:SetCost(c11200027.cost2)
e2:SetOperation(c11200027.op2)
c:RegisterEffect(e2)
--
end
--
function c11200027.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(700)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,700)
end
--
function c11200027.op1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--
function c11200027.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
--
function c11200027.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dc=Duel.TossDice(tp,1)
if dc>0 and dc<5 then
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2_1:SetProperty(EFFECT_FLAG_DELAY)
e2_1:SetCode(EVENT_SPSUMMON_SUCCESS)
e2_1:SetCondition(c11200027.con2_1)
e2_1:SetOperation(c11200027.op2_1)
e2_1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_1,tp)
local e2_2=Effect.CreateEffect(c)
e2_2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2_2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2_2:SetCondition(c11200027.con2_2)
e2_2:SetOperation(c11200027.op2_2)
e2_2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_2,tp)
local e2_3=Effect.CreateEffect(c)
e2_3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2_3:SetCode(EVENT_CHAIN_SOLVED)
e2_3:SetCondition(c11200027.con2_3)
e2_3:SetOperation(c11200027.op2_3)
e2_3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_3,tp)
end
if dc>4 then
local e2_4=Effect.CreateEffect(c)
e2_4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2_4:SetProperty(EFFECT_FLAG_DELAY)
e2_4:SetCode(EVENT_SPSUMMON_SUCCESS)
e2_4:SetCondition(c11200027.con2_4)
e2_4:SetOperation(c11200027.op2_4)
e2_4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_4,tp)
local e2_5=Effect.CreateEffect(c)
e2_5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2_5:SetCode(EVENT_SPSUMMON_SUCCESS)
e2_5:SetCondition(c11200027.con2_5)
e2_5:SetOperation(c11200027.op2_5)
e2_5:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_5,tp)
local e2_6=Effect.CreateEffect(c)
e2_6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2_6:SetCode(EVENT_CHAIN_SOLVED)
e2_6:SetCondition(c11200027.con2_6)
e2_6:SetOperation(c11200027.op2_6)
e2_6:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2_6,tp)
end
end
--
function c11200027.cfilter2_1(c,sp)
return c:GetSummonPlayer()==sp
end
function c11200027.con2_1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11200027.cfilter2_1,1,nil,1-tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function c11200027.op2_1(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,700,REASON_EFFECT)
end
--
function c11200027.con2_2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11200027.cfilter2_1,1,nil,1-tp)
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function c11200027.op2_2(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,11200027,RESET_CHAIN,0,1)
end
--
function c11200027.con2_3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,11200027)>0
end
function c11200027.op2_3(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetFlagEffect(tp,11200027)
Duel.ResetFlagEffect(tp,11200027)
Duel.Recover(tp,n*700,REASON_EFFECT)
end
--
function c11200027.con2_4(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11200027.cfilter2_1,1,nil,1-tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function c11200027.op2_4(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,11200028)>=3 then return end
Duel.Draw(tp,1,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,11200028,RESET_PHASE+PHASE_END,0,1)
end
--
function c11200027.con2_5(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11200027.cfilter2_1,1,nil,1-tp)
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function c11200027.op2_5(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,11200029,RESET_CHAIN,0,1)
end
--
function c11200027.con2_6(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,11200029)>0
end
function c11200027.op2_6(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetFlagEffect(tp,11200029)
local num=Duel.GetFlagEffect(tp,11200028)
if n>3-num then n=3-num end
Duel.ResetFlagEffect(tp,11200029)
if n>0 then Duel.Draw(tp,1,REASON_EFFECT) end
while n>0 do
Duel.RegisterFlagEffect(tp,11200028,RESET_PHASE+PHASE_END,0,1)
n=n-1
end
end
--
--迷途竹林
function c11200028.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200028+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c11200028.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetValue(c11200028.val2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c11200028.tg3)
e3:SetValue(1)
c:RegisterEffect(e3)
--
if not c11200028.global_check then
c11200028.global_check=true
c11200028[0]=0
local ge0=Effect.CreateEffect(c)
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge0:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge0:SetOperation(c11200028.clear)
Duel.RegisterEffect(ge0,0)
end
--
end
--
c11200028.xig_ihs_0x132=1
c11200028.xig_ihs_0x133=1
--
function c11200028.clear(e,tp,eg,ep,ev,re,r,rp)
c11200028[0]=0
end
--
function c11200028.ofilter1(c)
return c:IsFusionSummonableCard() and c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c11200028.op1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c11200028.ofilter1,tp,0xff,0xff,nil)
local tc=g:GetFirst()
while tc do
if tc:GetFlagEffect(11200028)==0 then
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetDescription(aux.Stringid(11200028,0))
e1_1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1_1:SetType(EFFECT_TYPE_FIELD)
e1_1:SetCode(EFFECT_SPSUMMON_PROC)
e1_1:SetRange(LOCATION_EXTRA)
e1_1:SetValue(SUMMON_TYPE_FUSION)
e1_1:SetReset(RESET_PHASE+PHASE_END)
e1_1:SetCondition(c11200028.con1_1)
e1_1:SetOperation(c11200028.op1_1)
tc:RegisterEffect(e1_1)
tc:RegisterFlagEffect(11200028,RESET_PHASE+PHASE_END,0,0)
end
tc=g:GetNext()
end
c11200028[0]=c11200028[0]+1
end
--
function c11200028.cfilter1_1(c,fc)
return c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial(fc) and c:IsType(TYPE_MONSTER)
end
function c11200028.con1_1(e,c)
if c11200028[0]==0 then return false end
if c==nil then return true end
local tp=c:GetControler()
local chkf=tp
local mg=Duel.GetMatchingGroup(c11200028.cfilter1_1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,c)
return c:CheckFusionMaterial(mg,nil,chkf)
end
function c11200028.op1_1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
local mg=Duel.GetMatchingGroup(c11200028.cfilter1_1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,c)
local mat=Duel.SelectFusionMaterial(tp,c,mg,nil,chkf)
c:SetMaterial(mat)
Duel.Remove(mat,POS_FACEUP,REASON_FUSION+REASON_COST+REASON_MATERIAL)
local e1_1_1=Effect.CreateEffect(c)
e1_1_1:SetDescription(aux.Stringid(11200028,1))
e1_1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1_1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1_1:SetCode(EFFECT_CANNOT_TRIGGER)
e1_1_1:SetReset(RESET_EVENT+0xfe0000)
c:RegisterEffect(e1_1_1,true)
c11200028[0]=c11200028[0]-1
end
--
function c11200028.val2(e,c)
return c:IsFaceup() and (c.xig_ihs_0x132 or c:IsCode(11200019) or c:IsSetCard(0x621))
end
--
function c11200028.tg3(e,c)
return c:IsFaceup() and (c.xig_ihs_0x132 or c:IsCode(11200019) or c:IsSetCard(0x621))
end
--
\ No newline at end of file
--泄矢诹访子
local m=11200029
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,11200029)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_SINGLE)
e1:SetCost(cm.sgcost)
e1:SetTarget(cm.sgtg)
e1:SetOperation(cm.sgop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_COUNTER+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_SINGLE)
e2:SetCost(cm.sgcost)
e2:SetTarget(cm.cttg)
e2:SetOperation(cm.ctop)
c:RegisterEffect(e2)
end
function cm.costfilter(c)
return c:GetCode()~=m and c:IsDiscardable()
end
function cm.sgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_DISCARD+REASON_COST)
end
function cm.filter(c)
return aux.IsCodeListed(c,m) and not c:IsCode(m) and c:IsAbleToHand()
end
function cm.sgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if e:GetHandler():IsLocation(LOCATION_HAND) then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
end
function cm.sgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
if c:IsLocation(LOCATION_HAND) and c:IsAbleToGrave() then
Duel.BreakEffect()
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,0x1620,1) end
if e:GetHandler():IsLocation(LOCATION_HAND) then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1620,1)
if g:GetCount()==0 then return end
for i=1,4 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:AddCounter(0x1620,1)
end
if c:IsLocation(LOCATION_HAND) and c:IsAbleToGrave() then
Duel.BreakEffect()
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
--两栖类的神明
local m=11200030
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,11200029)
--xyz summon
aux.AddXyzProcedure(c,nil,2,2)
c:EnableReviveLimit()
--code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e0:SetValue(11200029)
c:RegisterEffect(e0)
--attack up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetOperation(cm.adop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+900)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--lv change
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_XYZ_LEVEL)
e4:SetProperty(EFFECT_FLAG_SET_AVAIABLE)
e4:SetRange(LOCATION_EXTRA)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(cm.lvtg)
e4:SetValue(cm.lvval)
c:RegisterEffect(e4)
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.adfilter(c)
return c:IsFaceup() and c:IsRace(RACE_AQUA)
end
function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.ptfilter)
e1:SetValue(1200)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.ptfilter(e,c)
return c:IsRace(RACE_AQUA)
end
function cm.costfilter(c)
return c:IsRace(RACE_AQUA) and c:IsReleasable()
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,nil) or e:GetHandler():GetCounter(0x1620)>0 end
if Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,nil)
and (not e:GetHandler():GetCounter(0x1620)>0 or not Duel.SelectYesNo(tp,aux.Stringid(m,2))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
end
function cm.filter(c)
return c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelBelow(2) and c:IsAbleToHand() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function cm.thtg(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_TOHAND,nil,1,tp,LOCATION_GRAVE+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,aux.NecroValleyFilter(cm.filter),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.lvtg(e,c)
return c:IsLevelAbove(1) and c:GetCounter(0x1620)>0
end
function cm.lvval(e,c,rc)
local lv=c:GetLevel()
if rc==e:GetHandler() then return 2
else return lv end
end
--丰谷的神明
function c11200031.initial_effect(c)
aux.AddCodeList(c,11200029)
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,11200029,aux.FilterBoolFunction(Card.IsRace,RACE_AQUA),1,true,true)
--code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e0:SetValue(11200029)
c:RegisterEffect(e0)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,11200031)
e1:SetCost(c11200031.thcost)
e1:SetTarget(c11200031.thtg)
e1:SetOperation(c11200031.thop)
c:RegisterEffect(e1)
--recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11200031,1))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,11200931+EFFECT_COUNT_CODE_SINGLE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c11200031.rectg)
e3:SetOperation(c11200031.recop)
c:RegisterEffect(e3)
--damage
local e4=e3:Clone()
e4:SetDescription(aux.Stringid(11200031,2))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetTarget(c11200031.damtg)
e4:SetOperation(c11200031.damop)
c:RegisterEffect(e4)
end
function c11200031.thfilter(c,tp)
return c:IsType(TYPE_FIELD) and c:IsCode(11200039,11200040) and (c:IsAbleToHand() or c:GetActivateEffect():IsActivatable(tp,true,true))
end
function c11200031.cfilter(c)
return c:IsRace(RACE_AQUA) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost()
end
function c11200031.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200031.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c11200031.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c11200031.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200031.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c11200031.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11200031,0))
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local g=Duel.SelectMatchingCard(tp,c11200031.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
Duel.ResetFlagEffect(tp,15248873)
local tc=g:GetFirst()
if tc then
local te=tc:GetActivateEffect()
local b1=tc:IsAbleToHand()
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local b2=te:IsActivatable(tp,true,true)
Duel.ResetFlagEffect(tp,15248873)
if b1 and (not b2 or Duel.SelectOption(tp,1190,1150)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
end
function c11200031.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetCounter(0,1,1,0x1620)
if chk==0 then return ct>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300)
end
function c11200031.recop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetCounter(0,1,1,0x1620)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if ct>0 then
Duel.Recover(p,ct*300,REASON_EFFECT)
end
end
function c11200031.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetCounter(0,1,1,0x1620)
if chk==0 then return ct>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200)
end
function c11200031.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetCounter(0,1,1,0x1620)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if ct>0 then
Duel.Damage(p,ct*200,REASON_EFFECT)
end
end
--名存实亡的神明
local m=11200032
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,11200029)
--code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e0:SetValue(11200029)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,m+900)
e3:SetTarget(cm.mattg)
e3:SetOperation(cm.matop)
c:RegisterEffect(e3)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW)
and e:GetHandler():IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,0x1620,1) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.ctfilter(c)
return c:IsFaceup() and c:IsCode(11200029)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local ct=Duel.GetMatchingGroupCount(cm.ctfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,0x1620,1)
if g:GetCount()==0 or ct==0 then return end
for i=1,ct do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:AddCounter(0x1620,1)
end
end
end
function cm.matfilter(c)
return c:IsFaceup() and aux.IsCodeListed(c,11200029) and c:IsType(TYPE_XYZ)
end
function cm.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.matfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.matfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.matop(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 tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
--或许很烦人的谜之神明
local m=11200033
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,11200029)
--xyz summon
aux.AddXyzProcedure(c,nil,2,2)
c:EnableReviveLimit()
--code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e0:SetValue(11200029)
c:RegisterEffect(e0)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(cm.discon1)
e2:SetCost(cm.discost)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(cm.discon2)
c:RegisterEffect(e3)
--lv change
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_XYZ_LEVEL)
e4:SetProperty(EFFECT_FLAG_SET_AVAIABLE)
e4:SetRange(LOCATION_EXTRA)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(cm.lvtg)
e4:SetValue(cm.lvval)
c:RegisterEffect(e4)
end
function cm.atkval(e,c)
return c:GetOverlayCount()*1000
end
function cm.discon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1620)==0
end
function cm.discon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1620)>0
end
function cm.discost(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.disfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled()
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
function cm.lvtg(e,c)
return c:IsLevelAbove(1) and c:GetCounter(0x1620)>0
end
function cm.lvval(e,c,rc)
local lv=c:GetLevel()
if rc==e:GetHandler() then return 2
else return lv end
end
--赤口的土著神
local m=11200034
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,11200029)
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,11200029,cm.ffilter,1,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE+LOCATION_HAND,0,Duel.SendtoGrave,REASON_COST)
--code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e0:SetValue(11200029)
c:RegisterEffect(e0)
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(cm.atkval)
c:RegisterEffect(e2)
--equip
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetCountLimit(cm.eqcon)
e3:SetTarget(cm.eqtg)
e3:SetOperation(cm.eqop)
c:RegisterEffect(e3)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function cm.ffilter(c,fc,sub,mg,sg)
return c:GetCounter(0x1620)>0
end
function cm.atkval(e,c)
return Duel.GetCounter(0,1,1,0x1620)*400
end
function cm.eqcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE and e:GetHandler():GetCounter(0x1620)>0
end
function cm.efilter(c,tp)
return c:IsFaceup()
and Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_DECK,0,1,nil,c)
end
function cm.eqfilter(c,tc)
return c:IsType(TYPE_EQUIP) and c:IsCode(11200046) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:CheckEquipTarget(tc)
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.efilter(chkc,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(cm.efilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) and e:GetHandler():GetCounter(0x1620)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.efilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if e:GetHandler():GetCounter(0x1620)==0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.eqfilter),tp,LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil,tc)
local eq=g:GetFirst()
if eq then
Duel.Equip(tp,eq,tc)
end
end
--丰作之地
function c11200039.initial_effect(c)
aux.AddCodeList(c,11200029)
--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_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1)
e2:SetCondition(c11200039.drcon)
e2:SetTarget(c11200039.drtg)
e2:SetOperation(c11200039.drop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,11200039)
e3:SetTarget(c11200039.reptg)
e3:SetValue(c11200039.repval)
e3:SetOperation(c11200039.repop)
c:RegisterEffect(e3)
end
function c11200039.cfilter(c)
return aux.IsCodeListed(c,11200029) and not c:IsCode(11200039) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c11200039.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c11200039.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil)
end
function c11200039.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local turnp=Duel.GetTurnPlayer()
Duel.SetTargetPlayer(turnp)
Duel.SetTargetParam(1200)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,turnp,1200)
end
function c11200039.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c11200039.repfilter(c,tp)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:GetCounter(0x1620)>0
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c11200039.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsStatus(STATUS_DESTROY_CONFIRMED) and eg:IsExists(c11200039.repfilter,1,nil,tp) and Duel.IsCanRemoveCounter(tp,1,1,0x1620,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c11200039.repval(e,c)
return c11200039.repfilter(c,e:GetHandlerPlayer())
end
function c11200039.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.RemoveCounter(tp,1,1,0x1620,1,REASON_EFFECT+REASON_REPLACE)
end
--诅咒之地
function c11200040.initial_effect(c)
aux.AddCodeList(c,11200029)
--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_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1)
e2:SetCondition(c11200040.drcon)
e2:SetTarget(c11200040.drtg)
e2:SetOperation(c11200040.drop)
c:RegisterEffect(e2)
--cannot attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(c11200040.atktarget)
c:RegisterEffect(e3)
--disable
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetRange(LOCATION_FZONE)
e5:SetCondition(c11200040.discon)
e5:SetOperation(c11200040.disop)
c:RegisterEffect(e5)
end
function c11200040.cfilter(c)
return aux.IsCodeListed(c,11200029) and not c:IsCode(11200040) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c11200040.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c11200040.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil)
end
function c11200040.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local turnp=Duel.GetTurnPlayer()
Duel.SetTargetPlayer(turnp)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,turnp,800)
end
function c11200040.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c11200040.atktarget(e,c)
return c:GetCounter(0x1620)>0
end
function c11200040.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetCounter(0x1620)>0
end
function c11200040.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--土著神『小小青蛙不输风雨』
local m=11200041
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,11200029)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_REMOVE+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
--tohand(monster)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,m+900)
e4:SetCost(cm.thcost2)
e4:SetTarget(cm.thtg2)
e4:SetOperation(cm.thop2)
c:RegisterEffect(e4)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.tgfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGrave()
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)
Duel.ShuffleHand(p)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(p,cm.tgfilter,p,LOCATION_HAND,0,1,1,nil)
local tg=g:GetFirst()
if tg then
if Duel.SendtoGrave(g,REASON_EFFECT)==0 then
Duel.ConfirmCards(1-p,tg)
Duel.ShuffleHand(p)
end
else
local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
function cm.thcost2(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.thfilter2(c)
return c:IsCode(11200029) and c:IsAbleToHand() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.sgfilter(c)
return c:IsLocation(LOCATION_HAND)
end
function cm.ssfilter(c)
return (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and c:IsLevelBelow(2) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_AQUA) and c:IsAbleToGrave()
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(cm.sgfilter,nil,tp)
if ct==0 then
local tg=Duel.GetMatchingGroup(cm.ssfilter,tp,LOCATION_DECK+LOCATION_MZONE,0,nil)
if #tg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=tg:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
end
--祟神『赤口大人』
local m=11200042
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
aux.AddCodeList(c,11200029)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET)
e1:SetCondition(cm.descon1)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(cm.descon2)
c:RegisterEffect(e2)
--Add counter2
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_LEAVE_FIELD_P)
e3:SetRange(LOCATION_SZONE)
e3:SetOperation(cm.addop)
c:RegisterEffect(e3)
--tohand(monster)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,m)
e4:SetCost(cm.thcost2)
e4:SetTarget(cm.thtg2)
e4:SetOperation(cm.thop2)
c:RegisterEffect(e4)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION)
end
function cm.descon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.descon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsCode(11200029)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.desfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,2,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
end
function cm.desop(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)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.Destroy(tg,REASON_EFFECT)
end
end
function cm.addop(e,tp,eg,ep,ev,re,r,rp)
local count=0
local c=eg:GetFirst()
while c~=nil do
if c~=e:GetHandler() and c:IsLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) then
count=count+c:GetCounter(0x1620)
end
c=eg:GetNext()
end
if count>0 then
e:GetHandler():AddCounter(0x1620,count)
end
end
function cm.thcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function cm.thfilter2(c)
return c:IsCode(11200029) and c:IsAbleToHand() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.sgfilter(c)
return c:IsLocation(LOCATION_HAND)
end
function cm.ssfilter(c)
return c:IsFaceup() and c:GetCounter(0x1620)>0
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(cm.sgfilter,nil,tp)
if ct==0 then
local tg=Duel.GetMatchingGroup(cm.ssfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
end
end
--腹黑兔 因幡帝
function c11200043.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200043,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,11200043)
e1:SetCondition(c11200043.con1)
e1:SetTarget(c11200043.tg1)
e1:SetOperation(c11200043.op1)
c:RegisterEffect(e1)
--
end
--
c11200043.xig_ihs_0x133=1
--
function c11200043.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK)
end
--
function c11200043.tfilter1(c,tp)
return c.xig_ihs_0x133 and c:IsSSetable()
and c:IsType(TYPE_SPELL+TYPE_TRAP)
and (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 or c:IsType(TYPE_FIELD))
end
function c11200043.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(c11200043.tfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp)
local b2=Duel.IsPlayerCanDraw(tp,1)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (b1 or b2) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
--
function c11200043.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local off=1
local ops={}
local opval={}
local b1=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c11200043.tfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp)
local b2=Duel.IsPlayerCanDraw(tp,1)
if b1 then
ops[off]=aux.Stringid(11200043,1)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(11200043,2)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c11200043.tfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp)
Duel.BreakEffect()
Duel.SSet(tp,g)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
if tc:IsPreviousLocation(LOCATION_HAND) then
if tc:IsType(TYPE_QUICKPLAY) then
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1_1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1_1,true)
end
if tc:IsType(TYPE_TRAP) then
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1_2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1_2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1_2,true)
end
if tc:IsType(TYPE_SPELL) and not tc:IsType(TYPE_QUICKPLAY) then
local e1_3=tc:GetActivateEffect()
e1_3:SetProperty(0,EFFECT_FLAG2_COF)
e1_3:SetHintTiming(0,0x1e0+TIMING_CHAIN_END)
e1_3:SetCondition(c11200043.con1_3)
tc:RegisterFlagEffect(11200043,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
local e1_4=Effect.CreateEffect(c)
e1_4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1_4:SetCode(EVENT_ADJUST)
e1_4:SetOperation(c11200043.op1_4)
e1_4:SetLabelObject(tc)
Duel.RegisterEffect(e1_4,tp)
end
end
end
if sel==2 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
--
function c11200043.con1_3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()<1
end
function c11200043.op1_4(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(11200043)>0 then return end
local e1_3_1=tc:GetActivateEffect()
e1_3_1:SetProperty(nil)
e1_3_1:SetHintTiming(0)
e1_3_1:SetCondition(aux.TRUE)
e:Reset()
end
--
--开宴『二拜二拍一拜』
local m=11200044
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,11200029)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
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(monster)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,m+900)
e4:SetCost(cm.thcost2)
e4:SetTarget(cm.thtg2)
e4:SetOperation(cm.thop2)
c:RegisterEffect(e4)
end
function cm.filter(c)
return aux.IsCodeListed(c,11200029) and not c:IsCode(m) and c:IsAbleToHand()
end
function cm.target(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_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.cfilter(c)
return c:IsControler(tp) and aux.IsCodeListed(c,11200029) and not c:IsCode(m)
end
function cm.spcon(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.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,m,0,0x11,0,1800,2,RACE_AQUA,ATTRIBUTE_WATER) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x11,0,1800,2,RACE_AQUA,ATTRIBUTE_WATER) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
end
end
function cm.thcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function cm.thfilter2(c)
return c:IsCode(11200029) and c:IsAbleToHand() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.sgfilter(c)
return c:IsLocation(LOCATION_HAND)
end
function cm.ssfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsLevelBelow(2) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_AQUA) and c:IsAbleToDeck()
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(cm.sgfilter,nil,tp)
if ct==0 then
local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.ssfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if #tg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=tg:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
end
--神具『泄矢的铁轮』
local m=11200046
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,11200029)
--Equip limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_EQUIP_LIMIT)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetValue(1)
c:RegisterEffect(e0)
--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:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.zcon)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--Atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(cm.value)
c:RegisterEffect(e2)
--tohand(monster)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,m+900)
e4:SetCost(cm.thcost2)
e4:SetTarget(cm.thtg2)
e4:SetOperation(cm.thop2)
c:RegisterEffect(e4)
end
function cm.nfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsCode(11200029)
end
function cm.zcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.nfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.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 cm.value(e,c)
local ec=e:GetHandler():GetEquipTarget()
local ko=Duel.GetCounter(0,1,1,0x1620)
if ec:IsRace(RACE_AQUA) then
return ko*400
else
return ko*-400
end
end
function cm.thcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function cm.thfilter2(c)
return c:IsCode(11200029) and c:IsAbleToHand() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.sgfilter(c)
return c:IsLocation(LOCATION_HAND)
end
function cm.ssfilter(c)
return c:IsCode(m) and c:IsAbleToHand()
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(cm.sgfilter,nil,tp)
if ct==0 then
local tg=Duel.GetMatchingGroup(cm.ssfilter,tp,LOCATION_DECK,0,nil)
if #tg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=tg:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
--蛙狩『蛙以口鸣,方致蛇祸』
local m=11200048
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,11200029)
--counter
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.zcon)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--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)
--tohand(monster)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,m+900)
e4:SetCost(cm.thcost2)
e4:SetTarget(cm.thtg2)
e4:SetOperation(cm.thop2)
c:RegisterEffect(e4)
end
function cm.nfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsCode(11200029)
end
function cm.zcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.nfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanAddCounter(0x1620,2) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0x1620,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,0x1620,2)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,1,0x1620,2)
end
function cm.operation(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:AddCounter(0x1620,2)
local e3_1_1=Effect.CreateEffect(c)
e3_1_1:SetType(EFFECT_TYPE_SINGLE)
e3_1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3_1_1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3_1_1:SetCondition(cm.disable)
e3_1_1:SetValue(cm.synlimit)
e3_1_1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3_1_1)
local e3_1_2=e3_1_1:Clone()
e3_1_2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e3_1_2)
local e3_1_3=e3_1_1:Clone()
e3_1_3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e3_1_3)
local e3_1_4=e3_1_1:Clone()
e3_1_4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e3_1_4)
local e3_1_5=e3_1_1:Clone()
e3_1_5:SetCode(EFFECT_UNRELEASABLE_SUM)
e3_1_5:SetValue(1)
tc:RegisterEffect(e3_1_5)
local e3_1_6=e3_1_1:Clone()
e3_1_6:SetCode(EFFECT_UNRELEASABLE_NONSUM)
e3_1_6:SetValue(1)
tc:RegisterEffect(e3_1_6)
end
end
function cm.disable(e)
return e:GetHandler():GetCounter(0x1620)>0
end
function cm.synlimit(e,c)
if not c then return false end
return not c:IsRace(RACE_AQUA)
end
function cm.actcon(e)
return Duel.IsExistingMatchingCard(cm.nfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil)
end
function cm.thcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function cm.thfilter2(c)
return c:IsCode(11200029) and c:IsAbleToHand() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.sgfilter(c)
return c:IsLocation(LOCATION_HAND)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(cm.sgfilter,nil,tp)
if ct==0 then
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1620,1)
if g:GetCount()==0 then return end
for i=1,4 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local sg=g:Select(tp,1,1,nil)
sg:GetFirst():AddCounter(0x1620,1)
end
end
end
--幸运的白兔 因幡帝
function c11200064.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200064,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,11200064)
e1:SetCondition(c11200064.con1)
e1:SetTarget(c11200064.tg1)
e1:SetOperation(c11200064.op1)
c:RegisterEffect(e1)
--
end
--
function c11200064.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK)
end
--
function c11200064.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=true
local b2=Duel.IsPlayerCanDraw(tp,1)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (b1 or b2) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
--
function c11200064.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local off=1
local ops={}
local opval={}
local b1=true
local b2=Duel.IsPlayerCanDraw(tp,1)
if b1 then
ops[off]=aux.Stringid(11200064,1)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(11200064,2)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
Duel.BreakEffect()
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1_1:SetCode(EVENT_TOSS_DICE_NEGATE)
e1_1:SetRange(LOCATION_MZONE)
e1_1:SetCondition(c11200064.con1_1)
e1_1:SetOperation(c11200064.op1_1)
c:RegisterEffect(e1_1)
end
if sel==2 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
--
function c11200064.con1_1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(11200064)==0
end
function c11200064.op1_1(e,tp,eg,ep,ev,re,r,rp)
local cc=Duel.GetCurrentChain()
local cid=Duel.GetChainInfo(cc,CHAININFO_CHAIN_ID)
if c11200064[0]~=cid and Duel.SelectYesNo(tp,aux.Stringid(11200064,1)) then
Duel.Hint(HINT_CARD,0,11200064)
e:GetHandler():RegisterFlagEffect(11200064,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local dc={Duel.GetDiceResult()}
local ac=1
local ct=bit.band(ev,0xff)+bit.rshift(ev,16)
if ct>1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11200064,2))
local val,idx=Duel.AnnounceNumber(tp,table.unpack(dc,1,ct))
ac=idx+1
end
dc[ac]=7
Duel.SetDiceResult(table.unpack(dc))
c11200064[0]=cid
end
end
--
--因幡帝
function c11200065.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200065,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,11200065)
e1:SetCondition(c11200065.con1)
e1:SetTarget(c11200065.tg1)
e1:SetOperation(c11200065.op1)
c:RegisterEffect(e1)
--
end
--
c11200065.xig_ihs_0x132=1
c11200065.xig_ihs_0x133=1
--
function c11200065.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK)
end
--
function c11200065.tfilter1(c,e,tp)
return c:IsType(TYPE_MONSTER)
and (c:IsSetCard(0x621) or c:IsCode(11200019))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11200065.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.GetMZoneCount(tp)>1
and Duel.IsExistingMatchingCard(c11200065.tfilter1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.IsPlayerCanDraw(tp,1)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (b1 or b2) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
--
function c11200065.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local off=1
local ops={}
local opval={}
local b1=Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c11200065.tfilter1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.IsPlayerCanDraw(tp,1)
if b1 then
ops[off]=aux.Stringid(11200065,1)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(11200065,2)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c11200065.tfilter1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
if sel==2 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
--
--兔☆兔
function c11200066.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c11200066.FusFilter,2,true)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200066,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_REMOVE+CATEGORY_LEAVE_GRAVE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11200066)
e1:SetCondition(c11200066.con1)
e1:SetTarget(c11200066.tg1)
e1:SetOperation(c11200066.op1)
c:RegisterEffect(e1)
e2=e1:Clone()
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c11200066.con2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11200066,3))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetOperation(c11200066.op3)
c:RegisterEffect(e3)
--
end
--
function c11200066.FusFilter(c)
return c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
--
function c11200066.con1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION)
and c:GetMaterialCount()>0
end
function c11200066.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION)
end
--
function c11200066.tfilter1(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() and c:GetLevel()<5
end
function c11200066.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c11200066.tfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
--
function c11200066.ofilter1(c,tc)
return c:IsCode(tc:GetCode()) and c:IsAbleToRemove()
end
function c11200066.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c11200066.tfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if tg:GetCount()<1 then return end
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
local off=1
local ops={}
local opval={}
local b1=Duel.IsExistingMatchingCard(c11200066.ofilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tg:GetFirst())
local b2=true
if b1 then
ops[off]=aux.Stringid(11200066,1)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(11200066,2)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local lg=Duel.SelectMatchingCard(tp,c11200066.ofilter1,tp, LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tg:GetFirst())
if lg:GetCount()<1 then return end
Duel.Remove(lg,POS_FACEUP,REASON_EFFECT)
end
if sel==2 then
if Duel.GetFlagEffect(tp,11200066)~=0 then return end
local e1_1=Effect.CreateEffect(c)
e1_1:SetDescription(aux.Stringid(11200066,2))
e1_1:SetType(EFFECT_TYPE_FIELD)
e1_1:SetTargetRange(LOCATION_HAND,0)
e1_1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1_1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEAST))
e1_1:SetValue(0x1)
e1_1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1_1,tp)
Duel.RegisterFlagEffect(tp,11200066,RESET_PHASE+PHASE_END,0,1)
end
end
--
function c11200066.op3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,11200066)==0 then
local e3_1=Effect.CreateEffect(e:GetHandler())
e3_1:SetDescription(aux.Stringid(11200066,3))
e3_1:SetType(EFFECT_TYPE_FIELD)
e3_1:SetTargetRange(LOCATION_HAND,0)
e3_1:SetCode(EFFECT_SUMMON_PROC)
e3_1:SetCountLimit(1)
e3_1:SetCondition(c11200066.con3_1)
e3_1:SetTarget(c11200066.tg3_1)
e3_1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3_1,tp)
Duel.RegisterFlagEffect(tp,11200066,RESET_PHASE+PHASE_END,0,1)
end
end
--
function c11200066.con3_1(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c11200066.tg3_1(e,c)
return c:IsLevelAbove(5) and c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
--
--兔符『因幡的白兔』
function c11200067.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_DRAW+CATEGORY_TODECK+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200067+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c11200067.con1)
e1:SetCost(c11200067.cost1)
e1:SetTarget(c11200067.tg1)
e1:SetOperation(c11200067.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DRAW_COUNT)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(1,0)
e3:SetValue(2)
c:RegisterEffect(e3)
--
end
--
c11200067.xig_ihs_0x133=1
--
function c11200067.con1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
--
function c11200067.cfilter1(c)
return c:IsAbleToGraveAsCost() and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c11200067.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200067.cfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_MZONE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectMatchingCard(tp,c11200067.cfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local sg2=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,sg)
sg:Merge(sg2)
Duel.Release(sg,REASON_COST)
end
--
function c11200067.tfilter1(c)
return c:IsAbleToHand() and (c:IsCode(11200067) or c.xig_ihs_0x133)
end
function c11200067.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsPlayerCanDraw(tp,1)
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c11200067.tfilter1,tp,LOCATION_DECK,0,1,nil) and (b1 or b2) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
--
function c11200067.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11200067.tfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local off=1
local ops={}
local opval={}
local b1=Duel.IsPlayerCanDraw(tp,1)
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil)
if b1 then
ops[off]=aux.Stringid(11200067,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(11200067,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
if sel==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil)
if sg:GetCount()<1 then return end
Duel.BreakEffect()
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
end
--
--兔符『开运大纹』
function c11200068.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200068+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c11200068.con1)
e1:SetTarget(c11200068.tg1)
e1:SetOperation(c11200068.op1)
c:RegisterEffect(e1)
--
end
--
c11200068.xig_ihs_0x133=1
--
function c11200068.con1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
--
function c11200068.tfilter1(c)
return c:IsSetCard(0x621) or c.xig_ihs_0x133 and (c:IsLocation(LOCATION_DECK) or c:IsAbleToDeck())
end
function c11200068.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local alnum=0
if Duel.GetFieldGroupCount(1-tp,LOCATION_HAND+LOCATION_ONFIELD,0)>Duel.GetFieldGroupCount(tp,LOCATION_HAND+LOCATION_ONFIELD,0) then
alnum=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND+LOCATION_ONFIELD,0)-Duel.GetFieldGroupCount(tp,LOCATION_HAND+LOCATION_ONFIELD,0)
end
local b1=Duel.IsPlayerCanDraw(tp,1)
local b2=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
if chk==0 then return (alnum<2 or (b1 and b2))
and Duel.IsExistingMatchingCard(c11200068.tfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
e:SetLabel(alnum)
if alnum>2 then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1100)
end
end
--
function c11200068.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local alnum=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RESOLVECARD)
local sg=Duel.SelectMatchingCard(tp,c11200068.tfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if sg:GetCount()>0 then
local tc=sg:GetFirst()
if tc:IsLocation(LOCATION_DECK) then
Duel.MoveSequence(tc,0)
else
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
end
Duel.ConfirmDecktop(tp,1)
end
if alnum<3 then
local b1=Duel.IsPlayerCanDraw(tp,1)
local b2=true
local b3=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
local b4=c:IsRelateToEffect(e) and c:IsCanTurnSet()
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(11200068,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(11200068,1)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(11200068,2)
opval[off-1]=3
off=off+1
end
if b4 then
ops[off]=aux.Stringid(11200068,3)
opval[off-1]=4
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
if sel==1 then Duel.Draw(tp,1,REASON_EFFECT) end
if sel==2 then Duel.Damage(1-tp,1100,REASON_EFFECT) end
if sel==3 then
local lg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local lc=lg:GetFirst()
while lc do
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_UPDATE_ATTACK)
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1_1:SetValue(-550)
lc:RegisterEffect(e1_1)
local e1_2=e1_1:Clone()
e1_1:SetCode(EFFECT_UPDATE_DEFENSE)
lc:RegisterEffect(e1_2)
lc=lg:GetNext()
end
end
if sel==4 then
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
if alnum>2 then
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Damage(1-tp,1100,REASON_EFFECT)
local lg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local lc=lg:GetFirst()
while lc do
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_UPDATE_ATTACK)
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1_1:SetValue(-550)
lc:RegisterEffect(e1_1)
local e1_2=e1_1:Clone()
e1_1:SetCode(EFFECT_UPDATE_DEFENSE)
lc:RegisterEffect(e1_2)
lc=lg:GetNext()
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
end
--
--脱兔『Fluster Escape』
function c11200069.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetCondition(c11200069.con1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,11200069+EFFECT_COUNT_CODE_OATH)
e3:SetTarget(c11200069.tg3)
e3:SetOperation(c11200069.op3)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(11200069,0))
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_LEAVE_GRAVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,11200169)
e4:SetCondition(c11200069.con4)
e4:SetTarget(c11200069.tg4)
e4:SetOperation(c11200069.op4)
c:RegisterEffect(e4)
--
end
--
c11200069.xig_ihs_0x132=1
c11200069.xig_ihs_0x133=1
--
function c11200069.cfilter1(c)
return not (c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT))
end
function c11200069.con1(e)
local c=e:GetHandler()
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(c11200069.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
--
function c11200069.tfilter3(c,e,tp)
return (c:IsSetCard(0x621) or c:IsCode(11200019) or c.xig_ihs_0x132)
and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11200069.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c11200069.tfilter3,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
--
function c11200069.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c11200069.tfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if sg:GetCount()<1 then return end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
--
function c11200069.con4(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return not rc:IsSetCard(0x621)
end
--
function c11200069.tfilter4(c)
return c:IsSetCard(0x621) and c:IsAbleToDeck()
end
function c11200069.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() or Duel.IsExistingMatchingCard(c11200069.tfilter4,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,LOCATION_GRAVE+LOCATION_MZONE)
end
--
function c11200069.op4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=Duel.GetFieldGroup(tp,LOCATION_GRAVE+LOCATION_MZONE,0)
local tg=sg:Filter(c11200069.tfilter4,nil)
if c:IsRelateToEffect(e) then tg:AddCard(c) end
if tg:GetCount()<1 then return end
if Duel.SendtoDeck(tg,nil,1,REASON_EFFECT)>0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--
--借符『大穴牟迟大人的药』
function c11200070.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetCondition(c11200070.con1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,11200070+EFFECT_COUNT_CODE_OATH)
e2:SetTarget(c11200070.tg2)
e2:SetOperation(c11200070.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c11200070.con3)
e3:SetTarget(c11200070.tg3)
e3:SetOperation(c11200070.op3)
c:RegisterEffect(e3)
--
end
--
c11200070.xig_ihs_0x133=1
--
function c11200070.cfilter1(c)
return not (c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT))
end
function c11200070.con1(e)
local c=e:GetHandler()
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(c11200070.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
--
function c11200070.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
--
function c11200070.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_EQUIP_LIMIT)
e2_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2_1:SetValue(c11200070.val2_1)
e2_1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2_1)
if Duel.SelectYesNo(tp,aux.Stringid(11200070,0)) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2_2=Effect.CreateEffect(c)
e2_2:SetType(EFFECT_TYPE_SINGLE)
e2_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2_2:SetCode(EFFECT_DISABLE)
e2_2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2_2)
end
c:CancelToGrave()
else
c:CancelToGrave(false)
end
end
--
function c11200070.val2_1(e,c)
return e:GetHandler():GetEquipTarget()==c
end
--
function c11200070.cfilter3(c,tp)
return c:IsSetCard(0x621) and c:IsType(TYPE_MONSTER)
end
function c11200070.con3(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11200070.cfilter3,1,nil)
and not eg:IsContains(e:GetHandler())
end
--
function c11200070.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c11200070.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
Duel.ConfirmCards(1-tp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
end
--
--『Ancient Duper』
function c11200071.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,11200071+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c11200071.tg1)
e1:SetOperation(c11200071.op1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11200071,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,11200171)
e3:SetCost(c11200071.cost3)
e3:SetTarget(c11200071.tg3)
e3:SetOperation(c11200071.op3)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e4)
--
end
--
c11200071.xig_ihs_0x133=1
--
function c11200071.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if not eg then return false end
local tc=eg:GetFirst()
if chkc then return chkc==tc end
if chk==0 then return ep~=tp and tc:IsFaceup() and tc:GetAttack()>=1000 and tc:IsOnField() and tc:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
--
function c11200071.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1_1=Effect.CreateEffect(c)
e1_1:SetDescription(aux.Stringid(11200071,0))
e1_1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1_1:SetValue(1)
e1_1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1_1)
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1_2:SetValue(1)
e1_2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1_2)
local e1_3=Effect.CreateEffect(c)
e1_3:SetType(EFFECT_TYPE_SINGLE)
e1_3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1_3:SetValue(1)
e1_3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1_3)
local e1_4=Effect.CreateEffect(c)
e1_4:SetType(EFFECT_TYPE_SINGLE)
e1_4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1_4:SetValue(1)
e1_4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1_4)
local e1_5=Effect.CreateEffect(c)
e1_5:SetType(EFFECT_TYPE_SINGLE)
e1_5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_5:SetCode(EFFECT_DISABLE)
e1_5:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1_5)
end
end
--
function c11200071.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
--
function c11200071.tfilter3(c,tp)
return c.xig_ihs_0x133 and c:IsType(TYPE_SPELL+TYPE_TRAP)
and (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 or c:IsType(TYPE_FIELD)) and not c:IsCode(11200071)
end
function c11200071.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200071.tfilter3,tp,LOCATION_GRAVE,0,1,nil,tp) end
end
--
function c11200071.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c11200071.tfilter3,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SSet(tp,g)
Duel.ConfirmCards(1-tp,g)
end
--
--铃仙
function c11200074.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(1164)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c11200074.SynMixCondition(c11200074.SycFilter1,nil,nil,c11200074.SycFilter2,1,1,nil))
e1:SetTarget(c11200074.SynMixTarget(c11200074.SycFilter1,nil,nil,c11200074.SycFilter2,1,1,nil))
e1:SetOperation(c11200074.SynMixOperation(c11200074.SycFilter1,nil,nil,c11200074.SycFilter2,1,1,nil))
e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c11200074.tg2)
e2:SetValue(700)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11200074,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c11200074.con3)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c11200074.tg3)
e3:SetOperation(c11200074.op3)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(11200074,0))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(c11200074.con4)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c11200074.tg3)
e4:SetOperation(c11200074.op3)
c:RegisterEffect(e4)
--
end
--
c11200074.xig_ihs_0x132=1
--
function c11200074.SycFilter1(c)
return c:IsSynchroType(TYPE_TUNER) or c.xig_ihs_0x132
end
function c11200074.SycFilter2(c)
return not c:IsSynchroType(TYPE_TUNER)
end
--
function c11200074.SynMixCondition(f1,f2,f3,f4,minc,maxc,gc)
return
function(e,c,smat,mg1)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg
if mg1 then mg=mg1
else mg=c11200074.GetSynMaterials(tp,c) end
if smat~=nil then mg:AddCard(smat) end
return mg:IsExists(c11200074.SynMixFilter1,1,nil,f1,f2,f3,f4,minc,maxc,c,mg,smat,gc)
end
end
--
function c11200074.SynMaterialFilter(c,syncard)
return c:IsFaceup() and (c:IsCanBeSynchroMaterial(syncard) or (c.xig_ihs_0x132 and c:IsType(TYPE_MONSTER)))
end
function c11200074.GetSynMaterials(tp,syncard)
local mg=Duel.GetMatchingGroup(c11200074.SynMaterialFilter,tp,LOCATION_MZONE,0,nil,syncard)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(Card.IsCanBeSynchroMaterial,tp,LOCATION_HAND,0,nil,syncard)
if mg2:GetCount()>0 then mg:Merge(mg2) end
end
return mg
end
--
function c11200074.SynMixFilter1(c,f1,f2,f3,f4,minc,maxc,syncard,mg,smat,gc)
return (not f1 or f1(c,syncard))
and mg:IsExists(c11200074.SynMixFilter2,1,c,f2,f3,f4,minc,maxc,syncard,mg,smat,c,gc)
end
--
function c11200074.SynMixFilter2(c,f2,f3,f4,minc,maxc,syncard,mg,smat,c1,gc)
if f2 then
return f2(c,syncard,c1)
and mg:IsExists(c11200074.SynMixFilter3,1,Group.FromCards(c1,c),f3,f4,minc,maxc,syncard,mg,smat,c1,c,gc)
else
return mg:IsExists(c11200074.SynMixFilter4,1,c1,f4,minc,maxc,syncard,mg,smat,c1,nil,nil,gc)
end
end
--
function c11200074.SynMixFilter3(c,f3,f4,minc,maxc,syncard,mg,smat,c1,c2,gc)
if f3 then
return f3(c,syncard,c1,c2)
and mg:IsExists(c11200074.SynMixFilter4,1,Group.FromCards(c1,c2,c),f3,f4,minc,maxc,syncard,mg,smat,c1,c2,gc)
else
return mg:IsExists(c11200074.SynMixFilter4,1,Group.FromCards(c1,c2),f4,minc,maxc,syncard,mg,smat,c1,c2,nil,gc)
end
end
--
function c11200074.SynMixFilter4(c,f4,minc,maxc,syncard,mg1,smat,c1,c2,c3,gc)
if f4 and not f4(c,syncard,c1,c2,c3) then return false end
local sg=Group.FromCards(c1,c)
sg:AddCard(c1)
if c2 then sg:AddCard(c2) end
if c3 then sg:AddCard(c3) end
local mg=mg1:Clone()
if f4 then
mg=mg:Filter(f4,nil)
end
return c11200074.SynMixCheck(mg,sg,minc-1,maxc-1,syncard,smat,gc)
end
--
function c11200074.SynMixCheck(mg,sg1,minc,maxc,syncard,smat,gc)
local tp=syncard:GetControler()
for c in aux.Next(sg1) do
mg:RemoveCard(c)
end
local sg=Group.CreateGroup()
if minc==0 and c11200074.SynMixCheckGoal(tp,sg1,0,0,syncard,sg,smat,gc) then return true end
if maxc==0 then return false end
return mg:IsExists(c11200074.SynMixCheckRecursive,1,nil,tp,sg,mg,0,minc,maxc,syncard,sg1,smat,gc)
end
--
function c11200074.SynMixCheckRecursive(c,tp,sg,mg,ct,minc,maxc,syncard,sg1,smat,gc)
sg:AddCard(c)
ct=ct+1
local res=c11200074.SynMixCheckGoal(tp,sg,minc,ct,syncard,sg1,smat,gc)
or (ct<maxc and mg:IsExists(c11200074.SynMixCheckRecursive,1,sg,tp,sg,mg,ct,minc,maxc,syncard,sg1,smat,gc))
sg:RemoveCard(c)
ct=ct-1
return res
end
--
function c11200074.GetSynchroLevelCheck1(c,syncard,num,tc)
return c:GetSynchroLevel(syncard)==num
end
function c11200074.SynMixCheckGoal(tp,sg,minc,ct,syncard,sg1,smat,gc)
if ct<minc then return false end
local g=sg:Clone()
g:Merge(sg1)
if Duel.GetLocationCountFromEx(tp,tp,g,syncard)<=0 then return false end
if gc and not gc(g) then return false end
if smat and not g:IsContains(smat) then return false end
if not aux.MustMaterialCheck(g,tp,EFFECT_MUST_BE_SMATERIAL) then return false end
if g:GetCount()<1 then return false end
local checknum=0
--
local tc1=g:GetFirst()
local tc2=g:GetNext()
--
if not g:IsExists(Card.IsSynchroType,1,nil,TYPE_TUNER) then
if tc1.xig_ihs_0x132 and tc2 and tc2:GetSynchroLevel(syncard)==(syncard:GetLevel()-4) then checknum=1 end
if tc2 and tc2.xig_ihs_0x132 and tc1:GetSynchroLevel(syncard)==(syncard:GetLevel()-4) then checknum=1 end
end
--
if g:IsExists(Card.IsSynchroType,1,nil,TYPE_TUNER) then
if tc1.xig_ihs_0x132
and tc1:IsSynchroType(TYPE_TUNER)
and tc2 and ((tc2:GetSynchroLevel(syncard)==(syncard:GetLevel()-tc1:GetSynchroLevel(syncard))) or (tc2:GetSynchroLevel(syncard)==(syncard:GetLevel()-4))) then
checknum=1
end
if tc1.xig_ihs_0x132
and tc2 and tc2:IsSynchroType(TYPE_TUNER)
and tc2:GetSynchroLevel(syncard)==(syncard:GetLevel()-tc1:GetSynchroLevel(syncard)) then
checknum=1
end
if tc2 and tc2.xig_ihs_0x132
and tc2:IsSynchroType(TYPE_TUNER)
and ((tc1:GetSynchroLevel(syncard)==(syncard:GetLevel()-tc2:GetSynchroLevel(syncard))) or (tc1:GetSynchroLevel(syncard)==(syncard:GetLevel()-4))) then
checknum=1
end
if tc2 and tc2.xig_ihs_0x132
and tc1:IsSynchroType(TYPE_TUNER)
and tc1:GetSynchroLevel(syncard)==(syncard:GetLevel()-tc1:GetSynchroLevel(syncard)) then
checknum=1
end
if tc2 and not (tc1.xig_ihs_0x132 or tc2.xig_ihs_0x132)
and (tc1:GetSynchroLevel(syncard)+tc2:GetSynchroLevel(syncard))==syncard:GetLevel() then
checknum=1
end
end
--
if checknum~=1 then return false end
local hg=g:Filter(Card.IsLocation,nil,LOCATION_HAND)
local hct=hg:GetCount()
if hct>0 then
local found=false
for c in aux.Next(g) do
local he,hf,hmin,hmax=c:GetHandSynchro()
if he then
found=true
if hf and hg:IsExists(aux.SynLimitFilter,1,c,hf,he) then return false end
if (hmin and hct<hmin) or (hmax and hct>hmax) then return false end
end
end
if not found then return false end
end
for c in aux.Next(g) do
local le,lf,lloc,lmin,lmax=c:GetTunerLimit()
if le then
local lct=g:GetCount()-1
if lloc then
local llct=g:FilterCount(Card.IsLocation,c,lloc)
if llct~=lct then return false end
end
if lf and g:IsExists(aux.SynLimitFilter,1,c,lf,le) then return false end
if (lmin and lct<lmin) or (lmax and lct>lmax) then return false end
end
end
return true
end
--
function c11200074.SynMixTarget(f1,f2,f3,f4,minc,maxc,gc)
return
function(e,tp,eg,ep,ev,re,r,rp,chk,c,smat,mg1)
local g=Group.CreateGroup()
local mg
if mg1 then mg=mg1
else mg=c11200074.GetSynMaterials(tp,c) end
if smat~=nil then mg:AddCard(smat) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local c1=mg:FilterSelect(tp,c11200074.SynMixFilter1,1,1,nil,f1,f2,f3,f4,minc,maxc,c,mg,smat,gc):GetFirst()
g:AddCard(c1)
if f2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local c2=mg:FilterSelect(tp,c11200074.SynMixFilter2,1,1,c1,f2,f3,f4,minc,maxc,c,mg,smat,c1,gc):GetFirst()
g:AddCard(c2)
if f3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local c3=mg:FilterSelect(tp,c11200074.SynMixFilter3,1,1,Group.FromCards(c1,c2),f3,f4,minc,maxc,c,mg,smat,c1,c2,gc):GetFirst()
g:AddCard(c3)
end
end
local g4=Group.CreateGroup()
for i=0,maxc-1 do
local mg2=mg:Clone()
if f4 then
mg2=mg2:Filter(f4,nil)
end
local cg=mg2:Filter(c11200074.SynMixCheckRecursive,g4,tp,g4,mg2,i,minc,maxc,c,g,smat,gc)
if cg:GetCount()==0 then break end
local minct=1
if c11200074.SynMixCheckGoal(tp,g4,minc,i,c,g,smat,gc) then
minct=0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tg=cg:Select(tp,minct,1,nil)
if tg:GetCount()==0 then break end
g4:Merge(tg)
end
g:Merge(g4)
if g:GetCount()>0 then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
end
--
function c11200074.SynMixOperation(f1,f2,f3,f4,minct,maxc,gc)
return
function(e,tp,eg,ep,ev,re,r,rp,c,smat,mg)
local g=e:GetLabelObject()
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end
end
--
function c11200074.tg2(e,c)
return c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
--
function c11200074.con3(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
return ec:IsFaceup() and ec:IsControler(tp) and ec:IsRace(RACE_BEAST) and ec:IsAttribute(ATTRIBUTE_LIGHT)
end
--
function c11200074.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
--
function c11200074.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then Duel.Destroy(g,REASON_EFFECT) end
end
--
function c11200074.tfilter4(c,tp)
return c:IsFaceup() and c:IsRace(RACE_BEAST) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsControler(tp) and c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_MZONE)
end
function c11200074.con4(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c11200074.tfilter4,1,nil,tp) and Duel.IsChainNegatable(ev)
end
--团子
function c11200077.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11200077+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c11200077.tg1)
e1:SetOperation(c11200077.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RECOVER)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c11200077.con2)
e2:SetCost(c11200077.cost2)
e2:SetTarget(c11200077.tg2)
e2:SetOperation(c11200077.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3)
--
end
--
function c11200077.tfilter1(c)
return c:IsCode(11200077) and c:IsAbleToHand()
end
function c11200077.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200077.tfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end
--
function c11200077.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.Recover(tp,1100,REASON_EFFECT)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c11200077.tfilter1,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
--
function c11200077.con2(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
--
function c11200077.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
local g=Group.CreateGroup()
g:AddCard(c)
Duel.HintSelection(g)
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
--
function c11200077.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1100)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1100)
end
--
function c11200077.op2(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--
--浅绿色的月兔 清兰
function c11200080.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200080,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetRange(LOCATION_REMOVED)
e1:SetCountLimit(1,11200080)
e1:SetTarget(c11200080.sptg)
e1:SetOperation(c11200080.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c11200080.spcon2)
e2:SetTarget(c11200080.sptg2)
e2:SetOperation(c11200080.spop2)
c:RegisterEffect(e2)
end
function c11200080.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 c11200080.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
end
end
function c11200080.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c11200080.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x62e) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c11200080.fusiontg(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c11200080.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 mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c11200080.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
function c11200080.fusionop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c11200080.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c11200080.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c11200080.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,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.SendtoGrave(mat1,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,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c11200080.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c11200080.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local t2=c11200080.fusiontg(e,tp,eg,ep,ev,re,r,rp)
local op=0
local m={}
local n={}
local ct=1
m[ct]=aux.Stringid(11200080,2)
n[ct]=1
ct=ct+1
if t2 then m[ct]=aux.Stringid(11200080,3) n[ct]=2 ct=ct+1 end
local sp=Duel.SelectOption(tp,table.unpack(m))
op=n[sp+1]
e:SetLabel(op)
if op==1 then
elseif op==2 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
end
function c11200080.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()==1 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local sc=g:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(-550)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc:RegisterEffect(e2)
sc=g:GetNext()
end
Duel.Damage(1-tp,550,REASON_EFFECT)
elseif e:GetLabel()==2 then
c11200080.fusionop(e,tp,eg,ep,ev,re,r,rp)
end
end
\ No newline at end of file
--射鹰的月兔 清兰
function c11200081.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200081,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetRange(LOCATION_REMOVED)
e1:SetCountLimit(1,11200081)
e1:SetTarget(c11200081.sptg)
e1:SetOperation(c11200081.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c11200081.spcon2)
e2:SetTarget(c11200081.sptg2)
e2:SetOperation(c11200081.spop2)
c:RegisterEffect(e2)
end
function c11200081.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 c11200081.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
end
end
function c11200081.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c11200081.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x62e) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c11200081.fusiontg(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c11200081.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 mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c11200081.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
function c11200081.fusionop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c11200081.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c11200081.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c11200081.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,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.SendtoGrave(mat1,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,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c11200081.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c11200081.posfilter(c)
return c:IsFaceup() and c:IsCanTurnSet() and not (c:IsType(TYPE_PENDULUM) and c:IsLocation(LOCATION_PZONE))
end
function c11200081.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local t1=Duel.IsExistingMatchingCard(c11200081.posfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
local t2=c11200081.fusiontg(e,tp,eg,ep,ev,re,r,rp)
local op=0
local m={}
local n={}
local ct=1
m[ct]=aux.Stringid(11200081,2)
n[ct]=1
ct=ct+1
if t2 then m[ct]=aux.Stringid(11200081,3) n[ct]=2 ct=ct+1 end
local sp=Duel.SelectOption(tp,table.unpack(m))
op=n[sp+1]
e:SetLabel(op)
if op==1 then
e:SetCategory(CATEGORY_POSITION)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
elseif op==2 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
end
function c11200081.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c11200081.posfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.ChangePosition(g,POS_FACEDOWN)
elseif e:GetLabel()==2 then
c11200081.fusionop(e,tp,eg,ep,ev,re,r,rp)
end
end
--月狂之枪 清兰
function c11200082.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x62e),2,true)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetOperation(c11200082.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11200082)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetTarget(c11200082.sptg)
e2:SetOperation(c11200082.spop)
c:RegisterEffect(e2)
end
function c11200082.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then
Duel.Damage(1-tp,1100,REASON_EFFECT)
end
end
function c11200082.rfilter(c)
return c:IsSetCard(0x62e) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c11200082.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c11200082.rfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler())
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>ct-2 and g:GetCount()>1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
end
function c11200082.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c11200082.rfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,2,2,e:GetHandler())
if g2:GetCount()==2 and Duel.Remove(g2,POS_FACEUP,REASON_EFFECT)==2 and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,true,POS_FACEUP)>0 then
e:GetHandler():CompleteProcedure()
end
end
--浅绿色的Eagle Rabbit
function c11200083.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,11200083)
e2:SetTarget(c11200083.target)
e2:SetOperation(c11200083.activate)
c:RegisterEffect(e2)
--local e3=Effect.CreateEffect(c)
--e3:SetType(EFFECT_TYPE_FIELD)
--e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
--e3:SetCode(EFFECT_CANNOT_ACTIVATE)
--e3:SetCondition(c11200083.con)
--e3:SetRange(LOCATION_FZONE)
--e3:SetTargetRange(0,1)
--e3:SetValue(1)
--c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_DAMAGE)
e3:SetRange(LOCATION_FZONE)
e3:SetCondition(c11200083.ctcon)
e3:SetOperation(c11200083.ctop)
c:RegisterEffect(e3)
end
function c11200083.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
end
function c11200083.rfilter(c)
return c:IsSetCard(0x62e) and c:IsAbleToRemove()
end
function c11200083.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,2,c)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetCondition(c11200083.con)
e3:SetTargetRange(0,1)
e3:SetValue(1)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
if g:IsExists(Card.IsSetCard,1,nil,0x62e) and Duel.SelectYesNo(tp,aux.Stringid(11200083,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c11200083.rfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
end
end
end
function c11200083.filter(c)
return c:IsSetCard(0x62e) and c:IsFaceup()
end
--function c11200083.con(e)
-- local ph=Duel.GetCurrentPhase()
-- local tp=e:GetHandler():GetControler()
-- return Duel.IsExistingMatchingCard(c11200083.filter,tp,LOCATION_REMOVED,0,1,nil) and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
--end
function c11200083.con(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c11200083.cfilter(c)
return c:IsSetCard(0x62e) and c:IsType(TYPE_MONSTER)
end
function c11200083.ctcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and tp==rp and ((bit.band(r,REASON_BATTLE)~=0 and c11200083.cfilter(eg:GetFirst())) or (bit.band(r,REASON_EFFECT)~=0) and c11200083.cfilter(re:GetHandler()))
end
function c11200083.ctop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,550,REASON_EFFECT)
end
--兔已着陆
function c11200084.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,11200084+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c11200084.target)
e1:SetOperation(c11200084.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_REMOVED)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,21200084)
e2:SetCondition(c11200084.condition)
e2:SetCost(c11200084.cost)
e2:SetTarget(c11200084.target)
e2:SetOperation(c11200084.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCountLimit(1,31200084)
e3:SetCost(c11200084.cost2)
e3:SetTarget(c11200084.target2)
e3:SetOperation(c11200084.activate2)
c:RegisterEffect(e3)
end
function c11200084.filter(c)
return c:IsSetCard(0x62e) and c:IsAbleToRemove()
end
function c11200084.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
end
function c11200084.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
local g=Group.CreateGroup()
g:AddCard(c)
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c11200084.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200084.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c11200084.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11200084.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c11200084.cfilter(c)
return c:IsCode(11200082) and c:IsAbleToRemoveAsCost()
end
function c11200084.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200084.cfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11200084.cfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c11200084.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c11200084.activate2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
Duel.ConfirmCards(1-tp,c)
end
end
--鹰已击中
function c11200085.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,11200085+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c11200085.condition)
e1:SetOperation(c11200085.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_REMOVED)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,21200084)
e2:SetCondition(c11200085.condition1)
e2:SetCost(c11200085.cost)
e2:SetOperation(c11200085.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,31200085)
e3:SetTarget(c11200085.target2)
e3:SetOperation(c11200085.activate2)
c:RegisterEffect(e3)
end
function c11200085.filter(c)
return c:IsSetCard(0x62e) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c11200085.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c11200085.filter,tp,LOCATION_MZONE+LOCATION_REMOVED,0,1,nil)
end
function c11200085.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c11200085.filter,tp,LOCATION_MZONE+LOCATION_REMOVED,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
end
function c11200085.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
local g=Group.CreateGroup()
g:AddCard(c)
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c11200085.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c11200085.acfilter,tp,0,LOCATION_MZONE,nil)
local op=1
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
op=Duel.SelectOption(tp,aux.Stringid(11200085,0),aux.Stringid(11200085,1))
end
if op==0 then
if g:GetCount()>0 then
local sc=g:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(-550)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc:RegisterEffect(e2)
sc=g:GetNext()
end
end
elseif op==1 then
Duel.Damage(1-tp,1100,REASON_EFFECT)
end
--local e1=Effect.CreateEffect(e:GetHandler())
--e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
--e1:SetCode(EVENT_DAMAGE)
--e1:SetCondition(c11200085.ctcon)
--e1:SetOperation(c11200085.ctop)
--Duel.RegisterEffect(e1,tp)
end
function c11200085.cfilter(c)
return c:IsSetCard(0x62e) and c:IsType(TYPE_MONSTER) and c:IsOnField()
end
function c11200085.ctcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and tp==rp and ((bit.band(r,REASON_BATTLE)~=0 and c11200085.cfilter(eg:GetFirst())) or (bit.band(r,REASON_EFFECT)~=0) and c11200085.cfilter(re:GetHandler()))
end
function c11200085.ctop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,550,REASON_EFFECT)
end
function c11200085.filter2(c)
return c:IsSetCard(0x62e) and c:IsFaceup()
end
function c11200085.rcheck(c,sg)
return c:IsSetCard(0x62e) and c:IsFaceup() and sg:IsExists(aux.TRUE,1,c)
end
function c11200085.rselect(c,tp,mg,sg)
sg:AddCard(c)
local res=false
if sg:GetCount()<2 then
res=mg:IsExists(c11200085.rselect,1,sg,tp,mg,sg)
else
res=sg:IsExists(c11200085.rcheck,1,nil,sg)
end
sg:RemoveCard(c)
return res
end
function c11200085.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetFieldGroup(tp,LOCATION_REMOVED,0)
local sg=Group.CreateGroup()
if chkc then return chkc:IsLocation(LOCATION_REMOVED) end
if chk==0 then return Duel.IsExistingTarget(c11200085.filter2,tp,LOCATION_REMOVED,0,1,nil) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_REMOVED,0,2,nil) end
while sg:GetCount()<2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=mg:FilterSelect(tp,c11200085.rselect,1,1,sg,tp,mg,sg)
sg:Merge(g)
end
Duel.SetTargetCard(sg)
end
function c11200085.activate2(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Clone()
if not sg:IsExists(Card.IsRelateToEffect,2,nil,e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=sg:Select(tp,1,1,nil)
sg:Sub(g)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)
if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_EFFECT)
end
end
--虚构之炎
function c11200086.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--attribute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsFaceup))
e2:SetValue(ATTRIBUTE_FIRE)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_TO_DECK)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
e3:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_ONFIELD))
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_TO_HAND)
e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,1)
e4:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_ONFIELD))
c:RegisterEffect(e4)
--remove
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_SZONE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCountLimit(1,11200086)
e5:SetHintTiming(0,TIMING_MAIN_END)
e5:SetCondition(c11200086.rmcon)
e5:SetTarget(c11200086.rmtg)
e5:SetOperation(c11200086.rmop)
c:RegisterEffect(e5)
end
function c11200086.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c11200086.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_PZONE,LOCATION_PZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_PZONE,LOCATION_PZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c11200086.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 c11200087.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetCountLimit(1,11200087+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c11200087.cost)
e1:SetTarget(c11200087.target)
e1:SetOperation(c11200087.operation)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c11200087.descon)
e2:SetOperation(c11200087.desop)
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(c11200087.actcon)
c:RegisterEffect(e3)
end
function c11200087.nfilter(c)
return c:IsFaceup() and (c:IsType(TYPE_RITUAL) or c:IsType(TYPE_FUSION)) and c:IsAttribute(ATTRIBUTE_FIRE)
end
function c11200087.actcon(e)
return Duel.IsExistingMatchingCard(c11200087.nfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c11200087.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost()
end
function c11200087.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200087.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11200087.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c11200087.filter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function c11200087.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c11200087.filter(chkc) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c11200087.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c11200087.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c11200087.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_CONTROL)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetValue(c11200087.ctval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(e)
e1:SetCondition(c11200087.con)
tc:RegisterEffect(e1,true)
--cannot attack, trigger
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.ctg)
c:RegisterEffect(e2)
end
end
function c11200087.con(e)
local c=e:GetOwner()
local h=e:GetHandler()
local te=e:GetLabelObject()
return c:IsHasCardTarget(h) and not h:IsImmuneToEffect(te)
end
function c11200087.ctval(e,c)
return e:GetOwnerPlayer()
end
function c11200087.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
return tc and eg:IsContains(tc)
end
function c11200087.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
--真实神话的篡夺者
function c11200088.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_FIRE),3,false)
--destroy monster
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,11200088)
e1:SetCondition(c11200088.rdcon)
e1:SetTarget(c11200088.rdtg)
e1:SetOperation(c11200088.rdop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
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,11209088)
e2:SetTarget(c11200088.sptg)
e2:SetOperation(c11200088.spop)
c:RegisterEffect(e2)
end
function c11200088.rdcon(e,tp,eg,ep,ev,re,r,rp)
return not re:GetHandler():IsCode(11200088) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c11200088.rdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToRemove() end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c11200088.rdop(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 c11200088.rmfilter(c)
return c:IsFacedown() and c:IsAbleToRemove()
end
function c11200088.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200088.rmfilter,tp,LOCATION_EXTRA,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_EXTRA)
end
function c11200088.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c11200088.rmfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()==0 then return end
local tc=g:RandomSelect(tp,1):GetFirst()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED)
and c:IsRelateToEffect(e) then
if tc:IsType(TYPE_FUSION) then
Duel.BreakEffect()
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
local e5=e1:Clone()
e5:SetCode(EFFECT_UNRELEASABLE_SUM)
c:RegisterEffect(e5,true)
local e6=e1:Clone()
e6:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e6,true)
local e7=e1:Clone()
e7:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e7:SetValue(c11200088.fuslimit)
c:RegisterEffect(e7,true)
local e8=e1:Clone()
e8:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e8,true)
local e9=e1:Clone()
e9:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e9,true)
Duel.SpecialSummonComplete()
end
end
end
function c11200088.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
--跳跳兔
function c11200100.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,aux.TRUE,c11200100.xyzcheck,2,2)
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200100,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c11200100.atkcost)
e1:SetOperation(c11200100.atkop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e2:SetDescription(aux.Stringid(11200100,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,11200100)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c11200100.spcon)
e2:SetTarget(c11200100.sptg)
e2:SetOperation(c11200100.spop)
c:RegisterEffect(e2)
end
function c11200100.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()<=0
end
function c11200100.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,c)>0
and Duel.IsExistingMatchingCard(c11200100.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and c:IsAbleToRemove() and Duel.GetFieldGroupCount(tp,LOCATION_HAND+LOCATION_GRAVE,0)>1 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
end
function c11200100.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.Remove(c,POS_FACEUP,REASON_EFFECT)<=0 or Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c11200100.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local xg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11200100.xfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,2,nil,e)
if xg:GetCount()>0 then
Duel.BreakEffect()
Duel.Overlay(tc,xg)
end
end
end
function c11200100.xfilter(c,e)
return not c:IsImmuneToEffect(e)
end
function c11200100.spfilter(c,e,tp)
return c:IsCode(11200100) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11200100.xyzcheck(g)
return g:GetClassCount(Card.GetLevel)==1
end
function c11200100.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 c11200100.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,11200100))
e1:SetLabel(c:GetBaseAttack())
e1:SetValue(c11200100.atkval)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetLabel(c:GetBaseDefense())
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
Duel.RegisterEffect(e2,tp)
end
function c11200100.atkval(e,c)
return e:GetLabel()+500
end
\ No newline at end of file
--黄昏之少女
function c11200103.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200103,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11200103)
e1:SetCost(c11200103.thcost)
e1:SetTarget(c11200103.thtg)
e1:SetOperation(c11200103.thop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11209103)
e2:SetTarget(c11200103.drtg)
e2:SetOperation(c11200103.drop)
c:RegisterEffect(e2)
end
function c11200103.thcost(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 c11200103.thfilter(c)
return c:IsCode(11200106,11200112) and c:IsAbleToHand()
end
function c11200103.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c11200103.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11200103.thop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11200103.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c11200103.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c11200103.drop(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.Draw(tp,1,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--绯红之兽 斯卡雷特
function c11200104.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11200104)
e1:SetCondition(c11200104.con)
e1:SetTarget(c11200104.tg)
e1:SetOperation(c11200104.op)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(1)
e2:SetCondition(c11200104.actcon)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,11209104)
e3:SetTarget(c11200104.atktg)
e3:SetOperation(c11200104.atkop)
c:RegisterEffect(e3)
end
function c11200104.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function c11200104.filter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToRemove()
end
function c11200104.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200104.filter,tp,LOCATION_EXTRA,LOCATION_EXTRA,1,nil) end
local g=Duel.GetMatchingGroup(c11200104.filter,tp,LOCATION_EXTRA,LOCATION_EXTRA,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c11200104.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c11200104.filter,tp,LOCATION_EXTRA,LOCATION_EXTRA,nil)
local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local c=e:GetHandler()
if ct>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:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(ct*300)
c:RegisterEffect(e1)
end
end
function c11200104.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function c11200104.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c11200104.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-2550)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(-2550)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--绯红之玉
local m=11200105
local cm=_G["c"..m]
function cm.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:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,m+9000)
e2:SetCost(cm.diacost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsType(TYPE_FUSION)
end
function cm.diacost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
end
function cm.cfilter(c)
return (c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) or c:IsFaceup())
and c:IsAttribute(ATTRIBUTE_FIRE) and (bit.band(c:GetType(),0x81)==0x81 or c:IsType(TYPE_FUSION)) 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_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil,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,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.activate(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)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x11,1550,1050,8,RACE_ROCK,ATTRIBUTE_FIRE)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_REMOVED,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x11,1550,1050,8,RACE_ROCK,ATTRIBUTE_FIRE) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_REMOVED,0,1,1,c)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)
end
end
end
--虚构之炎
function c11200106.initial_effect(c)
aux.AddRitualProcGreater2Code2(c,11200104,11200209,LOCATION_HAND+LOCATION_REMOVED,c11200106.mfilter)
--ritual summon
local e1=aux.AddRitualProcGreater2Code2(c,11200104,11200209,LOCATION_HAND+LOCATION_REMOVED,c11200106.mfilter)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(0)
e1:SetRange(LOCATION_REMOVED)
e1:SetCountLimit(1,11200106)
e1:SetCost(c11200106.rscost)
end
function c11200106.mfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE)
end
function c11200106.rscost(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
--天国的果实
local m=11200107
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)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,m)
e3:SetCost(cm.diacost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsType(TYPE_FUSION)
end
function cm.diacost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_REMOVED+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_REMOVED+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x11,1550,1050,8,RACE_PLANT,ATTRIBUTE_FIRE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,2000)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x11,1550,1050,8,RACE_PLANT,ATTRIBUTE_FIRE) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
Duel.BreakEffect()
Duel.Recover(tp,2000,REASON_EFFECT)
end
end
--黯黑视线
function c11200109.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,11200109)
e1:SetCost(c11200109.cost)
e1:SetTarget(c11200109.target)
e1:SetOperation(c11200109.activate)
c:RegisterEffect(e1)
end
function c11200109.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(c11200109.sumlimit)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
Duel.RegisterEffect(e3,tp)
end
function c11200109.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetLabelObject()~=se
end
function c11200109.filter(c,tp)
return c:IsFaceup() and c:GetBaseAttack()>=0 and c:IsReleasableByEffect()
and Duel.IsPlayerCanSpecialSummonMonster(tp,11200199,0,0x4011,c:GetBaseAttack(),0,8,RACE_FIEND,ATTRIBUTE_FIRE)
end
function c11200109.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c11200109.filter(chkc,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c11200109.filter,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
Duel.SelectTarget(tp,c11200109.filter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c11200109.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Release(tc,REASON_EFFECT)>0 then
local token=Duel.CreateToken(tp,11200199)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(tc:GetBaseAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c11200109.rscon)
e2:SetTarget(c11200109.rstg)
e2:SetOperation(c11200109.rsop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
end
end
function c11200109.rscon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2
end
function c11200109.mfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end
function c11200109.rcheck(gc)
return function(tp,g,c)
return g:IsContains(gc)
end
end
function c11200109.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
aux.RCheckAdditional=c11200109.rcheck(c)
local res=mg:IsContains(c) and Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,c11200109.mfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
aux.RCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c11200109.rsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetRitualMaterial(tp)
if c:GetControler()~=tp or not c:IsRelateToEffect(e) or not mg:IsContains(c) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
aux.RCheckAdditional=c11200109.rcheck(c)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,c11200109.mfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
if not mg:IsContains(c) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
Duel.SetSelectedCard(c)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then
aux.RCheckAdditional=nil
return
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
aux.RCheckAdditional=nil
end
--红莲花之耀 斯卡雷特
function c11200111.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,11200103,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_FIRE),1,true,true)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200111,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,11200111)
e1:SetTarget(c11200111.rmtg)
e1:SetOperation(c11200111.rmop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200111,1))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11209111)
e2:SetCost(c11200111.damcost)
e2:SetTarget(c11200111.damtg)
e2:SetOperation(c11200111.damop)
c:RegisterEffect(e2)
--token
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,11299111)
e3:SetTarget(c11200111.tktg)
e3:SetOperation(c11200111.tkop)
c:RegisterEffect(e3)
end
function c11200111.rmfilter(c,atk)
return c:IsFaceup() and c:IsAbleToRemove() and not c:IsCode(11200111)
end
function c11200111.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local atk=e:GetHandler():GetAttack()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c11200111.rmfilter(chkc,atk) end
if chk==0 then return Duel.IsExistingTarget(c11200111.rmfilter,tp,LOCATION_MZONE,0,1,nil,atk) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c11200111.rmfilter,tp,LOCATION_MZONE,0,1,1,nil,atk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c11200111.rmop(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+REASON_TEMPORARY)~=0 then
tc:RegisterFlagEffect(11200111,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(c11200111.retcon)
e1:SetOperation(c11200111.retop)
Duel.RegisterEffect(e1,tp)
end
if c:IsRelateToEffect(e) then
local seq=tc:GetPreviousSequence()
Duel.MoveSequence(c,seq)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(2400)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c11200111.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(11200111)~=0
end
function c11200111.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function c11200111.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c11200111.rstop)
Duel.RegisterEffect(e1,tp)
end
end
function c11200111.rstop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function c11200111.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1200)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1200)
end
function c11200111.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c11200111.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,11200110,0,0x4011,2000,2000,8,RACE_ROCK,ATTRIBUTE_FIRE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c11200111.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,11200110,0,0x4011,2000,2000,8,RACE_ROCK,ATTRIBUTE_FIRE) then return end
local token=Duel.CreateToken(tp,11200110)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2,true)
end
--虚空之黯
function c11200112.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c11200112.target)
e1:SetOperation(c11200112.activate)
c:RegisterEffect(e1)
--fusion summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,11200112)
e2:SetCost(c11200112.pspcost)
e2:SetTarget(c11200112.psptg)
e2:SetOperation(c11200112.pspop)
c:RegisterEffect(e2)
end
function c11200112.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c11200112.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_FIRE) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c11200112.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c11200112.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 mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c11200112.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c11200112.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c11200112.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c11200112.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c11200112.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,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.SendtoGrave(mat1,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,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c11200112.pspcost(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 c11200112.pfilter0(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c11200112.pfilter1(c,e)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e) and c:IsAbleToDeck()
end
function c11200112.pfilter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_SPELLCASTER) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c11200112.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetMatchingGroup(c11200112.pfilter0,tp,LOCATION_REMOVED,0,nil)
local res=Duel.IsExistingMatchingCard(c11200112.pfilter2,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 mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c11200112.pfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
end
function c11200112.pspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
local mg1=Duel.GetMatchingGroup(c11200112.pfilter1,tp,LOCATION_REMOVED,0,nil,e)
local sg1=Duel.GetMatchingGroup(c11200112.pfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c11200112.pfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,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.SendtoDeck(mat1,nil,2,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,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:RegisterFlagEffect(11200112,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
tc:CompleteProcedure()
local e1=Effect.CreateEffect(c)
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(c11200112.rmcon)
e1:SetOperation(c11200112.rmop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c11200112.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c11200112.rmcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return tc:GetFlagEffectLabel(11200112)==e:GetLabel()
end
function c11200112.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
function c11200112.splimit(e,c)
return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
end
--SCP-040 进化之子
if not pcall(function() require("expansions/script/c16101100") end) then require("script/c16101100") end
local m,cm=rscf.DefineCard(11200207,"SCP")
function c11200207.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,16102002,aux.TRUE,1,false,false)
aux.AddContactFusionProcedure(c,cm.fusf,LOCATION_MZONE+LOCATION_HAND,0,Duel.Release,REASON_COST+REASON_MATERIAL)
--leave f
local e0=rsef.SV_REDIRECT(c,"leave",LOCATION_DECK,rscon.excard2(rscf.CheckSetCard,LOCATION_ONFIELD,0,1,nil,"SCP_J"))
--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(c11200207.splimit)
c:RegisterEffect(e1)
--fusion
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200207,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOEXTRA)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,11200207)
e2:SetCost(c11200207.cocost)
e2:SetCondition(c11200207.condition2)
e2:SetTarget(c11200207.copytg)
e2:SetOperation(c11200207.copyop)
c:RegisterEffect(e2)
end
function c11200207.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c11200207.descfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
function c11200207.descfilter(c)
return c:IsFaceup() and c:CheckSetCard("SCP") and (not c:CheckSetCard("SCP_J"))
end
function cm.fusf(c)
return c:IsReleasable() and c:IsType(TYPE_MONSTER) and c:CheckSetCard("SCP")
end
function c11200207.cocost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),tp,0,REASON_COST)
end
function c11200207.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c11200207.filter0(c)
return c:IsFaceup() and c:IsCanBeFusionMaterial()
end
function c11200207.filter1(c,e)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c11200207.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c11200207.filter3(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e)
end
function c11200207.copytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c11200207.filter0,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c11200207.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(c11200207.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)
end
function c11200207.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c11200207.filter1,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c11200207.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(c11200207.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.SendtoGrave(mat1,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
local op=Duel.SelectOption(tp,aux.Stringid(11200207,0),aux.Stringid(11200207,1),aux.Stringid(11200207,2))
if op==0 then
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetCondition(c11200207.atkcon)
e1:SetCost(c11200207.atkcost)
e1:SetOperation(c11200207.atkop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(11200207,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11200207,4))
end
if op==1 then
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c11200207.atkupcon)
e2:SetTarget(c11200207.atkuptg)
e2:SetOperation(c11200207.atkupop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(11200207,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11200207,5))
end
if op==2 then
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetLabel(0)
e3:SetCost(c11200207.tgcost)
e3:SetTarget(c11200207.tgtarget)
e3:SetOperation(c11200207.tgactivate)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
tc:RegisterFlagEffect(11200207,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11200207,6))
end
tc:CompleteProcedure()
end
end
function c11200207.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:GetAttack()>0
end
function c11200207.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c11200207.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c:IsRelateToBattle() and c:IsFaceup() and bc:IsRelateToBattle() and bc:IsFaceup() then
local val=math.max(bc:GetAttack(),bc:GetDefense())
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(val+100)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
c:RegisterEffect(e2)
end
end
function c11200207.atkfilter(c)
return c:IsFaceup() and c:CheckSetCard("SCP")
end
function c11200207.atkupcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return rp==tp
and rc:CheckSetCard("SCP")
end
function c11200207.atkuptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200207.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c11200207.atkupop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,600,REASON_EFFECT)
local g=Duel.GetMatchingGroup(c11200207.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c11200207.tgfilter(c)
return c:IsReleasable() and Duel.IsExistingMatchingCard(c11200207.tgfilter2,tp,LOCATION_DECK,0,1,nil,c:GetType())
end
function c11200207.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200207.tgfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c11200207.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
e:SetLabel(g:GetFirst():GetType())
Duel.Release(g,REASON_COST)
end
function c11200207.tgtarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.SelectMatchingCard(tp,c11200207.tgfilter2,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel())
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c11200207.tgfilter2(c,ttype)
return c:IsType(ttype) and c:IsAbleToHand() and c:CheckSetCard("SCP")
end
function c11200207.tgactivate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
\ No newline at end of file
--不可思议的探索者 爱丽丝
local m=11200208
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionType,TYPE_NORMAL),2,false)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTarget(cm.indtg)
e1:SetValue(700)
c:RegisterEffect(e1)
--break
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
end
function cm.indtg(e,c)
return not c:IsType(TYPE_EFFECT)
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.desfilter1(chkc,e,tp) end
if chk==0 then return eg:IsExists(cm.afilter,1,nil,e,tp) end
local a=eg:Filter(cm.afilter,nil,e,tp):GetFirst()
Duel.SetTargetCard(a)
end
function cm.afilter(c,e,tp)
return c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 and c:IsControler(tp) and not c:IsType(TYPE_EFFECT)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp)
end
function cm.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsType(TYPE_EFFECT)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.Release(tc,REASON_COST) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
g:GetFirst():RegisterEffect(e1)
end
end
end
\ No newline at end of file
--混沌归还 斯卡雷特
function c11200209.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,11200209)
e1:SetTarget(c11200209.rmtg)
e1:SetOperation(c11200209.rmop)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,11209209)
e3:SetTarget(c11200209.sptg)
e3:SetOperation(c11200209.spop)
c:RegisterEffect(e3)
end
function c11200209.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToRemove()
end
function c11200209.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(c11200209.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectTarget(tp,c11200209.cfilter,tp,LOCATION_MZONE+LOCATION_PZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,2,0,0)
end
function c11200209.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
function c11200209.thfilter(c)
return c:IsCode(11200209) and c:IsAbleToHand()
end
function c11200209.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(c11200209.thfilter,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11200209.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,3,aux.ExceptThisCard(e))
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,0,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11200209.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
--混沌螺旋
local m=11200210
local cm=_G["c"..m]
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)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,m+9000)
e2:SetCost(cm.diacost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsType(TYPE_FUSION)
end
function cm.diacost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToRemove),tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,4,e:GetHandler())
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x11,1550,1050,8,RACE_ROCK,ATTRIBUTE_FIRE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0,0x11,1550,1050,8,RACE_ROCK,ATTRIBUTE_FIRE) then
c:AddMonsterAttribute(TYPE_EFFECT)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_FUSION_SUBSTITUTE)
e1:SetCondition(cm.subcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
function cm.subcon(e)
return e:GetHandler():IsLocation(LOCATION_ONFIELD)
end
--月光大剑
local m=11200299
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e3)
--move
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.seqcon)
e4:SetTarget(cm.seqtg)
e4:SetOperation(cm.seqop)
c:RegisterEffect(e4)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cm.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 cm.seqcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ( Duel.GetTurnPlayer()==tp and ph==PHASE_MAIN1 or ph==PHASE_MAIN2 ) or (Duel.GetTurnPlayer()==1-tp and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
function cm.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 end
end
function cm.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetEquipTarget()
if not tc or not c:IsRelateToEffect(e) or tc:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
local g=c:GetColumnGroup():Filter(function(c) return c:IsControler(1-tp) end,nil)
if #g>0 then
Duel.BreakEffect()
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--穷极之门
local m=11200300
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TODECK)
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)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--OP
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_FZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetCountLimit(1)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--todeck
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_FZONE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(cm.descon2)
e4:SetOperation(cm.desop2)
c:RegisterEffect(e4)
end
function cm.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsType(TYPE_FUSION)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
end
function cm.rmfilter(c)
return c:IsFacedown() and c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()==0 then return end
local tc=g:RandomSelect(tp,1):GetFirst()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and not tc:IsType(TYPE_FUSION) then
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.filter0(c)
return c:IsOnField() and c:IsAbleToRemove()
end
function cm.filter1(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter0,nil)
local mg2=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
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
function cm.ffilter(c,tp)
return c:IsType(TYPE_FUSION) and c:IsFaceup() and c:IsControler(tp)
end
function cm.descon2(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(cm.ffilter,nil,tp)
return tc:GetCount()>0
end
function cm.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),tp,REASON_EFFECT)
end
\ No newline at end of file
--黯黑真实 布蕾克
function c11200301.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11200301)
e1:SetCost(c11200301.spcost)
e1:SetTarget(c11200301.sptg)
e1:SetOperation(c11200301.spop)
c:RegisterEffect(e1)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e5:SetCode(EVENT_DESTROYED)
e5:SetCountLimit(1,11209301)
e5:SetCondition(c11200301.thcon)
e5:SetTarget(c11200301.thtg)
e5:SetOperation(c11200301.thop)
c:RegisterEffect(e5)
end
function c11200301.dfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost()
end
function c11200301.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200301.dfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11200301.dfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c11200301.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 c11200301.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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c11200301.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c11200301.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_FIRE)
end
function c11200301.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c11200301.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c11200301.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c11200301.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11200301.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c11200301.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c11200301.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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c11200301.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--黯之群狼 布蕾克
function c11200302.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_FIRE),2)
c:EnableReviveLimit()
--actlimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetCode(EFFECT_CANNOT_ACTIVATE)
e0:SetRange(LOCATION_MZONE)
e0:SetTargetRange(0,1)
e0:SetCondition(c11200302.actcon)
e0:SetValue(1)
c:RegisterEffect(e0)
--token
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,11200302)
e4:SetCost(c11200302.spcost)
e4:SetTarget(c11200302.sptg)
e4:SetOperation(c11200302.spop)
c:RegisterEffect(e4)
end
function c11200302.cfilter(c,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsControler(tp) and (bit.band(c:GetType(),0x81)==0x81 or c:IsType(TYPE_FUSION))
end
function c11200302.actcon(e)
local tp=e:GetHandlerPlayer()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (a and c11200302.cfilter(a,tp)) or (d and c11200302.cfilter(d,tp))
end
function c11200302.dfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost()
end
function c11200302.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200302.dfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11200302.dfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c11200302.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,81009019,0,0x4011,2400,2400,8,RACE_ROCK,ATTRIBUTE_FIRE) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c11200302.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,81009019,0,0x4011,2400,2400,8,RACE_ROCK,ATTRIBUTE_FIRE) then
local token=Duel.CreateToken(tp,81009019)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
--黯色反转 布蕾克
function c11200304.initial_effect(c)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,11200304)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c11200304.atktg)
e1:SetOperation(c11200304.atkop)
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,11209304)
e2:SetCost(c11200304.thcost)
e2:SetTarget(c11200304.thtg)
e2:SetOperation(c11200304.thop)
c:RegisterEffect(e2)
end
function c11200304.dsfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE)
end
function c11200304.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11200304.dsfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11200304.dsfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c11200304.dsfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c11200304.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetValue(1000)
tc:RegisterEffect(e1)
end
end
function c11200304.thcost(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 c11200304.filter(c,tp)
return bit.band(c:GetType(),0x82)==0x82 and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c11200304.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,c)
end
function c11200304.filter2(c,mc)
return bit.band(c:GetType(),0x81)==0x81 and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() and c11200304.isfit(c,mc)
end
function c11200304.isfit(c,mc)
return (mc.fit_monster and c:IsCode(table.unpack(mc.fit_monster))) or aux.IsCodeListed(mc,c:GetCode())
end
function c11200304.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200304.filter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c11200304.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11200304.filter,tp,LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()>0 then
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c11200304.filter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,g:GetFirst())
if mg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=mg:Select(tp,1,1,nil)
g:Merge(sg)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(c11200304.splimit)
Duel.RegisterEffect(e2,tp)
end
function c11200304.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_FIRE)
end
--反转预兆 布蕾克
function c11200305.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,c11200305.affilter,c11200305.bffilter,false)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_FUSION+REASON_MATERIAL)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c11200305.splimit)
c:RegisterEffect(e0)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11200305,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,11200305)
e1:SetCost(c11200305.eqcost)
e1:SetTarget(c11200305.eqtg)
e1:SetOperation(c11200305.eqop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11200305,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,11209305)
e2:SetCost(c11200305.thcost)
e2:SetTarget(c11200305.thtg)
e2:SetOperation(c11200305.thop)
c:RegisterEffect(e2)
end
function c11200305.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function c11200305.affilter(c)
return c:IsFusionAttribute(ATTRIBUTE_FIRE) and bit.band(c:GetType(),0x81)==0x81
end
function c11200305.bffilter(c)
return c:IsFusionAttribute(ATTRIBUTE_FIRE) and not c:IsFusionType(TYPE_TOKEN)
end
function c11200305.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost()
end
function c11200305.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200305.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11200305.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c11200305.eqfilter(c)
return c:IsFaceup() and c:IsAbleToChangeControler()
end
function c11200305.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 c11200305.eqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11200305.eqfilter,tp,0,LOCATION_MZONE,1,nil,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c11200305.eqfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c11200305.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Equip(tp,tc,c) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c11200305.eqlimit)
e1:SetLabelObject(c)
tc:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(800)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
function c11200305.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c11200305.costfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost()
end
function c11200305.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200305.costfilter2,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c11200305.costfilter2,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c11200305.thfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function c11200305.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200305.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function c11200305.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11200305.thfilter,tp,LOCATION_DECK+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 c11200306.initial_effect(c)
--spsummon
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(c11200306.spcon)
e1:SetOperation(c11200306.spop)
c:RegisterEffect(e1)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_RELEASE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,11200306)
e3:SetTarget(c11200306.thtg)
e3:SetOperation(c11200306.thop)
c:RegisterEffect(e3)
end
function c11200306.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsDiscardable()
end
function c11200306.spcon(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_MZONE,0)==0
and Duel.IsExistingMatchingCard(c11200306.cfilter,tp,LOCATION_HAND,0,1,c)
end
function c11200306.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c11200306.cfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c11200306.thfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and bit.band(c:GetType(),0x81)==0x81 and c:IsAbleToHand()
end
function c11200306.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200306.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11200306.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11200306.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=11200307
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon by effect
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(cm.splimit)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sstg)
e1:SetOperation(cm.ssop)
c:RegisterEffect(e1)
--reg
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_REMOVE)
e2:SetOperation(cm.rmop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,m+9000)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.posfilter1(c)
return c:IsFaceup() and (bit.band(c:GetType(),0x81)==0x81 or c:IsType(TYPE_FUSION)) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToDeck()
and Duel.IsExistingTarget(cm.posfilter2,tp,LOCATION_REMOVED,0,2,c)
end
function cm.posfilter2(c)
return c:IsFaceup() and c:IsAbleToDeck()
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.posfilter1,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,cm.posfilter1,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,cm.posfilter2,tp,LOCATION_REMOVED,0,2,2,g1:GetFirst())
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)~=0
end
function cm.rmfilter(c,tp)
return c:IsAbleToRemove() and Duel.GetMZoneCount(tp,c)>0
end
function cm.posfilter3(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,tp)
and Duel.IsExistingMatchingCard(cm.posfilter3,tp,LOCATION_MZONE,0,1,nil,nil)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
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()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rmfilter),tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--土著神的红叶景色
local m=11200308
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,11200029)
c:EnableReviveLimit()
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkCode,11200029),1,1)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.linklimit)
c:RegisterEffect(e0)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.atkval)
c:RegisterEffect(e2)
--tohand(monster)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,m+900)
e4:SetCost(cm.thcost2)
e4:SetTarget(cm.thtg2)
e4:SetOperation(cm.thop2)
c:RegisterEffect(e4)
end
function cm.atkfilter(c)
return c:IsFaceup() and c:GetCounter(0x1620)>0
end
function cm.atkval(e,c)
local g=Duel.GetMatchingGroup(cm.atkfilter,0,LOCATION_MZONE,LOCATION_MZONE,c)
local atk=g:GetSum(Card.GetBaseAttack)
return atk
end
function cm.thcost2(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.thfilter2(c)
return c:IsCode(11200029) and c:IsAbleToHand() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.sgfilter(c)
return c:IsLocation(LOCATION_HAND)
end
function cm.ssfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsLevelBelow(2) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_AQUA) and c:IsAbleToDeck()
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(cm.sgfilter,nil,tp)
if ct==0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--蜃气楼·椎名咪玉
local m=11200309
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--name
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.nmtg)
e1:SetOperation(cm.nmop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.drcon)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
function cm.nmfilter(c,cd)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsType(TYPE_MONSTER)
and not c:IsCode(cd)
end
function cm.nmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local cd=e:GetHandler():GetCode()
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and cm.nmfilter(chkc,cd) end
if chk==0 then return Duel.IsExistingTarget(cm.nmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil,cd) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.nmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,cd)
end
function cm.nmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and (tc:IsLocation(LOCATION_GRAVE) or tc:IsFaceup()) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(tc:GetCode())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
if tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetValue(m)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and r==REASON_FUSION
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)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==2 then
Duel.ShuffleHand(p)
Duel.BreakEffect()
Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--UNICORN GUNDAM 02 BANSHEE NORN
local m=17020110
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,10,2,cm.ovfilter,aux.Stringid(17020110,0),99,cm.xyzop)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.incon)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.tgtg)
e2:SetValue(cm.indct)
c:RegisterEffect(e2)
--cannot be target
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(17020110,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCountLimit(1,17020110)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop)
c:RegisterEffect(e4)
--summon limit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCondition(cm.regcon)
e5:SetOperation(cm.regop)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCode(EFFECT_SPSUMMON_CONDITION)
e6:SetValue(cm.splimit)
c:RegisterEffect(e6)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.sumlimit)
Duel.RegisterEffect(e1,tp)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_MACHINE)
end
function cm.splimit(e,se,sp,st,spos,tgp)
return bit.band(st,SUMMON_TYPE_XYZ)~=SUMMON_TYPE_XYZ or Duel.GetFlagEffect(tgp,m)==0
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsLinkAbove(3)
end
function cm.incon(e)
return e:GetHandler():IsLinkState()
end
function cm.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function cm.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
function cm.tgtg(e,c)
return c:GetLinkedGroup():IsContains(e:GetHandler())
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,17020110)==0 end
Duel.RegisterFlagEffect(tp,17020110,RESET_PHASE+PHASE_END,0,1)
end
function cm.filter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():GetOverlayGroup():IsExists(cm.filter,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_OVERLAY)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetOverlayGroup()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=lg:FilterSelect(tp,cm.filter,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
g:GetFirst():RegisterEffect(e1)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsRace(RACE_MACHINE)
end
--平静祥和的森林
--Suyuz=Suyuz or {}
local m=33502100
local cm=_G["c"..m]
Suyuz={}
Suyuz.loaded_metatable_list={}
--
function Suyuz.load_metatable(code)
local m1=_G["c"..code]
if m1 then return m1 end
local m2=Suyuz.loaded_metatable_list[code]
if m2 then return m2 end
_G["c"..code]={}
if pcall(function() dofile("expansions/script/c"..code..".lua") end) or pcall(function() dofile("script/c"..code..".lua") end) then
local mt=_G["c"..code]
_G["c"..code]=nil
if mt then
Suyuz.loaded_metatable_list[code]=mt
return mt
end
else
_G["c"..code]=nil
end
end
function Suyuz.costgrave(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() end
Duel.SendtoGrave(c,REASON_COST)
end
function Suyuz.tograve(c,cat,code,op,hop)
--mat check
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(Suyuz.valcheck)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(code,0))
e1:SetCategory(cat)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,code)
e1:SetCost(Suyuz.costgrave)
e1:SetOperation(op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(code,2))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1)
e2:SetCondition(Suyuz.sum)
e2:SetOperation(Suyuz.hop)
e2:SetLabelObject(e0)
e2:SetLabel(code)
c:RegisterEffect(e2)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e9:SetCode(EVENT_CUSTOM)
e9:SetRange(0x70)
e9:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_SET_AVAILABLE)
e9:SetCondition(Suyuz.cc)
e9:SetOperation(op)
c:RegisterEffect(e9)
return e1,e2,e9
end
function Suyuz.fusli_i(c,cat,code,op,hop)
--mat check
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(Suyuz.valcheckfusli)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(code,2))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1)
e1:SetCondition(Suyuz.sumfus)
e1:SetOperation(Suyuz.hopfus)
e1:SetLabelObject(e0)
e1:SetLabel(code)
c:RegisterEffect(e1)
return e1
end
function Suyuz.hop(e,tp)
local c=e:GetHandler()
local code=e:GetLabel()
if c:GetFlagEffect(code)==0 and c:GetFlagEffect(code+100)==0 then
c:RegisterFlagEffect(code,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
end
function Suyuz.hopfus(e,tp)
local c=e:GetHandler()
local code=e:GetLabel()
local mat=c:GetMaterial()
local matg=mat:Filter(Card.IsSetCard,nil,0x5a80)
local matcode=matg:GetFirst()
if c:GetFlagEffect(code)==0 and c:GetFlagEffect(code+100)==0 then
c:RegisterFlagEffect(code,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
while matcode do
local mcode=matcode:GetOriginalCode()
if c:IsFaceup() and c:GetFlagEffect(mcode)==0 then
c:CopyEffect(mcode,RESET_EVENT+0x1fe0000+EVENT_CHAINING,1)
c:RegisterFlagEffect(mcode,RESET_EVENT+RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(mcode,2))
end
matcode=matg:GetNext()
end
end
end
function Suyuz.gaincon(code)
return function(e)
return e:GetHandler():GetFlagEffect(code)>0 or e:GetHandler():GetFlagEffect(code+100)>0
end
end
function Suyuz.cc(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler()
end
function Suyuz.sum(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
and e:GetLabelObject():GetLabel()~=0 and e:GetHandler():GetFlagEffect(code+100)==0
end
function Suyuz.sumfus(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
and e:GetLabelObject():GetLabel()~=0 and e:GetHandler():GetFlagEffect(code+100)==0
end
function Suyuz.valcheck(e,c)
local g=c:GetMaterial()
local flag=0
if g:IsExists(Card.IsRace,1,nil,RACE_PLANT) then flag=1 end
e:SetLabel(flag)
end
function Suyuz.valcheckfusli(e,c)
local g=c:GetMaterial()
local flag=0
if g:IsExists(Card.IsSetCard,1,nil,0x5a80) then flag=1 end
e:SetLabel(flag)
end
\ No newline at end of file
--自然色彩 晴橙雏菊
Duel.LoadScript("c33502100.lua")
local m=33502101
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e9=Suyuz.tograve(c,CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN,m,cm.op)
--HZ
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(Suyuz.gaincon(m))
e3:SetTarget(cm.target)
e3:SetOperation(cm.hop)
c:RegisterEffect(e3)
if not BZo_p then
BZo_p={}
BZo_p["Effects"]={}
end
BZo_p["Effects"]["c33502101"]=cm.disop
end
--e1
function cm.op(e,tp)
local c=e:GetHandler()
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(cm.disop)
e1:SetLabel(e)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabel()
if te==re or not (re:IsActiveType(TYPE_MONSTER) and re:IsActivated()) then return end
local tep=re:GetHandlerPlayer()
if not (Duel.GetLocationCount(tep,LOCATION_MZONE)>1 and Duel.IsPlayerCanSpecialSummonMonster(tp,28062326,0,0x4011,800,500,1,RACE_PLANT,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE,1-tp) and Duel.CheckLPCost(tp,800)) then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.PayLPCost(tp,800)
local ct=1
while ct>0 do
local token=Duel.CreateToken(tp,28062326)
Duel.SpecialSummonStep(token,0,tp,tep,false,false,POS_FACEUP_DEFENSE)
ct=ct-1
end
Duel.SpecialSummonComplete()
end
end
function cm.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
function cm.splimit0(c)
return c:IsRace(RACE_PLANT)
end
--e3
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.hop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local atk=Duel.GetMatchingGroupCount(cm.splimit0,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*200
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CHANGE_RACE)
e0:SetValue(RACE_PLANT)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e0)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(atk)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
end
end
--自然色彩 文红殊兰
Duel.LoadScript("c33502100.lua")
local m=33502102
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e9=Suyuz.tograve(c,CATEGORY_DESTROY+CATEGORY_RELEASE,m,cm.op)
--HZ
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(Suyuz.gaincon(m))
e3:SetTarget(cm.target)
e3:SetOperation(cm.hop)
c:RegisterEffect(e3)
if not BZo_p then
BZo_p={}
BZo_p["Effects"]={}
end
BZo_p["Effects"]["c33502102"]=cm.disop
end
--e1
function cm.op(e,tp)
local c=e:GetHandler()
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(cm.disop)
e1:SetLabel(e)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabel()
if te==re or not (re:IsActiveType(TYPE_MONSTER) and re:IsActivated()) then return end
local tep=re:GetHandlerPlayer()
if not (Duel.IsExistingMatchingCard(cm.splimit0,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil,e,tp)) then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.splimit0,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if Duel.Release(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if dg:GetCount()>0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
end
function cm.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
function cm.splimit0(c)
return c:IsRace(RACE_PLANT) and c:IsReleasable()
end
--e3
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.hop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local token=Duel.CreateToken(tp,28062326)
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)~=0 then
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(tc:GetAttack())
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(tc:GetDefense())
token:RegisterEffect(e2,true)
local e7=e1:Clone()
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetCode(EFFECT_CHANGE_CODE)
e7:SetValue(tc:GetCode())
token:RegisterEffect(e7,true)
token:CopyEffect(tc:GetCode(),RESET_EVENT+0xfe0000,1)
if tc:IsType(TYPE_EFFECT) then
local e8=e1:Clone()
e8:SetCode(EFFECT_ADD_TYPE)
e8:SetValue(TYPE_EFFECT)
token:RegisterEffect(e8,true)
end
Duel.SpecialSummonComplete()
end
end
end
\ No newline at end of file
--自然色彩 苍绿熙叶
Duel.LoadScript("c33502100.lua")
local m=33502103
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e9=Suyuz.tograve(c,CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE,m,cm.op)
--HZ
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(Suyuz.gaincon(m))
e3:SetTarget(cm.target)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetCondition(cm.descon)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
if not BZo_p then
BZo_p={}
BZo_p["Effects"]={}
end
BZo_p["Effects"]["c33502103"]=cm.disop
end
--e1
function cm.op(e,tp)
local c=e:GetHandler()
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(cm.disop)
e1:SetLabel(e)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabel()
if te==re or not (re:IsActiveType(TYPE_MONSTER) and re:IsActivated()) then return end
local tep=re:GetHandlerPlayer()
if not (Duel.IsExistingMatchingCard(cm.splimit0,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil,e,tp) and Duel.IsExistingMatchingCard(cm.splimit1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp)) then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.splimit0,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,nil)
if Duel.Release(g,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local dg=Duel.SelectMatchingCard(tp,cm.splimit1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
if dg:GetCount()>0 then
Duel.SpecialSummon(dg,0,tp,tp,false,false,POS_FACEUP)
local tcg=Duel.GetOperatedGroup()
local sc=tcg:GetFirst()
while sc do
local mcode=sc:GetOriginalCode()
if sc:IsSetCard(0x5a80) then
sc:RegisterFlagEffect(mcode+100,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33502100,0))
end
sc=tcg:GetNext()
end
end
end
end
end
function cm.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
function cm.splimit0(c)
return c:IsRace(RACE_PLANT) and c:IsReleasable()
end
function cm.splimit1(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
--e4
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_PLANT))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--immune (FAQ in Card Target)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.target)
e2:SetValue(cm.efilter)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.target(e,c)
local g,te=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS,CHAININFO_TRIGGERING_EFFECT)
return not (te and te:IsHasProperty(EFFECT_FLAG_CARD_TARGET))
or not (g and g:IsContains(c))
end
function cm.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
\ No newline at end of file
--自然色彩 霞绯落枫
Duel.LoadScript("c33502100.lua")
local m=33502104
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e9=Suyuz.tograve(c,CATEGORY_SUMMON,m,cm.op)
--HZ
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(Suyuz.gaincon(m))
e3:SetTarget(cm.target)
e3:SetOperation(cm.hop)
c:RegisterEffect(e3)
if not BZo_p then
BZo_p={}
BZo_p["Effects"]={}
end
BZo_p["Effects"]["c33502104"]=cm.disop
end
--e1
function cm.op(e,tp)
local c=e:GetHandler()
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(cm.disop)
e1:SetLabel(e)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabel()
if te==re or not (re:IsActiveType(TYPE_MONSTER) and re:IsActivated()) then return end
local tep=re:GetHandlerPlayer()
if not (Duel.IsExistingMatchingCard(cm.splimit0,tp,LOCATION_HAND,0,1,nil)) then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.splimit0,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
function cm.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
function cm.splimit0(c)
return c:IsRace(RACE_PLANT) and (c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)) and c:IsLevel(9)
end
function cm.splimit2(c)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),nil,0x11,1500,1250,9,RACE_PLANT,ATTRIBUTE_LIGHT)
end
--e3
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return Duel.IsExistingTarget(cm.splimit2,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.splimit2,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.hop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_NORMAL+TYPE_MONSTER)
e1:SetReset(RESET_EVENT+0x47c0000)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_PLANT)
tc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(ATTRIBUTE_LIGHT)
tc:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_SET_BASE_ATTACK)
e4:SetValue(1500)
tc:RegisterEffect(e4,true)
local e5=e1:Clone()
e5:SetCode(EFFECT_SET_BASE_DEFENSE)
e5:SetValue(1250)
tc:RegisterEffect(e5,true)
local e6=e1:Clone()
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(9)
tc:RegisterEffect(e6,true)
if Duel.SpecialSummon(tc,0,tp,1-tp,true,false,POS_FACEUP)~=0 then
local e7=Effect.CreateEffect(e:GetHandler())
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_ADD_SETCODE)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetValue(0x5a80)
e7:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e8:SetReset(RESET_EVENT+RESETS_REDIRECT)
e8:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e8,true)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
end
end
end
--自然色彩 岚紫罗兰
Duel.LoadScript("c33502100.lua")
local m=33502105
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e9=Suyuz.tograve(c,CATEGORY_DRAW+CATEGORY_RELEASE,m,cm.op)
--HZ
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(Suyuz.gaincon(m))
e3:SetTarget(cm.target)
e3:SetOperation(cm.hop)
c:RegisterEffect(e3)
if not BZo_p then
BZo_p={}
BZo_p["Effects"]={}
end
BZo_p["Effects"]["c33502105"]=cm.disop
end
--e1
function cm.op(e,tp)
local c=e:GetHandler()
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(cm.disop)
e1:SetLabel(e)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabel()
if te==re or not (re:IsActiveType(TYPE_MONSTER) and re:IsActivated()) then return end
local tep=re:GetHandlerPlayer()
if not (Duel.IsExistingMatchingCard(cm.splimit0,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.darw,tp,LOCATION_DECK,0,1,nil)) then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.splimit0,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if Duel.Release(tc,REASON_EFFECT)~=0 and Duel.IsPlayerCanDraw(tp,1)then
Duel.Draw(tp,1,REASON_EFFECT)
local sg=Duel.GetOperatedGroup()
local sumg=sg:GetFirst()
if(sumg:IsSummonable(true,nil) or sumg:IsMSetable(true,nil)) and sumg:IsRace(RACE_PLANT) and Duel.SelectYesNo(tp,aux.Stringid(m,4))then
Duel.ConfirmCards(1-tp,sumg)
if sumg then
Duel.Summon(tp,sumg,true,nil)
end
end
end
end
end
function cm.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
function cm.splimit0(c)
return c:IsRace(RACE_PLANT) and c:IsReleasable()
end
function cm.darw(c)
return c:IsAbleToHand()
end
--e3
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,0)
end
function cm.hop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local atk=Duel.GetMatchingGroupCount(cm.splimit0,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*500
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(cm.efilter)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(atk)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e4)
end
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
\ No newline at end of file
--自然色彩 云粉玫瑰
Duel.LoadScript("c33502100.lua")
local m=33502106
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e9=Suyuz.tograve(c,CATEGORY_DISABLE+CATEGORY_RELEASE,m,cm.op)
--HZ
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(Suyuz.gaincon(m))
e3:SetTarget(cm.target)
e3:SetOperation(cm.hop)
c:RegisterEffect(e3)
if not BZo_p then
BZo_p={}
BZo_p["Effects"]={}
end
BZo_p["Effects"]["c33502106"]=cm.disop
end
--e1
function cm.op(e,tp)
local c=e:GetHandler()
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(cm.disop)
e1:SetLabel(e)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabel()
if te==re or not (re:IsActiveType(TYPE_MONSTER) and re:IsActivated() and Duel.GetFlagEffect(tp,m)==0) then return end
local tep=re:GetHandlerPlayer()
if not Duel.IsExistingMatchingCard(cm.splimit0,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.splimit0,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if Duel.Release(tc,REASON_EFFECT)~=0 then
local e6=Effect.CreateEffect(e:GetHandler())
e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e6:SetCode(EVENT_CHAIN_SOLVING)
e6:SetReset(RESET_CHAIN)
e6:SetOperation(cm.dis)
Duel.RegisterEffect(e6,tp)
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
end
end
function cm.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
function cm.splimit0(c)
return c:IsRace(RACE_PLANT) and c:IsReleasable()
end
function cm.dis(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--e3
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE,tp,LOCATION_REASON_TOFIELD)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,0)
end
function cm.hop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetRange(LOCATION_SZONE)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TEMP_REMOVE-RESET_TURN_SET)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_REMOVE_TYPE)
e2:SetValue(TYPE_MONSTER+TYPE_EFFECT)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_RELEASE_REPLACE)
e3:SetRange(LOCATION_SZONE)
e3:SetTarget(cm.reptg)
e3:SetValue(cm.repval)
e3:SetOperation(cm.repop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TEMP_REMOVE-RESET_TURN_SET)
tc:RegisterEffect(e3)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
end
end
function cm.repfilter(c,tp,re)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsRace(RACE_PLANT) and not c:IsReason(REASON_REPLACE)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp,re)
and e:GetHandler():IsAbleToRemoveAsCost() end
return Duel.SelectYesNo(tp,aux.Stringid(m,4))
end
function cm.repval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer(),c:GetReasonEffect())
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_REPLACE)
end
\ No newline at end of file
--自然色彩 澄苍玉兰
Duel.LoadScript("c33502100.lua")
local m=33502107
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1,e2,e9=Suyuz.tograve(c,CATEGORY_DISABLE+CATEGORY_RELEASE,m,cm.op)
--HZ
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(Suyuz.gaincon(m))
e3:SetTarget(cm.target)
e3:SetOperation(cm.hop)
c:RegisterEffect(e3)
if not BZo_p then
BZo_p={}
BZo_p["Effects"]={}
end
BZo_p["Effects"]["c33502107"]=cm.disop
end
--e1
function cm.op(e,tp)
local c=e:GetHandler()
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(cm.disop)
e1:SetLabel(e)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabel()
if te==re or not (re:IsActiveType(TYPE_MONSTER) and re:IsActivated() and re:GetHandler():IsRace(RACE_PLANT)) then return end
local tep=re:GetHandlerPlayer()
if not Duel.IsExistingMatchingCard(cm.splimit0,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.splimit0,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
local tc=g:GetFirst()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function cm.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
function cm.splimit0(c)
return c:IsAbleToDeck()
end
--e3
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) end
if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_SZONE,tp,LOCATION_REASON_TOFIELD)>0 or Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp,LOCATION_REASON_TOFIELD)>0) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
if Duel.GetLocationCount(tp,LOCATION_SZONE,tp,LOCATION_REASON_TOFIELD)<1 then
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_GRAVE,1,1,nil)
elseif Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp,LOCATION_REASON_TOFIELD)<1 then
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_GRAVE,0,1,1,nil)
else
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,0)
end
function cm.hop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local tep=tc:GetOwner()
if tc:IsRelateToEffect(e) then
Duel.MoveToField(tc,tp,tep,LOCATION_SZONE,POS_FACEUP,true)
if (tc:IsType(TYPE_MONSTER) or tc:IsType(TYPE_TRAP)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetRange(LOCATION_SZONE)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TEMP_REMOVE-RESET_TURN_SET)
tc:RegisterEffect(e1)
if tc:IsType(TYPE_MONSTER) then
local e2=e1:Clone()
e2:SetCode(EFFECT_REMOVE_TYPE)
e2:SetValue(TYPE_MONSTER+TYPE_EFFECT)
tc:RegisterEffect(e2)
else
local e2=e1:Clone()
e2:SetCode(EFFECT_REMOVE_TYPE)
e2:SetValue(TYPE_TRAP)
tc:RegisterEffect(e2)
end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.recon)
e3:SetOperation(cm.repop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TEMP_REMOVE-RESET_TURN_SET)
tc:RegisterEffect(e3)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,5))
end
end
end
function cm.filter(c,sp)
return c:GetSummonPlayer()==sp
end
function cm.recon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,tp)
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.SetLP(tp,Duel.GetLP(tp)-200)
if eg:IsExists(Card.IsRace,1,nil,RACE_PLANT) then
Duel.Recover(tp,400,REASON_EFFECT)
end
end
\ No newline at end of file
--自然色彩 黯蓝幻蝶
Duel.LoadScript("c33502100.lua")
local m=33502111
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=Suyuz.tograve(c,CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON,m)
--HZ
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(Suyuz.gaincon(m))
e3:SetTarget(cm.target)
e3:SetOperation(cm.hop)
c:RegisterEffect(e3)
end
--e1
function cm.spfilter1(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.spfilter2(c,e,tp,m,f,chkf,ec)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_PLANT) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,ec,chkf)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf,c)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf,c)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.spfilter1,nil,e)
local sg1=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,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,c,chkf)
tc:SetMaterial(mat1)
Duel.Release(mat1,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,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
--e3
function cm.tgfilter(c,e,tp,ec,chkf)
local mg=Group.FromCards(ec,c)
return c:IsFaceup() and Duel.IsExistingMatchingCard(cm.fusic2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf,c)
end
function cm.fusic2(c,e,tp,m,f,chkf,fc)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,fc,chkf)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND)
if chkc then return false end
if chk==0 then
local chkf=tp
return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,mg1,chkf) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,mg1,chkf)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.hop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tec=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tec:IsFaceup() and tec:IsRelateToEffect(e) and not tec:IsImmuneToEffect(e) then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND)
mg1:Merge(tec)
local sg1=Duel.GetMatchingGroup(cm.fusic2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.fusic2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,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=cm.fselect(tp,tc,mg1,tec,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=cm.fselect(tp,tc,mg2,tec,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
end
function cm.fselect(tp,tc,mg,gc,chkf)
local g=Duel.SelectFusionMaterial(tp,tc,mg,gc,chkf)
return g
end
\ No newline at end of file
--自然色彩 三色蜂季香
Duel.LoadScript("c33502100.lua")
local m=33502121
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.matfilter,3,true)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(cm.splimit)
c:RegisterEffect(e0)
local e1=Suyuz.fusli_i(c,CATEGORY_SPECIAL_SUMMON,m)
--HZ
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.cond)
e2:SetTarget(cm.target)
e2:SetOperation(cm.hop)
c:RegisterEffect(e2)
--summon success
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.effcon2)
e3:SetOperation(cm.spsumsuc)
c:RegisterEffect(e3)
end
function cm.matfilter(c)
return c:IsRace(RACE_PLANT) and c:IsLevel(9)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
--e2
function cm.cond(e,tp,eg,ep,ev,re,r,rp)
if e==re or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()~=1 then return false end
local tc=g:GetFirst()
e:SetLabelObject(tc)
return tc:IsOnField() and Suyuz.gaincon(m) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup()
end
function cm.filter(c,re,rp,tf,ceg,cep,cev,cre,cr,crp)
return tf(re,rp,ceg,cep,cev,cre,cr,crp,0,c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tep=re:GetHandlerPlayer()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE,tp,LOCATION_REASON_TOFIELD)>0 end
end
function cm.hop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,cm.equ)
end
function cm.equ(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tep=e:GetHandlerPlayer()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tep,LOCATION_SZONE)<=0 then return end
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
if (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) then
c:CancelToGrave(true)
end
Duel.Equip(tep,c,tc)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33502121,5))
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(cm.atkvalue)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(cm.indvalue)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_DISABLE)
e4:SetCondition(cm.discon)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4)
end
end
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
function cm.atkvalue(e,c)
local ec=e:GetHandler():GetEquipTarget()
if ec:IsRace(RACE_PLANT) then
return 1000
else
return -1000
end
end
function cm.indvalue(e,c)
local ec=e:GetHandler():GetEquipTarget()
if ec:IsRace(RACE_PLANT) then
return 1
else
return 0
end
end
function cm.discon(e)
local tp=e:GetHandlerPlayer()
local ec=e:GetHandler():GetEquipTarget()
return ec:GetRace()~=RACE_PLANT
end
--e3
function cm.effcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.spsumsuc(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(cm.actvalue)
e1:SetLabel(Duel.GetCurrentPhase())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.actvalue(e,c)
if Duel.GetCurrentPhase()==e:GetLabel() then
return aux.TRUE
else
return 0
end
end
\ No newline at end of file
--自然色彩 幽彩兰樱
Duel.LoadScript("c33502100.lua")
local m=33502122
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsRace,RACE_PLANT),2,true)
local e1=Suyuz.fusli_i(c,CATEGORY_SPECIAL_SUMMON,m)
--HZ
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(Suyuz.gaincon(m))
e2:SetTarget(cm.target)
e2:SetOperation(cm.hop)
c:RegisterEffect(e2)
--summon success
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.effcon2)
e3:SetOperation(cm.spsumsuc)
c:RegisterEffect(e3)
end
--e2
function cm.toh(c)
return c:IsAbleToHand()
end
function cm.tohg(c)
return c:IsAbleToHand() and c:IsRace(RACE_PLANT)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.toh,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.hop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoHand(tc,tp,REASON_EFFECT)==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.tohg,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end
--e3
function cm.effcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.spsumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
--自然色彩 双生黄薇玫
Duel.LoadScript("c33502100.lua")
local m=33502123
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.matfilter,2,true)
local e1=Suyuz.fusli_i(c,CATEGORY_SPECIAL_SUMMON,m)
--HZ
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(Suyuz.gaincon(m))
e2:SetTarget(cm.target)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
--summon success
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.effcon2)
e3:SetOperation(cm.spsumsuc)
c:RegisterEffect(e3)
if not BZo_p then
BZo_p={}
BZo_p["Effects"]={}
end
BZo_p["Effects"]["c33502123"]={}
end
function cm.matfilter(c)
return c:IsSetCard(0x5a80) and c:IsLevel(9)
end
--e2
function cm.toh(c)
return c:IsSetCard(0x5a80) and c:IsAbleToGraveAsCost() and BZo_p["Effects"]["c"..c:GetCode()]~=nil
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.toh,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.toh,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.op(e,tp)
local c=e:GetHandler()
local g=Duel.GetOperatedGroup()
--disable
Duel.RaiseEvent(g,EVENT_CUSTOM,e,nil,nil,nil,nil)
end
--e3
function cm.effcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.spsumsuc(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_PLANT)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--自然秘境
Duel.LoadScript("c33502100.lua")
local m=33502130
local cm=_G["c"..m]
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:SetOperation(cm.activate)
c:RegisterEffect(e1)
--race
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCode(EFFECT_ADD_RACE)
e2:SetValue(RACE_PLANT)
c:RegisterEffect(e2)
if not BZo_p then
BZo_p={}
BZo_p["Effects"]={}
end
BZo_p["Effects"]["c33502130"]={}
end
--e1
function cm.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x5a80) and c:IsAbleToGrave()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
local txg0=Duel.GetOperatedGroup()
local txg=txg0:GetFirst()
if BZo_p["Effects"]["c"..txg:GetCode()]~=nil then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(BZo_p["Effects"]["c"..txg:GetCode()])
e1:SetLabel(e)
e1:SetRange(LOCATION_FZONE)
c:RegisterEffect(e1)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(txg:GetCode(),0))
end
end
end
--播种
Duel.LoadScript("c33502100.lua")
local m=33502131
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE)
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)
--cost
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_PLANT) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_PLANT)
Duel.Release(g,REASON_COST)
e:SetLabel(1)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local ag=Group.CreateGroup()
local codes={}
for c in aux.Next(g) do
local code=c:GetCode()
if c:IsSetCard(0x5a80) and not ag:IsExists(Card.IsCode,1,nil,code) then
ag:AddCard(c)
table.insert(codes,code)
end
end
table.sort(codes)
--c:IsCode(codes[1])
local afilter={codes[1],OPCODE_ISCODE}
if #codes>1 then
--or ... or c:IsCode(codes[i])
for i=2,#codes do
table.insert(afilter,codes[i])
table.insert(afilter,OPCODE_ISCODE)
table.insert(afilter,OPCODE_OR)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp,table.unpack(afilter))
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.filter(c,code)
return c:IsAbleToGrave() and c:IsCode(code)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local flag=1
local num=e:GetLabel()
local c=e:GetHandler()
flag=flag+num
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,ac):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(BZo_p["Effects"]["c"..tc:GetCode()])
e1:SetLabel(e)
e1:SetReset(RESET_PHASE+PHASE_END,flag)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function cm.splimit(e,c)
return not c:IsRace(RACE_PLANT)
end
\ No newline at end of file
......@@ -137,13 +137,6 @@
!setname 0xab5e 御龙骑士
#xig 1602540885 112 0x620-0x62f
!setname 0x621 因幡帝
!setname 0x62e 清兰
!setname 0x62f 美树沙耶加
#xig_ihs_0x132 铃仙·优昙华院·因幡记述
#xig_ihs_0x133 因幡帝记述
#AddCodeList(11200029) 泄矢诹访子记述
!counter 0x1620 作祟指示物
#PurpleNightfall - 114 0x970-0x97f
!setname 0x6978 龙宫城
......@@ -480,7 +473,6 @@
#珈百璃 1248959763 335 0xa80-0xa8f
!setname 0x3a80 灵气复苏
!setname 0x1a81 冰汽时代
!setnmae 0x3a81 精神寰宇
!setname 0xa82 天魔反转
!setname 0xa83 珈百璃
......@@ -488,7 +480,6 @@
!setname 0xa85 萨塔妮亚
!setname 0xa86 菈菲尔
!setname 0xa89 次元恋色
!setname 0x5a80 自然色彩
#cm.setname="Gmemories" 灰色记忆
!counter 0x1a80 灵气指示物
......
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