Commit 328f0579 authored by REIKAI's avatar REIKAI 💬

Merge branch '2022.11.28' into 'master'

2022.11.28

See merge request !1
parents d56a8197 31569d9c
......@@ -4,8 +4,8 @@ stages:
variables:
GIT_DEPTH: "1"
LAST_UPDATE_DATE: "2022.10.30"
CURRENT_UPDATE_DATE: "2022.11.15"
LAST_UPDATE_DATE: "2022.11.15"
CURRENT_UPDATE_DATE: "2022.11.28"
redtext:
stage: prepare
......
#created by ...
#main
11500023
11500022
11500005
11500011
11500028
11500012
11500026
11500007
11500014
11500016
11500020
11500018
11500003
11500004
11500021
11500013
11500019
#extra
11500027
11500006
11500009
11500008
!side
#created by ...
#main
#extra
12086005
12087003
12087055
!side
#created by ...
#main
67200239
67200348
67200351
67200236
67200242
67200048
67200237
67200241
#extra
!side
#created by ...
#main
71401004
71401007
71401003
71401006
71400002
71400067
71401002
71401001
71401005
71400032
71400034
71400070
#extra
71402001
71401008
71401009
71400024
71402003
71400068
!side
#created by ...
#main
9910649
9910652
9910666
9910816
9910052
9910318
9910354
9910320
9910285
9910088
9910305
9910213
9910807
9910212
9910237
9910291
9910059
9910654
9910080
9910085
#extra
9910315
9910056
9910301
9910302
9910646
9910294
9910591
!side
#created by ...
#main
33201163
33201157
33201152
33201159
33201158
33201151
33201161
33201162
33201154
33201164
#extra
33201155
33201153
33201156
33201160
!side
#created by ...
#main
30900609
30900603
30901003
30901002
30901001
30901006
30901004
30901005
30901000
30900602
30900605
30901012
30901014
30900606
30901011
30900600
30901010
30901015
30900608
30900601
30901013
#extra
30901009
30901007
30900607
30901016
30901008
!side
#created by ...
#main
23100021
50221420
71400039
33201203
33201204
33201205
33201206
33201207
23003020
23003030
33201201
33201208
30900700
30900701
30900702
30900703
30900712
50220105
6100000
50221425
33201210
30900710
16400089
16400092
33201200
50221450
16400093
23100022
30900708
33201211
30900709
71400041
71400042
6109001
30005205
30900711
#extra
50221430
33201150
71400048
33201202
50220130
50220135
50220125
50220120
50220115
50220110
6103000
33201209
16400091
30900707
30900704
!side
30900705
30900706
67200038
67200043
16400090
16400088
No preview for this file type
#[2022.9 DIY]
!2022.9 DIY
#[2022.11 DIY]
!2022.11 DIY
#1
00113217 1 --小红花
......@@ -33,6 +33,7 @@
01009036 1 --物语纪录·猫
#11
01102020 1 --砂冢明音·抉择
01102087 0 --灵都·回忆海岸
01110131 1 --灵都·双生并蒂
01111018 1 --秘谈·生命的旅路
01111223 0 --灵曲·年华静谧之月
......@@ -72,6 +73,7 @@
04241011 2 --手冲魔女-黑兔爱丽丝
04295003 0 --宫水静香·奏乐先啦
#61
06109001 0 --流转虚梦
06160008 0 --破碎世界的倒吊者
06160301 0 --破碎世界的太阳
06160405 0 --破碎世界的正义
......@@ -451,12 +453,14 @@
15000355 0 --蜂巢之血·维斯帕
15000358 1 --生之境 空洞骑士
15000400 1 --缄默之继承 辉煌圣子·极耶
15000421 0 --神见雪辉缄默城·米拉玻莉亚兹
15000546 0 --赤恒链之恶虺-撒拉斐永
15000550 0 --缓行之『蛇』
15000547 0 --黄如烟之恶虺
15000555 0 --『蛇』缠罪
15000604 1 --幻智指令·炎爆
15000625 1 --幻智的远岸·麦哲伦
15000931 0 --溺亡蔷薇花-荆棘托里亚丹
15000938 0 --憾死蔷薇花-怨灾莱西米娅
15000939 1 --悲亡死蔷薇-异雾厄玻莱斯
15002000 0 --神名浅海
......@@ -491,8 +495,8 @@
16104420 0 --天界律 盖亚
16104422 0 --与天界的链接
16104423 0 --归向天界的引导
16104427 0 --天界法·界长
16105004 1 --MysticElement 梅尔基奥尔
16104427 0 --天界法 索提拉
16105004 0 --MysticElement 梅尔基奥尔
16105016 0 --对Mystic的探究
16105036 0 --记录的神因子
16105108 0 --Mystic探索者 乌鸦女士
......@@ -511,6 +515,7 @@
16107121 0 --迷失在GODO的尽头
16108100 0 --里魂的显化
16110001 0 --谜神帝 伊兹莫
16110033 0 --暗之灵帝 阿尔卡迪亚斯
16110036 1 --天惠的圣龙 阿斯特利亚
16112001 0 --阿玛以马斯
16114200 0 --仙精地图
......@@ -559,6 +564,7 @@
16150026 0 --斩击的大王兽
16150029 0 --洋馆的怪人
16150049 0 --天命教令 天命统合
16151001 1 --SBK 企鹅
16160004 1 --憎恶的狂战士 兰斯洛特
16161010 1 --卡多克·泽姆露普斯
16162000 1 --宇宙人研究所
......@@ -569,6 +575,7 @@
16172004 0 --禁时王
16172006 0 --大欲的魔龙
16172022 0 --煌世破
16172023 0 --煌世落
16199520 0 --华丽的降神
16199522 0 --礼物A
16199523 1 --暴发户的赠礼
......@@ -674,6 +681,7 @@
#198
#200
20000008 0 --带恶人
20000050 1 --藏于心之Chein
20000054 0 --星屑茶
20000057 0 --七夕的花嫁骑士
......@@ -700,7 +708,7 @@
21520086 1 --宁静圣珖
21520087 1 --灵动君王
21520088 0 --霸业皇者
21520089 1 --始源创造龙
21520089 0 --始源创造龙
21520090 1 --终末破灭龙
21520093 1 --极寒灵龙
21520095 1 --相似之物
......@@ -763,6 +771,7 @@
23004002 0 --奇妙冒险团 朗笑火弓
23003007 1 --龙启之地的镖师
23003017 1 --英魂 国士无双
23003020 0 --龙启之地的神机飞弩
23003110 1 --影龙启之地的弓手 阿路露
23004050 1 --时空的护佑
#231
......@@ -820,6 +829,7 @@
30005185 0 --沼地的液植王
30005195 1 --白厄 诺纷斯
30005200 0 --闪辉龙 凯旋龙
30005205 0 --混沌二气
30052000 0 --克里斯汀·罗森塔尔
#305
30553101 0 --创衍秘器 愚沌之核
......@@ -884,6 +894,7 @@
30900024 0 --时空龙·命运驾驭龙
30900604 0 --悖论龙
30900607 0 --奇迹的天使
30900712 0 --混沌病毒·炸弹
30901016 0 --花园的陆莲花少女 麦丽丝
#312
31200000 0 --复合工程机龙
......@@ -899,10 +910,26 @@
33200431 1 --魔力联合 紫鸢尾
33200907 1 --寒霜灵兽 玛狃拉
33200912 1 --寒霜灵兽 象牙猪
33200951 2 --星辉末裔 沃尔夫冈
33200952 2 --星辉末裔 暮究那鲁托
33200953 2 --星辉末裔 零
33200954 2 --星辉末裔 奥莉薇娅
33200955 1 --星辉末裔 菲丝星歌
33200956 1 --星辉末裔 巴雷斯塔
33200957 1 --星辉末裔 米雷斯托
33200958 1 --星辉末裔 阿尔梅瑞亚斯
33201010 0 --死魂狂热信徒
33201011 0 --受污染的皇后 安普特
33201062 1 --血晶化过载-御影零夜
33201068 1 --晶化血裔 吉尔雷比斯
33201073 2 --新老血液的交替
33201102 0 --数据网索引乌贼
33201150 1 --潮涌结晶 海洋之心
33201203 1 --蚀刻圣骑 剑士弗格斯
33201204 1 --蚀刻圣骑 夜骑赫查特
33201205 1 --蚀刻圣骑 教士克兰麦
33201206 1 --蚀刻圣骑 圣女特丽莎
33201207 1 --蚀刻圣骑 尖刺布鲁图斯
33250000 0 --浅间橘
#333
33300200 1 --魔王城的栖夜姬
......@@ -1068,7 +1095,8 @@
33501256 1 --银光之穹 洁净
33501258 1 --银光之穹 穹
33501260 2 --银光之穹 约定
33502001 1 --灰色记忆 人偶少女
33502001 0 --灰色记忆 人偶少女
33502006 0 --灰色记忆 宝石光辉
33502007 0 --灰色记忆 泪雨成痕
33502008 0 --灰色记忆 璀璨之冠
33502009 1 --记忆的邀约 纯白
......@@ -1158,6 +1186,7 @@
33711009 1 --动物朋友 二色薮猫
33711106 0 --~自我收容的个人宇宙~
33711109 0 --加帕里:变成动物朋友
33711401 0 --动物朋友 荷兰乳牛
33711407 0 --动物朋友 Unico
33711408 0 --动物朋友 牦牛
33711501 1 --未来崩崩崩
......@@ -1251,6 +1280,7 @@
40009398 0 --无尽的G
40009964 0 --最凶兽神 穷奇-逆
40010050 0 --击退者-怒堕龙-逆
40010639 0 --黎明之出阵
#437
43700016 0 --圣狮守卫者
#440
......@@ -1271,6 +1301,9 @@
45745906 0 --极翼灵兽 象征鸟
45745921 0 --极翼灵兽 德尔塔气流
45745924 0 --极翼灵兽 勇鸟猛攻
45746831 0 --营地的厨师 艾登
45746832 0 --营地少年 爱德华
45746833 1 --营地少年 李
#473
47344558 1 --妖精骑士 高文
47344561 0 --咒之灾厄 科尔努诺斯
......@@ -1317,15 +1350,26 @@
47591855 0 --觉醒十天众 菲恩福
47591911 0 --觉醒十天众 乌诺
#502
50220115 0 --觉醒的伏龙-火山
50220120 0 --觉醒的伏龙-地震
50220125 0 --觉醒的伏龙-飓风
50220130 0 --觉醒的伏龙-月蚀
50220135 0 --觉醒的伏龙-日珥
50221425 0 --符龙王-魔咒
#514
51414050 1 --地底幽魂的断罪之魂
51414052 1 --审判所有的黑白阎罗
51414054 1 --萝翔说刑法
51414056 1 --冥渡幽魂的悠闲之人
51414056 0 --冥渡幽魂的悠闲之人
51414080 1 --难得的幽魂假日
51417013 0 --繁椛盛开 报社白狼
51417010 0 --清蒸莲子的报社记者
51417013 0 --远目望人 报社白狼
51417050 0 --统御报社的天狗之幕 饭纲丸龙
51417185 1 --流星来的那一页
51417195 1 --于报社短暂休息
51417200 1 --梦想于报社启航
51417999 0 --报社
51419704 0 --无光之夜的鬼杰静舞
51419712 0 --彼岸-地狱轴心
51419714 1 --地狱的糖球女神-赫卡提亚
......@@ -1485,6 +1529,7 @@
64800097 1 --神代丰
64800109 1 --神代丰的领域 香山竞马场
64800113 0 --樱花丰王
64800120 0 --深层幻夜 超天
64800129 0 --亡国的姬骑士 妮可莉娜
64800131 0 --芥川龙之介的河童之国
64800133 1 --万人要求的海盗狗
......@@ -1509,6 +1554,9 @@
64832005 1 --星光歌剧 大场奈奈
64832008 1 --星光歌剧 西条克洛迪娜
64832014 1 --星光歌剧 花柳香子Revue
64832018 1 --星光歌剧『命运』
64832019 1 --星光歌剧『迷宫』
64832021 1 --星光歌剧『孤独』
64832026 1 --『星光歌剧』台本-约定Revue
64832027 0 --『星光歌剧』台本-星醉Revue
64832031 0--『星光歌剧』台本-孤独Revue
......@@ -1557,6 +1605,7 @@
65074000 0 --缘天尊
65080043 0 --失落之妖精 艾尔兰缇娅
65080044 0 --幻想之大妖精 艾尔希萝娅
65011004 0 --时终夜的坠落者
#665
66510022 1 --铁血工造 侦察者
#669
......@@ -1569,12 +1618,16 @@
66915070 0 --星曜女神·希冀
#672
67200160 1 --天秤的裁决者 阿斯特莱雅
67200265 1 --封缄的磷使化
67200270 1 --封缄的烬燃卷
67200289 0 --封缄的愚摄公 巴罗哈曼
67200307 1 --姬狩的封缄英杰 莉莉
67200450 1 --穿行的旅者 阿娜丝塔希雅
67200533 0 --珊海环的黄金之乡
67200600 0 --征冥天的支配者
67200610 1 --征冥天的灰羽姬
67210102 0 --夏乡追忆 伊甸逐梦
67210104 0 --夏乡追忆 初遇花田
#696
69601003 0 --算命蟾蜍
69696005 0 --钟馗大神
......@@ -1704,8 +1757,12 @@
81051007 0 --田园精灵·白鸟芽衣
81057000 0 --水晶艾蕾娜
81057009 0 --水晶艾蕾娜·无意义
81066001 0 --幽言幽语 千幽
81066003 0 --万圣狂欢夜 千幽
81066004 0 --彼岸幽梦 千幽
81066013 0 --新年 千幽
81066031 2 --生日会 千幽
81066022 0 --暖心 千幽
81066031 1 --生日会 千幽
81078004 0 --不被吓个半死是不可能的
#816
81610037 1 --A.L-SHIP 大青花鱼
......
expansions/pics/50220105.jpg

16.2 KB | W: | H:

expansions/pics/50220105.jpg

82.1 KB | W: | H:

expansions/pics/50220105.jpg
expansions/pics/50220105.jpg
expansions/pics/50220105.jpg
expansions/pics/50220105.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50220110.jpg

17 KB | W: | H:

expansions/pics/50220110.jpg

92.2 KB | W: | H:

expansions/pics/50220110.jpg
expansions/pics/50220110.jpg
expansions/pics/50220110.jpg
expansions/pics/50220110.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50220115.jpg

16.9 KB | W: | H:

expansions/pics/50220115.jpg

89.9 KB | W: | H:

expansions/pics/50220115.jpg
expansions/pics/50220115.jpg
expansions/pics/50220115.jpg
expansions/pics/50220115.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50220120.jpg

17.4 KB | W: | H:

expansions/pics/50220120.jpg

93.1 KB | W: | H:

expansions/pics/50220120.jpg
expansions/pics/50220120.jpg
expansions/pics/50220120.jpg
expansions/pics/50220120.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50220125.jpg

17.8 KB | W: | H:

expansions/pics/50220125.jpg

98.4 KB | W: | H:

expansions/pics/50220125.jpg
expansions/pics/50220125.jpg
expansions/pics/50220125.jpg
expansions/pics/50220125.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50220130.jpg

18.5 KB | W: | H:

expansions/pics/50220130.jpg

98.7 KB | W: | H:

expansions/pics/50220130.jpg
expansions/pics/50220130.jpg
expansions/pics/50220130.jpg
expansions/pics/50220130.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50220135.jpg

17.4 KB | W: | H:

expansions/pics/50220135.jpg

96.7 KB | W: | H:

expansions/pics/50220135.jpg
expansions/pics/50220135.jpg
expansions/pics/50220135.jpg
expansions/pics/50220135.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50221420.jpg

18.1 KB | W: | H:

expansions/pics/50221420.jpg

100 KB | W: | H:

expansions/pics/50221420.jpg
expansions/pics/50221420.jpg
expansions/pics/50221420.jpg
expansions/pics/50221420.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50221425.jpg

16.5 KB | W: | H:

expansions/pics/50221425.jpg

87.4 KB | W: | H:

expansions/pics/50221425.jpg
expansions/pics/50221425.jpg
expansions/pics/50221425.jpg
expansions/pics/50221425.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50221430.jpg

17.5 KB | W: | H:

expansions/pics/50221430.jpg

95.8 KB | W: | H:

expansions/pics/50221430.jpg
expansions/pics/50221430.jpg
expansions/pics/50221430.jpg
expansions/pics/50221430.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50221450.jpg

15.2 KB | W: | H:

expansions/pics/50221450.jpg

76.3 KB | W: | H:

expansions/pics/50221450.jpg
expansions/pics/50221450.jpg
expansions/pics/50221450.jpg
expansions/pics/50221450.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/67200038.jpg

16.3 KB | W: | H:

expansions/pics/67200038.jpg

13.5 KB | W: | H:

expansions/pics/67200038.jpg
expansions/pics/67200038.jpg
expansions/pics/67200038.jpg
expansions/pics/67200038.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/67200043.jpg

16.9 KB | W: | H:

expansions/pics/67200043.jpg

14.2 KB | W: | H:

expansions/pics/67200043.jpg
expansions/pics/67200043.jpg
expansions/pics/67200043.jpg
expansions/pics/67200043.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400039.jpg

19.1 KB | W: | H:

expansions/pics/71400039.jpg

52.8 KB | W: | H:

expansions/pics/71400039.jpg
expansions/pics/71400039.jpg
expansions/pics/71400039.jpg
expansions/pics/71400039.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400041.jpg

14.3 KB | W: | H:

expansions/pics/71400041.jpg

35.7 KB | W: | H:

expansions/pics/71400041.jpg
expansions/pics/71400041.jpg
expansions/pics/71400041.jpg
expansions/pics/71400041.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400048.jpg

43.5 KB | W: | H:

expansions/pics/71400048.jpg

41.7 KB | W: | H:

expansions/pics/71400048.jpg
expansions/pics/71400048.jpg
expansions/pics/71400048.jpg
expansions/pics/71400048.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -3,6 +3,13 @@ if not pcall(function() require("expansions/script/c16104200") end) then require
local m,cm=rk.set(16104248)
function cm.initial_effect(c)
c:EnableReviveLimit()
--add code
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_ADD_CODE)
e0:SetValue(16104232)
c:RegisterEffect(e0)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -16,7 +16,11 @@ function cm.initial_effect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e5:SetRange(LOCATION_HAND)
e5:SetCost(function(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)
e5:SetCountLimit(1,m)
e5:SetTarget(cm.target)
e5:SetOperation(cm.operation)
......
--龙启之地的神机飞弩
local cm,m,o=GetID()
function cm.initial_effect(c)
--Inactivate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.discon)
e1:SetCost(cm.discost)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
--gain effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(cm.efcon)
e2:SetOperation(cm.efop)
c:RegisterEffect(e2)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.IsChainDisablable(ev)
end
function cm.tgf(c)
return c:IsSetCard(0x362) and c:IsType(TYPE_NORMAL) and c:IsAbleToGraveAsCost()
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.tgf,tp,LOCATION_DECK,0,nil)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:Select(tp,1,1,nil)
tg:AddCard(e:GetHandler())
Duel.SendtoGrave(tg,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function cm.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
--龙启之地的太平乐
local cm,m,o=GetID()
function cm.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x362) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetAbsoluteRange(tp,1,0)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
end
function cm.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x362)
end
--轨迹-塞莉丝·奥提希亚
local m=23100021
local cm=_G["c"..m]
function cm.initial_effect(c)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.discon)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--summon with no tribute
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SUMMON_PROC)
e4:SetCondition(cm.ntcon)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SUMMON_COST)
e5:SetOperation(cm.lvop)
c:RegisterEffect(e5)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,nil) and Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_EFFECT+REASON_DISCARD) and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function cm.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.lvcon(e)
return e:GetHandler():GetMaterialCount()==0
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CHANGE_LEVEL)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(cm.lvcon)
e0:SetValue(4)
e0:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e0)
local atk=c:GetBaseAttack()
local def=c:GetBaseDefense()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetCondition(cm.lvcon)
e1:SetValue(math.ceil(atk/2))
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(math.ceil(def/2))
c:RegisterEffect(e2)
end
\ No newline at end of file
--圣痕-赫灼印记
local m=23100022
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.con)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--change effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m+10000)
e3:SetCondition(cm.condition)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(23100021)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.thfilter(c)
return c:IsSetCard(0x3f71) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,0,2,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.repop)
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--混沌二气
local m=30005205
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e12:SetCondition(cm.handcon)
c:RegisterEffect(e12)
--Effect 2
local e32=Effect.CreateEffect(c)
e32:SetDescription(aux.Stringid(m,0))
e32:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e32:SetType(EFFECT_TYPE_QUICK_O)
e32:SetCode(EVENT_FREE_CHAIN)
e32:SetRange(LOCATION_GRAVE)
e32:SetTarget(cm.tg)
e32:SetOperation(cm.op)
c:RegisterEffect(e32)
end
--Effect 1
function cm.at(c,attr)
return c:IsFaceup() and c:IsAttribute(attr)
end
function cm.handcon(e)
local tp=e:GetHandlerPlayer()
local g1=Duel.GetMatchingGroup(cm.at,tp,LOCATION_MZONE,LOCATION_MZONE,nil,ATTRIBUTE_LIGHT)
local g2=Duel.GetMatchingGroup(cm.at,tp,LOCATION_MZONE,LOCATION_MZONE,nil,ATTRIBUTE_DARK)
return #g1>0 and #g2>0
end
function cm.f(c)
return c:IsAbleToDeck() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function cm.f1(c,e,tp,g)
local b1=c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)
local b2=c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
local b3=c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return #g>0 and Duel.GetMZoneCount(tp,g)>0 and b1 and b2 and b3
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetMatchingGroup(cm.f,tp,LOCATION_MZONE,0,nil)
local g2=Duel.GetMatchingGroup(cm.f,tp,0,LOCATION_MZONE,nil)
local g3=Duel.GetMatchingGroup(cm.f1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp,g1)
local g4=Duel.GetMatchingGroup(cm.f1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,nil,e,1-tp,g2)
local b1=#g3>0 and #g2==0
local b2=#g4>0 and #g1==0
local b3=#g3>0 and #g4>0
if chk==0 then return b1 or b2 or b3 end
if b1 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
if b2 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
Group.Merge(g1,g2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,#g1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(cm.f,tp,LOCATION_MZONE,0,nil)
local g2=Duel.GetMatchingGroup(cm.f,tp,0,LOCATION_MZONE,nil)
local g3=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.f1),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp,g1)
local g4=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.f1),tp,0,LOCATION_GRAVE+LOCATION_REMOVED,nil,e,1-tp,g2)
local b1=#g3>0 and #g2==0
local b2=#g4>0 and #g1==0
local b3=#g3>0 and #g4>0
if b1 or b2 or b3 then
local g3=g1+g2
--Debug.Message(#g3)
if Duel.SendtoDeck(g3,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return false end
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if #og==0 then return end
local tg1=og:Filter(Card.IsControler,nil,tp)
local tg2=og:Filter(Card.IsControler,nil,1-tp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
if #tg1>0 then
local ct=#tg1
if #tg1>=ft1 then ct=ft1 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.f1),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,ct,nil,e,tp,tg1)
if #sg==0 then return end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
if #tg2>0 then
local ct=#tg2
if #tg2>=ft2 then ct=ft2 end
if Duel.IsPlayerAffectedByEffect(1-tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(1-tp,aux.NecroValleyFilter(cm.f1),tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,ct,nil,e,1-tp,tg2)
if #sg==0 then return end
Duel.SpecialSummon(sg,0,1-tp,1-tp,false,false,POS_FACEUP)
end
end
end
--Effect 2
function cm.tf(c)
return c:IsAbleToHand() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler()
local g1=Duel.GetMatchingGroup(cm.tf,tp,LOCATION_GRAVE,0,nil)
local g2=Duel.GetMatchingGroup(cm.tf,tp,0,LOCATION_GRAVE,nil)
local b1=ec:GetFlagEffect(m)==0 and ec:IsAbleToDeck()
local b2=#g1>0 and #g2>0
if chk==0 then return b1 and b2 end
ec:RegisterFlagEffect(m,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,ec,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.tf),tp,LOCATION_GRAVE,0,nil)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.tf),tp,0,LOCATION_GRAVE,nil)
if #g1==0 or #g2==0 or not c:IsRelateToEffect(e) then return end
if Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) and c:IsLocation(LOCATION_DECK) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=g1:Select(tp,1,1,nil):GetFirst()
if Duel.SendtoHand(tc,nil,REASON_EFFECT)==0 then return end
Duel.ConfirmCards(1-tp,tc)
if tc and tc:IsLocation(LOCATION_HAND) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local tcc=g2:Select(1-tp,1,1,nil):GetFirst()
if Duel.SendtoHand(tcc,nil,REASON_EFFECT)==0 then return end
Duel.ConfirmCards(tp,tcc)
end
end
end
\ No newline at end of file
--混沌病毒·胞核
local m=30900700
local cm=_G["c"..m]
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon2)
e2:SetTarget(cm.ovtg)
e2:SetOperation(cm.ovop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_XMATERIAL)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(500)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_XMATERIAL)
e1:SetCode(EFFECT_ATTACK_ALL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function cm.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.ovfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(cm.ovfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler())
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.ovfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function cm.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
Duel.GetControl(tc,tp)
end
end
--混沌病毒·核酸
local m=30900701
local cm=_G["c"..m]
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon2)
e2:SetTarget(cm.ovtg)
e2:SetOperation(cm.ovop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_XMATERIAL)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(500)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCondition(cm.discon)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function cm.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.ovfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(cm.ovfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler())
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.ovfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function cm.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
Duel.GetControl(tc,tp)
end
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xc87) and c:IsControler(tp)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetAttackTarget()
if not c then return false end
if c:IsControler(1-tp) then c=Duel.GetAttacker() end
return c and cm.cfilter(c,tp)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttackTarget()
if tc:IsControler(tp) then tc=Duel.GetAttacker() end
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
Duel.AdjustInstantly(c)
end
\ No newline at end of file
--混沌病毒·蛋白
local m=30900702
local cm=_G["c"..m]
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon2)
e2:SetTarget(cm.ovtg)
e2:SetOperation(cm.ovop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_XMATERIAL)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(500)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_XMATERIAL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function cm.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.ovfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(cm.ovfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler())
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.ovfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function cm.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
Duel.GetControl(tc,tp)
end
end
--混沌病毒·线粒体
local m=30900703
local cm=_G["c"..m]
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon2)
e2:SetTarget(cm.ovtg)
e2:SetOperation(cm.ovop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_BATTLED)
e3:SetCondition(cm.rmcon)
e3:SetTarget(cm.rmtg)
e3:SetOperation(cm.rmop)
c:RegisterEffect(e3)
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function cm.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.ovfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(cm.ovfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler())
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.ovfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end
function cm.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
Duel.GetControl(tc,tp)
end
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
e:SetLabelObject(bc)
return bc and bc:IsStatus(STATUS_OPPO_BATTLE) and bc:IsRelateToBattle()
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetLabelObject(),1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc:IsRelateToBattle() and bc:IsControler(1-tp) then
Duel.Remove(bc,POS_FACEUP,REASON_EFFECT)
end
end
--混沌病毒·伊布里斯
local m=30900704
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),1,2,cm.ovfilter)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCountLimit(1,m)
e5:SetRange(LOCATION_MZONE)
e5:SetCost(cm.thcost)
e5:SetTarget(cm.thtg)
e5:SetOperation(cm.thop)
c:RegisterEffect(e5)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.atkval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,m+m)
e3:SetCondition(cm.thcon2)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.filter(c)
return c:IsSetCard(0xc87)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayGroup():IsExists(cm.filter,1,nil)
end
function cm.thcost(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.thfilter(c)
return c:IsSetCard(0xc87) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.atkfilter(c)
return c:IsType(TYPE_XYZ) and c:GetAttack()>=0
end
function cm.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(cm.atkfilter,nil)
return g:GetSum(Card.GetAttack)
end
function cm.spfilter(c)
return c:IsFaceup() and c:IsCanOverlay()
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.spfilter(chkc) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,cm.spfilter,tp,0,LOCATION_MZONE,1,1,nil)
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()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)~=0
and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(tc))
end
end
--混沌病毒·美比特
local m=30900705
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),1,2,cm.ovfilter)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetCountLimit(1,m)
e5:SetRange(LOCATION_MZONE)
e5:SetCost(cm.thcost)
e5:SetTarget(cm.target)
e5:SetOperation(cm.activate)
c:RegisterEffect(e5)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.atkval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,m+m)
e3:SetCondition(cm.thcon2)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.filter(c)
return c:IsSetCard(0xc87)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayGroup():IsExists(cm.filter,1,nil)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0xc87) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,exc)
and Duel.SelectYesNo(tp,aux.Stringid(55749927,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,0,1,1,exc)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function cm.atkfilter(c)
return c:IsType(TYPE_XYZ) and c:GetAttack()>=0
end
function cm.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(cm.atkfilter,nil)
return g:GetSum(Card.GetAttack)
end
function cm.spfilter(c)
return c:IsFaceup() and c:IsCanOverlay()
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.spfilter(chkc) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,cm.spfilter,tp,0,LOCATION_MZONE,1,1,nil)
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()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)~=0
and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(tc))
end
end
--混沌病毒·黑暗
local m=30900706
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),1,2,cm.ovfilter)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCountLimit(1,m)
e5:SetRange(LOCATION_MZONE)
e5:SetCost(cm.thcost)
e5:SetTarget(cm.destg)
e5:SetOperation(cm.desop)
c:RegisterEffect(e5)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.atkval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,m+m)
e3:SetCondition(cm.thcon2)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.filter(c)
return c:IsSetCard(0xc87)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayGroup():IsExists(cm.filter,1,nil)
end
function cm.thcost(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.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc87)
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,e:GetHandler())
and Duel.IsExistingTarget(aux.TRUE,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,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end
function cm.desop(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
Duel.Destroy(g,REASON_EFFECT)
end
end
function cm.atkfilter(c)
return c:IsType(TYPE_XYZ) and c:GetAttack()>=0
end
function cm.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(cm.atkfilter,nil)
return g:GetSum(Card.GetAttack)
end
function cm.spfilter(c)
return c:IsFaceup() and c:IsCanOverlay()
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.spfilter(chkc) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,cm.spfilter,tp,0,LOCATION_MZONE,1,1,nil)
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()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)~=0
and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(tc))
end
end
--混沌病毒·绝望
local m=30900707
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),1,4)
c:EnableReviveLimit()
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SUMMON)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.condition2)
e2:SetCost(cm.cost2)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.operation2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(m,2))
e3:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCondition(cm.spcon)
e5:SetTarget(cm.sptg)
e5:SetOperation(cm.spop)
c:RegisterEffect(e5)
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0xc87)
end
function cm.cost2(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.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:GetOverlayCount()>0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.desfilter(c)
return c:IsSetCard(0xc87) and c:IsType(TYPE_MONSTER)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.SelectYesNo(tp,aux.Stringid(55749927,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
end
--混沌病毒·增值
local m=30900708
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)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(cm.spcon)
e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_START)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m+m)
e3:SetCondition(cm.descon)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function cm.filter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xc87) and c:IsLocation(LOCATION_MZONE)
end
function cm.filter1(c,e,tp)
return c:IsSetCard(0xc87) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=eg:Filter(cm.filter,nil,tp)
local ct=g:GetCount()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_DECK,0,nil,e,tp)
if ft<1 or ct<1 or g:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
e:SetLabelObject(tc)
return tc and tc:IsFaceup() and tc:IsSetCard(0xc87)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return bc end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc:IsRelateToBattle() and bc:IsControler(tp) then
Duel.Destroy(bc,REASON_EFFECT)
end
end
\ No newline at end of file
--混沌病毒·实验室
local m=30900709
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(cm.descon)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.thfilter1(c)
return not c:IsType(TYPE_FIELD) and c:IsSetCard(0xc87) and c:IsAbleToHand()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.thfilter1,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function cm.desfilter(c)
return c:IsSetCard(0xc87) and c:IsType(TYPE_MONSTER) and not c:IsCode(m)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_DECK,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function cm.filter(c,e,tp)
return (c:IsSetCard(0xc87) or c:IsType(TYPE_XYZ)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE,1-tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local ct=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
if ct>2 then ct=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,ct,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==0 then return end
if g:GetCount()>ft or (g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end
Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_DEFENSE)
end
--混沌病毒·感染
local m=30900710
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(aux.bfgcost)
e2:SetCountLimit(1,m+m)
e2:SetTarget(cm.target1)
e2:SetOperation(cm.activate1)
c:RegisterEffect(e2)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,0xc87) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND,0,1,1,nil,0xc87)
if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then
Duel.Draw(p,d,REASON_EFFECT)
end
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0xc87)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end
function cm.activate1(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.Destroy(tg,REASON_EFFECT)
end
end
--混沌病毒·最后的呻吟
local m=30900711
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(cm.xyztg)
e1:SetOperation(cm.xyzop)
c:RegisterEffect(e1)
end
function cm.filter1(c,e,tp)
return c:IsLevel(1) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.filter2(c)
return c:IsFaceup() and c:IsLevelAbove(1)
end
function cm.fselect(sg,tp)
local mg=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_MZONE,0,nil)
mg:Merge(sg)
return mg:CheckSubGroup(cm.matfilter,1,#mg,tp,sg)
end
function cm.matfilter(sg,tp,g)
if sg:Filter(aux.IsInGroup,nil,g):GetCount()~=g:GetCount() then return false end
return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,sg)
end
function cm.xyzfilter(c,mg)
return c:IsSetCard(0xc87) and c:IsXyzSummonable(mg,#mg,#mg)
end
function cm.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_GRAVE,0,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>4 then ft=4 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,4)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and mg:CheckSubGroup(cm.fselect,1,ft,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
end
function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
local ssg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
if Duel.Destroy(ssg,REASON_EFFECT) then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if not Duel.IsPlayerCanSpecialSummonCount(tp,4) or ft<=0 then return end
if ft>4 then ft=4 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local mg=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_GRAVE,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=mg:SelectSubGroup(tp,cm.fselect,false,1,ft,tp)
if not g then return end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
Duel.AdjustAll()
if g:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<#g then return end
local exg=Duel.GetMatchingGroup(cm.xyzfilter2,tp,LOCATION_EXTRA,0,nil)
local xyzg=exg:Filter(cm.ovfilter,nil,tp,g)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
local fg=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_MZONE,0,nil)
local sg=fg:SelectSubGroup(tp,cm.gselect,false,1,7,xyz,g)
Duel.XyzSummon(tp,xyz,sg)
end
end
end
function cm.xyzfilter2(c)
return c:IsSetCard(0xc87)
end
function cm.ovfilter(c,tp,sg)
local mg=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_MZONE,0,nil)
mg:Merge(sg)
return mg:CheckSubGroup(cm.gselect,1,#mg,c,sg)
end
function cm.gselect(sg,c,g)
if sg:Filter(aux.IsInGroup,nil,g):GetCount()~=g:GetCount() then return false end
return c:IsXyzSummonable(sg,#sg,#sg)
end
--混沌病毒·炸弹
local m=30900712
local cm=_G["c"..m]
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(cm.thcon2)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCountLimit(1,17946350)
e2:SetCondition(cm.effcon)
e2:SetOperation(cm.effop)
c:RegisterEffect(e2)
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT)
end
function cm.desfilter(c)
return c:IsType(TYPE_MONSTER)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xc87) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE,0,nil)
local n=Duel.Destroy(g,REASON_EFFECT)+1
if n~=0 then
local tg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
ct=math.min(ct,n)
if ct>0 and tg:GetCount()>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=tg:Select(tp,1,ct,nil)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 then
local sg2=Duel.GetOperatedGroup()
local fid=e:GetHandler():GetFieldID()
local tc=sg2:GetFirst()
while tc do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0,fid)
tc=sg2:GetNext()
end
sg2:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(sg2)
e1:SetCondition(cm.descon2)
e1:SetOperation(cm.desop2)
Duel.RegisterEffect(e1,tp)
end
end
end
end
function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_XYZ)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and e:GetHandler():GetReasonCard():IsSetCard(0xc87)
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.discon)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and Duel.IsChainDisablable(ev)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--潮涌结晶 海洋之心
local s,id,o=GetID()
Mermaid_VHisc=Mermaid_VHisc or {}
function s.initial_effect(c)
--cannot special summon
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e3)
--set spell
-- local e0=Effect.CreateEffect(c)
-- e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
-- e0:SetCode(EVENT_FREE_CHAIN)
-- e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SET_AVAILABLE)
-- e0:SetRange(LOCATION_EXTRA)
-- e0:SetCondition(s.tgcon)
-- e0:SetOperation(s.tgop)
-- c:RegisterEffect(e0)
-----------------change for 222------------------
--special summon rule
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(s.exspcon)
e0:SetOperation(s.exspop)
c:RegisterEffect(e0)
--set spell
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(s.exstcon)
e4:SetOperation(s.exstop)
c:RegisterEffect(e4)
-----------------change for 222------------------
--fusion
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.fstg)
e1:SetOperation(s.fsop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetOperation(s.regop)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_MOVE)
ge1:SetCondition(s.checkcon)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
---------------monster effect-------------------
function s.exspcon(e,c)
if c==nil then return true end
local sp=c:GetControler()
return Duel.IsExistingMatchingCard(s.relfilter,sp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil)
end
function s.exspop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.relfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
c:SetMaterial(g)
Duel.Release(g,REASON_COST)
end
function s.exstcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
function s.exstop(e,tp,eg,ep,ev,re,r,rp,c)
if e:GetHandler():IsLocation(LOCATION_MZONE) then
Mermaid_VHisc.sp(e:GetHandler(),tp)
end
end
--move check
function s.ckfilter(c)
return c:GetOriginalType()&TYPE_MONSTER~=0 and c:IsLocation(LOCATION_SZONE)
end
function s.checkcon(e,tp,eg,ep,ev,re,r,rp)
if c==nil then return true end
return eg:Filter(s.ckfilter,nil):GetCount()>0
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp,c)
local fg=eg:Filter(s.ckfilter,nil)
for tc in aux.Next(fg) do
if tc:IsPreviousLocation(LOCATION_MZONE) then
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
Duel.RaiseEvent(tc,EVENT_CUSTOM+33201150,re,r,rp,ep,ev)
end
end
--set spell
function s.relfilter(c)
return c.VHisc_Mermaid and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
end
function s.tgcon(e,c)
if c==nil then return true end
local sp=e:GetHandler():GetControler()
return Duel.GetLocationCount(sp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.relfilter,sp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.GetTurnPlayer()==sp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local tp=c:GetControler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.relfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_CARD,1-tp,id)
if Duel.Release(g,REASON_COST)~=0 then
Mermaid_VHisc.sp(c,tp)
end
end
--fusion
function s.filter0(c,e)
return c:IsCanBeFusionMaterial() and c:IsFusionType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)
end
function s.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c.VHisc_Mermaid
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
mg1:Merge(Duel.GetMatchingGroup(s.filter0,tp,LOCATION_SZONE,0,nil,e))
local res=Duel.IsExistingMatchingCard(s.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(s.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 s.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
mg1:Merge(Duel.GetMatchingGroup(s.filter0,tp,LOCATION_SZONE,0,nil,e))
local sg1=Duel.GetMatchingGroup(s.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(s.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
--recover and to extra
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_GRAVE)
e1:SetTarget(s.tdtg)
e1:SetOperation(s.tdop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Recover(tp,500,REASON_EFFECT) then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
---------------Functions and FilterS--------------------
function Mermaid_VHisc.sp(sc,sp)
Duel.MoveToField(sc,sp,sp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(sc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_CONTINUOUS+TYPE_SPELL)
sc:RegisterEffect(e1,true)
end
--gain effect
function Mermaid_VHisc.fgck(fc,code)
return fc:GetFlagEffect(code+10000)==0
end
function Mermaid_VHisc.flagc(fc,code)
if fc:GetFlagEffect(code+10000)==0 then
fc:RegisterFlagEffect(code+10000,RESET_EVENT+(RESETS_STANDARD-RESET_TOFIELD-RESET_LEAVE)+RESET_OVERLAY,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(code,3))
end
end
function Mermaid_VHisc.effcon(e,tp,eg,ep,ev,re,r,rp)
local sc=e:GetHandler():GetReasonCard()
return bit.band(r,REASON_FUSION)~=0 and sc.VHisc_Mermaid
end
function Mermaid_VHisc.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local code=e:GetLabel()
local e2=e:GetLabelObject():Clone()
e2:SetReset(RESET_EVENT+(RESETS_STANDARD-RESET_TOFIELD-RESET_LEAVE)+RESET_OVERLAY)
rc:RegisterEffect(e2,true)
if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+(RESETS_STANDARD-RESET_MSCHANGE)+RESET_OVERLAY)
rc:RegisterEffect(e3,true)
end
if rc:GetFlagEffect(code)==0 then
rc:RegisterFlagEffect(code,RESET_EVENT+(RESETS_STANDARD-RESET_TOFIELD-RESET_LEAVE)+RESET_OVERLAY,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(c:GetCode(),0))
end
end
--fusion toextra
function Mermaid_VHisc.ftdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(33201150)~=0
end
--set effect
function Mermaid_VHisc.setef(ec,code)
local e2=Effect.CreateEffect(ec)
e2:SetDescription(aux.Stringid(33201150,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_RELEASE)
e2:SetCountLimit(1,code)
e2:SetTarget(Mermaid_VHisc.settg)
e2:SetOperation(Mermaid_VHisc.setop)
ec:RegisterEffect(e2)
end
function Mermaid_VHisc.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsPreviousLocation(LOCATION_HAND) end
end
function Mermaid_VHisc.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsRelateToEffect(e) then
Mermaid_VHisc.sp(e:GetHandler(),tp)
end
end
--蚀刻圣骑重启
local s,id,o=GetID()
VHisc_Paladin=VHisc_Paladin or {}
function s.initial_effect(c)
VHisc_Paladin.dthef(c,id)
VHisc_Paladin.addcheck(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id+10000)
e1:SetTarget(s.tg)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
--act in hand
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e4:SetCondition(s.handcon)
c:RegisterEffect(e4)
end
s.VHisc_RustyPaladin=true
function s.ft(c)
return c:IsPublic() and c.VHisc_RustyPaladin
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.ft,tp,LOCATION_HAND,0,1,nil,e,tp) end
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.ft,tp,LOCATION_HAND,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.ft,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local code=tc:GetCode()
local ccode=_G["c"..code]
Duel.ShuffleHand(tp)
Duel.BreakEffect()
ccode.efspop(e,tc,tp)
end
end
function s.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_SZONE,0)==0
end
---------------Functions and Filters--------------------
-----------this is a global destory check------------------
function VHisc_Paladin.addcheck(c)
if not VHisc_Paladin.global_check then
VHisc_Paladin.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED)
ge1:SetOperation(VHisc_Paladin.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_DESTROYED)
ge2:SetCondition(VHisc_Paladin.regcon)
ge2:SetOperation(VHisc_Paladin.regop)
Duel.RegisterEffect(ge2,0)
end
end
----------------------functions------------------------------
function VHisc_Paladin.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) then
tc:RegisterFlagEffect(33201200,RESET_EVENT+0x1f20000+RESET_PHASE+PHASE_END,0,1)
elseif tc:IsLocation(LOCATION_EXTRA) then
tc:RegisterFlagEffect(33201200,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
tc=eg:GetNext()
end
end
function VHisc_Paladin.spcfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c.VHisc_RustyPaladin
and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function VHisc_Paladin.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(VHisc_Paladin.spcfilter,1,nil,0) then v=v+1 end
if eg:IsExists(VHisc_Paladin.spcfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function VHisc_Paladin.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+33201200,re,r,rp,ep,e:GetLabel())
end
--Register destory_to_hand effect
function VHisc_Paladin.dthef(ce,cid)
local e2=Effect.CreateEffect(ce)
e2:SetDescription(aux.Stringid(33201200,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CUSTOM+33201200)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,cid+10000)
e2:SetCondition(VHisc_Paladin.dthcon)
e2:SetTarget(VHisc_Paladin.dthtg)
e2:SetOperation(VHisc_Paladin.dthop)
ce:RegisterEffect(e2)
end
function VHisc_Paladin.dthcon(e,tp,eg,ep,ev,re,r,rp)
return ev==tp or ev==PLAYER_ALL and not eg:IsContains(e:GetHandler())
end
function VHisc_Paladin.dthtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() and not eg:IsContains(e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function VHisc_Paladin.dthop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
-----------------------global check end---------------------------------
--Register delay effect
function VHisc_Paladin.delayef(ce,cid,time,efcate)
local e1=Effect.CreateEffect(ce)
e1:SetDescription(aux.Stringid(33201200,0))
e1:SetCategory(0x200+efcate)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetLabel(cid,time)
e1:SetCountLimit(1,cid)
e1:SetCondition(VHisc_Paladin.dycon)
e1:SetTarget(VHisc_Paladin.dytg)
e1:SetOperation(VHisc_Paladin.dyop)
ce:RegisterEffect(e1)
end
function VHisc_Paladin.dycon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and not e:GetHandler():IsPublic()
end
function VHisc_Paladin.dytg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function VHisc_Paladin.dyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid,time=e:GetLabel()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_CHAINING)
e2:SetLabel(cid,time)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetOperation(VHisc_Paladin.efckop)
c:RegisterEffect(e2)
end
function VHisc_Paladin.efckop(e,tp,eg,ep,ev,re,r,rp)
local cid,time=e:GetLabel()
local c=e:GetHandler()
local cs=_G["c"..cid]
if c:IsPublic() then c:RegisterFlagEffect(cid,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,fid,66) end
if c:GetFlagEffect(cid)>=time then
Duel.Hint(HINT_CARD,tp,cid)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
cs.efspop(e,c,tp)
end
e:Reset()
end
end
--Register atk down effect
function VHisc_Paladin.atkdef(ce)
local e2=Effect.CreateEffect(ce)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(VHisc_Paladin.atkdcon)
e2:SetTarget(VHisc_Paladin.atkdtg)
e2:SetOperation(VHisc_Paladin.atkdop)
ce:RegisterEffect(e2)
end
function VHisc_Paladin.atkdcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(function(c,tp) return c:IsControler(1-tp) end,1,nil,tp)
end
function VHisc_Paladin.atkdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsFaceup() and not e:GetHandler():IsAttack(0) end
end
function VHisc_Paladin.atkdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsFaceup() and c:IsRelateToEffect(e) and not c:IsAttack(0) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-500)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(-500)
c:RegisterEffect(e2)
if c:IsAttack(0) then Duel.Destroy(c,REASON_EFFECT) end
end
\ No newline at end of file
--蚀刻圣骑 从骑菲奥娜
local s,id,o=GetID()
Duel.LoadScript("c33201200.lua")
function s.initial_effect(c)
VHisc_Paladin.dthef(c,id)
VHisc_Paladin.addcheck(c)
--synchro summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(s.syncon)
e1:SetTarget(s.syntg)
e1:SetOperation(s.synop)
c:RegisterEffect(e1)
end
s.VHisc_RustyPaladin=true
--e1
function s.syncon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function s.synfilter(c,tp,mc)
local mg=Group.FromCards(c,mc)
return c:IsFaceup() and c.VHisc_RustyPaladin and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg)
end
function s.syntg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.synfilter(chkc,tp,c) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(s.synfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.synfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,2,tp,LOCATION_EXTRA)
end
function s.synop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
Duel.AdjustAll()
local mg=Group.FromCards(c,tc)
if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end
end
--蚀刻圣骑 修士伯纳多
local m=33201202
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+100)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
cm.VHisc_RustyPaladin=true
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_ONFIELD)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,1-tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 or g2:GetCount()>0 then
local g1=g+g2
Duel.HintSelection(g1)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
end
end
function cm.check(c)
return c.VHisc_RustyPaladin and c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Duel.GetMatchingGroup(cm.check,tp,LOCATION_GRAVE,0,e:GetHandler())
if chk==0 then return sg:GetCount()>=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=sg:Select(tp,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local fid=c:GetFieldID()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetLabelObject(c)
e1:SetLabel(fid)
e1:SetCountLimit(1)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.retcon(e,tp)
local c = e:GetLabelObject()
if c:GetFlagEffectLabel(m) == e:GetLabel() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return true
else
e:Reset()
return false
end
end
function cm.retop(e,tp)
local c = e:GetLabelObject()
Duel.Hint(HINT_CARD,0,m)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
e:Reset()
end
\ No newline at end of file
--蚀刻圣骑 剑士弗格斯
local s,id,o=GetID()
Duel.LoadScript("c33201200.lua")
function s.initial_effect(c)
VHisc_Paladin.delayef(c,id,5,0x0)
VHisc_Paladin.atkdef(c)
end
s.VHisc_RustyPaladin=true
--e1
function s.xyzfilter(c)
return c.VHisc_RustyPaladin and c:IsXyzSummonable(nil)
end
function s.efspop(e,c,tp)
if Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_CARD,tp,id)
local g=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
end
--蚀刻圣骑 夜骑赫查特
local s,id,o=GetID()
Duel.LoadScript("c33201200.lua")
function s.initial_effect(c)
VHisc_Paladin.delayef(c,id,5,0x0)
VHisc_Paladin.atkdef(c)
end
s.VHisc_RustyPaladin=true
--e1
function s.smfilter(c,e,tp)
return c.VHisc_RustyPaladin and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.efspop(e,c,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.smfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_CARD,tp,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.smfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--蚀刻圣骑 教士克兰麦
local s,id,o=GetID()
Duel.LoadScript("c33201200.lua")
function s.initial_effect(c)
VHisc_Paladin.delayef(c,id,5,0x20000+0x8)
VHisc_Paladin.atkdef(c)
end
s.VHisc_RustyPaladin=true
--e1
function s.filter(c)
return c.VHisc_RustyPaladin and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function s.efspop(e,c,tp)
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_CARD,tp,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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
end
--蚀刻圣骑 圣女特丽莎
local s,id,o=GetID()
Duel.LoadScript("c33201200.lua")
function s.initial_effect(c)
VHisc_Paladin.delayef(c,id,5,0x20000+0x8)
VHisc_Paladin.atkdef(c)
end
s.VHisc_RustyPaladin=true
--e1
function s.thfilter(c,code)
return c.VHisc_RustyPaladin and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(code)
end
function s.exfilter(c,tp)
return c.VHisc_RustyPaladin and c:IsType(TYPE_MONSTER) and not c:IsPublic() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function s.efspop(e,c,tp)
if Duel.IsExistingMatchingCard(s.exfilter,tp,LOCATION_HAND,0,1,nil,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_CARD,tp,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local exc=Duel.SelectMatchingCard(tp,s.exfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst()
Duel.ConfirmCards(1-tp,exc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,exc:GetCode())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--蚀刻圣骑 尖刺布鲁图斯
local s,id,o=GetID()
Duel.LoadScript("c33201200.lua")
function s.initial_effect(c)
VHisc_Paladin.delayef(c,id,5,0x1)
VHisc_Paladin.atkdef(c)
end
s.VHisc_RustyPaladin=true
--e1
function s.exfilter(c)
return c.VHisc_RustyPaladin and not c:IsPublic()
end
function s.efspop(e,c,tp)
if Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(s.exfilter,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_CARD,tp,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local exc=Duel.SelectMatchingCard(tp,s.exfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
Duel.ConfirmCards(1-tp,exc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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