Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
d9d3234f
Commit
d9d3234f
authored
Nov 15, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
b2fixes
parent
c09b4b74
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
2307 additions
and
2045 deletions
+2307
-2045
expansions/script/c60151101.lua
expansions/script/c60151101.lua
+145
-122
expansions/script/c60151102.lua
expansions/script/c60151102.lua
+122
-98
expansions/script/c60151103.lua
expansions/script/c60151103.lua
+138
-117
expansions/script/c60151104.lua
expansions/script/c60151104.lua
+147
-123
expansions/script/c60151105.lua
expansions/script/c60151105.lua
+128
-104
expansions/script/c60151106.lua
expansions/script/c60151106.lua
+233
-209
expansions/script/c60151107.lua
expansions/script/c60151107.lua
+163
-140
expansions/script/c60151108.lua
expansions/script/c60151108.lua
+208
-188
expansions/script/c60151121.lua
expansions/script/c60151121.lua
+132
-117
expansions/script/c60151123.lua
expansions/script/c60151123.lua
+129
-115
expansions/script/c60151125.lua
expansions/script/c60151125.lua
+138
-125
expansions/script/c60151127.lua
expansions/script/c60151127.lua
+144
-127
expansions/script/c60151128.lua
expansions/script/c60151128.lua
+171
-156
expansions/script/c60151196.lua
expansions/script/c60151196.lua
+84
-82
expansions/script/c60151197.lua
expansions/script/c60151197.lua
+76
-75
expansions/script/c60151198.lua
expansions/script/c60151198.lua
+68
-65
expansions/script/c60151199.lua
expansions/script/c60151199.lua
+81
-82
No files found.
expansions/script/c60151101.lua
View file @
d9d3234f
This diff is collapsed.
Click to expand it.
expansions/script/c60151102.lua
View file @
d9d3234f
--├随想者 提亚┤
function
c60151102
.
initial_effect
(
c
)
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
6011102
)
e1
:
SetTarget
(
c60151102
.
cointg
)
e1
:
SetOperation
(
c60151102
.
coinop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151102
,
1
))
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
60151102
)
e3
:
SetCondition
(
c60151102
.
spcon
)
e3
:
SetTarget
(
c60151102
.
sptg
)
e3
:
SetOperation
(
c60151102
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c60151102
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151102
.
chlimit
)
Duel
.
RegisterFlagEffect
(
tp
,
60151102
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
end
function
c60151102
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c60151102
.
filter
(
c
)
return
c
:
IsDestructable
()
end
function
c60151102
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151102
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
res
=
0
if
Duel
.
GetFlagEffect
(
tp
,
60151102
)
>
0
then
res
=
1
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151102
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
if
res
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151102
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
end
end
end
function
c60151102
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
end
function
c60151102
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
end
function
c60151102
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151102
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
--├随想者 提亚┤
function
c60151102
.
initial_effect
(
c
)
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_DESTROY
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
6011102
)
e1
:
SetCondition
(
c60151102
.
coincon
)
e1
:
SetTarget
(
c60151102
.
cointg
)
e1
:
SetOperation
(
c60151102
.
coinop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
local
e111
=
Effect
.
CreateEffect
(
c
)
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e111
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_TOGRAVE
)
e111
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e111
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e111
:
SetCountLimit
(
1
,
6011102
)
e111
:
SetCondition
(
c60151102
.
coincon2
)
e111
:
SetTarget
(
c60151102
.
cointg
)
e111
:
SetOperation
(
c60151102
.
coinop
)
c
:
RegisterEffect
(
e111
)
local
e222
=
e111
:
Clone
()
e222
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e222
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151102
,
1
))
e3
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_TOGRAVE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
60151102
)
e3
:
SetCondition
(
c60151102
.
spcon
)
e3
:
SetTarget
(
c60151102
.
sptg
)
e3
:
SetOperation
(
c60151102
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c60151102
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
function
c60151102
.
coincon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
function
c60151102
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151102
.
chlimit
)
Duel
.
RegisterFlagEffect
(
tp
,
60151102
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
1
-
tp
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
function
c60151102
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c60151102
.
filter
(
c
)
return
c
:
IsDestructable
()
end
function
c60151102
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151102
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
res
=
0
if
Duel
.
GetFlagEffect
(
tp
,
60151102
)
>
0
then
res
=
1
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151102
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
if
res
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151102
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
end
end
end
function
c60151102
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
end
function
c60151102
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
function
c60151102
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151102
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
\ No newline at end of file
expansions/script/c60151103.lua
View file @
d9d3234f
--├风语者 妲修斯┤
function
c60151103
.
initial_effect
(
c
)
c
:
EnableUnsummonable
()
--special summon
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetType
(
EFFECT_TYPE_FIELD
)
e11
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e11
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e11
:
SetRange
(
LOCATION_HAND
)
e11
:
SetCountLimit
(
1
,
60111031
)
e11
:
SetCondition
(
c60151103
.
spcon2
)
c
:
RegisterEffect
(
e11
)
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
6011103
)
e1
:
SetTarget
(
c60151103
.
cointg
)
e1
:
SetOperation
(
c60151103
.
coinop
)
c
:
RegisterEffect
(
e1
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151103
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
60151103
)
e3
:
SetCondition
(
c60151103
.
spcon
)
e3
:
SetTarget
(
c60151103
.
sptg
)
e3
:
SetOperation
(
c60151103
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c60151103
.
sfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x9b23
)
and
c
:
GetCode
()
~=
60151103
end
function
c60151103
.
spcon2
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetMZoneCount
(
c
:
GetControler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
c60151103
.
sfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c60151103
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151103
.
chlimit
)
Duel
.
RegisterFlagEffect
(
tp
,
60151103
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
end
function
c60151103
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c60151103
.
filter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c60151103
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151103
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
res
=
0
if
Duel
.
GetFlagEffect
(
tp
,
60151103
)
>
0
then
res
=
1
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151103
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
if
res
==
1
then
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
):
RandomSelect
(
tp
,
1
)
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
end
end
function
c60151103
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
end
function
c60151103
.
spfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
60151103
)
and
c
:
IsAbleToHand
()
end
function
c60151103
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151103
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c60151103
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151103
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151103
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
end
--├风语者 妲修斯┤
function
c60151103
.
initial_effect
(
c
)
c
:
EnableUnsummonable
()
--special summon
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetType
(
EFFECT_TYPE_FIELD
)
e11
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e11
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e11
:
SetRange
(
LOCATION_HAND
)
e11
:
SetCountLimit
(
1
,
60111031
)
e11
:
SetCondition
(
c60151103
.
spcon2
)
c
:
RegisterEffect
(
e11
)
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
6011103
)
e1
:
SetCondition
(
c60151103
.
coincon
)
e1
:
SetTarget
(
c60151103
.
cointg
)
e1
:
SetOperation
(
c60151103
.
coinop
)
c
:
RegisterEffect
(
e1
)
local
e111
=
Effect
.
CreateEffect
(
c
)
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e111
:
SetCategory
(
CATEGORY_TOGRAVE
)
e111
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e111
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e111
:
SetCountLimit
(
1
,
6011103
)
e111
:
SetCondition
(
c60151103
.
coincon2
)
e111
:
SetTarget
(
c60151103
.
cointg
)
e111
:
SetOperation
(
c60151103
.
coinop
)
c
:
RegisterEffect
(
e111
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151103
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_TOGRAVE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
60151103
)
e3
:
SetCondition
(
c60151103
.
spcon
)
e3
:
SetTarget
(
c60151103
.
sptg
)
e3
:
SetOperation
(
c60151103
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c60151103
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
function
c60151103
.
coincon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
function
c60151103
.
sfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x9b23
)
and
c
:
GetCode
()
~=
60151103
end
function
c60151103
.
spcon2
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c60151103
.
sfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c60151103
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151103
.
chlimit
)
Duel
.
RegisterFlagEffect
(
tp
,
60151103
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
1
-
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
function
c60151103
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c60151103
.
filter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c60151103
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151103
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
res
=
0
if
Duel
.
GetFlagEffect
(
tp
,
60151103
)
>
0
then
res
=
1
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151103
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
if
res
==
1
then
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
):
RandomSelect
(
tp
,
1
)
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
end
end
function
c60151103
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
end
function
c60151103
.
spfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
60151103
)
and
c
:
IsAbleToHand
()
end
function
c60151103
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151103
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
function
c60151103
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151103
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151103
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
end
end
\ No newline at end of file
expansions/script/c60151104.lua
View file @
d9d3234f
This diff is collapsed.
Click to expand it.
expansions/script/c60151105.lua
View file @
d9d3234f
--├谋略者 蕾尔拉┤
function
c60151105
.
initial_effect
(
c
)
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
6011105
)
e1
:
SetTarget
(
c60151105
.
cointg
)
e1
:
SetOperation
(
c60151105
.
coinop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151105
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
60151105
)
e3
:
SetCondition
(
c60151105
.
spcon
)
e3
:
SetTarget
(
c60151105
.
sptg
)
e3
:
SetOperation
(
c60151105
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c60151105
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151105
.
chlimit
)
Duel
.
RegisterFlagEffect
(
tp
,
60151105
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
end
function
c60151105
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c60151105
.
filter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
c60151105
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151105
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
res
=
0
if
Duel
.
GetFlagEffect
(
tp
,
60151105
)
>
0
then
res
=
1
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151105
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
if
res
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151105
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
end
end
end
function
c60151105
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
end
function
c60151105
.
spfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
c60151105
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151105
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c60151105
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151105
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151105
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
end
--├谋略者 蕾尔拉┤
function
c60151105
.
initial_effect
(
c
)
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
6011105
)
e1
:
SetCondition
(
c60151105
.
coincon
)
e1
:
SetTarget
(
c60151105
.
cointg
)
e1
:
SetOperation
(
c60151105
.
coinop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
local
e111
=
Effect
.
CreateEffect
(
c
)
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e111
:
SetCategory
(
CATEGORY_TOGRAVE
)
e111
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e111
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e111
:
SetCountLimit
(
1
,
6011105
)
e111
:
SetCondition
(
c60151105
.
coincon2
)
e111
:
SetTarget
(
c60151105
.
cointg
)
e111
:
SetOperation
(
c60151105
.
coinop
)
c
:
RegisterEffect
(
e111
)
local
e222
=
e111
:
Clone
()
e222
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e222
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151105
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
60151105
)
e3
:
SetCondition
(
c60151105
.
spcon
)
e3
:
SetTarget
(
c60151105
.
sptg
)
e3
:
SetOperation
(
c60151105
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c60151105
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
function
c60151105
.
coincon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
function
c60151105
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151105
.
chlimit
)
Duel
.
RegisterFlagEffect
(
tp
,
60151105
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c60151105
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c60151105
.
filter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
c60151105
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151105
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
res
=
0
if
Duel
.
GetFlagEffect
(
tp
,
60151105
)
>
0
then
res
=
1
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151105
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
if
res
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151105
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
end
end
end
function
c60151105
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
end
function
c60151105
.
spfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
c60151105
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151105
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
function
c60151105
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151105
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151105
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
end
end
\ No newline at end of file
expansions/script/c60151106.lua
View file @
d9d3234f
This diff is collapsed.
Click to expand it.
expansions/script/c60151107.lua
View file @
d9d3234f
This diff is collapsed.
Click to expand it.
expansions/script/c60151108.lua
View file @
d9d3234f
This diff is collapsed.
Click to expand it.
expansions/script/c60151121.lua
View file @
d9d3234f
--├军团亚席 钢铁之布欧娜┤
function
c60151121
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
c60151121
.
xyzfilter
,
4
,
2
)
c
:
EnableReviveLimit
()
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c60151121
.
atkcon
)
e1
:
SetTarget
(
c60151121
.
cointg
)
e1
:
SetOperation
(
c60151121
.
coinop
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetTarget
(
c60151121
.
thtg
)
e2
:
SetOperation
(
c60151121
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c60151121
.
xyzfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
end
function
c60151121
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
function
c60151121
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151121
.
chlimit
)
Duel
.
RegisterFlagEffect
(
tp
,
60151121
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
end
function
c60151121
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c60151121
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151121
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
res
=
0
if
Duel
.
GetFlagEffect
(
tp
,
60151121
)
>
0
then
res
=
1
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151121
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151121
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
if
res
==
1
then
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
tc
:
GetAttack
()
/
2
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e2
:
SetValue
(
tc
:
GetDefense
()
/
2
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e11
:
SetValue
(
e
:
GetHandler
():
GetAttack
()
/
2
)
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e
:
GetHandler
():
RegisterEffect
(
e11
)
end
end
function
c60151121
.
filter3
(
c
)
return
not
c
:
IsCode
(
60151121
)
and
c
:
IsAbleToGrave
()
end
function
c60151121
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_EFFECT
)
end
end
function
c60151121
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
then
Duel
.
BreakEffect
()
--indes
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
60151121
,
1
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
--battle indestructable
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e
:
GetHandler
():
RegisterEffect
(
e2
)
end
--├军团亚席 钢铁之布欧娜┤
function
c60151121
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
c60151121
.
xyzfilter
,
4
,
2
)
c
:
EnableReviveLimit
()
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c60151121
.
atkcon
)
e1
:
SetTarget
(
c60151121
.
cointg
)
e1
:
SetOperation
(
c60151121
.
coinop
)
c
:
RegisterEffect
(
e1
)
local
e111
=
Effect
.
CreateEffect
(
c
)
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e111
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e111
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e111
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e111
:
SetCondition
(
c60151121
.
atkcon2
)
e111
:
SetTarget
(
c60151121
.
cointg
)
e111
:
SetOperation
(
c60151121
.
coinop
)
c
:
RegisterEffect
(
e111
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetTarget
(
c60151121
.
thtg
)
e2
:
SetOperation
(
c60151121
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c60151121
.
xyzfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
end
function
c60151121
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_XYZ
and
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
function
c60151121
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_XYZ
and
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
function
c60151121
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151121
.
chlimit
)
Duel
.
RegisterFlagEffect
(
tp
,
60151121
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
,
nil
,
1
,
1
-
tp
,
LOCATION_MZONE
)
end
function
c60151121
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c60151121
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151121
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
res
=
0
if
Duel
.
GetFlagEffect
(
tp
,
60151121
)
>
0
then
res
=
1
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151121
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151121
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
if
res
==
1
then
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
tc
:
GetAttack
()
/
2
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e2
:
SetValue
(
tc
:
GetDefense
()
/
2
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e11
:
SetValue
(
e
:
GetHandler
():
GetAttack
()
/
2
)
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e
:
GetHandler
():
RegisterEffect
(
e11
)
end
end
function
c60151121
.
filter3
(
c
)
return
not
c
:
IsCode
(
60151121
)
and
c
:
IsAbleToGrave
()
end
function
c60151121
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_EFFECT
)
end
end
function
c60151121
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
then
Duel
.
BreakEffect
()
--indes
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
60151121
,
1
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
--battle indestructable
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetValue
(
1
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e
:
GetHandler
():
RegisterEffect
(
e2
)
end
end
\ No newline at end of file
expansions/script/c60151123.lua
View file @
d9d3234f
--├军团亚席 极舞之赛尔菲┤
function
c60151123
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
c60151123
.
tfilter
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x9b23
),
1
)
c
:
EnableReviveLimit
()
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c60151123
.
atkcon
)
e1
:
SetTarget
(
c60151123
.
cointg
)
e1
:
SetOperation
(
c60151123
.
coinop
)
c
:
RegisterEffect
(
e1
)
--remove
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_TOGRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGETEFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetTarget
(
c60151123
.
rmtg
)
e2
:
SetOperation
(
c60151123
.
rmop
)
c
:
RegisterEffect
(
e2
)
end
function
c60151123
.
tfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
end
function
c60151123
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c60151123
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151123
.
chlimit
)
Duel
.
RegisterFlagEffect
(
tp
,
60151123
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
end
function
c60151123
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c60151123
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151123
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
res
=
0
if
Duel
.
GetFlagEffect
(
tp
,
60151123
)
>
0
then
res
=
1
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151123
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151123
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
if
res
==
1
then
--attack all
local
e4
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e4
:
SetDescription
(
aux
.
Stringid
(
60151123
,
1
))
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_ATTACK_ALL
)
e4
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e4
:
SetValue
(
1
)
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e
:
GetHandler
():
RegisterEffect
(
e4
)
end
end
function
c60151123
.
filter3
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
60151123
)
and
c
:
IsAbleToGrave
()
end
function
c60151123
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c60151123
.
filter3
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ATKCHANGE
,
g
,
1
,
0
,
0
)
end
function
c60151123
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151123
.
filter3
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
if
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
then
Duel
.
BreakEffect
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc2
=
g1
:
GetFirst
()
local
atk
=
tc2
:
GetAttack
()
local
def
=
tc2
:
GetDefense
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
-
atk
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
)
end
end
end
--├军团亚席 极舞之赛尔菲┤
function
c60151123
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
c60151123
.
tfilter
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x9b23
),
1
)
c
:
EnableReviveLimit
()
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c60151123
.
atkcon
)
e1
:
SetTarget
(
c60151123
.
cointg
)
e1
:
SetOperation
(
c60151123
.
coinop
)
c
:
RegisterEffect
(
e1
)
local
e111
=
Effect
.
CreateEffect
(
c
)
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e111
:
SetCategory
(
CATEGORY_TOGRAVE
)
e111
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e111
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e111
:
SetCondition
(
c60151123
.
atkcon2
)
e111
:
SetTarget
(
c60151123
.
cointg
)
e111
:
SetOperation
(
c60151123
.
coinop
)
c
:
RegisterEffect
(
e111
)
--remove
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_TOGRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetTarget
(
c60151123
.
rmtg
)
e2
:
SetOperation
(
c60151123
.
rmop
)
c
:
RegisterEffect
(
e2
)
end
function
c60151123
.
tfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
end
function
c60151123
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
and
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
function
c60151123
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
and
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
function
c60151123
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151123
.
chlimit
)
Duel
.
RegisterFlagEffect
(
tp
,
60151123
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
end
function
c60151123
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c60151123
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151123
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
res
=
0
if
Duel
.
GetFlagEffect
(
tp
,
60151123
)
>
0
then
res
=
1
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151123
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151123
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
if
res
==
1
then
--attack all
local
e4
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e4
:
SetDescription
(
aux
.
Stringid
(
60151123
,
1
))
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_ATTACK_ALL
)
e4
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e4
:
SetValue
(
1
)
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e
:
GetHandler
():
RegisterEffect
(
e4
)
end
end
function
c60151123
.
filter3
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
60151123
)
and
c
:
IsAbleToGrave
()
end
function
c60151123
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c60151123
.
filter3
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ATKCHANGE
,
g
,
1
,
0
,
0
)
end
function
c60151123
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151123
.
filter3
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
if
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
then
Duel
.
BreakEffect
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc2
=
g1
:
GetFirst
()
local
atk
=
tc2
:
GetAttack
()
local
def
=
tc2
:
GetDefense
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
-
atk
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
)
end
end
end
end
\ No newline at end of file
expansions/script/c60151125.lua
View file @
d9d3234f
--├军团次席 断罪者卡斯芙┤
function
c60151125
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
60151125
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
c60151125
.
xyzfilter
,
8
,
2
)
c
:
EnableReviveLimit
()
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c60151125
.
atkcon
)
e1
:
SetTarget
(
c60151125
.
cointg
)
e1
:
SetOperation
(
c60151125
.
coinop
)
c
:
RegisterEffect
(
e1
)
end
function
c60151125
.
xyzfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
end
function
c60151125
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
function
c60151125
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151125
.
chlimit
)
Duel
.
RegisterFlagEffect
(
tp
,
60151125
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
end
function
c60151125
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c60151125
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151125
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
res
=
0
if
Duel
.
GetFlagEffect
(
tp
,
60151125
)
>
0
then
res
=
1
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e11
:
SetValue
(
1000
)
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e
:
GetHandler
():
RegisterEffect
(
e11
)
end
if
res
==
1
then
--disable and destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151123
,
1
))
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetCode
(
EVENT_CHAIN_ACTIVATING
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetCondition
(
c60151125
.
indcon
)
e1
:
SetOperation
(
c60151125
.
disop
)
c
:
RegisterEffect
(
e1
)
end
end
function
c60151125
.
indcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetOverlayCount
()
>
0
end
function
c60151125
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
ep
==
tp
then
return
end
local
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
if
(
loc
==
LOCATION_MZONE
or
loc
==
LOCATION_SZONE
)
then
Duel
.
Hint
(
HINT_CARD
,
0
,
60151125
)
local
res
=
0
res
=
Duel
.
TossCoin
(
tp
,
1
)
if
res
==
0
then
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
end
if
res
==
1
then
local
rc
=
re
:
GetHandler
()
Duel
.
NegateEffect
(
ev
)
if
rc
:
IsRelateToEffect
(
re
)
and
not
rc
:
IsImmuneToEffect
(
e
)
then
if
rc
:
IsType
(
TYPE_MONSTER
)
then
local
og
=
rc
:
GetOverlayGroup
()
if
og
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
og
,
REASON_RULE
)
end
Duel
.
Overlay
(
e
:
GetHandler
(),
Group
.
FromCards
(
rc
))
end
if
rc
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
then
rc
:
CancelToGrave
()
Duel
.
Overlay
(
e
:
GetHandler
(),
Group
.
FromCards
(
rc
))
end
end
end
end
end
function
c60151125
.
filter3
(
c
)
return
not
c
:
IsCode
(
60151125
)
and
c
:
IsAbleToGrave
()
end
function
c60151125
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_EFFECT
)
end
end
function
c60151125
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_ACTIVATING
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetOperation
(
c60151125
.
activate
)
Duel
.
RegisterEffect
(
e1
,
1
-
tp
)
end
end
function
c60151125
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
if
(
loc
==
LOCATION_HAND
or
loc
==
LOCATION_GRAVE
or
loc
==
LOCATION_DECK
or
loc
==
LOCATION_REMOVED
or
loc
==
LOCATION_EXTRA
or
loc
==
LOCATION_OVERLAY
)
and
not
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
then
Duel
.
NegateEffect
(
ev
)
end
--├军团次席 断罪者卡斯芙┤
function
c60151125
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
60151125
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
c60151125
.
xyzfilter
,
8
,
2
)
c
:
EnableReviveLimit
()
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c60151125
.
atkcon
)
e1
:
SetTarget
(
c60151125
.
cointg
)
e1
:
SetOperation
(
c60151125
.
coinop
)
c
:
RegisterEffect
(
e1
)
local
e111
=
Effect
.
CreateEffect
(
c
)
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e111
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e111
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e111
:
SetCondition
(
c60151125
.
atkcon2
)
e111
:
SetTarget
(
c60151125
.
cointg
)
e111
:
SetOperation
(
c60151125
.
coinop
)
c
:
RegisterEffect
(
e111
)
end
function
c60151125
.
xyzfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
end
function
c60151125
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_XYZ
and
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
function
c60151125
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_XYZ
and
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
function
c60151125
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151125
.
chlimit
)
Duel
.
RegisterFlagEffect
(
tp
,
60151125
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
end
function
c60151125
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c60151125
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151125
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
res
=
0
if
Duel
.
GetFlagEffect
(
tp
,
60151125
)
>
0
then
res
=
1
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e11
:
SetValue
(
1000
)
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e
:
GetHandler
():
RegisterEffect
(
e11
)
end
if
res
==
1
then
--disable and destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151123
,
1
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetCode
(
EVENT_CHAIN_ACTIVATING
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetCondition
(
c60151125
.
indcon
)
e1
:
SetOperation
(
c60151125
.
disop
)
c
:
RegisterEffect
(
e1
)
end
end
function
c60151125
.
indcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetOverlayCount
()
>
0
end
function
c60151125
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
ep
==
tp
then
return
end
local
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
if
(
loc
==
LOCATION_MZONE
or
loc
==
LOCATION_SZONE
)
then
Duel
.
Hint
(
HINT_CARD
,
0
,
60151125
)
local
res
=
0
res
=
Duel
.
TossCoin
(
tp
,
1
)
if
res
==
0
then
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
end
if
res
==
1
then
local
rc
=
re
:
GetHandler
()
Duel
.
NegateEffect
(
ev
)
if
rc
:
IsRelateToEffect
(
re
)
and
not
rc
:
IsImmuneToEffect
(
e
)
then
if
rc
:
IsType
(
TYPE_MONSTER
)
then
local
og
=
rc
:
GetOverlayGroup
()
if
og
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
og
,
REASON_RULE
)
end
Duel
.
Overlay
(
e
:
GetHandler
(),
Group
.
FromCards
(
rc
))
end
if
rc
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
then
rc
:
CancelToGrave
()
Duel
.
Overlay
(
e
:
GetHandler
(),
Group
.
FromCards
(
rc
))
end
end
end
end
end
function
c60151125
.
filter3
(
c
)
return
not
c
:
IsCode
(
60151125
)
and
c
:
IsAbleToGrave
()
end
function
c60151125
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_EFFECT
)
end
end
function
c60151125
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_ACTIVATING
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetOperation
(
c60151125
.
activate
)
Duel
.
RegisterEffect
(
e1
,
1
-
tp
)
end
end
function
c60151125
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
if
(
loc
==
LOCATION_HAND
or
loc
==
LOCATION_GRAVE
or
loc
==
LOCATION_DECK
or
loc
==
LOCATION_REMOVED
or
loc
==
LOCATION_EXTRA
or
loc
==
LOCATION_OVERLAY
)
and
not
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
then
Duel
.
NegateEffect
(
ev
)
end
end
\ No newline at end of file
expansions/script/c60151127.lua
View file @
d9d3234f
--├军团次席 律法者丽安塔┤
function
c60151127
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
60151127
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
c60151127
.
tfilter
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x9b23
),
2
)
c
:
EnableReviveLimit
()
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c60151127
.
atkcon
)
e1
:
SetTarget
(
c60151127
.
cointg
)
e1
:
SetOperation
(
c60151127
.
coinop
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetTarget
(
c60151127
.
destg
)
e2
:
SetOperation
(
c60151127
.
desop
)
c
:
RegisterEffect
(
e2
)
end
function
c60151127
.
tfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
end
function
c60151127
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c60151127
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151127
.
chlimit
)
Duel
.
RegisterFlagEffect
(
tp
,
60151127
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
end
function
c60151127
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c60151127
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151127
.
filter
(
c
)
return
c
:
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
and
c
:
IsDestructable
()
end
function
c60151127
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
res
=
0
if
Duel
.
GetFlagEffect
(
tp
,
60151127
)
>
0
then
res
=
1
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
local
g
=
Duel
.
GetMatchingGroup
(
c60151127
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
if
res
==
1
then
--disable and destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151123
,
1
))
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetCode
(
EVENT_SPSUMMON
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetCondition
(
c60151127
.
condition
)
e1
:
SetOperation
(
c60151127
.
disop
)
c
:
RegisterEffect
(
e1
)
end
end
function
c60151127
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
ep
end
function
c60151127
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
60151127
)
local
res
=
0
res
=
Duel
.
TossCoin
(
tp
,
1
)
if
res
==
0
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151127
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
if
res
==
1
then
Duel
.
NegateSummon
(
eg
)
Duel
.
SendtoDeck
(
eg
,
nil
,
2
,
REASON_EFFECT
)
end
end
function
c60151127
.
filter3
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
end
function
c60151127
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151127
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c60151127
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g1
=
Duel
.
GetMatchingGroup
(
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g1
,
1
,
0
,
0
)
end
function
c60151127
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151127
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
tp
)
if
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151127
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
--├军团次席 律法者丽安塔┤
function
c60151127
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
60151127
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
c60151127
.
tfilter
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x9b23
),
2
)
c
:
EnableReviveLimit
()
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c60151127
.
atkcon
)
e1
:
SetTarget
(
c60151127
.
cointg
)
e1
:
SetOperation
(
c60151127
.
coinop
)
c
:
RegisterEffect
(
e1
)
local
e111
=
Effect
.
CreateEffect
(
c
)
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e111
:
SetCategory
(
CATEGORY_DESTROY
)
e111
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e111
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e111
:
SetCondition
(
c60151127
.
atkcon2
)
e111
:
SetTarget
(
c60151127
.
cointg
)
e111
:
SetOperation
(
c60151127
.
coinop
)
c
:
RegisterEffect
(
e111
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
+
CATEGORY_TOGRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetTarget
(
c60151127
.
destg
)
e2
:
SetOperation
(
c60151127
.
desop
)
c
:
RegisterEffect
(
e2
)
end
function
c60151127
.
tfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
end
function
c60151127
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
and
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
function
c60151127
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
and
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
function
c60151127
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151127
.
chlimit
)
Duel
.
RegisterFlagEffect
(
tp
,
60151127
,
RESET_CHAIN
,
0
,
1
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
1
-
tp
,
LOCATION_MZONE
)
end
end
function
c60151127
.
chlimit
(
e
,
ep
,
tp
)
return
tp
==
ep
end
function
c60151127
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151127
.
filter
(
c
)
return
bit
.
band
(
c
:
GetSummonType
(),
SUMMON_TYPE_SPECIAL
)
==
SUMMON_TYPE_SPECIAL
and
c
:
IsDestructable
()
end
function
c60151127
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
then
return
end
local
res
=
0
if
Duel
.
GetFlagEffect
(
tp
,
60151127
)
>
0
then
res
=
1
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
local
g
=
Duel
.
GetMatchingGroup
(
c60151127
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
if
res
==
1
then
--disable and destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151123
,
1
))
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetCode
(
EVENT_SPSUMMON
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetCondition
(
c60151127
.
condition
)
e1
:
SetOperation
(
c60151127
.
disop
)
c
:
RegisterEffect
(
e1
)
end
end
function
c60151127
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
ep
end
function
c60151127
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
60151127
)
local
res
=
0
res
=
Duel
.
TossCoin
(
tp
,
1
)
if
res
==
0
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151127
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
if
res
==
1
then
Duel
.
NegateSummon
(
eg
)
Duel
.
SendtoDeck
(
eg
,
nil
,
2
,
REASON_EFFECT
)
end
end
function
c60151127
.
filter3
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
end
function
c60151127
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151127
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c60151127
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g1
=
Duel
.
GetMatchingGroup
(
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g1
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
function
c60151127
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151127
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
tp
)
if
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151127
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
end
\ No newline at end of file
expansions/script/c60151128.lua
View file @
d9d3234f
This diff is collapsed.
Click to expand it.
expansions/script/c60151196.lua
View file @
d9d3234f
--├宁静的行程┤
function
c60151196
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCountLimit
(
1
,
60151196
)
e1
:
SetTarget
(
c60151196
.
target
)
e1
:
SetOperation
(
c60151196
.
activate
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
60151196
)
e2
:
SetCondition
(
c60151196
.
drcon
)
e2
:
SetTarget
(
c60151196
.
drtg
)
e2
:
SetOperation
(
c60151196
.
drop
)
c
:
RegisterEffect
(
e2
)
end
function
c60151196
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsAbleToGrave
()
end
function
c60151196
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151196
.
tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c60151196
.
tgfilter2
(
c
,
ttype
)
return
c
:
IsType
(
ttype
)
and
c
:
IsFaceup
()
and
c
:
IsAbleToDeck
()
end
function
c60151196
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151196
.
tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
local
tc
=
g
:
GetFirst
()
if
tc
and
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
~=
0
and
tc
:
IsLocation
(
LOCATION_GRAVE
)
then
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
local
ttype
=
bit
.
band
(
tc
:
GetType
(),
0x7
)
local
g2
=
Duel
.
GetMatchingGroup
(
c60151196
.
tgfilter2
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
ttype
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151196
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
sg
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
function
c60151196
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
function
c60151196
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsAbleToHand
()
end
function
c60151196
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151196
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c60151196
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151196
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
end
--├宁静的行程┤
function
c60151196
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_DRAW
+
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCountLimit
(
1
,
60151196
)
e1
:
SetTarget
(
c60151196
.
target
)
e1
:
SetOperation
(
c60151196
.
activate
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
60151196
)
e2
:
SetCondition
(
c60151196
.
drcon
)
e2
:
SetTarget
(
c60151196
.
drtg
)
e2
:
SetOperation
(
c60151196
.
drop
)
c
:
RegisterEffect
(
e2
)
end
function
c60151196
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsAbleToGrave
()
end
function
c60151196
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151196
.
tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
1
-
tp
,
LOCATION_ONFIELD
)
end
function
c60151196
.
tgfilter2
(
c
,
ttype
)
return
c
:
IsType
(
ttype
)
and
c
:
IsFaceup
()
and
c
:
IsAbleToDeck
()
end
function
c60151196
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151196
.
tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
local
tc
=
g
:
GetFirst
()
if
tc
and
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
~=
0
and
tc
:
IsLocation
(
LOCATION_GRAVE
)
then
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
local
ttype
=
bit
.
band
(
tc
:
GetType
(),
0x7
)
local
g2
=
Duel
.
GetMatchingGroup
(
c60151196
.
tgfilter2
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
ttype
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151196
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
sg
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
function
c60151196
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
function
c60151196
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsAbleToHand
()
end
function
c60151196
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151196
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
function
c60151196
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151196
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
end
end
\ No newline at end of file
expansions/script/c60151197.lua
View file @
d9d3234f
--├腹心反击┤
function
c60151197
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e1
:
SetCountLimit
(
1
,
60151197
)
e1
:
SetCondition
(
c60151197
.
condition
)
e1
:
SetTarget
(
c60151197
.
target
)
e1
:
SetOperation
(
c60151197
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e12
=
e1
:
Clone
()
e12
:
SetCode
(
EVENT_BECOME_TARGET
)
c
:
RegisterEffect
(
e12
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60151197
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
60151197
)
e2
:
SetCondition
(
c60151197
.
drcon
)
e2
:
SetTarget
(
c60151197
.
drtg
)
e2
:
SetOperation
(
c60151197
.
drop
)
c
:
RegisterEffect
(
e2
)
end
function
c60151197
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
return
tc
:
IsControler
(
tp
)
and
tc
:
IsFaceup
()
and
tc
:
IsSetCard
(
0x9b23
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
IsLocation
(
LOCATION_MZONE
)
end
function
c60151197
.
tgfilter
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151197
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151197
.
tgfilter
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
function
c60151197
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g2
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
Duel
.
ConfirmCards
(
tp
,
g2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151197
.
tgfilter
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
local
g3
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
nil
)
local
g1
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
g3
:
GetCount
()
>
0
and
g1
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151197
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
sg
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_TOGRAVE
)
local
sg2
=
g3
:
Select
(
1
-
tp
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
sg2
)
Duel
.
SendtoGrave
(
sg2
,
REASON_RULE
)
end
end
end
Duel
.
ShuffleHand
(
1
-
tp
)
end
function
c60151197
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
function
c60151197
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c60151197
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
--├腹心反击┤
function
c60151197
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e1
:
SetCountLimit
(
1
,
60151197
)
e1
:
SetCondition
(
c60151197
.
condition
)
e1
:
SetTarget
(
c60151197
.
target
)
e1
:
SetOperation
(
c60151197
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e12
=
e1
:
Clone
()
e12
:
SetCode
(
EVENT_BECOME_TARGET
)
c
:
RegisterEffect
(
e12
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60151197
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
60151197
)
e2
:
SetCondition
(
c60151197
.
drcon
)
e2
:
SetTarget
(
c60151197
.
drtg
)
e2
:
SetOperation
(
c60151197
.
drop
)
c
:
RegisterEffect
(
e2
)
end
function
c60151197
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
return
tc
:
IsControler
(
tp
)
and
tc
:
IsFaceup
()
and
tc
:
IsSetCard
(
0x9b23
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
IsLocation
(
LOCATION_MZONE
)
end
function
c60151197
.
tgfilter
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151197
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151197
.
tgfilter
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
1
-
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
function
c60151197
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g2
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
Duel
.
ConfirmCards
(
tp
,
g2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151197
.
tgfilter
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
local
g3
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
nil
)
local
g1
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
e
:
GetHandler
())
if
g3
:
GetCount
()
>
0
and
g1
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151197
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
sg
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_TOGRAVE
)
local
sg2
=
g3
:
Select
(
1
-
tp
,
1
,
1
,
nil
)
Duel
.
HintSelection
(
sg2
)
Duel
.
SendtoGrave
(
sg2
,
REASON_RULE
)
end
end
end
Duel
.
ShuffleHand
(
1
-
tp
)
end
function
c60151197
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
function
c60151197
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c60151197
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c60151198.lua
View file @
d9d3234f
--├深夜行军┤
function
c60151198
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
60151198
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c60151198
.
target
)
e1
:
SetOperation
(
c60151198
.
operation
)
c
:
RegisterEffect
(
e1
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60151198
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
60151198
)
e2
:
SetCondition
(
c60151198
.
drcon
)
e2
:
SetTarget
(
c60151198
.
drtg
)
e2
:
SetOperation
(
c60151198
.
drop
)
c
:
RegisterEffect
(
e2
)
end
function
c60151198
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c60151198
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingTarget
(
c60151198
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c60151198
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c60151198
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151198
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151198
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151198
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
e
:
GetHandler
())
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
end
function
c60151198
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
function
c60151198
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c60151198
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
--├深夜行军┤
function
c60151198
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
60151198
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c60151198
.
target
)
e1
:
SetOperation
(
c60151198
.
operation
)
c
:
RegisterEffect
(
e1
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60151198
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
60151198
)
e2
:
SetCondition
(
c60151198
.
drcon
)
e2
:
SetTarget
(
c60151198
.
drtg
)
e2
:
SetOperation
(
c60151198
.
drop
)
c
:
RegisterEffect
(
e2
)
end
function
c60151198
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c60151198
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c60151198
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c60151198
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
function
c60151198
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151198
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
end
end
function
c60151198
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
function
c60151198
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c60151198
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c60151199.lua
View file @
d9d3234f
--├军团┤
function
c60151199
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x1b
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
60151199
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c60151199
.
cointg
)
e1
:
SetOperation
(
c60151199
.
coinop
)
c
:
RegisterEffect
(
e1
)
--counter
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c60151199
.
ctcon
)
e2
:
SetOperation
(
c60151199
.
ctop
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
60151199
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x9b23
))
c
:
RegisterEffect
(
e3
)
--special summon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_DRAW
)
e5
:
SetDescription
(
aux
.
Stringid
(
60151199
,
0
))
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCost
(
c60151199
.
cost3
)
e5
:
SetOperation
(
c60151199
.
op3
)
c
:
RegisterEffect
(
e5
)
end
function
c60151199
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
function
c60151199
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151199
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
c
=
e
:
GetHandler
()
local
res
=
0
res
=
Duel
.
TossCoin
(
tp
,
1
)
if
res
==
0
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
end
function
c60151199
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsReason
(
REASON_EFFECT
))
end
function
c60151199
.
ctcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
and
eg
:
IsExists
(
c60151199
.
cfilter
,
1
,
nil
)
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
end
function
c60151199
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
eg
then
return
end
local
ct
=
eg
:
FilterCount
(
c60151199
.
cfilter
,
nil
)
e
:
GetHandler
():
AddCounter
(
0x1b
,
ct
)
end
function
c60151199
.
cost3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0x1b
,
3
,
REASON_COST
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
e
:
GetHandler
():
RemoveCounter
(
tp
,
0x1b
,
3
,
REASON_COST
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c60151199
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151199
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
--├军团┤
function
c60151199
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
60151199
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c60151199
.
cointg
)
e1
:
SetOperation
(
c60151199
.
coinop
)
c
:
RegisterEffect
(
e1
)
--counter
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c60151199
.
ctcon
)
e2
:
SetOperation
(
c60151199
.
ctop
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
60151199
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x9b23
))
c
:
RegisterEffect
(
e3
)
--special summon
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_DRAW
)
e5
:
SetDescription
(
aux
.
Stringid
(
60151199
,
0
))
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCost
(
c60151199
.
cost3
)
e5
:
SetOperation
(
c60151199
.
op3
)
c
:
RegisterEffect
(
e5
)
end
function
c60151199
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
function
c60151199
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c60151199
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
c
=
e
:
GetHandler
()
local
res
=
0
res
=
Duel
.
TossCoin
(
tp
,
1
)
if
res
==
0
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
end
function
c60151199
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsReason
(
REASON_EFFECT
))
end
function
c60151199
.
ctcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
and
eg
:
IsExists
(
c60151199
.
cfilter
,
1
,
nil
)
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
end
function
c60151199
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
eg
then
return
end
local
ct
=
eg
:
FilterCount
(
c60151199
.
cfilter
,
nil
)
e
:
GetHandler
():
AddCounter
(
0x101b
,
ct
)
end
function
c60151199
.
cost3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0x101b
,
3
,
REASON_COST
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
e
:
GetHandler
():
RemoveCounter
(
tp
,
0x101b
,
3
,
REASON_COST
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c60151199
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151199
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
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