Commit e4fcab71 authored by Tachibana's avatar Tachibana

hole

parent 3a4ca3a4
...@@ -29,8 +29,20 @@ ...@@ -29,8 +29,20 @@
10940000 10940000
10940001 10940001
10940003 10940003
11800066
12031001
12031002
12031003
12031004
12031005
12031006
#extra #extra
111017 111017
170006 170006
10909013 10909013
12031000
12031010
12031011
12031012
12031013
!side !side
#created by ... #created by ...
#main #main
11800001 12300000
11800002 12300001
11800003 12300003
11800004 12300005
11800005 12300008
11800009 12300009
11800011 12300014
11800012 12300105
11800013 12300112
11800014 12300205
11800015 12300209
11800016 14142001
11800050 14142002
11800051 14142003
11800052 14142004
11800053 14142005
11800054 14142006
11800055 14142007
11800056 14142009
11800057 14142011
11800058 14142012
11800059 14142101
11800060 14142102
11800061 14142103
11800062 14142104
11800063 14142105
11800064 14142106
11800065 14142107
11800066 14142108
12031001
12031002
12031003
12031004
12031005
12031006
#extra #extra
11800006 12300007
11800007 12300101
11800008 12300109
11800010 12300115
11800017 14142008
11800018 14142010
11800019 14142013
11800020 14142014
12031000 14142015
12031010 14142016
12031011
12031012
12031013
!side !side
#created by ... #created by ...
#main #main
12300000 15000541
12300001 15000542
12300003 15000543
12300005 15000547
12300008 15000548
12300009 15000549
12300014 15000550
12300105 15000555
12300112 15000720
12300205 15000722
12300209 15000724
14142001 15000726
14142002 15000728
14142003 15000740
14142004 15000742
14142005 15000744
14142006 15000746
14142007 15000748
14142009 18016001
14142011 18016002
14142012 18016003
14142101 18016004
14142102 18016005
14142103 18016006
14142104 18016007
14142105 18016008
14142106 18016009
14142107 18016010
14142108 18016011
18016012
18016013
18016018
18016019
18016020
18016021
18016022
#extra #extra
12300007 15000540
12300101 15000544
12300109 15000546
12300115 15000730
14142008 15000732
14142010 18016014
14142013 18016015
14142014 18016016
14142015 18016017
14142016
!side !side
#created by ... #created by ...
#main #main
15000541 20100300
15000542 20100304
15000543 20100308
15000547 20100312
15000548 20100316
15000549 20100320
15000550 20100324
15000555 20100328
15000720 20100332
15000722 20100336
15000724 20100340
15000726 20100344
15000728 20100348
15000740 20100352
15000742 20100397
15000744 20100417
15000746 20100419
15000748 20100421
18016001 20100423
18016002 20100425
18016003 20100427
18016004 20100429
18016005 20100431
18016006 21520123
18016007 21520187
18016008 26806014
18016009 26812015
18016010 26812016
18016011
18016012
18016013
18016018
18016019
18016020
18016021
18016022
#extra #extra
15000540 20100356
15000544 20100360
15000546 20100364
15000730 20100368
15000732 20100372
18016014 20100376
18016015 20100380
18016016 20100384
18016017 20100388
20100392
20100396
!side !side
21520097
21520235
26804025
30000620
30000625
#created by ... #created by ...
#main #main
20100300 33200059
20100304 33200063
20100308 33200069
20100312 33310607
20100316 33501401
20100320 33501402
20100324 33501403
20100328 33501404
20100332 33501405
20100336 33501406
20100340 33501431
20100344 33501432
20100348 33501433
20100352 37900001
20100397 37900002
20100417 37900003
20100419 37900004
20100421 37900005
20100423 37900096
20100425 37900097
20100427 37900098
20100429 37900099
20100431 40008450
21520123 40008544
21520187 40008555
26806014 40009510
26812015 40009512
26812016 40009516
30000005 40009520
30000051 40009524
30000053
30000480
#extra #extra
20100356 33200027
20100360 33200029
20100364 33200054
20100368 33200055
20100372 33200056
20100376 33200057
20100380 33200073
20100384 33380000
20100388 33380001
20100392
20100396
!side !side
21520097 33501407
21520235 33501409
26804025 33501411
30000430 33501413
30000620 33501415
30000625 33501417
30000650 40008547
30000655 40009286
40009491
40009514
40009518
40009526
40009545
#created by ... #created by ...
#main #main
33200059 50218505
33200063 50218510
33200069 50218515
33310607 50218520
33501301 50218525
33501302 50218530
33501303 50218575
33501304 50218580
33501305 50218585
33501306 50218590
33501310 50218595
33501311 50218599
33501401 50218605
33501402 50218610
33501403 50218615
33501404 50218620
33501405 50218625
33501406 50218630
33501431 50218635
33501432 50218675
33501433 50218680
37900001 50218685
37900002 50218690
37900003 50220105
37900004 50220135
37900005 50220140
37900096
37900097
37900098
37900099
40008450
40008544
40008555
40009510
40009512
40009516
40009520
40009524
#extra #extra
33200027 50218535
33200029 50218540
33200054 50218545
33200055 50218550
33200056 50218555
33200057 50218560
33200073 50218565
33380000 50218570
33380001 50218640
33501307 50218645
33501308 50218650
33501309 50218655
50218660
50218665
50218670
!side !side
33501407 50220110
33501409 50220115
33501411 50220120
33501413 50220125
33501415 50220130
33501417
40008547
40009286
40009491
40009514
40009518
40009526
40009545
#created by ... #created by ...
#main #main
50218505 61000011
50218510 61000030
50218515 61000031
50218520 64800074
50218525 72412160
50218530 72412180
50218575 72412210
50218580 75646560
50218585 81005017
50218590 81005068
50218595 81008098
50218599 81011007
50218605 81011086
50218610 81013066
50218615 81013085
50218620 81013086
50218625 81013087
50218630 81013090
50218635 81019014
50218675 81019044
50218680 81019045
50218685 81019053
50218690 81019054
50220105 81019055
50220135 81019056
50220140 81019057
81019058
81019060
81019061
81019062
81040068
81040069
81044034
81048006
#extra #extra
50218535 61000041
50218540 64800026
50218545 64800080
50218550 75646555
50218555
50218560
50218565
50218570
50218640
50218645
50218650
50218655
50218660
50218665
50218670
!side !side
50220110 81005040
50220115 81005044
50220120 81005045
50220125 81005046
50220130 81005077
81005078
81009024
81011037
81013083
81013084
81013088
81013089
81019055
81022057
#created by ...
#main
61000011
61000030
61000031
64800074
72412160
72412180
72412210
75646560
81005017
81005068
81008098
81011007
81011086
81013066
81013085
81013086
81013087
81013090
81019014
81019044
81019045
81019053
81019054
81019055
81019056
81019057
81019058
81019060
81019061
81019062
81040068
81040069
81044034
81048006
#extra
61000041
64800026
64800080
75646555
!side
81005040
81005044
81005045
81005046
81005077
81005078
81009024
81011037
81013083
81013084
81013088
81013089
81019055
81022057
No preview for this file type
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#1 #1
00113217 1 --小红花 00113217 1 --小红花
00119002 1 --MS-06S 夏亚专用-扎古II 00119002 0 --MS-06S 夏亚专用-扎古II
00119006 1 --海帕杰顿-完全体 00119006 1 --海帕杰顿-完全体
#7 #7
00710236 0 --圣遗物-支配之镰 00710236 0 --圣遗物-支配之镰
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
01150039 0 --雪月华舞·怜 01150039 0 --雪月华舞·怜
01150041 0 --蓝色世界 01150041 0 --蓝色世界
01150042 0 --红色世界 01150042 0 --红色世界
01156007 0 --门前的妖怪小姑娘
01156024 0 --接近神的蝴蝶妖精 01156024 0 --接近神的蝴蝶妖精
01160006 0 --混沌形态·爱丽丝 01160006 0 --混沌形态·爱丽丝
01160011 0 --夏日舞曲·辛德瑞拉 01160011 0 --夏日舞曲·辛德瑞拉
...@@ -160,7 +161,6 @@ ...@@ -160,7 +161,6 @@
11700016 0 --ZEON-扎古II·S赤色彗星 11700016 0 --ZEON-扎古II·S赤色彗星
11700018 1 --ZEON的军魂 11700018 1 --ZEON的军魂
#118 #118
11800016 0 --外界之理
11800066 1 --蛮夺的指挥 11800066 1 --蛮夺的指挥
#120 #120
12001006 2 --六曜的占星 12001006 2 --六曜的占星
...@@ -568,12 +568,6 @@ ...@@ -568,12 +568,6 @@
29065595 0 --双龙呼争 29065595 0 --双龙呼争
29065598 0 --方舟之骑士·廷达 29065598 0 --方舟之骑士·廷达
#300 #300
30000007 0 --残存虚无之废墟
30000025 2 --腐败侵蚀冲击波
30000055 2 --感染腐蚀
30000200 0 --暗魔力的爆发
30000420 0 --邪暗之源的幻影
30000430 0 --亚奥斯克的神孽
30003030 0 --次元回探机 30003030 0 --次元回探机
#305 #305
30553001 0 --异械教国 护卫兵械 30553001 0 --异械教国 护卫兵械
...@@ -750,6 +744,9 @@ ...@@ -750,6 +744,9 @@
33501000 1 --星空下的投影 33501000 1 --星空下的投影
33501002 0 --海行 漫游 33501002 0 --海行 漫游
33501016 0 --救 赎 执 行 33501016 0 --救 赎 执 行
33501401 0 --天选姬
33501407 0 --天选盛花-天选姬
33501433 1 --天选预兆
33502001 1 --灰色记忆 人偶少女 33502001 1 --灰色记忆 人偶少女
33502006 2 --灰色记忆 宝石光辉 33502006 2 --灰色记忆 宝石光辉
33502007 0 --灰色记忆 泪雨成痕 33502007 0 --灰色记忆 泪雨成痕
...@@ -794,6 +791,7 @@ ...@@ -794,6 +791,7 @@
33701023 2 --晦空士的日梦 33701023 2 --晦空士的日梦
33701317 0 --卓越融合 33701317 0 --卓越融合
33701324 0 --虚拟YouTuber 宇志海莓 33701324 0 --虚拟YouTuber 宇志海莓
33710901 0 --千篇万花
33710909 0 --快乐八重彩 33710909 0 --快乐八重彩
33710913 0 --永恒的约定 33710913 0 --永恒的约定
33711003 1 --疑虚拟YouTuber 星野尼亚 33711003 1 --疑虚拟YouTuber 星野尼亚
......
--『创造物』 解析
local m=11800001
local cm=_G["c"..m]
function cm.initial_effect(c)
--battle
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--avoid damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e3:SetValue(1)
c:RegisterEffect(e3)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.drcon)
e4:SetTarget(cm.drtg)
e4:SetOperation(cm.drop)
c:RegisterEffect(e4)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and not c:IsDisabled()
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.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)
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
\ No newline at end of file
--『创造物』 神秘
local m=11800002
local cm=_G["c"..m]
function cm.initial_effect(c)
--battle indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetCountLimit(1)
e1:SetValue(cm.valcon)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetTarget(cm.target1)
e2:SetOperation(cm.operation1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--avoid damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function cm.valcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 and e:GetHandler():IsDefensePos()
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.operation1(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 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
--『创造物』 绚烂
local m=11800003
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.spcon)
c:RegisterEffect(e2)
--direct attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.drcon)
e4:SetTarget(cm.drtg)
e4:SetOperation(cm.drop)
c:RegisterEffect(e4)
--avoid damage
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e5:SetValue(1)
c:RegisterEffect(e5)
end
function cm.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(Card.IsSetCard,c:GetControler(),LOCATION_MZONE,0,1,nil,0x3310)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsDisabled()
end
function cm.filter(c)
return c:IsSetCard(0x3310) and c:IsAbleToHand()
end
function cm.drtg(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.drop(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
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
\ No newline at end of file
--『创造物』 古老
local m=11800004
local cm=_G["c"..m]
function cm.initial_effect(c)
--position
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetTarget(cm.postg)
e3:SetOperation(cm.posop)
c:RegisterEffect(e3)
--avoid damage
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e5:SetValue(1)
c:RegisterEffect(e5)
end
function cm.postg(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetAttackTarget()
if chk==0 then return d and d:IsControler(1-tp) and d:IsAttackPos() and d:IsCanChangePosition() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,d,1,0,0)
end
function cm.posop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if d:IsRelateToBattle() then
Duel.ChangePosition(d,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE)
end
end
\ No newline at end of file
--铁蛰灭击者
local m=11800005
local cm=_G["c"..m]
function cm.initial_effect(c)
--search
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--avoid damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return c:IsSetCard(0x3310) and not c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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
local e1=Effect.CreateEffect(c)
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
function cm.filter(c,e,tp)
return c:IsCode(11800004) 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.filter,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 c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 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(800)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
end
--『创造物』 守御
local m=11800006
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--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(cm.splimit)
c:RegisterEffect(e1)
--tg
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_BATTLED)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCondition(cm.descon)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
--avoid damage
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e5:SetValue(1)
c:RegisterEffect(e5)
--tg
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_BATTLED)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCondition(cm.descon2)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
end
function cm.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x3310) and se:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler():GetBattleTarget(),1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.SendtoGrave(bc,REASON_EFFECT)
end
end
function cm.descon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and c:IsSetCard(0x3310)
end
\ No newline at end of file
--『创造物』 锋锐
local m=11800007
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--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(cm.splimit)
c:RegisterEffect(e1)
--Recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_BATTLED)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
--Recover
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_RECOVER)
e4:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_BATTLED)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCondition(cm.descon2)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
--avoid damage
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e5:SetValue(1)
c:RegisterEffect(e5)
end
function cm.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x3310) and se:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.descon2(e)
local c=e:GetHandler()
return c:IsSetCard(0x3310)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,e:GetHandler():GetAttack())
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=c:GetAttack()
if atk<0 then atk=0 end
Duel.Recover(tp,atk,REASON_EFFECT)
end
--『创造物』 迅袭
local m=11800008
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--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(cm.splimit)
c:RegisterEffect(e1)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetTarget(cm.damtg)
e3:SetOperation(cm.damop)
c:RegisterEffect(e3)
--avoid damage
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e5:SetValue(1)
c:RegisterEffect(e5)
end
function cm.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x3310) and se:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
end
function cm.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
--『闪枪姬』 洛拉米亚
local m=11800009
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.atkcost)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--avoid damage
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e5:SetValue(1)
c:RegisterEffect(e5)
end
function cm.ckfilter(c)
return c:IsAttackAbove(1) or c:IsDefenseAbove(1)
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttackAbove,1,c,1) or Duel.CheckReleaseGroup(tp,Card.IsDefenseAbove,1,c,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,cm.ckfilter,1,1,c)
Duel.Release(g,REASON_COST)
e:SetLabelObject(g:GetFirst())
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if 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(tc:GetPreviousAttackOnField())
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e2:SetValue(tc:GetPreviousDefenseOnField())
c:RegisterEffect(e2)
end
end
\ No newline at end of file
--『音速机械』 洛拉米亚
local m=11800010
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,cm.mfilter1,cm.mfilter2,nil,aux.NonTuner(cm.mfilter3),1,1)
c:EnableReviveLimit()
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--update atk,def
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(cm.val)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(2,m)
e2:SetCondition(cm.discon)
e2:SetCost(cm.discost)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--avoid damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function cm.mfilter1(c)
return c:IsCode(11800009)
end
function cm.mfilter2(c,syncard,c1)
return c:IsSetCard(0x3310) and (c:IsType(TYPE_TUNER) or c1:IsType(TYPE_TUNER))
end
function cm.mfilter3(c)
return c:IsSetCard(0x3310)
end
function cm.recfilter(c)
return c:IsSetCard(0x3310) and c:IsType(TYPE_MONSTER)
end
function cm.val(e,c)
local g=Duel.GetMatchingGroup(cm.recfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil)
return g:GetClassCount(Card.GetCode)*500
end
function cm.disfilter(c)
return c:IsSetCard(0x3310) and c:IsDiscardable()
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp and Duel.IsChainNegatable(ev)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.disfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,cm.disfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
\ No newline at end of file
--『水星圣盾』 席翁
local m=11800011
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--atk/def up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCost(cm.cost)
e3:SetTarget(cm.adtg)
e3:SetOperation(cm.adop)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(1)
c:RegisterEffect(e4)
--halve damage
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CHANGE_DAMAGE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(1,0)
e5:SetValue(0)
c:RegisterEffect(e5)
end
function cm.refilter(c)
return c:IsSetCard(0x3310) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function cm.ckfilter(g,ft)
return aux.dncheck(g) and (ft>0 or g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE))
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(cm.refilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler())
return ft>-1 and g:GetClassCount(Card.GetCode)>=6 and (ft>0 or Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_MZONE,0,1,nil))
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(cm.refilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,cm.ckfilter,false,6,6,ft)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.adfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3310)
end
function cm.adtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.adfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.adfilter,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:SetValue(1600)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
--『创造物』 增殖
local m=11800012
local cm=_G["c"..m]
function cm.initial_effect(c)
--pos
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.postg2)
e3:SetOperation(cm.posop2)
c:RegisterEffect(e3)
--avoid damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function cm.filter(c,e,tp,cd)
return c:IsCode(cd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.postg2(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+LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler():GetCode()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.posop2(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler():GetCode())) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetHandler():GetCode())
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--丝碧涅的『创造物』
local m=11800013
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--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)
--avoid damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function cm.filter(c)
return c:IsFaceup() and c:IsCode(11800014)
end
function cm.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(cm.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function cm.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO and e:GetHandler():GetReasonCard():IsRace(RACE_MACHINE)
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_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetLabel(ep)
e1:SetValue(cm.tgval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function cm.tgval(e,re,rp)
return rp==1-e:GetLabel()
end
\ No newline at end of file
--『神秘守门人』丝碧涅
local m=11800014
local cm=_G["c"..m]
function cm.initial_effect(c)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--avoid damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function cm.thfilter(c)
return c:IsSetCard(0x3310) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(cm.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x3310)
end
\ No newline at end of file
--『遗物守门人』璐琪尔
local m=11800015
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,m)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
--avoid damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function cm.filter(c)
return c:IsFaceup() and c:IsCode(11800014)
end
function cm.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(cm.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function cm.spfilter(c,e,tp)
return c:IsCode(11800003) 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_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)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--外界之理
local m=11800016
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon 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)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(cm.spcon)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(cm.tdtg)
e3:SetOperation(cm.tdop)
c:RegisterEffect(e3)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(cm.efilter)
c:RegisterEffect(e4)
--indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e5:SetValue(1)
c:RegisterEffect(e5)
--cannot release
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_UNRELEASABLE_SUM)
e6:SetValue(1)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e7)
--cannot be material
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e8:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e8:SetValue(cm.fuslimit)
c:RegisterEffect(e8)
local e9=e8:Clone()
e9:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e9:SetValue(1)
c:RegisterEffect(e9)
local e10=e8:Clone()
e10:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e10)
local e11=e8:Clone()
e11:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e11)
--Remove
local e12=Effect.CreateEffect(c)
e12:SetDescription(aux.Stringid(m,0))
e12:SetCategory(CATEGORY_REMOVE)
e12:SetType(EFFECT_TYPE_IGNITION)
e12:SetRange(LOCATION_MZONE)
e12:SetCost(cm.rmcost)
e12:SetTarget(cm.rmtg)
e12:SetOperation(cm.rmop)
c:RegisterEffect(e12)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)>=30
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_REMOVED)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_REMOVED,LOCATION_REMOVED)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
if 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*500)
c:RegisterEffect(e1)
end
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
function cm.thfilter(c)
return c:IsAbleToRemoveAsCost(POS_FACEDOWN)
end
function cm.rmcost(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.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,1,1,0,0)
Duel.SetChainLimit(cm.chlimit)
end
function cm.chlimit(e,ep,tp)
return tp==ep
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end
--攻击型巨像
local m=11800017
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3310),3,2,cm.ovfilter,aux.Stringid(m,0),2,cm.xyzop)
c:EnableReviveLimit()
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.atkcon)
e2:SetCost(cm.atkcost)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(cm.descost)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
--avoid damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3310) and c:IsType(TYPE_XYZ+TYPE_SYNCHRO)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
c:RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(800)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(800)
c:RegisterEffect(e2)
end
function cm.descost(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.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,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,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--防御型巨像
local m=11800018
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3310),3,2,cm.ovfilter,aux.Stringid(m,0),2,cm.xyzop)
c:EnableReviveLimit()
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.atkcon)
e2:SetCost(cm.atkcost)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(cm.descost)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
--avoid damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3310) and c:IsType(TYPE_XYZ+TYPE_SYNCHRO)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
c:RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
end
function cm.descost(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.desop(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_ONLY_ATTACK_MONSTER)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(cm.atklimit)
e1:SetLabel(c:GetRealFieldID())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.atklimit(e,c)
return c:GetRealFieldID()==e:GetLabel()
end
--『因果之理』机械降神
local m=11800019
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),4,4,cm.lcheck)
c:EnableReviveLimit()
--untargetable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.imval1)
c:RegisterEffect(e1)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(cm.efilter)
c:RegisterEffect(e4)
--link target indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(cm.indtg)
e3:SetValue(1)
c:RegisterEffect(e3)
--atk
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)
--discard deck
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_DECKDES)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(cm.discon)
e5:SetTarget(cm.distg)
e5:SetOperation(cm.disop)
c:RegisterEffect(e5)
--avoid damage
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e6:SetValue(1)
c:RegisterEffect(e6)
end
function cm.lcheck(g,lc)
return g:IsExists(Card.IsLinkType,2,nil,TYPE_SYNCHRO)
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.indtg(e,c)
return c:IsRace(RACE_MACHINE) and e:GetHandler():GetLinkedGroup():IsContains(c)
end
function cm.atkval(e,c)
return c:GetLinkedGroup():Filter(Card.IsSetCard,nil,0x3310):GetCount()*500
end
function cm.filter(c)
return te:GetOwner()~=e:GetOwner()
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetMatchingGroupCount(nil,tp,LOCATION_DECK,0,nil)%2==0
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,5)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.Draw(tp,5,REASON_EFFECT)
end
--『神秘的遗物』丝碧涅和璐琪尔
local m=11800020
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x5310),4,2)
c:EnableReviveLimit()
--atk up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.atkcon)
e2:SetCost(cm.atkcost)
e2:SetOperation(cm.atkop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(cm.descost)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
--avoid damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
c:RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(cm.efilter)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e4:SetOwnerPlayer(tp)
c:RegisterEffect(e4)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(800)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(800)
c:RegisterEffect(e2)
end
function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function cm.descost(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.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_MZONE,1,nil,TYPE_EFFECT) end
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_MZONE,nil,TYPE_EFFECT)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_MZONE,nil,TYPE_EFFECT)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--典范转移
local m=11800050
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
e1:SetLabel(11800053)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+10000)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.filter1(c,e,tp)
local lv=c:GetLevel()
return c:IsSetCard(0x3310) and c:IsType(TYPE_SYNCHRO)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp,lv)
end
function cm.filter2(c,tp,lv)
local rlv=lv-c:GetLevel()
local rg=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,0,c)
return rlv>0 and c:IsType(TYPE_TUNER) and c:IsSetCard(0x3310) and c:IsAbleToRemove()
and rg:CheckWithSumEqual(Card.GetLevel,rlv,1,99)
end
function cm.filter3(c)
return c:GetLevel()>0 and not c:IsType(TYPE_TUNER) and c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE+LOCATION_MZONE)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g1:GetFirst()
if tc then
local lv=tc:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp,lv)
local rlv=lv-g2:GetFirst():GetLevel()
local rg=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,0,g2:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g3=rg:SelectWithSumEqual(tp,Card.GetLevel,rlv,1,99)
g2:Merge(g3)
Duel.Remove(g2,POS_FACEUP,REASON_EFFECT)
Duel.SpecialSummonStep(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(cm.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x3310)
end
function cm.thfilter(c)
return c:IsSetCard(0x3310) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_REMOVED,0,2,nil) and e:GetHandler():IsAbleToHand() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_REMOVED,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,tp,REASON_EFFECT)~=0 and sg:GetCount()~=0 then
Duel.SendtoDeck(sg,tp,2,REASON_EFFECT)
end
end
--加速装置·火箭喷射拳
local m=11800051
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--spsummon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,0))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_SZONE)
e6:SetCondition(cm.condition)
e6:SetTarget(cm.sptg)
e6:SetOperation(cm.spop)
c:RegisterEffect(e6)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
end
function cm.cfilter(c)
return c:GetSequence()<5
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3310) 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_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst()
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(tc)
e2:SetCondition(cm.descon)
e2:SetOperation(cm.desop)
Duel.RegisterEffect(e2,tp)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(m)~=0 then
return true
else
e:Reset()
return false
end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
function cm.tgtg(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
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--虚数物体
local m=11800052
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,4))
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCondition(aux.dscon)
e0:SetOperation(cm.operation)
c:RegisterEffect(e0)
--act in hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetCondition(cm.handcon)
c:RegisterEffect(e1)
--token
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCost(cm.atkcost)
e4:SetTarget(cm.atktg)
e4:SetOperation(cm.atkop)
c:RegisterEffect(e4)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,5))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.discon)
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:SetRange(LOCATION_SZONE)
c:RegisterEffect(e3)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
end
function cm.filter(c)
return c:IsFaceup() and c:IsSetCard(0x3310)
end
function cm.handcon(e)
return Duel.IsExistingMatchingCard(cm.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0x3310) end
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0x3310)
Duel.Release(g,REASON_COST)
e:SetLabelObject(g:GetFirst())
end
function cm.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 cm.atkop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
local tc1=e:GetLabelObject()
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-tc1:GetPreviousAttackOnField())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(-tc1:GetPreviousDefenseOnField())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==1-tp and Duel.IsChainNegatable(ev) and c:GetFlagEffect(m)==0
end
function cm.discfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3310) and c:IsAbleToRemoveAsCost() and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.discfilter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.discfilter,tp,LOCATION_MZONE,0,1,1,c)
Duel.Remove(g,POS_FACEUP,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_NEGATE,eg,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.NegateActivation(ev)
end
\ No newline at end of file
--生命量产·城械工厂
local m=11800053
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.drcon)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
--inactivatable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_INACTIVATE)
e2:SetRange(LOCATION_FZONE)
e2:SetValue(cm.efilter)
c:RegisterEffect(e2)
--act limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE)
e3:SetCondition(cm.limcon)
e3:SetOperation(cm.limop)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_FZONE)
e5:SetCode(EVENT_CHAIN_END)
e5:SetOperation(cm.limop2)
c:RegisterEffect(e5)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1,m+10000)
e4:SetCondition(cm.spcon)
e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop)
c:RegisterEffect(e4)
end
function cm.cfilter(c,tp)
return c:IsControler(tp) and c:IsType(TYPE_SYNCHRO)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Draw(tp,1,REASON_EFFECT)
end
function cm.efilter(e,ct)
local p=e:GetHandlerPlayer()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return p==tp and te:GetLabel()==m
end
function cm.limfilter(c,tp)
return c:GetSummonPlayer()==tp and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.limcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.limfilter,1,nil,tp)
end
function cm.limop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(cm.chainlm)
elseif Duel.GetCurrentChain()==1 then
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(cm.resetop)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_BREAK_EFFECT)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
end
function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():ResetFlagEffect(m)
e:Reset()
end
function cm.limop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(m)~=0 then
Duel.SetChainLimitTillChainEnd(cm.chainlm)
end
e:GetHandler():ResetFlagEffect(m)
end
function cm.chainlm(e,rp,tp)
return tp==rp
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_FZONE)
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 Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x3310,0x11,2400,2400,6,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,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,0x3310,0x11,2400,2400,6,RACE_MACHINE,ATTRIBUTE_EARTH) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
--构造的解析
local m=11800054
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsCode(11800003) and c:IsAbleToGrave()
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_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,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)
Duel.Draw(p,d,REASON_EFFECT)
end
--自动化
local m=11800055
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
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)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e3:SetTarget(cm.tdtg)
e3:SetOperation(cm.tdop)
c:RegisterEffect(e3)
end
function cm.filter(c)
return c:IsCode(11800001,11800002,11800003,11800004) and c:IsAbleToGrave()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil)
return g:GetClassCount(Card.GetCode)>=2
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil)
if g:GetClassCount(Card.GetCode)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
function cm.tdfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3310) and c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,2,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,2,2,nil)
if g:GetCount()>0 then Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
--创造物激光炮
local m=11800056
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)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.dacost)
e2:SetTarget(cm.datg)
e2:SetOperation(cm.daop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1)
e3:SetCost(cm.spcost1)
e3:SetTarget(cm.sptg1)
e3:SetOperation(cm.spop1)
c:RegisterEffect(e3)
end
function cm.costfilter(c)
return c:IsSetCard(0x3310) and c:IsAbleToGraveAsCost()
end
function cm.dacost(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.DiscardHand(tp,cm.costfilter,1,1,REASON_COST)
end
function cm.datg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1600)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1600)
end
function cm.daop(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 cm.cfilter1(c)
return c:IsSetCard(0x3310)
end
function cm.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter1,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter1,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)
end
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local dg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(dg)
Duel.SendtoGrave(dg,REASON_EFFECT)
end
\ No newline at end of file
--紧急着装
local m=11800057
local cm=_G["c"..m]
function cm.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:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c,e,tp)
return c:IsCode(11800010)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetLocationCountFromEx(tp)>0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp)) or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetLocationCountFromEx(tp)>0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
local b=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
local g
if not (a or b) then return end
if a and b then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,e,tp)
elseif a then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
end
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(tc)
e2:SetCondition(cm.descon)
e2:SetOperation(cm.desop)
Duel.RegisterEffect(e2,tp)
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(m)~=0 then
return true
else
e:Reset()
return false
end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
--『创造物』的扫描
local m=11800058
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m+10000)
e3:SetTarget(cm.tdtg)
e3:SetOperation(cm.tdop)
c:RegisterEffect(e3)
end
function cm.thfilter(c,e,tp,spchk)
return c:IsSetCard(0x3310) and c:IsType(TYPE_MONSTER)
and (c:IsAbleToHand() or (spchk and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function cm.ckfilter(c)
return c:IsSetCard(0x3310) and c:IsType(TYPE_MONSTER)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(cm.ckfilter,tp,LOCATION_GRAVE,0,nil)
local spchk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and g:GetClassCount(Card.GetCode)>=6
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and cm.thfilter(chkc,e,tp,spchk) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,nil,e,tp,spchk) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,2,nil,e,tp,spchk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,0,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.ckfilter,tp,LOCATION_GRAVE,0,nil)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==0 then return end
local a=0
local b=0
tc=sg:GetFirst()
while tc do
if tc:IsAbleToHand() then a=a+1 end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then b=b+1 end
tc=sg:GetNext()
end
if a==sg:GetCount() then a=1 else a=0 end
if b==sg:GetCount() and Duel.GetLocationCount(tp,LOCATION_MZONE)>=b and g:GetClassCount(Card.GetCode)>=6 then b=1 else b=0 end
if not (a==1 or b==1) then return end
if b==1 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
function cm.tdfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3310) and c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_REMOVED,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 and Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)~=0 then Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
end
--水星盾的守护
local m=11800059
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c,e,tp)
return c:IsCode(11800011)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(aux.RitualUltimateFilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,cm.filter,e,tp,mg,mg2,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(aux.RitualUltimateFilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,cm.filter,e,tp,mg,mg2,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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
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 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
end
\ No newline at end of file
--机·构·解·放
local m=11800060
local cm=_G["c"..m]
function cm.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_SZONE)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_SELF_TOGRAVE)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.tgcon)
c:RegisterEffect(e3)
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x3310) and c:IsType(TYPE_MONSTER)
and c:GetSummonPlayer()==tp
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=re:GetHandler()
if eg:IsExists(cm.cfilter,1,nil,tp)then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function cm.tgcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END
end
\ No newline at end of file
--『创造物』的呼唤
local m=11800061
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:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsSetCard(0x3310) 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,2,nil) and Duel.GetMatchingGroupCount(nil,tp,LOCATION_DECK,0,nil)%2==0) or (Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) and Duel.GetMatchingGroupCount(nil,tp,LOCATION_DECK,0,nil)%2~=0) end
if Duel.GetMatchingGroupCount(nil,tp,LOCATION_DECK,0,nil)%2==0 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
else
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not ((Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,2,nil) and Duel.GetMatchingGroupCount(nil,tp,LOCATION_DECK,0,nil)%2==0) or (Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) and Duel.GetMatchingGroupCount(nil,tp,LOCATION_DECK,0,nil)%2~=0)) then return end
local g
if Duel.GetMatchingGroupCount(nil,tp,LOCATION_DECK,0,nil)%2==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,2,2,nil)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
end
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--『创造物』的同调
local m=11800062
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
e1:SetLabel(11800053)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,m)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.activate2)
e2:SetLabel(11800053)
c:RegisterEffect(e2)
end
function cm.filter1(c,e,tp)
local lv=c:GetLevel()
return c:IsSetCard(0x3310) and c:IsType(TYPE_SYNCHRO)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil,tp,lv)
end
function cm.filter2(c,tp,lv)
local rlv=lv-c:GetLevel()
local rg=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_DECK,0,c)
return rlv>0 and c:IsType(TYPE_TUNER) and c:IsSetCard(0x3310) and c:IsAbleToGrave()
and rg:CheckWithSumEqual(Card.GetLevel,rlv,1,2)
end
function cm.filter3(c)
return c:IsSetCard(0x3310) and c:GetLevel()>0 and not c:IsType(TYPE_TUNER) and c:IsAbleToGrave()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g1:GetFirst()
if tc then
local lv=tc:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK,0,1,1,nil,tp,lv)
local rlv=lv-g2:GetFirst():GetLevel()
local rg=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_DECK,0,g2:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=rg:SelectWithSumEqual(tp,Card.GetLevel,rlv,1,2)
g2:Merge(g3)
Duel.SendtoGrave(g2,REASON_EFFECT)
Duel.SpecialSummonStep(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(cm.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function cm.filter12(c,e,tp)
local lv=c:GetLevel()
return c:IsSetCard(0x3310) and c:IsType(TYPE_SYNCHRO)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
and Duel.IsExistingMatchingCard(cm.filter22,tp,LOCATION_REMOVED,0,1,nil,tp,lv)
end
function cm.filter22(c,tp,lv)
local rlv=lv-c:GetLevel()
local rg=Duel.GetMatchingGroup(cm.filter32,tp,LOCATION_REMOVED,0,c)
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and rlv>0 and c:IsType(TYPE_TUNER) and c:IsSetCard(0x3310) and c:IsAbleToDeck()
and rg:CheckWithSumEqual(Card.GetLevel,rlv,1,2)
end
function cm.filter32(c)
return c:IsSetCard(0x3310) and c:GetLevel()>0 and not c:IsType(TYPE_TUNER) and c:IsAbleToDeck()
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter12,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.filter12,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g1:GetFirst()
if tc then
local lv=tc:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectMatchingCard(tp,cm.filter22,tp,LOCATION_REMOVED,0,1,1,nil,tp,lv)
local rlv=lv-g2:GetFirst():GetLevel()
local rg=Duel.GetMatchingGroup(cm.filter32,tp,LOCATION_REMOVED,0,g2:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g3=rg:SelectWithSumEqual(tp,Card.GetLevel,rlv,1,2)
g2:Merge(g3)
Duel.SendtoDeck(g2,nil,2,REASON_EFFECT)
Duel.SpecialSummonStep(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(cm.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x3310)
end
\ No newline at end of file
--次元传送
local m=11800063
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCondition(cm.condition2)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.operation2)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsSetCard(0x3310) and c:IsFaceup()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function cm.cfilter(c)
return c:IsSetCard(0x3310) and c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
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 aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEDOWN,REASON_EFFECT)
end
end
function cm.cfilter2(c,tp)
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and c:GetReasonPlayer()==1-tp
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter2,1,nil,tp)
end
function cm.filter2(c,e,tp)
return c:IsSetCard(0x3310) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),tp,POS_FACEDOWN)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.ckfilter2(c)
return c:IsSetCard(0x3310) and c:IsType(TYPE_MONSTER)
end
function cm.operation2(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,aux.NecroValleyFilter(cm.filter2),tp,LOCATION_DECK+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 g1=Duel.GetMatchingGroup(cm.ckfilter2,tp,LOCATION_GRAVE,0,nil)
if g1:GetClassCount(Card.GetCode)>=6 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp,POS_FACEDOWN)
if g2:GetCount()>0 then
Duel.HintSelection(g2)
Duel.Remove(g2,POS_FACEDOWN,REASON_EFFECT)
end
end
end
end
--创造术
local m=11800064
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsCode(11800001) and c:IsAbleToGrave()
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_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,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)
Duel.Draw(p,d,REASON_EFFECT)
end
--异次元的侵略
local m=11800065
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.operation2)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.tdtg)
e3:SetOperation(cm.tdop)
c:RegisterEffect(e3)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3310)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_REMOVED,0,5,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil,tp,POS_FACEDOWN) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,e:GetHandler(),tp,POS_FACEDOWN)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil,tp,POS_FACEDOWN)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3310) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and c:IsCanBeEffectTarget(e)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,2,nil,e,tp)
Duel.SetTargetCard(g1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if sg:GetCount()>ft then return end
local c=e:GetHandler()
local tc=sg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
end
function cm.tdfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3310) and c:IsAbleToGrave()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_REMOVED,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_REMOVED,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 and Duel.SendtoDeck(e:GetHandler(),tp,2,REASON_EFFECT)~=0 and Duel.SendtoGrave(tg,REASON_EFFECT)==tg:GetCount() then
Duel.Draw(tp,2,REASON_EFFECT)
end
end
\ No newline at end of file
...@@ -69,7 +69,7 @@ function c12031003.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +69,7 @@ function c12031003.thcon(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end end
function c12031003.thfilter(c) function c12031003.thfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAttribute(ATTRIBUTE_DARK) and ( c:IsAbleToHand() or c:IsAbleToGrave() ) return c:IsSetCard(0xfa0) and ( c:IsAbleToHand() or c:IsAbleToGrave() )
end end
function c12031003.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c12031003.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12031003.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c12031003.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -111,7 +111,7 @@ end ...@@ -111,7 +111,7 @@ end
function c12300009.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c12300009.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,nil)
if not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY) then g:RemoveCard(c) end if Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY) then g:RemoveCard(c) end
if chk==0 then if chk==0 then
return Duel.IsExistingMatchingCard(c12300009.filsp,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) and g:GetCount()>0 return Duel.IsExistingMatchingCard(c12300009.filsp,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) and g:GetCount()>0
end end
......
--终焉邪魂 暗之仆从
function c30000005.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--token
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c30000005.sptg)
e2:SetOperation(c30000005.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--set
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_REMOVE)
e4:SetCountLimit(1,30000006)
e4:SetTarget(c30000005.satg)
e4:SetOperation(c30000005.saop)
c:RegisterEffect(e4)
end
function c30000005.satg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not c:IsForbidden() and c:CheckUniqueOnField(tp) end
end
function c30000005.saop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
function c30000005.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 Duel.IsPlayerCanSpecialSummonMonster(tp,30000009,0,0x4011,0,0,1,RACE_ZOMBIE,ATTRIBUTE_DARK) and c:GetFlagEffect(30000005)<3 end
c:RegisterFlagEffect(30000005,RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD,0,1)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,0,0)
end
function c30000005.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsPlayerCanSpecialSummonMonster(tp,30000009,0,0x4011,0,0,1,RACE_ZOMBIE,ATTRIBUTE_DARK) then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 or (Duel.IsPlayerAffectedByEffect(tp,59822133) and ft>1) then return end
for i=1,ft do
local token=Duel.CreateToken(tp,30000009)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
--cannot release
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(1)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
token:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(c30000005.fuslimit)
token:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e4:SetValue(1)
token:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e5)
token:RegisterFlagEffect(30000005,RESET_EVENT+RESETS_STANDARD,0,1)
local e6=Effect.CreateEffect(e:GetHandler())
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_PHASE+PHASE_END)
e6:SetCountLimit(1)
e6:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e6:SetLabelObject(token)
e6:SetCondition(c30000005.descon)
e6:SetOperation(c30000005.desop)
Duel.RegisterEffect(e6,tp)
end
end
function c30000005.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
function c30000005.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(30000005)~=0 then
return true
else
e:Reset()
return false
end
end
function c30000005.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
\ No newline at end of file
--终焉邪魂 废墟虚无之魔殿
function c30000007.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c30000007.tg)
e1:SetOperation(c30000007.op)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,30000007)
e2:SetOperation(c30000007.ctop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,30000008)
e3:SetTarget(c30000007.thtg)
e3:SetOperation(c30000007.thop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_DESTROYED)
c:RegisterEffect(e4)
end
function c30000007.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c30000007.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function c30000007.ctfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_TOKEN)
end
function c30000007.ctop(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c30000007.ctfilter,nil)
if ct>0 then
Duel.IsPlayerCanDraw(tp,1)
Duel.Draw(tp,1,REASON_EFFECT) end
end
function c30000007.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c30000007.thop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil)
if g1:GetCount()>0 and Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--终焉邪魂 腐败侵蚀冲击波
function c30000025.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c30000025.spcost)
e1:SetTarget(c30000025.target)
e1:SetOperation(c30000025.activate)
c:RegisterEffect(e1)
end
function c30000025.cfilter(c)
return c:IsAbleToRemoveAsCost() and not c:IsCode(30000025)
end
function c30000025.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30000025.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c30000025.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c30000025.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c30000025.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext() end
local dg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),TYPE_SPELL+TYPE_TRAP)
if dg:GetCount()>0 and Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)==0 and Duel.SelectYesNo(tp,aux.Stringid(30000025,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=dg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--终焉邪魂 死亡侵蚀
function c30000035.initial_effect(c)
--Activate(summon)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30000035,0))
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON)
e1:SetCountLimit(1,30000035)
e1:SetCondition(c30000035.condition1)
e1:SetCost(c30000035.cost)
e1:SetTarget(c30000035.target1)
e1:SetOperation(c30000035.activate1)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e3)
--Activate(effect)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(30000035,1))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_CHAINING)
e4:SetCountLimit(1,30000036)
e4:SetCondition(c30000035.condition2)
e4:SetCost(c30000035.cost)
e4:SetTarget(c30000035.target2)
e4:SetOperation(c30000035.activate2)
c:RegisterEffect(e4)
--Activate(effect2)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(30000035,2))
e5:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e5:SetType(EFFECT_TYPE_ACTIVATE)
e5:SetCode(EVENT_CHAINING)
e5:SetCountLimit(1,30000037)
e5:SetCondition(c30000035.condition3)
e5:SetCost(c30000035.cost)
e5:SetTarget(c30000035.target3)
e5:SetOperation(c30000035.activate3)
c:RegisterEffect(e5)
--Activate(effect2)
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetRange(LOCATION_GRAVE)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetCountLimit(1,30000038)
e6:SetCost(c30000035.thcost)
e6:SetTarget(c30000035.thtg)
e6:SetOperation(c30000035.thop)
c:RegisterEffect(e6)
end
function c30000035.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0
end
function c30000035.cfilter(c)
return c:IsAbleToRemoveAsCost() and not c:IsCode(30000035)
end
function c30000035.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30000035.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,5,nil) end
local g=Duel.SelectMatchingCard(tp,c30000035.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,5,5,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c30000035.target1(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_REMOVE,eg,eg:GetCount(),0,0)
end
function c30000035.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
function c30000035.condition2(e,tp,eg,ep,ev,re,r,rp)
return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)) and Duel.IsChainNegatable(ev)
end
function c30000035.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsAbleToRemove() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c30000035.activate2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function c30000035.condition3(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainNegatable(ev) then return false end
if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
return re:IsHasCategory(CATEGORY_SPECIAL_SUMMON)
end
function c30000035.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsAbleToRemove() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c30000035.activate3(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function c30000035.thfilter(c)
return c:IsAbleToRemoveAsCost() and not c:IsCode(30000035)
end
function c30000035.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30000035.thfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,5,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c30000035.thfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,5,5,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c30000035.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c30000035.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
\ No newline at end of file
--散播毁灭的波纹
function c30000051.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30000051,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,30000051)
e1:SetTarget(c30000051.tgtg)
e1:SetOperation(c30000051.tgop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,30000052)
e2:SetTarget(c30000051.satg)
e2:SetOperation(c30000051.saop)
c:RegisterEffect(e2)
--Destroy
end
function c30000051.satg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not c:IsForbidden() and c:CheckUniqueOnField(tp) end
end
function c30000051.saop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
function c30000051.tgfilter(c)
return c:IsLevelAbove(5) and c:IsDefense(0) and c:IsType(TYPE_MONSTER) and (c:IsAbleToGrave() or c:IsAbleToRemove())
end
function c30000051.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30000051.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c30000051.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local g=Duel.SelectMatchingCard(tp,c30000051.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
local b1=tc:IsAbleToGrave()
local b2=tc:IsAbleToRemove()
local op=2
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(30000051,2),aux.Stringid(30000051,3))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(30000051,2))
else
op=Duel.SelectOption(tp,aux.Stringid(30000051,3))+1
end
if op==0 then
Duel.SendtoGrave(tc,REASON_EFFECT)
else
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
end
\ No newline at end of file
--终焉邪魂 侵蚀再起
function c30000053.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30000051,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,30000053)
e1:SetTarget(c30000053.tgtg)
e1:SetOperation(c30000053.tgop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,30000054)
e2:SetTarget(c30000053.satg)
e2:SetOperation(c30000053.saop)
c:RegisterEffect(e2)
--Destroy
end
function c30000053.satg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not c:IsForbidden() and c:CheckUniqueOnField(tp) end
end
function c30000053.saop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
function c30000053.tgtg(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,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(30000053,0))
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c30000053.tgop(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()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end
end
\ No newline at end of file
--终焉邪魂 感染腐蚀
function c30000055.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30000055,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c30000055.spcost)
e1:SetTarget(c30000055.tgtg)
e1:SetOperation(c30000055.tgop)
c:RegisterEffect(e1)
end
function c30000055.cfilter(c)
return c:IsAbleToRemoveAsCost() and not c:IsCode(30000055)
end
function c30000055.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30000055.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c30000055.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c30000055.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function c30000055.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(30000055,1))
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
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 Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)==0 and c:IsLocation(LOCATION_SZONE) then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DISABLE)
e4:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e4:SetTarget(c30000055.distg)
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetLabel(c:GetSequence())
Duel.RegisterEffect(e4,tp)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetOperation(c30000055.disop)
e5:SetReset(RESET_PHASE+PHASE_END)
e5:SetLabel(c:GetSequence())
Duel.RegisterEffect(e5,tp)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetTarget(c30000055.distg)
e6:SetReset(RESET_PHASE+PHASE_END)
e6:SetLabel(c:GetSequence())
Duel.RegisterEffect(e6,tp)
end
end
function c30000055.distg(e,c)
local seq=e:GetLabel()
local tp=e:GetHandlerPlayer()
return c:IsType(TYPE_SPELL+TYPE_TRAP) and aux.GetColumn(c,tp)==seq
end
function c30000055.disop(e,tp,eg,ep,ev,re,r,rp)
local tseq=e:GetLabel()
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
if loc&LOCATION_SZONE~=0 and seq<=4 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
and ((rp==tp and seq==tseq) or (rp==1-tp and seq==4-tseq)) then
Duel.NegateEffect(ev)
end
end
\ No newline at end of file
--暗魔力的爆发
function c30000200.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,30000200+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c30000200.cost)
e1:SetTarget(c30000200.target)
e1:SetOperation(c30000200.activate)
c:RegisterEffect(e1)
end
function c30000200.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil)
if g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
end
Duel.SendtoDeck(g,tp,2,REASON_COST)
end
function c30000200.filter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsDefenseAbove(2000)and c:IsLevelAbove(6) and c:IsAbleToHand()
end
function c30000200.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30000200.filter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function c30000200.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c30000200.filter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--不灭的黑暗
function c30000205.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30000205,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,30000205)
e1:SetTarget(c30000205.target)
e1:SetOperation(c30000205.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(30000205,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,30000205)
e2:SetCost(c30000205.cost)
e2:SetTarget(c30000205.target1)
e2:SetOperation(c30000205.operation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,30000205)
e3:SetTarget(c30000205.sttg)
e3:SetOperation(c30000205.stop)
c:RegisterEffect(e3)
end
function c30000205.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToDeck()
end
function c30000205.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c30000205.filter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c30000205.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c30000205.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c30000205.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==3 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c30000205.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c30000205.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
end
function c30000205.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and c30000205.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c30000205.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c30000205.filter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c30000205.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c30000205.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not c:IsForbidden() and c:CheckUniqueOnField(tp) end
end
function c30000205.stop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
\ No newline at end of file
--混沌的轮回 循环
if not pcall(function() require("expansions/script/c30000100") end) then require("script/c30000100") end
local m,cm=rscf.DefineCard(30000220)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,nil,"td,dr",nil,nil,nil,cm.tg,cm.act)
local e2=rsef.I(c,{m,0},nil,"td,dr","tg",LOCATION_GRAVE,aux.exccon,nil,rstg.target({cm.tdfilter,"td",LOCATION_GRAVE+LOCATION_REMOVED,0,2 },rsop.list(Card.IsAbleToDeck,"td"),rsop.list(1,"dr")),cm.drop)
if cm.actct then return end
cm.actct=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_NEGATED)
ge1:SetOperation(cm.regop)
Duel.RegisterEffect(ge1,tp)
end
function cm.checkfun(att)
return function(c)
return (c:IsType(TYPE_MONSTER) and c:IsAttribute(att)) or ((c:IsComplexType(TYPE_SPELL+TYPE_PENDULUM) and c:GetAttribute()&att>0))
end
end
cm.hnchecks={cm.checkfun(ATTRIBUTE_LIGHT),cm.checkfun(ATTRIBUTE_DARK)}
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsCode(m) then
cm.actct=math.max(cm.actct-1,0)
end
end
function cm.cfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToDeck()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroupEach(cm.hnchecks,aux.TRUE) and Duel.IsPlayerCanDraw(tp,cm.actct+3) end
cm.actct=cm.actct+1
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.act(e,tp)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil)
if not g:CheckSubGroupEach(cm.hnchecks,aux.TRUE) then return end
local tg=g:SelectSubGroupEach(tp,cm.hnchecks,false,aux.TRUE)
local hg=tg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if #hg>0 then
Duel.ConfirmCards(1-tp,hg)
end
Duel.HintSelection(tg-hg)
if Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup()
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel.ShuffleDeck(tp)
end
Duel.Draw(tp,cm.actct+2,REASON_EFFECT)
end
end
function cm.tdfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and c:IsAbleToDeck()
end
function cm.drop(e,tp)
local tg=rsgf.GetTargetGroup()
local c=aux.ExceptThisCard(e)
if not c or #tg<=0 then return end
tg:AddCard(c)
if Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup()
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel.ShuffleDeck(tp)
end
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--幻邪龙机 卡度卡斯
if not pcall(function() require("expansions/script/c30000100") end) then require("script/c30000100") end
local m,cm=rscf.DefineCard(30000410)
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3)
c:EnableReviveLimit()
--race
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_RACE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(RACE_WYRM+RACE_FIEND)
c:RegisterEffect(e1)
--target
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--race
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(cm.tgtg2)
e3:SetOperation(cm.tgop2)
--c:RegisterEffect(e3)
--remove
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,m+1)
e4:SetTarget(cm.rmtg)
e4:SetOperation(cm.rmop)
c:RegisterEffect(e4)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),0,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,4,PLAYER_ALL,LOCATION_GRAVE)
end
function cm.rmfilter(c)
return c:IsAbleToRemove(c:GetControler(),POS_FACEDOWN)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rmfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,5,5,nil)
if #rg==5 then
Duel.HintSelection(rg)
if Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)>0 then
if Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then
local fid=c:GetFieldID()
c:RegisterFlagEffect(m+1,RESET_PHASE+PHASE_END,0,2,fid)
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,2)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCountLimit(1)
e1:SetValue(fid)
e1:SetLabelObject(c)
e1:SetCondition(cm.spscon)
e1:SetOperation(cm.spsop)
Duel.RegisterEffect(e1,tp)
end
end
end
end
function cm.spscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
return Duel.GetTurnCount()~=e:GetLabel() and c:GetFlagEffectLabel(m+1)==e:GetValue() and
c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.bfilter(c)
return not c:IsOnField() or c:IsAbleToGrave()
end
function cm.spsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
Duel.Hint(HINT_CARD,0,m)
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)<=0 then return end
rsop.SelectOC(nil,true)
local og=rsop.SelectSolve(HINTMSG_TARGET,tp,cm.bfilter,tp,LOCATION_ONFIELD+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_REMOVED,2,2,nil)
local g1=og:Filter(Card.IsOnField,nil)
local g2=og:Filter(Card.IsLocation,nil,LOCATION_REMOVED)
Duel.SendtoGrave(g1,REASON_EFFECT)
Duel.SendtoGrave(g2,REASON_EFFECT+REASON_RETURN)
end
function cm.cfilter1(c)
return (c:IsAbleToGrave() or c:IsAbleToRemove()) and c:IsRace(RACE_WYRM+RACE_DRAGON)
and c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevel(10)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g=Duel.SelectMatchingCard(tp,cm.cfilter1,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
local tc=g:GetFirst()
if tc and tc:IsAbleToGrave() and (not tc:IsAbleToRemove() or Duel.SelectOption(tp,1191,1192)==0) then
if Duel.SendtoGrave(tc,REASON_EFFECT)<=0 or not tc:IsLocation(LOCATION_GRAVE) then
return
end
else
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)<=0 or not tc:IsLocation(LOCATION_REMOVED) then
return
end
end
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.BreakEffect()
--cannot attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(aux.imval1)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
end
end
end
function cm.cfilter2(c)
return (c:IsAbleToGrave() or c:IsAbleToRemove()) and c:IsRace(RACE_FIEND)
and c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevel(12)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsRace(RACE_FIEND)
and c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevel(12) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
return Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_DECK,0,1,nil) and c:IsAbleToGrave()
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) and
Duel.GetMZoneCount(tp,c,tp)>0
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,c,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g=Duel.SelectMatchingCard(tp,cm.cfilter2,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
local tc=g:GetFirst()
if tc and tc:IsAbleToGrave() and (not tc:IsAbleToRemove() or Duel.SelectOption(tp,1191,1192)==0) then
if Duel.SendtoGrave(tc,REASON_EFFECT)<=0 or not tc:IsLocation(LOCATION_GRAVE) then
return
end
else
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)<=0 or not tc:IsLocation(LOCATION_REMOVED) then
return
end
end
if c:IsRelateToEffect(e) and c:IsFaceup() then
if Duel.SendtoGrave(c,REASON_EFFECT)>0 then
local fid=c:GetFieldID()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetLabelObject(c)
e1:SetValue(fid)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
--Duel.RegisterEffect(e1,tp)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if #sg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil):GetFirst()
Duel.HintSelection(Group.FromCards(sc))
if Duel.SpecialSummonStep(sc,0,tp,tp,true,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
end
end
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return Duel.GetTurnCount()>e:GetLabel() and tc:GetFlagEffectLabel(m)==e:GetValue()
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.ReturnToField(e:GetLabelObject())
end
function cm.cfilter3(c)
return (c:IsAbleToGrave() or c:IsAbleToRemove()) and c:IsRace(RACE_MACHINE)
and c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.tgtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter3,tp,LOCATION_DECK,0,1,nil) and c:IsAbleToGrave() end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,c,2,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.tgop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetReset(RESET_PHASE+PHASE_END)
e0:SetTarget(cm.sumlimit)
e0:SetTargetRange(1,0)
Duel.RegisterEffect(e0,tp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g=Duel.SelectMatchingCard(tp,cm.cfilter1,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
local tc=g:GetFirst()
if tc and tc:IsAbleToGrave() and (not tc:IsAbleToRemove() or Duel.SelectOption(tp,1191,1192)==0) then
if Duel.SendtoGrave(tc,REASON_EFFECT)<=0 or not tc:IsLocation(LOCATION_GRAVE) then
return
end
else
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)<=0 or not tc:IsLocation(LOCATION_REMOVED) then
return
end
end
if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)>0 and c:IsLocation(LOCATION_GRAVE) then
--race
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(cm.racecon)
e1:SetValue(RACE_MACHINE)
Duel.RegisterEffect(e1,tp)
--attribute
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetValue(ATTRIBUTE_DARK)
Duel.RegisterEffect(e2,tp)
--untarget
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetTarget(cm.tgtg3)
e3:SetValue(1)
Duel.RegisterEffect(e3,tp)
end
end
end
function cm.sumlimit(e,c)
return not c:IsCode(m) and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.racecon(e)
local tp=e:GetHandlerPlayer()
return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY)
and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_NECRO_VALLEY)
end
function cm.tgtgc(e,c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK)
end
--邪暗之源的幻影
if not pcall(function() require("expansions/script/c30000100") end) then require("script/c30000100") end
local m,cm=rscf.DefineCard(30000420)
function cm.initial_effect(c)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),11,3,nil,nil,99)
local e1=rscf.SetSummonCondition(c,false,aux.xyzlimit)
local e2=rscf.AddSpecialSummonProcdure(c,LOCATION_EXTRA,cm.sprcon,nil,cm.sprop,{m,0},nil,SUMMON_TYPE_XYZ)
local e3=rsef.SV_CANNOT_DISABLE_S(c)
local e4=rsef.SV_INDESTRUCTABLE(c,"effect")
local e6=rsef.QO(c,nil,{m,1},1,nil,nil,LOCATION_MZONE,nil,rscost.rmxyz(3),nil,cm.efop)
local e7=rsef.QF(c,EVENT_SUMMON,{m,2},nil,"diss,rm",nil,LOCATION_MZONE,cm.disscon,nil,cm.disstg,cm.dissop)
local e8=rsef.RegisterClone(c,e7,"code",EVENT_SPSUMMON)
local e9=rsef.QF(c,EVENT_CHAINING,{m,3},nil,"neg,rm","dsp,dcal",LOCATION_MZONE,cm.negcon,nil,rstg.negtg("rm"),cm.negop)
local e10=rsef.I(c,"rm",nil,"rm,dam",nil,LOCATION_MZONE,cm.rmcon,rscost.rmxyz(1),rsop.target2(cm.fun,{Card.IsAbleToRemove,"rm"},{Card.IsAbleToRemove,"rm",rsloc.hg,rsloc.hg,true}),cm.rmop)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCode(EFFECT_CANNOT_REMOVE)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,1)
e5:SetTarget(cm.rmlimit)
c:RegisterEffect(e5)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_FIELD)
e11:SetCode(EFFECT_CANNOT_INACTIVATE)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e11:SetRange(LOCATION_MZONE)
e11:SetValue(cm.efilter)
c:RegisterEffect(e11)
end
function cm.efilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
return te:GetHandler()==e:GetHandler()
end
function cm.rmcon(e)
return e:GetHandler():GetOverlayCount()==1
end
function cm.fun(g,e,tp)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,rsloc.hg,rsloc.hg,nil)
rg:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#rg*300)
end
function cm.rmop(e,tp)
local c=rscf.GetSelf(e)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,rsloc.hg,rsloc.hg,nil)
if c and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)>0 and c:IsLocation(LOCATION_REMOVED) and #rg>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 then
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_REMOVED) + 1
Duel.BreakEffect()
Duel.Damage(1-tp,ct*300,REASON_EFFECT)
end
end
function cm.disscon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0 and e:GetHandler():GetFlagEffect(m)>0
end
function cm.disstg(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_REMOVE,eg,eg:GetCount(),0,0)
end
function cm.dissop(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,rsloc.hog,nil)
if #rg>0 and rsop.SelectYesNo(1-tp,"rm") then
rsgf.SelectRemove(rg,1-tp,aux.TRUE,1,1,nil,{})
Duel.NegateEffect(0)
return
end
Duel.NegateSummon(eg)
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
function cm.negcon(e,...)
return rscon.negcon(0,true)(e,...) and e:GetHandler():GetFlagEffect(m)>0
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,rsloc.hog,nil)
if #rg>0 and rsop.SelectYesNo(1-tp,"rm") then
rsgf.SelectRemove(rg,1-tp,aux.TRUE,1,1,nil,{})
Duel.NegateEffect(0)
return
end
if Duel.NegateActivation(ev) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function cm.efop(e,tp)
local c=e:GetHandler()
c:RegisterFlagEffect(m,rsreset.est_pend,0,1)
end
function cm.rmlimit(e,c,tp,r)
return c==e:GetHandler()
end
function cm.cfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCanOverlay() and c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.seqfilter(c)
return c:GetSequence()>=5
end
function cm.mfilter(c,lv,race)
return c:IsLevel(lv) and c:IsRace(race)
end
function cm.gcheck(g)
if #g==1 then return g:IsExists(cm.mfilter,1,nil,12,RACE_FIEND) or g:IsExists(cm.mfilter,1,nil,10,RACE_DRAGON) end
if #g>=2 then return g:IsExists(cm.mfilter,1,nil,12,RACE_FIEND) and g:IsExists(cm.mfilter,1,nil,10,RACE_DRAGON) and aux.dncheck(g) end
end
function cm.sprcon(e,c,tp)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local g2=Duel.GetReleaseGroup(tp):Filter(cm.seqfilter,nil)
g:Sub((g2))
return #g2>0 and Duel.GetLocationCountFromEx(tp,tp,g2,c)>0
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL) and g:CheckSubGroup(cm.gcheck,7,7)
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local g2=Duel.GetReleaseGroup(tp):Filter(cm.seqfilter,nil)
g:Sub((g2))
Duel.Release(g2,REASON_COST)
rshint.Select(tp,HINTMSG_XMATERIAL)
local matg = g:SelectSubGroup(tp,cm.gcheck,false,7,7)
local og=Group.CreateGroup()
for tc in aux.Next(matg) do
og:Merge(tc:GetOverlayGroup())
end
og:Merge(matg)
Duel.Overlay(c,og)
end
\ No newline at end of file
--亚奥斯克的神孽
if not pcall(function() require("expansions/script/c30000100") end) then require("script/c30000100") end
local m,cm=rscf.DefineCard(30000430)
function cm.initial_effect(c)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),10,3,nil,nil,99)
--spsummon limit
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.limit)
c:RegisterEffect(e1)
local e2=rsef.SV_CANNOT_DISABLE_S(c)
local e4=rsef.SV_IMMUNE_EFFECT(c)
local e5,e6=rsef.SV_SET(c,"batk,bdef",cm.val)
local e7=rsef.SV_LIMIT(c,"datk")
local e8=rsef.FV_REDIRECT(c,"tg",LOCATION_REMOVED,nil,{0xff,0xff},cm.rmcon)
local e9=rsef.I(c,"sp",1,"sp",nil,LOCATION_MZONE,cm.spcon,rscost.rmxyz(1),cm.sptg,cm.spop)
local e10=rsef.FTF(c,EVENT_PHASE+PHASE_END,"rm",1,"rm",nil,LOCATION_MZONE,nil,nil,nil,cm.rmop)
local e11=rsef.STF(c,EVENT_LEAVE_FIELD,"td",nil,"td,dam",nil,cm.tdcon,nil,rsop.target2(cm.tdfun,Card.IsAbleToDeck,"td",LOCATION_REMOVED,LOCATION_REMOVED,true,true,c),cm.tdop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_INACTIVATE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_FIELD)
e12:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e12:SetCode(EFFECT_CANNOT_ACTIVATE)
e12:SetRange(LOCATION_MZONE)
e12:SetTargetRange(0,1)
e12:SetValue(1)
e12:SetCondition(cm.actcon)
c:RegisterEffect(e12)
local e13=Effect.CreateEffect(c)
e13:SetType(EFFECT_TYPE_SINGLE)
e13:SetCode(EFFECT_ATTACK_COST)
e13:SetCost(cm.atcost)
e13:SetOperation(cm.atop)
c:RegisterEffect(e13)
end
function cm.tdcon(e,tp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function cm.tdfun(g,e,tp)
local dam = Duel.GetMatchingGroupCount(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,e:GetHandler())*500
end
function cm.tdop(e,tp)
local g = Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,aux.ExceptThisCard(e))
if #g>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 then
Duel.BreakEffect()
local dam = Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,rsloc.de) * 500
Duel.SetLP(tp,Duel.GetLP(tp)-dam)
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-dam)
end
end
function cm.rmop(e,tp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,rsloc.hog,LOCATION_ONFIELD,aux.ExceptThisCard(e))
local b1 = c:IsAbleToRemove()
local b2 = #g>0
local op=rsop.SelectOption(tp,b1,{m,0},b2,{m,1})
local rg = op==1 and c or g
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
function cm.limit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ and not se
end
function cm.efilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
return te:GetHandler()==e:GetHandler()
end
function cm.val(e,c)
return Duel.GetFieldGroupCount(0,LOCATION_REMOVED,LOCATION_REMOVED)*1000
end
function cm.cfilter(c)
return c:IsRace(RACE_FIEND) and c:IsLevel(12) and c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.rmcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(cm.cfilter,1,nil)
end
function cm.cfilter2(c)
return c:IsRace(RACE_DRAGON+RACE_WYRM) and c:IsLevel(10) and c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.spcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(cm.cfilter2,1,nil)
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,nil,1,1-tp,rsloc.hdg+LOCATION_EXTRA+LOCATION_GRAVE)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,1-tp,true,false,POS_FACEUP_ATTACK) and c:RemovePosCheck() and rszsf.GetUseAbleMZoneCount(c,1-tp)>0
end
function cm.spop(e,tp)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,0,rsloc.hdg+LOCATION_EXTRA+LOCATION_GRAVE,nil,e,tp)
if #sg<=0 then return end
local sc
local ct=0
repeat
ct=ct+1
if ct==2 and rscon.bsdcheck(1-tp) then break end
sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,0,rsloc.hdg+LOCATION_EXTRA+LOCATION_GRAVE,nil,e,tp)
if #sg>0 then
rshint.Select(1-tp,"sp")
sc = sg:Select(1-tp,1,1,nil):GetFirst()
Duel.SpecialSummonStep(sc,0,1-tp,1-tp,true,false,POS_FACEUP_ATTACK)
end
until #sg == 0
Duel.SpecialSummonComplete()
local c=rscf.GetFaceUpSelf(e)
if c then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ATTACK_ALL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function cm.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function cm.atcost(e,c,tp)
return true
end
function cm.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local tc=g:GetFirst()
local dis_n=0
if not tc then return end
while tc do
if aux.disfilter1(tc) and not tc:IsImmuneToEffect(e) then dis_n=dis_n+1 end
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)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
tc=g:GetNext()
end
if dis_n>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(dis_n*3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--暗渡寂
function c30000480.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,30000480)
e1:SetCost(c30000480.spcost)
e1:SetTarget(c30000480.sptg)
e1:SetOperation(c30000480.spop)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetTarget(c30000480.rectg)
e2:SetOperation(c30000480.recop)
c:RegisterEffect(e2)
end
function c30000480.costfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable() and c:IsAttribute(ATTRIBUTE_DARK) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,c:GetLevel(),nil)
end
function c30000480.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30000480.costfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.DiscardHand(tp,c30000480.costfilter,1,1,REASON_COST+REASON_DISCARD)
local g=Duel.GetOperatedGroup()
e:SetLabel(g:GetFirst():GetLevel())
end
function c30000480.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c30000480.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,e:GetLabel(),nil) then return end
local g=Duel.GetDecktopGroup(tp,e:GetLabel())
if Duel.SendtoGrave(g,REASON_EFFECT)~0 then
local og=Duel.GetOperatedGroup()
og=og:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
for tc in aux.Next(og) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
end
function c30000480.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c30000480.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--魔机 扎斯克
local m=30000650
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_DARK),2)
c:EnableReviveLimit()
--fusion
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW+CATEGORY_TOEXTRA+CATEGORY_TOGRAVE)
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+1)
e2:SetCondition(cm.drcon)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
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 c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK) 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.target(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.activate(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
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,sump,sumtype,sumpos,targetp,se)
return not (c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK))
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetReasonCard()
return c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and r==REASON_FUSION and tc:IsRace(RACE_MACHINE) and tc:IsAttribute(ATTRIBUTE_DARK)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local sp=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local c=e:GetHandler()
c:RegisterFlagEffect(m,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:SetCountLimit(1)
e1:SetLabelObject(c)
e1:SetCondition(cm.thcon)
e1:SetOperation(cm.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,sp)
end
function cm.thfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGrave()
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
return c:GetFlagEffect(m)>0 and c:IsAbleToExtra()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local c=e:GetLabelObject()
if Duel.SendtoDeck(c,nil,2,REASON_EFFECT) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--械装守护邪龙 卡达巴洛
local m=30000655
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(cm.mat),3,true)
--Fusion ONce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(cm.decon)
e1:SetOperation(cm.deop)
c:RegisterEffect(e1)
--atk limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(cm.limcon)
e2:SetValue(cm.atlimit)
c:RegisterEffect(e2)
--cannot be target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCondition(cm.limcon)
e3:SetTarget(cm.tgtg)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCountLimit(1)
e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop)
c:RegisterEffect(e4)
--Cannot Be Target until End Phase
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,0))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetHintTiming(0,TIMING_END_PHASE)
e5:SetCountLimit(1)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCost(cm.cost)
e5:SetTarget(cm.tg)
e5:SetOperation(cm.op)
c:RegisterEffect(e5)
--Draw
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_REMOVE)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCountLimit(1)
e6:SetOperation(cm.draw)
c:RegisterEffect(e6)
--to hand
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_TOHAND)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_GRAVE)
e7:SetCountLimit(1,m)
e7:SetCost(aux.bfgcost)
e7:SetCondition(cm.limcon)
e7:SetTarget(cm.thtg)
e7:SetOperation(cm.thop)
c:RegisterEffect(e7)
end
function cm.mat(c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.decon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION
end
function cm.deop(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:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(m) and bit.band(sumtype,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function cm.limcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.atlimit(e,c)
return c~=e:GetHandler()
end
function cm.tgtg(e,c)
return c~=e:GetHandler()
end
function cm.spfil(c,e,tp)
if c:IsLocation(LOCATION_REMOVED) and not c:IsFaceup() then return false end
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.spfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or g:GetCount()<=0 then return end
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
--
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_1)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit_1(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK))
end
function cm.costfilter(c)
return c:IsAbleToGraveAsCost() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsFaceup()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
local cc=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SendtoGrave(cc,REASON_COST+REASON_RETURN)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c: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_CANNOT_BE_EFFECT_TARGET)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
end
end
function cm.drfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_TOKEN) and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.draw(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(cm.drfilter,nil)
if ct>0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function cm.thfilter(c,mc)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() and c~=mc
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e:GetHandler())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
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_1)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
...@@ -167,8 +167,6 @@ ...@@ -167,8 +167,6 @@
!setname 0x280 ZEON !setname 0x280 ZEON
#yuangeril 1404497238 118 0x310-0x31f #yuangeril 1404497238 118 0x310-0x31f
!setname 0x3310 创造物
!setname 0x5310 造物少女
#Mizuhashi Parsee 1772438857 120 0xfa0-0xfaf 0xfb0-0xfbf #Mizuhashi Parsee 1772438857 120 0xfa0-0xfaf 0xfb0-0xfbf
!setname 0xfa0 三葉巧可 !setname 0xfa0 三葉巧可
......
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