Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ai
ygopro-222DIY-cards
Commits
3ee1e09f
Commit
3ee1e09f
authored
Jun 17, 2019
by
2924713558
Committed by
GitHub
Jun 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
31b2e7fe
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1552 additions
and
1518 deletions
+1552
-1518
expansions/script/c20100002.lua
expansions/script/c20100002.lua
+803
-801
expansions/script/c21520180.lua
expansions/script/c21520180.lua
+179
-179
expansions/script/c21520182.lua
expansions/script/c21520182.lua
+241
-238
expansions/script/c21520183.lua
expansions/script/c21520183.lua
+207
-178
expansions/script/c9980515.lua
expansions/script/c9980515.lua
+122
-122
No files found.
expansions/script/c20100002.lua
View file @
3ee1e09f
--Cirn9 Personal Function
Cirn9
=
Cirn9
or
{}
--Welcome my firend~
--Pack 01 Toji no Miko is on the line 5
--Pack 02 Shoujyo Kageki ReLive is on the line 460
function
Cirn9
.
TojiEquip
(
ec
,
code
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
token
=
Duel
.
CreateToken
(
tp
,
code
)
Duel
.
MoveToField
(
token
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
token
:
CancelToGrave
()
local
e1_1
=
Effect
.
CreateEffect
(
token
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_1
:
SetValue
(
TYPE_EQUIP
+
TYPE_SPELL
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
token
:
RegisterEffect
(
e1_1
,
true
)
local
e1_2
=
Effect
.
CreateEffect
(
token
)
e1_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_2
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_2
:
SetValue
(
1
)
token
:
RegisterEffect
(
e1_2
,
true
)
token
:
CancelToGrave
()
if
Duel
.
Equip
(
tp
,
token
,
ec
,
false
)
then
if
code
==
20100002
then
--御 刀 加 州 清 光
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
300
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2_2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2_2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetCost
(
Cirn9
.
amcost
)
--am means Asakura Mihono
e2_2
:
SetOperation
(
Cirn9
.
amop
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100004
then
--御 刀 骚 速 之 剑
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2_1
:
SetValue
(
500
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_2
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e2_2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2_2
:
SetTarget
(
Cirn9
.
sclimit
)
--sc means Setouchi Chie
e2_2
:
SetValue
(
aux
.
tgoval
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100006
then
--御 刀 北 谷 菜 切 二 王 清 纲
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
500
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
--Shichinosato Kofuki
e2_2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_2
:
SetCode
(
EFFECT_ADD_TYPE
)
e2_2
:
SetValue
(
TYPE_TUNER
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100008
then
--御 刀 莲 华 不 动 辉 广
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
200
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2_2
:
SetValue
(
200
)
token
:
RegisterEffect
(
e2_2
)
local
e2_3
=
Effect
.
CreateEffect
(
ec
)
e2_3
:
SetCategory
(
CATEGORY_RECOVER
)
e2_3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2_3
:
SetRange
(
LOCATION_SZONE
)
e2_3
:
SetCountLimit
(
1
)
e2_3
:
SetTarget
(
Cirn9
.
mktg
)
--mk means Musumi Kiyoka
e2_3
:
SetOperation
(
Cirn9
.
mkop
)
token
:
RegisterEffect
(
e2_3
)
end
if
code
==
20100011
then
--御 刀 实 休 光 忠
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
400
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2_2
:
SetValue
(
400
)
token
:
RegisterEffect
(
e2_2
)
local
e2_3
=
Effect
.
CreateEffect
(
ec
)
e2_3
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e2_3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2_3
:
SetCode
(
EVENT_FREE_CHAIN
)
e2_3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2_3
:
SetRange
(
LOCATION_SZONE
)
e2_3
:
SetCost
(
Cirn9
.
amcost
)
e2_3
:
SetTarget
(
Cirn9
.
kmtg
)
--km means Kitora Mirja
e2_3
:
SetOperation
(
Cirn9
.
kmop
)
token
:
RegisterEffect
(
e2_3
)
end
if
code
==
20100013
then
--御 刀 千 鸟
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
500
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2_2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2_2
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DISABLE
)
e2_2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_ATTACK
+
TIMING_BATTLE_START
)
e2_2
:
SetCost
(
Cirn9
.
amcost
)
e2_2
:
SetCondition
(
Cirn9
.
ekcon
)
e2_2
:
SetTarget
(
Cirn9
.
ektg
)
--ek means Etou Kanami
e2_2
:
SetOperation
(
Cirn9
.
ekop
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100015
then
--御 刀 孙 六 兼 元
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
300
)
token
:
RegisterEffect
(
e2_1
)
--Activate
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetCategory
(
CATEGORY_DAMAGE
+
CATEGORY_DESTROY
)
e2_2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2_2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2_2
:
SetCost
(
Cirn9
.
amcost
)
e2_2
:
SetCondition
(
Cirn9
.
ymcon
)
--ym means Yanase Mai
e2_2
:
SetTarget
(
Cirn9
.
ymtg
)
e2_2
:
SetOperation
(
Cirn9
.
ymop
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100017
then
--御 刀 小 乌 丸
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
400
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_2
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e2_2
:
SetCondition
(
Cirn9
.
jhcon
)
--jh means Jujo Hiyori
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100019
then
--御 刀 妙 法 村 正
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
400
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2_2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetCost
(
Cirn9
.
amcost
)
e2_2
:
SetOperation
(
Cirn9
.
isop
)
--is means Itomi Sayaka
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100021
then
--御 刀 弥 弥 切 丸
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
800
)
--
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_2
:
SetCode
(
EFFECT_PIERCE
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100024
then
--御 刀 越 前 康 继
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2_1
:
SetValue
(
800
)
--
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2_2
:
SetCode
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e2_2
:
SetValue
(
Cirn9
.
kalimit1
)
--ka means Kohagura Eren
token
:
RegisterEffect
(
e2_2
)
local
e2_3
=
Effect
.
CreateEffect
(
ec
)
e2_3
:
SetType
(
EFFECT_TYPE_FIELD
)
e2_3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e2_3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2_3
:
SetRange
(
LOCATION_SZONE
)
e2_3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2_3
:
SetTarget
(
Cirn9
.
kalimit2
)
e2_3
:
SetValue
(
aux
.
tgoval
)
token
:
RegisterEffect
(
e2_3
)
end
if
code
==
20100026
then
--御 刀 薄 绿
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
600
)
--
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2_2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e2_2
:
SetTargetRange
(
0
,
1
)
e2_2
:
SetValue
(
Cirn9
.
smlimit
)
--sm means Shidou Maki
e2_2
:
SetCondition
(
Cirn9
.
smcon
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100028
then
--御 刀 九 字 兼 定
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
500
)
--
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2_2
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetCost
(
Cirn9
.
amcost
)
e2_2
:
SetCondition
(
Cirn9
.
kscon
)
--ks means konohana Suzuka
e2_2
:
SetOperation
(
Cirn9
.
ksop
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100030
then
--御 刀 水 神 切 兼 光
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
500
)
--
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2_2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e2_2
:
SetTarget
(
Cirn9
.
sytg
)
--sy means Satsuki Yomi
e2_2
:
SetValue
(
1
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100032
then
--御 刀 笑 面 青 江
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
500
)
--Tsubakuro Yume
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_2
:
SetCode
(
EFFECT_ATTACK_ALL
)
e2_2
:
SetValue
(
1
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100035
then
--御 刀 童 子 切 安 纲
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
700
)
--Origami Yukari
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e2_2
:
SetCode
(
EFFECT_LINK_SPELL_KOISHI
)
e2_2
:
SetValue
(
LINK_MARKER_TOP
)
token
:
RegisterEffect
(
e2_2
)
end
return
true
else
Duel
.
SendtoGrave
(
token
,
REASON_RULE
)
return
false
end
end
function
Cirn9
.
amcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
local
syk
=
e
:
GetHandler
():
GetEquipTarget
()
e
:
SetLabelObject
(
syk
)
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
function
Cirn9
.
amfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xc90
)
end
function
Cirn9
.
amop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sg
=
Duel
.
GetMatchingGroup
(
Cirn9
.
amfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
c
=
e
:
GetHandler
()
local
uc
=
sg
:
GetFirst
()
while
uc
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
300
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
uc
:
RegisterEffect
(
e1
)
uc
=
sg
:
GetNext
()
end
end
function
Cirn9
.
sclimit
(
e
,
c
)
return
c
:
IsSetCard
(
0xc90
)
and
c
~=
e
:
GetHandler
():
GetEquipTarget
()
end
function
Cirn9
.
mkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xc90
)
end
function
Cirn9
.
mktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
rec
=
Duel
.
GetMatchingGroupCount
(
Cirn9
.
mkfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
*
400
if
chk
==
0
then
return
rec
>
0
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
rec
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
rec
)
end
function
Cirn9
.
mkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rec
=
Duel
.
GetMatchingGroupCount
(
Cirn9
.
mkfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
*
400
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
Duel
.
Recover
(
p
,
rec
,
REASON_EFFECT
)
end
function
Cirn9
.
kmfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
and
c
:
IsSetCard
(
0xc90
)
end
function
Cirn9
.
kmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
Cirn9
.
kmfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingTarget
(
Cirn9
.
kmfilter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Cirn9
.
kmfilter
,
tp
,
LOCATION_GRAVE
,
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
Cirn9
.
kmop
(
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
Cirn9
.
ekcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
end
function
Cirn9
.
ektg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
end
function
Cirn9
.
ekop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
0
)
tc
:
RegisterEffect
(
e1
)
if
Duel
.
GetTurnPlayer
()
==
tp
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e3
:
SetValue
(
RESET_TURN_SET
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e3
)
end
end
end
function
Cirn9
.
ymcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
Duel
.
GetTurnPlayer
()
end
function
Cirn9
.
ymtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
tg
=
Duel
.
GetAttacker
()
if
chkc
then
return
chkc
==
tg
end
if
chk
==
0
then
return
tg
:
IsOnField
()
and
tg
:
IsCanBeEffectTarget
(
e
)
end
Duel
.
SetTargetCard
(
tg
)
local
dam
=
tg
:
GetAttack
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
dam
)
Duel
.
SetChainLimit
(
Cirn9
.
ymchainlm
)
end
function
Cirn9
.
ymchainlm
(
e
,
rp
,
tp
)
return
tp
==
rp
end
function
Cirn9
.
ymop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
then
Duel
.
Damage
(
1
-
tp
,
tc
:
GetAttack
(),
REASON_EFFECT
)
end
end
end
function
Cirn9
.
jhcon
(
e
)
local
cg
=
e
:
GetHandler
():
GetEquipTarget
():
GetColumnGroup
():
Filter
(
Card
.
IsControler
,
nil
,
1
-
e
:
GetHandlerPlayer
())
return
cg
:
FilterCount
(
Card
.
IsType
,
nil
,
TYPE_MONSTER
)
==
0
end
function
Cirn9
.
isop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
e
:
GetLabelObject
()
if
tc
then
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e4
:
SetValue
(
Cirn9
.
efilter
)
e4
:
SetOwnerPlayer
(
tp
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e4
)
end
end
function
Cirn9
.
efilter
(
e
,
re
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
function
Cirn9
.
kalimit1
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xc90
)
and
c
~=
e
:
GetHandler
():
GetEquipTarget
()
end
function
Cirn9
.
kalimit2
(
e
,
c
)
return
c
:
IsSetCard
(
0xc90
)
and
c
~=
e
:
GetHandler
():
GetEquipTarget
()
end
function
Cirn9
.
smlimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
Cirn9
.
smcon
(
e
)
local
tc
=
e
:
GetHandler
():
GetEquipTarget
()
return
Duel
.
GetAttacker
()
==
tc
or
Duel
.
GetAttackTarget
()
==
tc
end
function
Cirn9
.
kscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
ep
~=
tp
and
(
Duel
.
GetAttacker
()
==
e
:
GetHandler
():
GetEquipTarget
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
():
GetEquipTarget
())
end
function
Cirn9
.
ksop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
lp
=
Duel
.
GetLP
(
1
-
tp
)
if
lp
>=
1500
then
Duel
.
SetLP
(
1
-
tp
,
lp
-
1500
)
else
Duel
.
SetLP
(
1
-
tp
,
0
)
end
end
function
Cirn9
.
sytg
(
e
,
c
)
return
c
:
IsType
(
TYPE_EQUIP
)
and
c
:
IsSetCard
(
0xc91
)
end
--Add Butaishoujyo Property to ReLive Monster
function
Cirn9
.
ReLiveMonster
(
c
)
c
:
EnableCounterPermit
(
0xc99
)
--attack cost
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_ATTACK_COST
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCost
(
Cirn9
.
rlcost
)
e1
:
SetOperation
(
Cirn9
.
rlop
)
c
:
RegisterEffect
(
e1
)
--Play music <Hoshi No Dialogue> at the first turn
if
not
Cirn9
.
global_check1
then
Cirn9
.
global_check1
=
true
local
ge1
=
Effect
.
GlobalEffect
()
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge1
:
SetCondition
(
Cirn9
.
opcon
)
ge1
:
SetOperation
(
Cirn9
.
opop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
--ac1
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_ADD_COUNTER
+
0xc99
)
e3
:
SetOperation
(
Cirn9
.
acop
)
c
:
RegisterEffect
(
e3
)
end
--ReLive field magic can not be setted
function
Cirn9
.
ReLiveStage
(
c
)
if
not
Cirn9
.
global_check2
then
Cirn9
.
global_check2
=
true
local
ge
=
Effect
.
GlobalEffect
()
ge
:
SetType
(
EFFECT_TYPE_FIELD
)
ge
:
SetCode
(
EFFECT_CANNOT_SSET
)
ge
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ge
:
SetTargetRange
(
1
,
1
)
ge
:
SetTarget
(
Cirn9
.
stg
)
Duel
.
RegisterEffect
(
ge
,
0
)
end
--Activate without operation
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
20100108
,
1
))
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetTarget
(
Cirn9
.
nanacon2
)
e2
:
SetOperation
(
Cirn9
.
stageop
)
c
:
RegisterEffect
(
e2
)
end
function
Cirn9
.
ReLink
(
c
)
--link
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
20100098
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_ONFIELD
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e1
:
SetTarget
(
Cirn9
.
linktg
)
c
:
RegisterEffect
(
e1
)
end
function
Cirn9
.
linktg
(
e
,
c
)
return
e
:
GetHandler
():
GetLinkedGroup
():
IsContains
(
c
)
end
function
Cirn9
.
ffilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_FIELD
)
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
,
true
,
true
)
and
c
:
IsSetCard
(
0xc99
)
end
--Activate ReliveStage or Not
function
Cirn9
.
Climax
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
not
fc
and
not
Duel
.
IsExistingMatchingCard
(
Cirn9
.
ffilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
tp
)
then
return
0
end
if
not
fc
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
20100060
,
4
))
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Cirn9
.
ffilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
te
:
UseCountLimit
(
tp
,
1
,
true
)
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
Duel
.
RaiseEvent
(
tc
,
4179255
,
te
,
0
,
tp
,
tp
,
Duel
.
GetCurrentChain
())
return
1
end
end
if
fc
then
if
not
Duel
.
IsExistingMatchingCard
(
Cirn9
.
ffilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
tp
)
then
return
2
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
20100060
,
5
))
then
Duel
.
SendtoGrave
(
fc
,
REASON_RULE
)
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
20100060
,
4
))
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Cirn9
.
ffilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
te
:
UseCountLimit
(
tp
,
1
,
true
)
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
Duel
.
RaiseEvent
(
tc
,
4179255
,
te
,
0
,
tp
,
tp
,
Duel
.
GetCurrentChain
())
return
1
end
end
return
2
end
end
function
Cirn9
.
rlcost
(
e
,
c
,
tp
)
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
--Copy From THC Makai Deck
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
--Thanks Hiragi Sama
local
fc
=
fa
-
fb
return
(
fc
<
6
)
or
(
e
:
GetHandler
():
GetFlagEffect
(
20100070
)
~=
0
)
or
Duel
.
IsPlayerAffectedByEffect
(
tp
,
20100134
)
end
function
Cirn9
.
rlop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
20100134
)
then
return
end
if
(
e
:
GetHandler
():
GetFlagEffect
(
20100070
)
>
0
)
then
return
end
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
rd
=
6
-
fa
+
fb
if
e
:
GetHandler
():
IsOriginalSetCard
(
0xc99
)
then
Debug
.
Message
(
"ReLive卡行动次数剩余"
..
rd
..
"次 DA☆ZE"
)
end
end
function
Cirn9
.
opcon
(
e
)
return
Duel
.
GetTurnCount
()
==
1
end
function
Cirn9
.
opop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
11
,
0
,
aux
.
Stringid
(
20100060
,
3
))
end
function
Cirn9
.
ap1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
fc
=
fa
-
fb
if
chk
==
0
then
return
fc
<
6
end
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
rd
=
5
-
fc
Debug
.
Message
(
"ReLive卡行动次数剩余"
..
rd
..
"次 DA☆ZE"
)
end
function
Cirn9
.
ap2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
fc
=
fa
-
fb
if
chk
==
0
then
return
fc
<
5
end
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
rd
=
4
-
fc
Debug
.
Message
(
"ReLive卡行动次数剩余"
..
rd
..
"次 DA☆ZE"
)
end
function
Cirn9
.
fumiap2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
fc
=
fa
-
fb
if
chk
==
0
then
return
fc
<
5
or
(
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
and
fc
<
6
)
end
if
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
then
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
else
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
local
ea
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
eb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
ec
=
6
-
ea
+
eb
Debug
.
Message
(
"ReLive卡行动次数剩余"
..
ec
..
"次 DA☆ZE"
)
end
function
Cirn9
.
stg
(
e
,
c
)
return
c
:
IsSetCard
(
0xc99
)
and
c
:
IsType
(
TYPE_FIELD
)
end
function
Cirn9
.
clcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
not
fc
and
not
Duel
.
IsExistingMatchingCard
(
Cirn9
.
ffilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
tp
)
then
return
false
end
return
true
end
function
Cirn9
.
clcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xc99
,
3
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xc99
,
3
,
REASON_COST
)
Duel
.
RegisterFlagEffect
(
tp
,
20100053
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100053
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100053
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
Cirn9
.
RevueBgm
(
tp
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
fcode
=
fc
:
GetOriginalCode
()
Duel
.
Hint
(
11
,
0
,
aux
.
Stringid
(
fcode
,
0
))
end
function
Cirn9
.
GetLine
(
c
)
if
c
:
IsLocation
(
LOCATION_FZONE
)
then
return
99
end
if
c
:
IsLocation
(
LOCATION_SZONE
)
then
return
1
end
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
return
2
end
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
>
4
then
return
3
end
end
function
Cirn9
.
fap1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
f1
=
Duel
.
GetFlagEffect
(
tp
,
20100088
)
local
f2
=
Duel
.
GetFlagEffect
(
tp
,
20100089
)
local
fc
=
fa
-
fb
local
f3
=
f1
-
f2
if
chk
==
0
then
return
(
fc
<
6
and
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
))
or
(
f3
>
0
)
end
if
fc
<
6
then
if
f3
<
1
then
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
elseif
f3
>
0
then
if
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
20100088
,
3
))
then
Duel
.
RegisterFlagEffect
(
tp
,
20100089
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
else
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
else
Duel
.
RegisterFlagEffect
(
tp
,
20100089
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
else
Duel
.
RegisterFlagEffect
(
tp
,
20100089
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
local
ea
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
eb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
ec
=
6
-
ea
+
eb
Debug
.
Message
(
"ReLive卡行动次数剩余"
..
ec
..
"次 DA☆ZE"
)
end
function
Cirn9
.
arrap1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
og
=
e
:
GetHandler
():
GetOverlayGroup
()
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
f1
=
Duel
.
GetFlagEffect
(
tp
,
20100088
)
local
f2
=
Duel
.
GetFlagEffect
(
tp
,
20100089
)
local
fc
=
fa
-
fb
local
f3
=
f1
-
f2
if
chk
==
0
then
return
(
fc
<
6
and
og
:
FilterCount
(
Card
.
IsAbleToRemoveAsCost
,
nil
)
>
0
)
or
(
f3
>
0
)
end
if
fc
<
6
then
if
f3
<
1
then
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
g
=
og
:
FilterSelect
(
tp
,
Card
.
IsAbleToRemoveAsCost
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
elseif
f3
>
0
then
if
og
:
FilterCount
(
Card
.
IsAbleToRemoveAsCost
,
nil
)
>
0
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
20100088
,
3
))
then
Duel
.
RegisterFlagEffect
(
tp
,
20100089
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
else
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
g
=
og
:
FilterSelect
(
tp
,
Card
.
IsAbleToRemoveAsCost
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
else
Duel
.
RegisterFlagEffect
(
tp
,
20100089
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
else
Duel
.
RegisterFlagEffect
(
tp
,
20100089
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
local
ea
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
eb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
ec
=
6
-
ea
+
eb
Debug
.
Message
(
"ReLive卡行动次数剩余"
..
ec
..
"次 DA☆ZE"
)
end
function
Cirn9
.
rlink
(
c
)
return
c
:
IsType
(
TYPE_LINK
)
or
(
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsType
(
TYPE_SPELL
))
and
c
:
IsSetCard
(
0xc99
)
and
c
:
IsFaceup
()
end
function
Cirn9
.
sap2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
fc
=
fa
-
fb
local
rls
=
0
local
lg
=
e
:
GetHandler
():
GetLinkedGroup
()
if
lg
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0xc99
)
then
rls
=
1
end
if
e
:
GetHandler
():
IsHasEffect
(
20100098
)
then
rls
=
1
end
if
chk
==
0
then
return
(
fc
<
5
or
((
rls
==
1
)
and
(
fc
<
6
)))
end
if
(
rls
==
1
)
then
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
else
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
local
ea
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
eb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
ec
=
6
-
ea
+
eb
Debug
.
Message
(
"ReLive卡行动次数剩余"
..
ec
..
"次 DA☆ZE"
)
end
function
Cirn9
.
IsReLinkState
(
c
)
if
c
:
IsHasEffect
(
20100098
)
then
return
true
end
if
c
:
GetLinkedGroup
():
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0xc99
)
then
return
true
end
return
false
end
function
Cirn9
.
nanacon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetFlagEffect
(
tp
,
20100068
)
==
0
)
end
function
Cirn9
.
nanacon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
(
Duel
.
GetFlagEffect
(
tp
,
20100068
)
~=
0
)
end
end
function
Cirn9
.
stageop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Cirn9
.
RevueBgm
(
tp
)
end
function
Cirn9
.
FinishAct
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
20100108
,
3
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetCost
(
Cirn9
.
finalcost
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
Cirn9
.
finalcon
)
return
e1
end
function
Cirn9
.
finalcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
function
Cirn9
.
finalcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tid
=
e
:
GetHandler
():
GetTurnID
()
return
(
Duel
.
GetTurnCount
()
==
tid
+
1
)
end
function
Cirn9
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
for
i
=
1
,
ev
do
Duel
.
RegisterFlagEffect
(
tp
,
20100052
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
--Cirn9 Personal Function
Cirn9
=
Cirn9
or
{}
--Welcome my firend~
--Pack 01 Toji no Miko is on the line 5
--Pack 02 Shoujyo Kageki ReLive is on the line 460
function
Cirn9
.
TojiEquip
(
ec
,
code
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
token
=
Duel
.
CreateToken
(
tp
,
code
)
Duel
.
MoveToField
(
token
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
token
:
CancelToGrave
()
local
e1_1
=
Effect
.
CreateEffect
(
token
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_1
:
SetValue
(
TYPE_EQUIP
+
TYPE_SPELL
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
token
:
RegisterEffect
(
e1_1
,
true
)
local
e1_2
=
Effect
.
CreateEffect
(
token
)
e1_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_2
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_2
:
SetValue
(
1
)
token
:
RegisterEffect
(
e1_2
,
true
)
token
:
CancelToGrave
()
if
Duel
.
Equip
(
tp
,
token
,
ec
,
false
)
then
if
code
==
20100002
then
--御 刀 加 州 清 光
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
300
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2_2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2_2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetCost
(
Cirn9
.
amcost
)
--am means Asakura Mihono
e2_2
:
SetOperation
(
Cirn9
.
amop
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100004
then
--御 刀 骚 速 之 剑
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2_1
:
SetValue
(
500
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_2
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e2_2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2_2
:
SetTarget
(
Cirn9
.
sclimit
)
--sc means Setouchi Chie
e2_2
:
SetValue
(
aux
.
tgoval
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100006
then
--御 刀 北 谷 菜 切 二 王 清 纲
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
500
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
--Shichinosato Kofuki
e2_2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_2
:
SetCode
(
EFFECT_ADD_TYPE
)
e2_2
:
SetValue
(
TYPE_TUNER
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100008
then
--御 刀 莲 华 不 动 辉 广
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
200
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2_2
:
SetValue
(
200
)
token
:
RegisterEffect
(
e2_2
)
local
e2_3
=
Effect
.
CreateEffect
(
ec
)
e2_3
:
SetCategory
(
CATEGORY_RECOVER
)
e2_3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2_3
:
SetRange
(
LOCATION_SZONE
)
e2_3
:
SetCountLimit
(
1
)
e2_3
:
SetTarget
(
Cirn9
.
mktg
)
--mk means Musumi Kiyoka
e2_3
:
SetOperation
(
Cirn9
.
mkop
)
token
:
RegisterEffect
(
e2_3
)
end
if
code
==
20100011
then
--御 刀 实 休 光 忠
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
400
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2_2
:
SetValue
(
400
)
token
:
RegisterEffect
(
e2_2
)
local
e2_3
=
Effect
.
CreateEffect
(
ec
)
e2_3
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e2_3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2_3
:
SetCode
(
EVENT_FREE_CHAIN
)
e2_3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2_3
:
SetRange
(
LOCATION_SZONE
)
e2_3
:
SetCost
(
Cirn9
.
amcost
)
e2_3
:
SetTarget
(
Cirn9
.
kmtg
)
--km means Kitora Mirja
e2_3
:
SetOperation
(
Cirn9
.
kmop
)
token
:
RegisterEffect
(
e2_3
)
end
if
code
==
20100013
then
--御 刀 千 鸟
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
500
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2_2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2_2
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DISABLE
)
e2_2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_ATTACK
+
TIMING_BATTLE_START
)
e2_2
:
SetCost
(
Cirn9
.
amcost
)
e2_2
:
SetCondition
(
Cirn9
.
ekcon
)
e2_2
:
SetTarget
(
Cirn9
.
ektg
)
--ek means Etou Kanami
e2_2
:
SetOperation
(
Cirn9
.
ekop
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100015
then
--御 刀 孙 六 兼 元
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
300
)
token
:
RegisterEffect
(
e2_1
)
--Activate
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetCategory
(
CATEGORY_DAMAGE
+
CATEGORY_DESTROY
)
e2_2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2_2
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e2_2
:
SetCost
(
Cirn9
.
amcost
)
e2_2
:
SetCondition
(
Cirn9
.
ymcon
)
--ym means Yanase Mai
e2_2
:
SetTarget
(
Cirn9
.
ymtg
)
e2_2
:
SetOperation
(
Cirn9
.
ymop
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100017
then
--御 刀 小 乌 丸
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
400
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_2
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e2_2
:
SetCondition
(
Cirn9
.
jhcon
)
--jh means Jujo Hiyori
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100019
then
--御 刀 妙 法 村 正
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
400
)
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2_2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetCost
(
Cirn9
.
amcost
)
e2_2
:
SetOperation
(
Cirn9
.
isop
)
--is means Itomi Sayaka
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100021
then
--御 刀 弥 弥 切 丸
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
800
)
--
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_2
:
SetCode
(
EFFECT_PIERCE
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100024
then
--御 刀 越 前 康 继
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2_1
:
SetValue
(
800
)
--
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2_2
:
SetCode
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e2_2
:
SetValue
(
Cirn9
.
kalimit1
)
--ka means Kohagura Eren
token
:
RegisterEffect
(
e2_2
)
local
e2_3
=
Effect
.
CreateEffect
(
ec
)
e2_3
:
SetType
(
EFFECT_TYPE_FIELD
)
e2_3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e2_3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2_3
:
SetRange
(
LOCATION_SZONE
)
e2_3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2_3
:
SetTarget
(
Cirn9
.
kalimit2
)
e2_3
:
SetValue
(
aux
.
tgoval
)
token
:
RegisterEffect
(
e2_3
)
end
if
code
==
20100026
then
--御 刀 薄 绿
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
600
)
--
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2_2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e2_2
:
SetTargetRange
(
0
,
1
)
e2_2
:
SetValue
(
Cirn9
.
smlimit
)
--sm means Shidou Maki
e2_2
:
SetCondition
(
Cirn9
.
smcon
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100028
then
--御 刀 九 字 兼 定
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
500
)
--
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2_2
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetCost
(
Cirn9
.
amcost
)
e2_2
:
SetCondition
(
Cirn9
.
kscon
)
--ks means konohana Suzuka
e2_2
:
SetOperation
(
Cirn9
.
ksop
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100030
then
--御 刀 水 神 切 兼 光
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
500
)
--
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2_2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e2_2
:
SetTarget
(
Cirn9
.
sytg
)
--sy means Satsuki Yomi
e2_2
:
SetValue
(
1
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100032
then
--御 刀 笑 面 青 江
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
500
)
--Tsubakuro Yume
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_2
:
SetCode
(
EFFECT_ATTACK_ALL
)
e2_2
:
SetValue
(
1
)
token
:
RegisterEffect
(
e2_2
)
end
if
code
==
20100035
then
--御 刀 童 子 切 安 纲
local
e2_1
=
Effect
.
CreateEffect
(
ec
)
e2_1
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1
:
SetValue
(
700
)
--Origami Yukari
token
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
ec
)
e2_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e2_2
:
SetCode
(
EFFECT_LINK_SPELL_KOISHI
)
e2_2
:
SetValue
(
LINK_MARKER_TOP
)
token
:
RegisterEffect
(
e2_2
)
end
return
true
else
Duel
.
SendtoGrave
(
token
,
REASON_RULE
)
return
false
end
end
function
Cirn9
.
amcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
local
syk
=
e
:
GetHandler
():
GetEquipTarget
()
e
:
SetLabelObject
(
syk
)
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
function
Cirn9
.
amfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xc90
)
end
function
Cirn9
.
amop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sg
=
Duel
.
GetMatchingGroup
(
Cirn9
.
amfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
c
=
e
:
GetHandler
()
local
uc
=
sg
:
GetFirst
()
while
uc
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
300
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
uc
:
RegisterEffect
(
e1
)
uc
=
sg
:
GetNext
()
end
end
function
Cirn9
.
sclimit
(
e
,
c
)
return
c
:
IsSetCard
(
0xc90
)
and
c
~=
e
:
GetHandler
():
GetEquipTarget
()
end
function
Cirn9
.
mkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xc90
)
end
function
Cirn9
.
mktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
rec
=
Duel
.
GetMatchingGroupCount
(
Cirn9
.
mkfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
*
400
if
chk
==
0
then
return
rec
>
0
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
rec
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
rec
)
end
function
Cirn9
.
mkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rec
=
Duel
.
GetMatchingGroupCount
(
Cirn9
.
mkfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
*
400
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
Duel
.
Recover
(
p
,
rec
,
REASON_EFFECT
)
end
function
Cirn9
.
kmfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
and
c
:
IsSetCard
(
0xc90
)
end
function
Cirn9
.
kmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
Cirn9
.
kmfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingTarget
(
Cirn9
.
kmfilter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Cirn9
.
kmfilter
,
tp
,
LOCATION_GRAVE
,
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
Cirn9
.
kmop
(
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
Cirn9
.
ekcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
end
function
Cirn9
.
ektg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
end
function
Cirn9
.
ekop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
0
)
tc
:
RegisterEffect
(
e1
)
if
Duel
.
GetTurnPlayer
()
==
tp
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e3
:
SetValue
(
RESET_TURN_SET
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e3
)
end
end
end
function
Cirn9
.
ymcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
Duel
.
GetTurnPlayer
()
end
function
Cirn9
.
ymtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
tg
=
Duel
.
GetAttacker
()
if
chkc
then
return
chkc
==
tg
end
if
chk
==
0
then
return
tg
:
IsOnField
()
and
tg
:
IsCanBeEffectTarget
(
e
)
end
Duel
.
SetTargetCard
(
tg
)
local
dam
=
tg
:
GetAttack
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
dam
)
Duel
.
SetChainLimit
(
Cirn9
.
ymchainlm
)
end
function
Cirn9
.
ymchainlm
(
e
,
rp
,
tp
)
return
tp
==
rp
end
function
Cirn9
.
ymop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
then
Duel
.
Damage
(
1
-
tp
,
tc
:
GetAttack
(),
REASON_EFFECT
)
end
end
end
function
Cirn9
.
jhcon
(
e
)
local
cg
=
e
:
GetHandler
():
GetEquipTarget
():
GetColumnGroup
():
Filter
(
Card
.
IsControler
,
nil
,
1
-
e
:
GetHandlerPlayer
())
return
cg
:
FilterCount
(
Card
.
IsType
,
nil
,
TYPE_MONSTER
)
==
0
end
function
Cirn9
.
isop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
e
:
GetLabelObject
()
if
tc
then
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e4
:
SetValue
(
Cirn9
.
efilter
)
e4
:
SetOwnerPlayer
(
tp
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e4
)
end
end
function
Cirn9
.
efilter
(
e
,
re
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
function
Cirn9
.
kalimit1
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xc90
)
and
c
~=
e
:
GetHandler
():
GetEquipTarget
()
end
function
Cirn9
.
kalimit2
(
e
,
c
)
return
c
:
IsSetCard
(
0xc90
)
and
c
~=
e
:
GetHandler
():
GetEquipTarget
()
end
function
Cirn9
.
smlimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
Cirn9
.
smcon
(
e
)
local
tc
=
e
:
GetHandler
():
GetEquipTarget
()
return
Duel
.
GetAttacker
()
==
tc
or
Duel
.
GetAttackTarget
()
==
tc
end
function
Cirn9
.
kscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
ep
~=
tp
and
(
Duel
.
GetAttacker
()
==
e
:
GetHandler
():
GetEquipTarget
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
():
GetEquipTarget
())
end
function
Cirn9
.
ksop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
lp
=
Duel
.
GetLP
(
1
-
tp
)
if
lp
>=
1500
then
Duel
.
SetLP
(
1
-
tp
,
lp
-
1500
)
else
Duel
.
SetLP
(
1
-
tp
,
0
)
end
end
function
Cirn9
.
sytg
(
e
,
c
)
return
c
:
IsType
(
TYPE_EQUIP
)
and
c
:
IsSetCard
(
0xc91
)
end
--Add Butaishoujyo Property to ReLive Monster
function
Cirn9
.
ReLiveMonster
(
c
)
c
:
EnableCounterPermit
(
0xc99
)
--attack cost
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_ATTACK_COST
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCost
(
Cirn9
.
rlcost
)
e1
:
SetOperation
(
Cirn9
.
rlop
)
c
:
RegisterEffect
(
e1
)
--Play music <Hoshi No Dialogue> at the first turn
if
not
Cirn9
.
global_check1
then
Cirn9
.
global_check1
=
true
local
ge1
=
Effect
.
GlobalEffect
()
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge1
:
SetCondition
(
Cirn9
.
opcon
)
ge1
:
SetOperation
(
Cirn9
.
opop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
--ac1
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_ADD_COUNTER
+
0xc99
)
e3
:
SetOperation
(
Cirn9
.
acop
)
c
:
RegisterEffect
(
e3
)
end
--ReLive field magic can not be setted
function
Cirn9
.
ReLiveStage
(
c
)
if
not
Cirn9
.
global_check2
then
Cirn9
.
global_check2
=
true
local
ge
=
Effect
.
GlobalEffect
()
ge
:
SetType
(
EFFECT_TYPE_FIELD
)
ge
:
SetCode
(
EFFECT_CANNOT_SSET
)
ge
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ge
:
SetTargetRange
(
1
,
1
)
ge
:
SetTarget
(
Cirn9
.
stg
)
Duel
.
RegisterEffect
(
ge
,
0
)
end
--Activate without operation
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
20100108
,
1
))
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetTarget
(
Cirn9
.
nanacon2
)
e2
:
SetOperation
(
Cirn9
.
stageop
)
c
:
RegisterEffect
(
e2
)
end
function
Cirn9
.
ReLink
(
c
)
--link
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
20100098
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_ONFIELD
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e1
:
SetTarget
(
Cirn9
.
linktg
)
c
:
RegisterEffect
(
e1
)
end
function
Cirn9
.
linktg
(
e
,
c
)
return
e
:
GetHandler
():
GetLinkedGroup
():
IsContains
(
c
)
end
function
Cirn9
.
ffilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_FIELD
)
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
,
true
,
true
)
and
c
:
IsSetCard
(
0xc99
)
end
--Activate ReliveStage or Not
function
Cirn9
.
Climax
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
not
fc
and
not
Duel
.
IsExistingMatchingCard
(
Cirn9
.
ffilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
tp
)
then
return
0
end
if
not
fc
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
20100060
,
4
))
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Cirn9
.
ffilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
te
:
UseCountLimit
(
tp
,
1
,
true
)
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
Duel
.
RaiseEvent
(
tc
,
4179255
,
te
,
0
,
tp
,
tp
,
Duel
.
GetCurrentChain
())
return
1
end
end
if
fc
then
if
not
Duel
.
IsExistingMatchingCard
(
Cirn9
.
ffilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
tp
)
then
return
2
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
20100060
,
5
))
then
Duel
.
SendtoGrave
(
fc
,
REASON_RULE
)
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
20100060
,
4
))
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Cirn9
.
ffilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
te
:
UseCountLimit
(
tp
,
1
,
true
)
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
Duel
.
RaiseEvent
(
tc
,
4179255
,
te
,
0
,
tp
,
tp
,
Duel
.
GetCurrentChain
())
return
1
end
end
return
2
end
end
function
Cirn9
.
rlcost
(
e
,
c
,
tp
)
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
--Copy From THC Makai Deck
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
--Thanks Hiragi Sama
local
fc
=
fa
-
fb
return
(
fc
<
6
)
or
(
e
:
GetHandler
():
GetFlagEffect
(
20100070
)
~=
0
)
or
Duel
.
IsPlayerAffectedByEffect
(
tp
,
20100134
)
end
function
Cirn9
.
rlop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
20100134
)
then
return
end
if
(
e
:
GetHandler
():
GetFlagEffect
(
20100070
)
>
0
)
then
return
end
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
rd
=
6
-
fa
+
fb
if
e
:
GetHandler
():
IsOriginalSetCard
(
0xc99
)
then
Debug
.
Message
(
"ReLive卡行动次数剩余"
..
rd
..
"次 DA☆ZE"
)
end
end
function
Cirn9
.
opcon
(
e
)
return
Duel
.
GetTurnCount
()
==
1
end
function
Cirn9
.
opop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
11
,
0
,
aux
.
Stringid
(
20100060
,
3
))
end
function
Cirn9
.
ap1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
fc
=
fa
-
fb
if
chk
==
0
then
return
fc
<
6
end
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
local
rd
=
5
-
fc
Debug
.
Message
(
"ReLive卡行动次数剩余"
..
rd
..
"次 DA☆ZE"
)
end
function
Cirn9
.
ap2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
fc
=
fa
-
fb
if
chk
==
0
then
return
fc
<
5
end
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
local
rd
=
4
-
fc
Debug
.
Message
(
"ReLive卡行动次数剩余"
..
rd
..
"次 DA☆ZE"
)
end
function
Cirn9
.
fumiap2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
fc
=
fa
-
fb
if
chk
==
0
then
return
fc
<
5
or
(
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
and
fc
<
6
)
end
if
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
then
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
else
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
local
ea
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
eb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
ec
=
6
-
ea
+
eb
Debug
.
Message
(
"ReLive卡行动次数剩余"
..
ec
..
"次 DA☆ZE"
)
end
function
Cirn9
.
stg
(
e
,
c
)
return
c
:
IsSetCard
(
0xc99
)
and
c
:
IsType
(
TYPE_FIELD
)
end
function
Cirn9
.
clcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
not
fc
and
not
Duel
.
IsExistingMatchingCard
(
Cirn9
.
ffilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
tp
)
then
return
false
end
return
true
end
function
Cirn9
.
clcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0xc99
,
3
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveCounter
(
tp
,
0xc99
,
3
,
REASON_COST
)
Duel
.
RegisterFlagEffect
(
tp
,
20100053
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100053
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100053
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
Cirn9
.
RevueBgm
(
tp
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
fcode
=
fc
:
GetOriginalCode
()
Duel
.
Hint
(
11
,
0
,
aux
.
Stringid
(
fcode
,
0
))
end
function
Cirn9
.
GetLine
(
c
)
if
c
:
IsLocation
(
LOCATION_FZONE
)
then
return
99
end
if
c
:
IsLocation
(
LOCATION_SZONE
)
then
return
1
end
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
return
2
end
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
>
4
then
return
3
end
end
function
Cirn9
.
fap1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
f1
=
Duel
.
GetFlagEffect
(
tp
,
20100088
)
local
f2
=
Duel
.
GetFlagEffect
(
tp
,
20100089
)
local
fc
=
fa
-
fb
local
f3
=
f1
-
f2
if
chk
==
0
then
return
(
fc
<
6
and
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
))
or
(
f3
>
0
)
end
if
fc
<
6
then
if
f3
<
1
then
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
elseif
f3
>
0
then
if
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
20100088
,
3
))
then
Duel
.
RegisterFlagEffect
(
tp
,
20100089
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
else
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
else
Duel
.
RegisterFlagEffect
(
tp
,
20100089
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
else
Duel
.
RegisterFlagEffect
(
tp
,
20100089
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
local
ea
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
eb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
ec
=
6
-
ea
+
eb
Debug
.
Message
(
"ReLive卡行动次数剩余"
..
ec
..
"次 DA☆ZE"
)
end
function
Cirn9
.
arrap1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
og
=
e
:
GetHandler
():
GetOverlayGroup
()
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
f1
=
Duel
.
GetFlagEffect
(
tp
,
20100088
)
local
f2
=
Duel
.
GetFlagEffect
(
tp
,
20100089
)
local
fc
=
fa
-
fb
local
f3
=
f1
-
f2
if
chk
==
0
then
return
(
fc
<
6
and
og
:
FilterCount
(
Card
.
IsAbleToRemoveAsCost
,
nil
)
>
0
)
or
(
f3
>
0
)
end
if
fc
<
6
then
if
f3
<
1
then
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
g
=
og
:
FilterSelect
(
tp
,
Card
.
IsAbleToRemoveAsCost
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
elseif
f3
>
0
then
if
og
:
FilterCount
(
Card
.
IsAbleToRemoveAsCost
,
nil
)
>
0
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
20100088
,
3
))
then
Duel
.
RegisterFlagEffect
(
tp
,
20100089
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
else
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
g
=
og
:
FilterSelect
(
tp
,
Card
.
IsAbleToRemoveAsCost
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
else
Duel
.
RegisterFlagEffect
(
tp
,
20100089
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
else
Duel
.
RegisterFlagEffect
(
tp
,
20100089
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100051
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
local
ea
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
eb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
ec
=
6
-
ea
+
eb
Debug
.
Message
(
"ReLive卡行动次数剩余"
..
ec
..
"次 DA☆ZE"
)
end
function
Cirn9
.
rlink
(
c
)
return
c
:
IsType
(
TYPE_LINK
)
or
(
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsType
(
TYPE_SPELL
))
and
c
:
IsSetCard
(
0xc99
)
and
c
:
IsFaceup
()
end
function
Cirn9
.
sap2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
fa
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
fb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
fc
=
fa
-
fb
local
rls
=
0
local
lg
=
e
:
GetHandler
():
GetLinkedGroup
()
if
lg
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0xc99
)
then
rls
=
1
end
if
e
:
GetHandler
():
IsHasEffect
(
20100098
)
then
rls
=
1
end
if
chk
==
0
then
return
(
fc
<
5
or
((
rls
==
1
)
and
(
fc
<
6
)))
end
if
(
rls
==
1
)
then
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
else
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
20100050
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
local
ea
=
Duel
.
GetFlagEffect
(
tp
,
20100050
)
local
eb
=
Duel
.
GetFlagEffect
(
tp
,
20100051
)
local
ec
=
6
-
ea
+
eb
Debug
.
Message
(
"ReLive卡行动次数剩余"
..
ec
..
"次 DA☆ZE"
)
end
function
Cirn9
.
IsReLinkState
(
c
)
if
c
:
IsHasEffect
(
20100098
)
then
return
true
end
if
c
:
GetLinkedGroup
():
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0xc99
)
then
return
true
end
return
false
end
function
Cirn9
.
nanacon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetFlagEffect
(
tp
,
20100068
)
==
0
)
end
function
Cirn9
.
nanacon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
(
Duel
.
GetFlagEffect
(
tp
,
20100068
)
~=
0
)
end
end
function
Cirn9
.
stageop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Cirn9
.
RevueBgm
(
tp
)
end
function
Cirn9
.
FinishAct
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
20100108
,
3
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetCost
(
Cirn9
.
finalcost
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
Cirn9
.
finalcon
)
return
e1
end
function
Cirn9
.
finalcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
function
Cirn9
.
finalcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tid
=
e
:
GetHandler
():
GetTurnID
()
return
(
Duel
.
GetTurnCount
()
==
tid
+
1
)
end
function
Cirn9
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
for
i
=
1
,
ev
do
Duel
.
RegisterFlagEffect
(
tp
,
20100052
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
\ No newline at end of file
expansions/script/c21520180.lua
View file @
3ee1e09f
--镜面结合
function
c21520180
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
21520180
,
0
))
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
21520180
)
e1
:
SetTarget
(
c21520180
.
target
)
e1
:
SetOperation
(
c21520180
.
activate
)
c
:
RegisterEffect
(
e1
)
--fusion summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
21520180
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
21520180
)
e2
:
SetCost
(
c21520180
.
fscost
)
e2
:
SetTarget
(
c21520180
.
fstg
)
e2
:
SetOperation
(
c21520180
.
fsop
)
c
:
RegisterEffect
(
e2
)
--silence
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
21520180
,
2
))
e3
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e3
:
SetCondition
(
c21520180
.
actcon
)
e3
:
SetOperation
(
c21520180
.
actop
)
c
:
RegisterEffect
(
e3
)
local
e3_2
=
e3
:
Clone
()
e3_2
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
c
:
RegisterEffect
(
e3_2
)
end
function
c21520180
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x490
)
and
c
:
IsCanBeEffectTarget
()
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c21520180
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
and
chkc
:
IsSetCard
(
0x490
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
nil
,
0
,
0x11
,
0
,
0
,
nil
,
RACE_FIEND
,
ATTRIBUTE_DARK
)
and
Duel
.
IsExistingMatchingCard
(
c21520180
.
tgfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
sg
=
Duel
.
SelectTarget
(
tp
,
c21520180
.
tgfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
sg
,
1
,
0
,
0
)
end
function
c21520180
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
Duel
.
GetFirstTarget
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
nil
,
0
,
0x11
,
ec
:
GetAttack
(),
ec
:
GetDefense
(),
ec
:
GetLevel
(),
RACE_FIEND
,
ATTRIBUTE_DARK
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
TYPE_NORMAL
+
TYPE_MONSTER
)
e1
:
SetReset
(
RESET_EVENT
+
0x47c0000
)
c
:
RegisterEffect
(
e1
,
true
)
--[[ local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_FIEND)
c:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_CHANGE_LEVEL)
e4:SetValue(ec:GetLevel())
c:RegisterEffect(e4,true)--]]
local
e5
=
e1
:
Clone
()
e5
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
e5
:
SetValue
(
ec
:
GetAttack
())
c
:
RegisterEffect
(
e5
,
true
)
local
e6
=
e1
:
Clone
()
e6
:
SetCode
(
EFFECT_SET_BASE_DEFENSE
)
e6
:
SetValue
(
ec
:
GetDefense
())
c
:
RegisterEffect
(
e6
,
true
)
local
e7
=
e1
:
Clone
()
e7
:
SetCode
(
EFFECT_CHANGE_CODE
)
e7
:
SetValue
(
ec
:
GetOriginalCode
())
c
:
RegisterEffect
(
e7
,
true
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e8
:
SetCode
(
EFFECT_TO_GRAVE_REDIRECT_CB
)
e8
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e8
:
SetCondition
(
c21520180
.
repcon
)
e8
:
SetOperation
(
c21520180
.
repop
)
c
:
RegisterEffect
(
e8
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
end
end
function
c21520180
.
repcon
(
e
)
local
c
=
e
:
GetHandler
()
return
c
:
IsFaceup
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsReason
(
REASON_DESTROY
)
end
function
c21520180
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
end
function
c21520180
.
fmfilter
(
c
,
e
)
return
c
:
IsCanBeFusionMaterial
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c21520180
.
fsfilter
(
c
,
e
,
tp
,
mg
)
return
c
:
IsSetCard
(
0x490
)
and
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
mg
)
end
function
c21520180
.
fscost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
function
c21520180
.
fstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetMatchingGroup
(
c21520180
.
fmfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
nil
,
e
)
return
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c21520180
.
fsfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c21520180
.
fsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCountFromEx
(
tp
)
<=
0
then
return
end
local
mg
=
Duel
.
GetMatchingGroup
(
c21520180
.
fmfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
nil
,
e
)
local
sg
=
Duel
.
GetMatchingGroup
(
c21520180
.
fsfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg
)
if
sg
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
local
code
=
tc
:
GetCode
()
local
mat
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg
)
local
fg
=
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
code
)
local
tc
=
fg
:
GetFirst
()
while
tc
do
tc
:
SetMaterial
(
mat
)
tc
=
fg
:
GetNext
()
end
Duel
.
Remove
(
mat
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
local
tc
=
Duel
.
GetFirstMatchingCard
(
c21520180
.
procfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
code
,
e
,
tp
)
if
not
tc
then
return
end
if
Duel
.
GetLocationCountFromEx
(
tp
)
<=
0
then
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
tc
:
CompleteProcedure
()
else
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
end
function
c21520180
.
procfilter
(
c
,
code
,
e
,
tp
)
return
c
:
IsCode
(
code
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
end
function
c21520180
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
if
tc
:
IsControler
(
1
-
tp
)
then
tc
=
Duel
.
GetAttackTarget
()
end
return
tc
and
tc
:
IsControler
(
tp
)
and
tc
:
IsSetCard
(
0x490
)
end
function
c21520180
.
actop
(
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_ACTIVATE
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
c21520180
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c21520180
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
--镜面结合
function
c21520180
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
21520180
,
0
))
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
21520180
)
e1
:
SetTarget
(
c21520180
.
target
)
e1
:
SetOperation
(
c21520180
.
activate
)
c
:
RegisterEffect
(
e1
)
--fusion summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
21520180
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
21520180
)
e2
:
SetCost
(
c21520180
.
fscost
)
e2
:
SetTarget
(
c21520180
.
fstg
)
e2
:
SetOperation
(
c21520180
.
fsop
)
c
:
RegisterEffect
(
e2
)
--silence
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
21520180
,
2
))
e3
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e3
:
SetCondition
(
c21520180
.
actcon
)
e3
:
SetOperation
(
c21520180
.
actop
)
c
:
RegisterEffect
(
e3
)
local
e3_2
=
e3
:
Clone
()
e3_2
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
c
:
RegisterEffect
(
e3_2
)
end
function
c21520180
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x490
)
and
c
:
IsCanBeEffectTarget
()
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c21520180
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
and
chkc
:
IsSetCard
(
0x490
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
nil
,
0
,
0x11
,
0
,
0
,
nil
,
RACE_FIEND
,
ATTRIBUTE_DARK
)
and
Duel
.
IsExistingMatchingCard
(
c21520180
.
tgfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
sg
=
Duel
.
SelectTarget
(
tp
,
c21520180
.
tgfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
sg
,
1
,
0
,
0
)
end
function
c21520180
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
Duel
.
GetFirstTarget
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
nil
,
0
,
0x11
,
ec
:
GetAttack
(),
ec
:
GetDefense
(),
1
,
RACE_FIEND
,
ATTRIBUTE_DARK
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
TYPE_NORMAL
+
TYPE_MONSTER
)
e1
:
SetReset
(
RESET_EVENT
+
0x47c0000
)
c
:
RegisterEffect
(
e1
,
true
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CHANGE_RACE
)
e2
:
SetValue
(
RACE_FIEND
)
c
:
RegisterEffect
(
e2
,
true
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_CHANGE_ATTRIBUTE
)
e3
:
SetValue
(
ATTRIBUTE_DARK
)
c
:
RegisterEffect
(
e3
,
true
)
--[[ local e4=e1:Clone()
e4:SetCode(EFFECT_CHANGE_LEVEL)
e4:SetValue(ec:GetLevel())
c:RegisterEffect(e4,true)--]]
local
e5
=
e1
:
Clone
()
e5
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
e5
:
SetValue
(
ec
:
GetAttack
())
c
:
RegisterEffect
(
e5
,
true
)
local
e6
=
e1
:
Clone
()
e6
:
SetCode
(
EFFECT_SET_BASE_DEFENSE
)
e6
:
SetValue
(
ec
:
GetDefense
())
c
:
RegisterEffect
(
e6
,
true
)
local
e7
=
e1
:
Clone
()
e7
:
SetCode
(
EFFECT_CHANGE_CODE
)
e7
:
SetValue
(
ec
:
GetOriginalCode
())
c
:
RegisterEffect
(
e7
,
true
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e8
:
SetCode
(
EFFECT_TO_GRAVE_REDIRECT_CB
)
e8
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e8
:
SetCondition
(
c21520180
.
repcon
)
e8
:
SetOperation
(
c21520180
.
repop
)
c
:
RegisterEffect
(
e8
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
end
end
function
c21520180
.
repcon
(
e
)
local
c
=
e
:
GetHandler
()
return
c
:
IsFaceup
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsReason
(
REASON_DESTROY
)
end
function
c21520180
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
end
function
c21520180
.
fmfilter
(
c
,
e
)
return
c
:
IsCanBeFusionMaterial
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c21520180
.
fsfilter
(
c
,
e
,
tp
,
mg
)
return
c
:
IsSetCard
(
0x490
)
and
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
mg
)
end
function
c21520180
.
fscost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
function
c21520180
.
fstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg
=
Duel
.
GetMatchingGroup
(
c21520180
.
fmfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
nil
,
e
)
return
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c21520180
.
fsfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c21520180
.
fsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCountFromEx
(
tp
)
<=
0
then
return
end
local
mg
=
Duel
.
GetMatchingGroup
(
c21520180
.
fmfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
nil
,
e
)
local
sg
=
Duel
.
GetMatchingGroup
(
c21520180
.
fsfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg
)
if
sg
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
local
code
=
tc
:
GetCode
()
local
mat
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg
)
local
fg
=
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
code
)
local
tc
=
fg
:
GetFirst
()
while
tc
do
tc
:
SetMaterial
(
mat
)
tc
=
fg
:
GetNext
()
end
Duel
.
Remove
(
mat
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
local
tc
=
Duel
.
GetFirstMatchingCard
(
c21520180
.
procfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
code
,
e
,
tp
)
if
not
tc
then
return
end
if
Duel
.
GetLocationCountFromEx
(
tp
)
<=
0
then
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
tc
:
CompleteProcedure
()
else
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
end
function
c21520180
.
procfilter
(
c
,
code
,
e
,
tp
)
return
c
:
IsCode
(
code
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
end
function
c21520180
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
if
tc
:
IsControler
(
1
-
tp
)
then
tc
=
Duel
.
GetAttackTarget
()
end
return
tc
and
tc
:
IsControler
(
tp
)
and
tc
:
IsSetCard
(
0x490
)
end
function
c21520180
.
actop
(
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_ACTIVATE
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
c21520180
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c21520180
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
expansions/script/c21520182.lua
View file @
3ee1e09f
--幻形魔-昂千德
function
c21520182
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--fusion material
aux
.
AddFusionProcMixRep
(
c
,
false
,
false
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x490
),
3
,
100
)
--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
(
c21520182
.
splimit
)
c
:
RegisterEffect
(
e1
)
--cost
local
e00
=
Effect
.
CreateEffect
(
c
)
e00
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e00
:
SetDescription
(
aux
.
Stringid
(
21520182
,
4
))
e00
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e00
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e00
:
SetCountLimit
(
1
)
e00
:
SetRange
(
LOCATION_MZONE
)
e00
:
SetCondition
(
c21520182
.
ccon
)
e00
:
SetOperation
(
c21520182
.
ccost
)
c
:
RegisterEffect
(
e00
)
--attribute
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_ADD_ATTRIBUTE
)
e2
:
SetValue
(
ATTRIBUTE_DARK
)
c
:
RegisterEffect
(
e2
)
--atk def
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e4
:
SetValue
(
c21520182
.
matcheck
)
c
:
RegisterEffect
(
e4
)
--[[ local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCondition(c21520182.regcon)
e5:SetOperation(c21520182.regop)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)--]]
--copy
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e6
:
SetDescription
(
aux
.
Stringid
(
21520182
,
3
))
e6
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCountLimit
(
1
,
21520182
)
e6
:
SetTarget
(
c21520182
.
cptg
)
e6
:
SetOperation
(
c21520182
.
cpop
)
c
:
RegisterEffect
(
e6
)
--draw
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetCategory
(
CATEGORY_DRAW
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e7
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e7
:
SetCode
(
EVENT_TO_GRAVE
)
e7
:
SetCondition
(
c21520182
.
drcon
)
e7
:
SetTarget
(
c21520182
.
drtg
)
e7
:
SetOperation
(
c21520182
.
drop
)
c
:
RegisterEffect
(
e7
)
end
function
c21520182
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
end
function
c21520182
.
cfilter1
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
not
c
:
IsPublic
()
end
function
c21520182
.
ccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c21520182
.
ccost
(
e
,
tp
)
if
tp
~=
Duel
.
GetTurnPlayer
()
then
return
end
local
c
=
e
:
GetHandler
()
local
g1
=
Duel
.
GetMatchingGroup
(
c21520182
.
cfilter1
,
tp
,
LOCATION_HAND
,
0
,
nil
)
local
opselect
=
2
if
g1
:
GetCount
()
>
0
then
opselect
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
21520182
,
0
),
aux
.
Stringid
(
21520182
,
1
),
aux
.
Stringid
(
21520182
,
2
))
else
opselect
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
21520182
,
1
),
aux
.
Stringid
(
21520182
,
2
))
opselect
=
opselect
+
1
end
if
opselect
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
elseif
opselect
==
1
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
-
c
:
GetAttack
())
e1
:
SetReset
(
RESET_PHASE
+
PHASE_STANDBY
,
2
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCategory
(
CATEGORY_DEFCHANGE
)
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
-
c
:
GetDefense
())
c
:
RegisterEffect
(
e2
)
else
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_RULE
)
end
end
--[[
function c21520182.ffilter(c,cat,fc,race)
if cat~=nil and race==nil then
return c:IsFusionSetCard(0x490) and c:IsCanBeFusionMaterial(fc)
elseif cat==nil and race~=nil then
return c:IsRace(RACE_FIEND) and c:IsCanBeFusionMaterial(fc)
end
end
function c21520182.fscondition(e,g,gc,chkf)
if g==nil then return true end
if gc then return false end
local g1=g:Filter(c21520182.ffilter,nil,0x490,e:GetHandler(),nil)
local c1=g1:GetCount()
local g2=g:Filter(c21520182.ffilter,nil,nil,e:GetHandler(),RACE_FIEND)
local c2=g2:GetCount()
local ag=g1:Clone()
ag:Merge(g2)
if chkf~=PLAYER_NONE and not ag:IsExists(aux.FConditionCheckF,1,nil,chkf) then return false end
return c1>0 and c2>1 and ag:GetCount()>=3
end
function c21520182.fsoperation(e,tp,eg,ep,ev,re,r,rp,gc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=g:Filter(c21520182.ffilter,nil,0x490,e:GetHandler(),nil)
local g2=g:Filter(c21520182.ffilter,nil,nil,e:GetHandler(),RACE_FIEND)
local ag=g1:Clone()
ag:Merge(g2)
local tc=nil
local f1=0
local f2=0
local mg=Group.CreateGroup()
Duel.SetFusionMaterial(eg:FilterSelect(tp,c21520182.ffilter,3,100,nil))
end
]]
function
c21520182
.
matcheck
(
e
,
c
)
-- local g=c:GetMaterial()
-- e:SetLabel(g:GetClassCount(Card.GetOriginalCode))
local
ct
=
c
:
GetMaterialCount
()
local
ae
=
Effect
.
CreateEffect
(
c
)
ae
:
SetType
(
EFFECT_TYPE_SINGLE
)
ae
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
ae
:
SetValue
(
ct
*
450
)
ae
:
SetReset
(
RESET_EVENT
+
0xff0000
)
c
:
RegisterEffect
(
ae
)
local
de
=
ae
:
Clone
()
de
:
SetCode
(
EFFECT_SET_BASE_DEFENSE
)
c
:
RegisterEffect
(
de
)
end
function
c21520182
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
e
:
GetHandler
():
GetSummonType
(),
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
end
function
c21520182
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
local
c
=
e
:
GetHandler
()
local
ae
=
Effect
.
CreateEffect
(
c
)
ae
:
SetType
(
EFFECT_TYPE_SINGLE
)
ae
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
ae
:
SetValue
(
ct
*
900
)
ae
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
ae
)
local
de
=
ae
:
Clone
()
de
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
de
)
end
function
c21520182
.
cpfilter
(
c
)
return
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsFaceup
()
end
function
c21520182
.
cptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
c21520182
.
cpfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21520182
.
cpfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_MZONE
,
LOCATION_GRAVE
+
LOCATION_MZONE
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c21520182
.
cpfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_MZONE
,
LOCATION_GRAVE
+
LOCATION_MZONE
,
1
,
1
,
e
:
GetHandler
())
-- local loc=g1:GetFirst():GetLocation()
-- Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,1,tp,loc)
end
function
c21520182
.
cpop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsOnField
()
or
c
:
IsFacedown
()
then
return
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
then
--[[ local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)--]]
local
code
=
tc
:
GetOriginalCode
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetValue
(
code
)
c
:
RegisterEffect
(
e1
)
c
:
CopyEffect
(
code
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
1
)
-- Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function
c21520182
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsReason
(
REASON_DESTROY
)
end
function
c21520182
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
PLAYER_ALL
,
1
)
end
function
c21520182
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_REMOVED
,
LOCATION_REMOVED
)
if
g
:
GetCount
()
==
0
then
return
end
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
Duel
.
BreakEffect
()
local
tg
=
Duel
.
GetOperatedGroup
()
-- if tg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleDeck
(
1
-
tp
)
-- end
local
ct
=
tg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
if
ct
>
0
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
1
-
tp
,
1
,
REASON_EFFECT
)
end
end
--幻形魔-昂千德
function
c21520182
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--fusion material
aux
.
AddFusionProcMixRep
(
c
,
false
,
false
,
c21520182
.
sefilter
,
3
,
100
)
--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
(
c21520182
.
splimit
)
c
:
RegisterEffect
(
e1
)
--cost
local
e00
=
Effect
.
CreateEffect
(
c
)
e00
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e00
:
SetDescription
(
aux
.
Stringid
(
21520182
,
4
))
e00
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e00
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e00
:
SetCountLimit
(
1
)
e00
:
SetRange
(
LOCATION_MZONE
)
e00
:
SetCondition
(
c21520182
.
ccon
)
e00
:
SetOperation
(
c21520182
.
ccost
)
c
:
RegisterEffect
(
e00
)
--attribute
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_ADD_ATTRIBUTE
)
e2
:
SetValue
(
ATTRIBUTE_DARK
)
c
:
RegisterEffect
(
e2
)
--atk def
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e4
:
SetValue
(
c21520182
.
matcheck
)
c
:
RegisterEffect
(
e4
)
--[[ local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCondition(c21520182.regcon)
e5:SetOperation(c21520182.regop)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)--]]
--copy
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e6
:
SetDescription
(
aux
.
Stringid
(
21520182
,
3
))
e6
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCountLimit
(
1
,
21520182
)
e6
:
SetTarget
(
c21520182
.
cptg
)
e6
:
SetOperation
(
c21520182
.
cpop
)
c
:
RegisterEffect
(
e6
)
--draw
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetCategory
(
CATEGORY_DRAW
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e7
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e7
:
SetCode
(
EVENT_TO_GRAVE
)
e7
:
SetCondition
(
c21520182
.
drcon
)
e7
:
SetTarget
(
c21520182
.
drtg
)
e7
:
SetOperation
(
c21520182
.
drop
)
c
:
RegisterEffect
(
e7
)
end
function
c21520182
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
end
function
c21520182
.
cfilter1
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
not
c
:
IsPublic
()
end
function
c21520182
.
ccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c21520182
.
ccost
(
e
,
tp
)
if
tp
~=
Duel
.
GetTurnPlayer
()
then
return
end
local
c
=
e
:
GetHandler
()
local
g1
=
Duel
.
GetMatchingGroup
(
c21520182
.
cfilter1
,
tp
,
LOCATION_HAND
,
0
,
nil
)
local
opselect
=
2
if
g1
:
GetCount
()
>
0
then
opselect
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
21520182
,
0
),
aux
.
Stringid
(
21520182
,
1
),
aux
.
Stringid
(
21520182
,
2
))
else
opselect
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
21520182
,
1
),
aux
.
Stringid
(
21520182
,
2
))
opselect
=
opselect
+
1
end
if
opselect
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
elseif
opselect
==
1
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
-
c
:
GetAttack
())
e1
:
SetReset
(
RESET_PHASE
+
PHASE_STANDBY
,
2
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCategory
(
CATEGORY_DEFCHANGE
)
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
-
c
:
GetDefense
())
c
:
RegisterEffect
(
e2
)
else
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_RULE
)
end
end
--[[
function c21520182.ffilter(c,cat,fc,race)
if cat~=nil and race==nil then
return c:IsFusionSetCard(0x490) and c:IsCanBeFusionMaterial(fc)
elseif cat==nil and race~=nil then
return c:IsRace(RACE_FIEND) and c:IsCanBeFusionMaterial(fc)
end
end
function c21520182.fscondition(e,g,gc,chkf)
if g==nil then return true end
if gc then return false end
local g1=g:Filter(c21520182.ffilter,nil,0x490,e:GetHandler(),nil)
local c1=g1:GetCount()
local g2=g:Filter(c21520182.ffilter,nil,nil,e:GetHandler(),RACE_FIEND)
local c2=g2:GetCount()
local ag=g1:Clone()
ag:Merge(g2)
if chkf~=PLAYER_NONE and not ag:IsExists(aux.FConditionCheckF,1,nil,chkf) then return false end
return c1>0 and c2>1 and ag:GetCount()>=3
end
function c21520182.fsoperation(e,tp,eg,ep,ev,re,r,rp,gc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=g:Filter(c21520182.ffilter,nil,0x490,e:GetHandler(),nil)
local g2=g:Filter(c21520182.ffilter,nil,nil,e:GetHandler(),RACE_FIEND)
local ag=g1:Clone()
ag:Merge(g2)
local tc=nil
local f1=0
local f2=0
local mg=Group.CreateGroup()
Duel.SetFusionMaterial(eg:FilterSelect(tp,c21520182.ffilter,3,100,nil))
end
]]
function
c21520182
.
matcheck
(
e
,
c
)
-- local g=c:GetMaterial()
-- e:SetLabel(g:GetClassCount(Card.GetOriginalCode))
local
ct
=
c
:
GetMaterialCount
()
local
ae
=
Effect
.
CreateEffect
(
c
)
ae
:
SetType
(
EFFECT_TYPE_SINGLE
)
ae
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
ae
:
SetValue
(
ct
*
450
)
ae
:
SetReset
(
RESET_EVENT
+
0xff0000
)
c
:
RegisterEffect
(
ae
)
local
de
=
ae
:
Clone
()
de
:
SetCode
(
EFFECT_SET_BASE_DEFENSE
)
c
:
RegisterEffect
(
de
)
end
function
c21520182
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
e
:
GetHandler
():
GetSummonType
(),
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
end
function
c21520182
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
e
:
GetLabelObject
():
GetLabel
()
local
c
=
e
:
GetHandler
()
local
ae
=
Effect
.
CreateEffect
(
c
)
ae
:
SetType
(
EFFECT_TYPE_SINGLE
)
ae
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
ae
:
SetValue
(
ct
*
900
)
ae
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
ae
)
local
de
=
ae
:
Clone
()
de
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
de
)
end
function
c21520182
.
cpfilter
(
c
)
return
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsFaceup
()
end
function
c21520182
.
cptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
c21520182
.
cpfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21520182
.
cpfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_MZONE
,
LOCATION_GRAVE
+
LOCATION_MZONE
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c21520182
.
cpfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_MZONE
,
LOCATION_GRAVE
+
LOCATION_MZONE
,
1
,
1
,
e
:
GetHandler
())
-- local loc=g1:GetFirst():GetLocation()
-- Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,1,tp,loc)
end
function
c21520182
.
cpop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsOnField
()
or
c
:
IsFacedown
()
then
return
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
then
--[[ local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)--]]
local
code
=
tc
:
GetOriginalCode
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetValue
(
code
)
c
:
RegisterEffect
(
e1
)
c
:
CopyEffect
(
code
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
1
)
-- Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function
c21520182
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsReason
(
REASON_DESTROY
)
end
function
c21520182
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
PLAYER_ALL
,
1
)
end
function
c21520182
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_REMOVED
,
LOCATION_REMOVED
)
if
g
:
GetCount
()
==
0
then
return
end
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
Duel
.
BreakEffect
()
local
tg
=
Duel
.
GetOperatedGroup
()
-- if tg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleDeck
(
1
-
tp
)
-- end
local
ct
=
tg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
if
ct
>
0
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
1
-
tp
,
1
,
REASON_EFFECT
)
end
end
function
c21520182
.
sefilter
(
c
)
return
c
:
IsFusionSetCard
(
0x490
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
expansions/script/c21520183.lua
View file @
3ee1e09f
--曲形魔-克莱因
function
c21520183
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_FIEND
),
10
,
3
,
nil
,
nil
,
99
)
--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
(
c21520183
.
splimit
)
c
:
RegisterEffect
(
e1
)
--special summon rule
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_GRAVE
+
LOCATION_EXTRA
)
e2
:
SetCondition
(
c21520183
.
spcon
)
e2
:
SetOperation
(
c21520183
.
spop
)
c
:
RegisterEffect
(
e2
)
--draw
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetDescription
(
aux
.
Stringid
(
21520183
,
0
))
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCost
(
c21520183
.
drcost
)
e3
:
SetTarget
(
c21520183
.
drtg
)
e3
:
SetOperation
(
c21520183
.
drop
)
c
:
RegisterEffect
(
e3
)
--atk & def
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_SET_ATTACK
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetValue
(
c21520183
.
adval
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_SET_DEFENSE
)
c
:
RegisterEffect
(
e5
)
--imune
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e6
:
SetCondition
(
c21520183
.
econ
)
e6
:
SetValue
(
c21520183
.
efilter
)
c
:
RegisterEffect
(
e6
)
--material
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetDescription
(
aux
.
Stringid
(
21520183
,
1
))
e7
:
SetType
(
EFFECT_TYPE_IGNITION
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCountLimit
(
1
,
21520183
)
e7
:
SetCost
(
c21520183
.
cost
)
e7
:
SetTarget
(
c21520183
.
target
)
e7
:
SetOperation
(
c21520183
.
operation
)
c
:
RegisterEffect
(
e7
)
--destroy replace
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e8
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e8
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetTarget
(
c21520183
.
reptg
)
c
:
RegisterEffect
(
e8
)
end
function
c21520183
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_XYZ
)
==
SUMMON_TYPE_XYZ
or
se
:
GetHandler
()
==
e
:
GetHandler
()
end
function
c21520183
.
spfilter
(
c
)
return
(
c
:
IsSetCard
(
0x490
)
or
c
:
IsRace
(
RACE_FIEND
))
and
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c21520183
.
spcheck
(
c
,
sg
)
return
c
:
IsSetCard
(
0x490
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
sg
:
FilterCount
(
c21520183
.
spcheck2
,
c
)
+
1
==
sg
:
GetCount
()
and
sg
:
FilterCount
(
Card
.
IsSetCard
,
c
,
0x490
)
>=
2
end
function
c21520183
.
spcheck2
(
c
)
return
c
:
IsRace
(
RACE_FIEND
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c21520183
.
spgoal
(
c
,
tp
,
sg
)
return
sg
:
GetCount
()
>
1
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
)
>
0
and
sg
:
IsExists
(
c21520183
.
spcheck
,
1
,
nil
,
sg
)
end
function
c21520183
.
spselect
(
c
,
tp
,
mg
,
sg
)
sg
:
AddCard
(
c
)
local
res
=
c21520183
.
spgoal
(
c
,
tp
,
sg
)
or
mg
:
IsExists
(
c21520183
.
spselect
,
1
,
sg
,
tp
,
mg
,
sg
)
sg
:
RemoveCard
(
c
)
return
res
end
function
c21520183
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
c21520183
.
spfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
e
:
GetHandler
())
local
sg
=
Group
.
CreateGroup
()
return
mg
:
IsExists
(
c21520183
.
spselect
,
1
,
nil
,
tp
,
mg
,
sg
)
end
function
c21520183
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c21520183
.
spfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
e
:
GetHandler
())
local
sg
=
Group
.
CreateGroup
()
while
true
do
local
cg
=
mg
:
Filter
(
c21520183
.
spselect
,
sg
,
tp
,
mg
,
sg
)
if
cg
:
GetCount
()
==
0
or
(
c21520183
.
spgoal
(
c
,
tp
,
sg
)
and
not
Duel
.
SelectYesNo
(
tp
,
210
))
then
break
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
cg
:
Select
(
tp
,
1
,
1
,
nil
)
sg
:
Merge
(
g
)
end
c
:
SetMaterial
(
sg
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
end
function
c21520183
.
drcost
(
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
c21520183
.
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
c21520183
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
function
c21520183
.
adval
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
Card
.
IsFaceup
,
c
:
GetControler
(),
LOCATION_REMOVED
,
LOCATION_REMOVED
,
nil
)
*
361
end
function
c21520183
.
econ
(
e
)
return
e
:
GetHandler
():
GetOverlayCount
()
>
0
end
function
c21520183
.
efilter
(
e
,
te
)
return
not
te
:
IsActiveType
(
TYPE_COUNTER
)
and
te
:
GetHandler
()
~=
e
:
GetHandler
()
end
function
c21520183
.
filter
(
c
)
return
not
c
:
IsType
(
TYPE_TOKEN
)
and
c
:
IsAbleToChangeControler
()
and
c
:
IsFaceup
()
end
function
c21520183
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetAttackAnnouncedCount
()
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
end
function
c21520183
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21520183
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
and
e
:
GetHandler
():
IsType
(
TYPE_XYZ
)
end
end
function
c21520183
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
ct
=
c
:
GetOverlayCount
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21520183
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
ct
+
1
,
e
:
GetHandler
())
local
tc
=
g
:
GetFirst
()
while
tc
do
if
c
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
then
local
og
=
tc
:
GetOverlayGroup
()
if
og
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
og
,
REASON_RULE
)
end
Duel
.
Overlay
(
c
,
Group
.
FromCards
(
tc
))
end
tc
=
g
:
GetNext
()
end
end
function
c21520183
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
ct
=
math.ceil
(
e
:
GetHandler
():
GetOverlayCount
()
/
2
)
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
ct
,
REASON_EFFECT
)
end
local
c
=
e
:
GetHandler
()
if
c
:
GetOverlayCount
()
>
0
then
local
ct
=
math.ceil
(
c
:
GetOverlayCount
()
/
2
)
c
:
RemoveOverlayCard
(
tp
,
ct
,
ct
,
REASON_EFFECT
)
return
true
else
return
false
end
end
--曲形魔-克莱因
function
c21520183
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_FIEND
),
10
,
3
,
nil
,
nil
,
99
)
--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
(
c21520183
.
splimit
)
c
:
RegisterEffect
(
e1
)
--special summon rule
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_GRAVE
+
LOCATION_EXTRA
)
e2
:
SetCondition
(
c21520183
.
spcon
)
e2
:
SetOperation
(
c21520183
.
spop
)
c
:
RegisterEffect
(
e2
)
--draw
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetDescription
(
aux
.
Stringid
(
21520183
,
0
))
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCost
(
c21520183
.
drcost
)
e3
:
SetTarget
(
c21520183
.
drtg
)
e3
:
SetOperation
(
c21520183
.
drop
)
c
:
RegisterEffect
(
e3
)
--atk & def
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_SET_ATTACK
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetValue
(
c21520183
.
adval
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_SET_DEFENSE
)
c
:
RegisterEffect
(
e5
)
--imune
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e6
:
SetCondition
(
c21520183
.
econ
)
e6
:
SetValue
(
c21520183
.
efilter
)
c
:
RegisterEffect
(
e6
)
--material
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetDescription
(
aux
.
Stringid
(
21520183
,
1
))
e7
:
SetType
(
EFFECT_TYPE_IGNITION
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCountLimit
(
1
,
21520183
)
e7
:
SetCost
(
c21520183
.
cost
)
e7
:
SetTarget
(
c21520183
.
target
)
e7
:
SetOperation
(
c21520183
.
operation
)
c
:
RegisterEffect
(
e7
)
--destroy replace
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e8
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e8
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetTarget
(
c21520183
.
reptg
)
c
:
RegisterEffect
(
e8
)
end
function
c21520183
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_XYZ
)
==
SUMMON_TYPE_XYZ
or
se
:
GetHandler
()
==
e
:
GetHandler
()
end
function
c21520183
.
spfilter
(
c
)
return
(
c
:
IsSetCard
(
0x490
)
or
c
:
IsRace
(
RACE_FIEND
))
and
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c21520183
.
spcheck
(
c
,
sg
)
return
c
:
IsSetCard
(
0x490
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
sg
:
FilterCount
(
c21520183
.
spcheck2
,
c
)
+
1
==
sg
:
GetCount
()
and
sg
:
FilterCount
(
Card
.
IsSetCard
,
c
,
0x490
)
>=
2
end
function
c21520183
.
spcheck2
(
c
)
return
c
:
IsRace
(
RACE_FIEND
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c21520183
.
spgoal
(
sg
,
tp
,
loc
)
if
loc
==
LOCATION_EXTRA
then
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
)
>
0
and
sg
:
IsExists
(
c21520183
.
spcheck
,
1
,
nil
,
sg
)
else
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
sg
:
IsExists
(
c21520183
.
spcheck
,
1
,
nil
,
sg
)
end
end
function
c21520183
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
c21520183
.
spfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
e
:
GetHandler
())
local
sg
=
Group
.
CreateGroup
()
return
mg
:
CheckSubGroup
(
c21520183
.
spgoal
,
1
,
nil
,
tp
)
end
function
c21520183
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c21520183
.
spfilter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
e
:
GetHandler
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
cancel
=
Duel
.
GetCurrentChain
()
==
0
local
sg
=
mg
:
SelectSubGroup
(
tp
,
c21520183
.
spgoal
,
cancel
,
1
,
nil
,
tp
,
c
:
GetLocation
())
c
:
SetMaterial
(
sg
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_COST
)
end
--[[nction c21520183.spcheck(c,sg)
return c:IsSetCard(0x490) and c:IsType(TYPE_MONSTER) and sg:FilterCount(c21520183.spcheck2,c)+1==sg:GetCount()
and sg:FilterCount(Card.IsSetCard,c,0x490)>=2
end
function c21520183.spcheck2(c)
return c:IsRace(RACE_FIEND) and c:IsType(TYPE_MONSTER)
end
function c21520183.spgoal(c,tp,sg)
return sg:GetCount()>1 and Duel.GetLocationCountFromEx(tp,tp,sg)>0 and sg:IsExists(c21520183.spcheck,1,nil,sg)
end
function c21520183.spselect(c,tp,mg,sg)
sg:AddCard(c)
local res=c21520183.spgoal(c,tp,sg) or mg:IsExists(c21520183.spselect,1,sg,tp,mg,sg)
sg:RemoveCard(c)
return res
end
function c21520183.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c21520183.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler())
local sg=Group.CreateGroup()
return mg:IsExists(c21520183.spselect,1,nil,tp,mg,sg)
end
function c21520183.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c21520183.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler())
local sg=Group.CreateGroup()
while true do
local cg=mg:Filter(c21520183.spselect,sg,tp,mg,sg)
if cg:GetCount()==0
or (c21520183.spgoal(c,tp,sg) and not Duel.SelectYesNo(tp,210)) then break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=cg:Select(tp,1,1,nil)
sg:Merge(g)
end
c:SetMaterial(sg)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end--]]
function
c21520183
.
drcost
(
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
c21520183
.
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
c21520183
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
function
c21520183
.
adval
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
Card
.
IsFaceup
,
c
:
GetControler
(),
LOCATION_REMOVED
,
LOCATION_REMOVED
,
nil
)
*
361
end
function
c21520183
.
econ
(
e
)
return
e
:
GetHandler
():
GetOverlayCount
()
>
0
end
function
c21520183
.
efilter
(
e
,
te
)
return
not
te
:
IsActiveType
(
TYPE_COUNTER
)
and
te
:
GetHandler
()
~=
e
:
GetHandler
()
end
function
c21520183
.
filter
(
c
)
return
not
c
:
IsType
(
TYPE_TOKEN
)
and
c
:
IsAbleToChangeControler
()
and
c
:
IsFaceup
()
end
function
c21520183
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetAttackAnnouncedCount
()
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
end
function
c21520183
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c21520183
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
and
e
:
GetHandler
():
IsType
(
TYPE_XYZ
)
end
end
function
c21520183
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
ct
=
c
:
GetOverlayCount
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21520183
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
ct
+
1
,
e
:
GetHandler
())
local
tc
=
g
:
GetFirst
()
while
tc
do
if
c
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
then
local
og
=
tc
:
GetOverlayGroup
()
if
og
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
og
,
REASON_RULE
)
end
Duel
.
Overlay
(
c
,
Group
.
FromCards
(
tc
))
end
tc
=
g
:
GetNext
()
end
end
function
c21520183
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
ct
=
math.ceil
(
e
:
GetHandler
():
GetOverlayCount
()
/
2
)
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
ct
,
REASON_EFFECT
)
end
local
c
=
e
:
GetHandler
()
if
c
:
GetOverlayCount
()
>
0
then
local
ct
=
math.ceil
(
c
:
GetOverlayCount
()
/
2
)
c
:
RemoveOverlayCard
(
tp
,
ct
,
ct
,
REASON_EFFECT
)
return
true
else
return
false
end
end
expansions/script/c9980515.lua
View file @
3ee1e09f
--正义巨像·加里奥
function
c9980515
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
c9980515
.
matfilter
,
2
,
true
)
aux
.
AddContactFusionProcedure
(
c
,
Card
.
IsAbleToDeckOrExtraAsCost
,
LOCATION_MZONE
,
0
,
aux
.
tdcfop
(
c
))
--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
(
c9980515
.
splimit
)
c
:
RegisterEffect
(
e1
)
--cannot be fusion material
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
--move
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9980515
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c9980515
.
seqtg
)
e2
:
SetOperation
(
c9980515
.
seqop
)
c
:
RegisterEffect
(
e2
)
--negate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
9980515
,
2
))
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCondition
(
c9980515
.
discon
)
e1
:
SetTarget
(
c9980515
.
distg
)
e1
:
SetOperation
(
c9980515
.
disop
)
c
:
RegisterEffect
(
e1
)
--spsummon bgm
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e8
:
SetOperation
(
c9980515
.
sumsuc
)
c
:
RegisterEffect
(
e8
)
local
e4
=
e8
:
Clone
()
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e4
)
--atkup
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetValue
(
c9980515
.
val
)
c
:
RegisterEffect
(
e4
)
end
function
c9980515
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9980515
,
3
))
end
function
c9980515
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
end
function
c9980515
.
matfilter
(
c
)
return
c
:
IsLevelAbove
(
5
)
and
c
:
IsRace
(
RACE_ROCK
)
end
function
c9980515
.
seqfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_ROCK
)
end
function
c9980515
.
seqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c9980515
.
seqfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c9980515
.
seqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_CONTROL
)
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
9980515
,
1
))
Duel
.
SelectTarget
(
tp
,
c9980515
.
seqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c9980515
.
seqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsControler
(
1
-
tp
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
local
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
0
)
local
nseq
=
math.log
(
s
,
2
)
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
MoveSequence
(
tc
,
nseq
)
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9980515
,
3
))
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetValue
(
c9980515
.
efilter
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e3
)
end
end
function
c9980515
.
efilter
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
function
c9980515
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
ep
~=
tp
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c9980515
.
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
c9980515
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9980515
,
3
))
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
function
c9980515
.
val
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
Card
.
IsSetCard
,
c
:
GetControler
(),
LOCATION_GRAVE
,
0
,
nil
,
RACE_ROCK
)
*
300
--正义巨像·加里奥
function
c9980515
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
c9980515
.
matfilter
,
2
,
true
)
aux
.
AddContactFusionProcedure
(
c
,
Card
.
IsAbleToDeckOrExtraAsCost
,
LOCATION_MZONE
,
0
,
aux
.
tdcfop
(
c
))
--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
(
c9980515
.
splimit
)
c
:
RegisterEffect
(
e1
)
--cannot be fusion material
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
--move
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9980515
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c9980515
.
seqtg
)
e2
:
SetOperation
(
c9980515
.
seqop
)
c
:
RegisterEffect
(
e2
)
--negate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
9980515
,
2
))
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCondition
(
c9980515
.
discon
)
e1
:
SetTarget
(
c9980515
.
distg
)
e1
:
SetOperation
(
c9980515
.
disop
)
c
:
RegisterEffect
(
e1
)
--spsummon bgm
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e8
:
SetOperation
(
c9980515
.
sumsuc
)
c
:
RegisterEffect
(
e8
)
local
e4
=
e8
:
Clone
()
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e4
)
--atkup
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetValue
(
c9980515
.
val
)
c
:
RegisterEffect
(
e4
)
end
function
c9980515
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9980515
,
3
))
end
function
c9980515
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
end
function
c9980515
.
matfilter
(
c
)
return
c
:
IsLevelAbove
(
5
)
and
c
:
IsRace
(
RACE_ROCK
)
end
function
c9980515
.
seqfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_ROCK
)
end
function
c9980515
.
seqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c9980515
.
seqfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c9980515
.
seqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_CONTROL
)
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
9980515
,
1
))
Duel
.
SelectTarget
(
tp
,
c9980515
.
seqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c9980515
.
seqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsControler
(
1
-
tp
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
local
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
0
)
local
nseq
=
math.log
(
s
,
2
)
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
MoveSequence
(
tc
,
nseq
)
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9980515
,
3
))
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetValue
(
c9980515
.
efilter
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e3
)
end
end
function
c9980515
.
efilter
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
function
c9980515
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
ep
~=
tp
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c9980515
.
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
c9980515
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Hint
(
HINT_MUSIC
,
0
,
aux
.
Stringid
(
9980515
,
3
))
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
function
c9980515
.
val
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
Card
.
IsSetCard
,
c
:
GetControler
(),
LOCATION_GRAVE
,
0
,
nil
,
RACE_ROCK
)
*
300
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment