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
)
function
c60151102
.
initial_effect
(
c
)
--coin
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_DESTROY
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
6011102
)
e1
:
SetCountLimit
(
1
,
6011102
)
e1
:
SetTarget
(
c60151102
.
cointg
)
e1
:
SetCondition
(
c60151102
.
coincon
)
e1
:
SetOperation
(
c60151102
.
coinop
)
e1
:
SetTarget
(
c60151102
.
cointg
)
c
:
RegisterEffect
(
e1
)
e1
:
SetOperation
(
c60151102
.
coinop
)
local
e2
=
e1
:
Clone
()
c
:
RegisterEffect
(
e1
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
local
e2
=
e1
:
Clone
()
c
:
RegisterEffect
(
e2
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
--
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e111
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151102
,
1
))
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e3
:
SetCategory
(
CATEGORY_DRAW
)
e111
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_TOGRAVE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e111
:
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
)
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e111
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e3
:
SetCountLimit
(
1
,
60151102
)
e111
:
SetCountLimit
(
1
,
6011102
)
e3
:
SetCondition
(
c60151102
.
spcon
)
e111
:
SetCondition
(
c60151102
.
coincon2
)
e3
:
SetTarget
(
c60151102
.
sptg
)
e111
:
SetTarget
(
c60151102
.
cointg
)
e3
:
SetOperation
(
c60151102
.
spop
)
e111
:
SetOperation
(
c60151102
.
coinop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e111
)
end
local
e222
=
e111
:
Clone
()
function
c60151102
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e222
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
if
chk
==
0
then
return
true
end
c
:
RegisterEffect
(
e222
)
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
--
Duel
.
SetChainLimit
(
c60151102
.
chlimit
)
local
e3
=
Effect
.
CreateEffect
(
c
)
Duel
.
RegisterFlagEffect
(
tp
,
60151102
,
RESET_CHAIN
,
0
,
1
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151102
,
1
))
else
e3
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_TOGRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
end
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
end
e3
:
SetCode
(
EVENT_TO_GRAVE
)
function
c60151102
.
chlimit
(
e
,
ep
,
tp
)
e3
:
SetCountLimit
(
1
,
60151102
)
return
tp
==
ep
e3
:
SetCondition
(
c60151102
.
spcon
)
end
e3
:
SetTarget
(
c60151102
.
sptg
)
function
c60151102
.
filter
(
c
)
e3
:
SetOperation
(
c60151102
.
spop
)
return
c
:
IsDestructable
()
c
:
RegisterEffect
(
e3
)
end
end
function
c60151102
.
filter2
(
c
)
function
c60151102
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsAbleToGrave
()
return
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
end
function
c60151102
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60151102
.
coincon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
return
e
:
GetHandler
():
IsHasEffect
(
60151199
)
local
c
=
e
:
GetHandler
()
end
if
c
:
IsFacedown
()
then
return
end
function
c60151102
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
res
=
0
if
chk
==
0
then
return
true
end
if
Duel
.
GetFlagEffect
(
tp
,
60151102
)
>
0
then
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
res
=
1
Duel
.
SetChainLimit
(
c60151102
.
chlimit
)
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
Duel
.
RegisterFlagEffect
(
tp
,
60151102
,
RESET_CHAIN
,
0
,
1
)
if
res
==
0
then
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151102
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
if
g1
:
GetCount
()
>
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
1
-
tp
,
LOCATION_ONFIELD
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
end
end
function
c60151102
.
chlimit
(
e
,
ep
,
tp
)
if
res
==
1
then
return
tp
==
ep
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151102
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
function
c60151102
.
filter
(
c
)
if
g
:
GetCount
()
>
0
then
return
c
:
IsDestructable
()
Duel
.
HintSelection
(
g
)
end
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
function
c60151102
.
filter2
(
c
)
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
return
c
:
IsAbleToGrave
()
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
end
Duel
.
BreakEffect
()
function
c60151102
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
local
c
=
e
:
GetHandler
()
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
if
c
:
IsFacedown
()
then
return
end
end
local
res
=
0
end
if
Duel
.
GetFlagEffect
(
tp
,
60151102
)
>
0
then
end
res
=
1
end
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
end
if
res
==
0
then
function
c60151102
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151102
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
if
g1
:
GetCount
()
>
0
then
end
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
function
c60151102
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
end
end
Duel
.
SetTargetPlayer
(
tp
)
if
res
==
1
then
Duel
.
SetTargetParam
(
2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151102
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
end
if
g
:
GetCount
()
>
0
then
function
c60151102
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
HintSelection
(
g
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
then
Duel
.
BreakEffect
()
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151102
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
BreakEffect
()
if
g1
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
end
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
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
end
\ No newline at end of file
expansions/script/c60151103.lua
View file @
d9d3234f
--├风语者 妲修斯┤
--├风语者 妲修斯┤
function
c60151103
.
initial_effect
(
c
)
function
c60151103
.
initial_effect
(
c
)
c
:
EnableUnsummonable
()
c
:
EnableUnsummonable
()
--special summon
--special summon
local
e11
=
Effect
.
CreateEffect
(
c
)
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetType
(
EFFECT_TYPE_FIELD
)
e11
:
SetType
(
EFFECT_TYPE_FIELD
)
e11
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e11
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e11
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e11
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e11
:
SetRange
(
LOCATION_HAND
)
e11
:
SetRange
(
LOCATION_HAND
)
e11
:
SetCountLimit
(
1
,
60111031
)
e11
:
SetCountLimit
(
1
,
60111031
)
e11
:
SetCondition
(
c60151103
.
spcon2
)
e11
:
SetCondition
(
c60151103
.
spcon2
)
c
:
RegisterEffect
(
e11
)
c
:
RegisterEffect
(
e11
)
--coin
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
6011103
)
e1
:
SetCountLimit
(
1
,
6011103
)
e1
:
SetTarget
(
c60151103
.
cointg
)
e1
:
SetCondition
(
c60151103
.
coincon
)
e1
:
SetOperation
(
c60151103
.
coinop
)
e1
:
SetTarget
(
c60151103
.
cointg
)
c
:
RegisterEffect
(
e1
)
e1
:
SetOperation
(
c60151103
.
coinop
)
--
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e111
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151103
,
1
))
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e111
:
SetCategory
(
CATEGORY_TOGRAVE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e111
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e111
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCountLimit
(
1
,
60151103
)
e111
:
SetCountLimit
(
1
,
6011103
)
e3
:
SetCondition
(
c60151103
.
spcon
)
e111
:
SetCondition
(
c60151103
.
coincon2
)
e3
:
SetTarget
(
c60151103
.
sptg
)
e111
:
SetTarget
(
c60151103
.
cointg
)
e3
:
SetOperation
(
c60151103
.
spop
)
e111
:
SetOperation
(
c60151103
.
coinop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e111
)
end
--
function
c60151103
.
sfilter
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x9b23
)
and
c
:
GetCode
()
~=
60151103
e3
:
SetDescription
(
aux
.
Stringid
(
60151103
,
1
))
end
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_TOGRAVE
)
function
c60151103
.
spcon2
(
e
,
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
if
c
==
nil
then
return
true
end
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
return
Duel
.
GetMZoneCount
(
c
:
GetControler
())
>
0
and
e3
:
SetCode
(
EVENT_TO_GRAVE
)
Duel
.
IsExistingMatchingCard
(
c60151103
.
sfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
e3
:
SetCountLimit
(
1
,
60151103
)
end
e3
:
SetCondition
(
c60151103
.
spcon
)
function
c60151103
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e3
:
SetTarget
(
c60151103
.
sptg
)
if
chk
==
0
then
return
true
end
e3
:
SetOperation
(
c60151103
.
spop
)
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
c
:
RegisterEffect
(
e3
)
Duel
.
SetChainLimit
(
c60151103
.
chlimit
)
end
Duel
.
RegisterFlagEffect
(
tp
,
60151103
,
RESET_CHAIN
,
0
,
1
)
function
c60151103
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
else
return
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
end
function
c60151103
.
coincon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
IsHasEffect
(
60151199
)
function
c60151103
.
chlimit
(
e
,
ep
,
tp
)
end
return
tp
==
ep
function
c60151103
.
sfilter
(
c
)
end
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x9b23
)
and
c
:
GetCode
()
~=
60151103
function
c60151103
.
filter
(
c
)
end
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
function
c60151103
.
spcon2
(
e
,
c
)
end
if
c
==
nil
then
return
true
end
function
c60151103
.
filter2
(
c
)
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
return
c
:
IsAbleToGrave
()
Duel
.
IsExistingMatchingCard
(
c60151103
.
sfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
c60151103
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60151103
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
if
chk
==
0
then
return
true
end
local
c
=
e
:
GetHandler
()
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
if
c
:
IsFacedown
()
then
return
end
Duel
.
SetChainLimit
(
c60151103
.
chlimit
)
local
res
=
0
Duel
.
RegisterFlagEffect
(
tp
,
60151103
,
RESET_CHAIN
,
0
,
1
)
if
Duel
.
GetFlagEffect
(
tp
,
60151103
)
>
0
then
else
res
=
1
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
else
end
res
=
Duel
.
TossCoin
(
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
1
-
tp
,
LOCATION_HAND
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
if
res
==
0
then
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
function
c60151103
.
chlimit
(
e
,
ep
,
tp
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151103
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
return
tp
==
ep
if
g1
:
GetCount
()
>
0
then
end
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
function
c60151103
.
filter
(
c
)
end
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
end
if
res
==
1
then
function
c60151103
.
filter2
(
c
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
):
RandomSelect
(
tp
,
1
)
return
c
:
IsAbleToGrave
()
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
end
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
function
c60151103
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
Duel
.
BreakEffect
()
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
if
c
:
IsFacedown
()
then
return
end
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
local
res
=
0
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
if
Duel
.
GetFlagEffect
(
tp
,
60151103
)
>
0
then
end
res
=
1
end
else
end
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
end
function
c60151103
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
res
==
0
then
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151103
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
if
g1
:
GetCount
()
>
0
then
function
c60151103
.
spfilter
(
c
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
60151103
)
and
c
:
IsAbleToHand
()
end
end
end
function
c60151103
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
res
==
1
then
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151103
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
):
RandomSelect
(
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
end
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
function
c60151103
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
BreakEffect
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151103
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
if
g
:
GetCount
()
>
0
then
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
end
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151103
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
if
g1
:
GetCount
()
>
0
then
end
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
function
c60151103
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
end
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
end
end
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
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
)
function
c60151105
.
initial_effect
(
c
)
--coin
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
6011105
)
e1
:
SetCountLimit
(
1
,
6011105
)
e1
:
SetTarget
(
c60151105
.
cointg
)
e1
:
SetCondition
(
c60151105
.
coincon
)
e1
:
SetOperation
(
c60151105
.
coinop
)
e1
:
SetTarget
(
c60151105
.
cointg
)
c
:
RegisterEffect
(
e1
)
e1
:
SetOperation
(
c60151105
.
coinop
)
local
e2
=
e1
:
Clone
()
c
:
RegisterEffect
(
e1
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
local
e2
=
e1
:
Clone
()
c
:
RegisterEffect
(
e2
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
--
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e111
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151105
,
1
))
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e111
:
SetCategory
(
CATEGORY_TOGRAVE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e111
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e111
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e3
:
SetCountLimit
(
1
,
60151105
)
e111
:
SetCountLimit
(
1
,
6011105
)
e3
:
SetCondition
(
c60151105
.
spcon
)
e111
:
SetCondition
(
c60151105
.
coincon2
)
e3
:
SetTarget
(
c60151105
.
sptg
)
e111
:
SetTarget
(
c60151105
.
cointg
)
e3
:
SetOperation
(
c60151105
.
spop
)
e111
:
SetOperation
(
c60151105
.
coinop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e111
)
end
local
e222
=
e111
:
Clone
()
function
c60151105
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e222
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
if
chk
==
0
then
return
true
end
c
:
RegisterEffect
(
e222
)
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
--
Duel
.
SetChainLimit
(
c60151105
.
chlimit
)
local
e3
=
Effect
.
CreateEffect
(
c
)
Duel
.
RegisterFlagEffect
(
tp
,
60151105
,
RESET_CHAIN
,
0
,
1
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151105
,
1
))
else
e3
:
SetCategory
(
CATEGORY_TOHAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
end
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
end
e3
:
SetCode
(
EVENT_TO_GRAVE
)
function
c60151105
.
chlimit
(
e
,
ep
,
tp
)
e3
:
SetCountLimit
(
1
,
60151105
)
return
tp
==
ep
e3
:
SetCondition
(
c60151105
.
spcon
)
end
e3
:
SetTarget
(
c60151105
.
sptg
)
function
c60151105
.
filter
(
c
)
e3
:
SetOperation
(
c60151105
.
spop
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
c
:
RegisterEffect
(
e3
)
end
end
function
c60151105
.
filter2
(
c
)
function
c60151105
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsAbleToGrave
()
return
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
end
function
c60151105
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60151105
.
coincon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
return
e
:
GetHandler
():
IsHasEffect
(
60151199
)
local
c
=
e
:
GetHandler
()
end
if
c
:
IsFacedown
()
then
return
end
function
c60151105
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
res
=
0
if
chk
==
0
then
return
true
end
if
Duel
.
GetFlagEffect
(
tp
,
60151105
)
>
0
then
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
res
=
1
Duel
.
SetChainLimit
(
c60151105
.
chlimit
)
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
Duel
.
RegisterFlagEffect
(
tp
,
60151105
,
RESET_CHAIN
,
0
,
1
)
if
res
==
0
then
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151105
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
if
g1
:
GetCount
()
>
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
end
function
c60151105
.
chlimit
(
e
,
ep
,
tp
)
if
res
==
1
then
return
tp
==
ep
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151105
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
function
c60151105
.
filter
(
c
)
if
g
:
GetCount
()
>
0
then
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
end
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
function
c60151105
.
filter2
(
c
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
return
c
:
IsAbleToGrave
()
Duel
.
BreakEffect
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
function
c60151105
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
local
c
=
e
:
GetHandler
()
end
if
c
:
IsFacedown
()
then
return
end
end
local
res
=
0
end
if
Duel
.
GetFlagEffect
(
tp
,
60151105
)
>
0
then
end
res
=
1
end
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
function
c60151105
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
res
==
0
then
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151105
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
if
g1
:
GetCount
()
>
0
then
function
c60151105
.
spfilter
(
c
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
end
end
function
c60151105
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
res
==
1
then
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151105
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151105
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
end
if
g
:
GetCount
()
>
0
then
function
c60151105
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151105
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
if
g
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
end
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151105
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
if
g1
:
GetCount
()
>
0
then
end
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
end
function
c60151105
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
end
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
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
)
function
c60151121
.
initial_effect
(
c
)
--xyz summon
--xyz summon
aux
.
AddXyzProcedure
(
c
,
c60151121
.
xyzfilter
,
4
,
2
)
aux
.
AddXyzProcedure
(
c
,
c60151121
.
xyzfilter
,
4
,
2
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--coin
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c60151121
.
atkcon
)
e1
:
SetCondition
(
c60151121
.
atkcon
)
e1
:
SetTarget
(
c60151121
.
cointg
)
e1
:
SetTarget
(
c60151121
.
cointg
)
e1
:
SetOperation
(
c60151121
.
coinop
)
e1
:
SetOperation
(
c60151121
.
coinop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e111
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e111
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e111
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCountLimit
(
1
)
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e111
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e111
:
SetCondition
(
c60151121
.
atkcon2
)
e2
:
SetTarget
(
c60151121
.
thtg
)
e111
:
SetTarget
(
c60151121
.
cointg
)
e2
:
SetOperation
(
c60151121
.
thop
)
e111
:
SetOperation
(
c60151121
.
coinop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e111
)
end
--to hand
function
c60151121
.
xyzfilter
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
end
e2
:
SetRange
(
LOCATION_MZONE
)
function
c60151121
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e2
:
SetCountLimit
(
1
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
end
e2
:
SetHintTiming
(
0
,
0x1e0
)
function
c60151121
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e2
:
SetTarget
(
c60151121
.
thtg
)
if
chk
==
0
then
return
true
end
e2
:
SetOperation
(
c60151121
.
thop
)
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
c
:
RegisterEffect
(
e2
)
Duel
.
SetChainLimit
(
c60151121
.
chlimit
)
end
Duel
.
RegisterFlagEffect
(
tp
,
60151121
,
RESET_CHAIN
,
0
,
1
)
function
c60151121
.
xyzfilter
(
c
)
else
return
c
:
IsSetCard
(
0x9b23
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
end
function
c60151121
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_XYZ
and
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
function
c60151121
.
chlimit
(
e
,
ep
,
tp
)
end
return
tp
==
ep
function
c60151121
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_XYZ
and
e
:
GetHandler
():
IsHasEffect
(
60151199
)
function
c60151121
.
filter2
(
c
)
end
return
c
:
IsAbleToGrave
()
function
c60151121
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
chk
==
0
then
return
true
end
function
c60151121
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151121
.
chlimit
)
local
c
=
e
:
GetHandler
()
Duel
.
RegisterFlagEffect
(
tp
,
60151121
,
RESET_CHAIN
,
0
,
1
)
if
c
:
IsFacedown
()
then
return
end
else
local
res
=
0
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
if
Duel
.
GetFlagEffect
(
tp
,
60151121
)
>
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
res
=
1
end
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
,
nil
,
1
,
1
-
tp
,
LOCATION_MZONE
)
if
res
==
0
then
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151121
,
0
))
then
function
c60151121
.
chlimit
(
e
,
ep
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
return
tp
==
ep
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151121
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
if
g1
:
GetCount
()
>
0
then
function
c60151121
.
filter2
(
c
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
return
c
:
IsAbleToGrave
()
end
end
end
function
c60151121
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
res
==
1
then
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
c
:
IsFacedown
()
then
return
end
local
tc
=
g
:
GetFirst
()
local
res
=
0
while
tc
do
if
Duel
.
GetFlagEffect
(
tp
,
60151121
)
>
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
res
=
1
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
if
res
==
0
then
e1
:
SetValue
(
tc
:
GetAttack
()
/
2
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151121
,
0
))
then
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
tc
:
RegisterEffect
(
e1
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151121
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
if
g1
:
GetCount
()
>
0
then
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
e2
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
end
e2
:
SetValue
(
tc
:
GetDefense
()
/
2
)
end
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
end
tc
:
RegisterEffect
(
e2
)
if
res
==
1
then
tc
=
g
:
GetNext
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
end
local
tc
=
g
:
GetFirst
()
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
while
tc
do
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e11
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetValue
(
e
:
GetHandler
():
GetAttack
()
/
2
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
tc
:
GetAttack
()
/
2
)
e
:
GetHandler
():
RegisterEffect
(
e11
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
end
tc
:
RegisterEffect
(
e1
)
end
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
function
c60151121
.
filter3
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
return
not
c
:
IsCode
(
60151121
)
and
c
:
IsAbleToGrave
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
end
e2
:
SetValue
(
tc
:
GetDefense
()
/
2
)
function
c60151121
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_EFFECT
)
end
tc
:
RegisterEffect
(
e2
)
end
tc
=
g
:
GetNext
()
function
c60151121
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
then
Duel
.
BreakEffect
()
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
--indes
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e11
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151121
,
1
))
e11
:
SetValue
(
e
:
GetHandler
():
GetAttack
()
/
2
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e
:
GetHandler
():
RegisterEffect
(
e11
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CLIENT_HINT
)
end
e1
:
SetRange
(
LOCATION_MZONE
)
end
e1
:
SetValue
(
1
)
function
c60151121
.
filter3
(
c
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
return
not
c
:
IsCode
(
60151121
)
and
c
:
IsAbleToGrave
()
e
:
GetHandler
():
RegisterEffect
(
e1
)
end
--battle indestructable
function
c60151121
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_EFFECT
)
end
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
end
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
function
c60151121
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e2
:
SetValue
(
1
)
if
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
then
Duel
.
BreakEffect
()
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
--indes
e
:
GetHandler
():
RegisterEffect
(
e2
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
end
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
end
\ No newline at end of file
expansions/script/c60151123.lua
View file @
d9d3234f
--├军团亚席 极舞之赛尔菲┤
--├军团亚席 极舞之赛尔菲┤
function
c60151123
.
initial_effect
(
c
)
function
c60151123
.
initial_effect
(
c
)
--synchro summon
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
c60151123
.
tfilter
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x9b23
),
1
)
aux
.
AddSynchroProcedure
(
c
,
c60151123
.
tfilter
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x9b23
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--coin
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c60151123
.
atkcon
)
e1
:
SetCondition
(
c60151123
.
atkcon
)
e1
:
SetTarget
(
c60151123
.
cointg
)
e1
:
SetTarget
(
c60151123
.
cointg
)
e1
:
SetOperation
(
c60151123
.
coinop
)
e1
:
SetOperation
(
c60151123
.
coinop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--remove
local
e111
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_TOGRAVE
)
e111
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGETEFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e111
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e111
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetRange
(
LOCATION_MZONE
)
e111
:
SetCondition
(
c60151123
.
atkcon2
)
e2
:
SetCountLimit
(
1
)
e111
:
SetTarget
(
c60151123
.
cointg
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e111
:
SetOperation
(
c60151123
.
coinop
)
e2
:
SetTarget
(
c60151123
.
rmtg
)
c
:
RegisterEffect
(
e111
)
e2
:
SetOperation
(
c60151123
.
rmop
)
--remove
c
:
RegisterEffect
(
e2
)
local
e2
=
Effect
.
CreateEffect
(
c
)
end
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_TOGRAVE
)
function
c60151123
.
tfilter
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
return
c
:
IsSetCard
(
0x9b23
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
end
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
function
c60151123
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e2
:
SetRange
(
LOCATION_MZONE
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
e2
:
SetCountLimit
(
1
)
end
e2
:
SetHintTiming
(
0
,
0x1e0
)
function
c60151123
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e2
:
SetTarget
(
c60151123
.
rmtg
)
if
chk
==
0
then
return
true
end
e2
:
SetOperation
(
c60151123
.
rmop
)
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
c
:
RegisterEffect
(
e2
)
Duel
.
SetChainLimit
(
c60151123
.
chlimit
)
end
Duel
.
RegisterFlagEffect
(
tp
,
60151123
,
RESET_CHAIN
,
0
,
1
)
function
c60151123
.
tfilter
(
c
)
else
return
c
:
IsSetCard
(
0x9b23
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
end
function
c60151123
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
and
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
function
c60151123
.
chlimit
(
e
,
ep
,
tp
)
end
return
tp
==
ep
function
c60151123
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
and
e
:
GetHandler
():
IsHasEffect
(
60151199
)
function
c60151123
.
filter2
(
c
)
end
return
c
:
IsAbleToGrave
()
function
c60151123
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
chk
==
0
then
return
true
end
function
c60151123
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
Duel
.
SetChainLimit
(
c60151123
.
chlimit
)
local
c
=
e
:
GetHandler
()
Duel
.
RegisterFlagEffect
(
tp
,
60151123
,
RESET_CHAIN
,
0
,
1
)
if
c
:
IsFacedown
()
then
return
end
else
local
res
=
0
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
if
Duel
.
GetFlagEffect
(
tp
,
60151123
)
>
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
res
=
1
end
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
end
if
res
==
0
then
function
c60151123
.
chlimit
(
e
,
ep
,
tp
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151123
,
0
))
then
return
tp
==
ep
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
end
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151123
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
function
c60151123
.
filter2
(
c
)
if
g1
:
GetCount
()
>
0
then
return
c
:
IsAbleToGrave
()
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
function
c60151123
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
local
c
=
e
:
GetHandler
()
if
res
==
1
then
if
c
:
IsFacedown
()
then
return
end
--attack all
local
res
=
0
local
e4
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
if
Duel
.
GetFlagEffect
(
tp
,
60151123
)
>
0
then
e4
:
SetDescription
(
aux
.
Stringid
(
60151123
,
1
))
res
=
1
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
e4
:
SetCode
(
EFFECT_ATTACK_ALL
)
if
res
==
0
then
e4
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151123
,
0
))
then
e4
:
SetValue
(
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151123
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
e
:
GetHandler
():
RegisterEffect
(
e4
)
if
g1
:
GetCount
()
>
0
then
end
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
function
c60151123
.
filter3
(
c
)
end
return
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
60151123
)
and
c
:
IsAbleToGrave
()
end
end
if
res
==
1
then
function
c60151123
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
--attack all
local
c
=
e
:
GetHandler
()
local
e4
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
e4
:
SetDescription
(
aux
.
Stringid
(
60151123
,
1
))
and
Duel
.
IsExistingMatchingCard
(
c60151123
.
filter3
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
e4
:
SetCode
(
EFFECT_ATTACK_ALL
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
e4
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ATKCHANGE
,
g
,
1
,
0
,
0
)
e4
:
SetValue
(
1
)
end
e4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
function
c60151123
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RegisterEffect
(
e4
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
end
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151123
.
filter3
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
if
g1
:
GetCount
()
>
0
then
function
c60151123
.
filter3
(
c
)
if
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
then
Duel
.
BreakEffect
()
return
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
60151123
)
and
c
:
IsAbleToGrave
()
local
tc
=
Duel
.
GetFirstTarget
()
end
local
tc2
=
g1
:
GetFirst
()
function
c60151123
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
atk
=
tc2
:
GetAttack
()
local
c
=
e
:
GetHandler
()
local
def
=
tc2
:
GetDefense
()
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
and
Duel
.
IsExistingMatchingCard
(
c60151123
.
filter3
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_ATKCHANGE
,
g
,
1
,
0
,
0
)
e1
:
SetValue
(
-
atk
)
end
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
function
c60151123
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
tc
:
RegisterEffect
(
e1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151123
.
filter3
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
if
g1
:
GetCount
()
>
0
then
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
if
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
then
Duel
.
BreakEffect
()
e2
:
SetValue
(
-
atk
)
local
tc
=
Duel
.
GetFirstTarget
()
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
local
tc2
=
g1
:
GetFirst
()
tc
:
RegisterEffect
(
e2
)
local
atk
=
tc2
:
GetAttack
()
end
local
def
=
tc2
:
GetDefense
()
end
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
end
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
end
\ No newline at end of file
expansions/script/c60151125.lua
View file @
d9d3234f
--├军团次席 断罪者卡斯芙┤
--├军团次席 断罪者卡斯芙┤
function
c60151125
.
initial_effect
(
c
)
function
c60151125
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
60151125
)
c
:
SetUniqueOnField
(
1
,
0
,
60151125
)
--xyz summon
--xyz summon
aux
.
AddXyzProcedure
(
c
,
c60151125
.
xyzfilter
,
8
,
2
)
aux
.
AddXyzProcedure
(
c
,
c60151125
.
xyzfilter
,
8
,
2
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--coin
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c60151125
.
atkcon
)
e1
:
SetCondition
(
c60151125
.
atkcon
)
e1
:
SetTarget
(
c60151125
.
cointg
)
e1
:
SetTarget
(
c60151125
.
cointg
)
e1
:
SetOperation
(
c60151125
.
coinop
)
e1
:
SetOperation
(
c60151125
.
coinop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
local
e111
=
Effect
.
CreateEffect
(
c
)
function
c60151125
.
xyzfilter
(
c
)
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
return
c
:
IsSetCard
(
0x9b23
)
e111
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
end
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
function
c60151125
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e111
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
e111
:
SetCondition
(
c60151125
.
atkcon2
)
end
e111
:
SetTarget
(
c60151125
.
cointg
)
function
c60151125
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e111
:
SetOperation
(
c60151125
.
coinop
)
if
chk
==
0
then
return
true
end
c
:
RegisterEffect
(
e111
)
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
end
Duel
.
SetChainLimit
(
c60151125
.
chlimit
)
function
c60151125
.
xyzfilter
(
c
)
Duel
.
RegisterFlagEffect
(
tp
,
60151125
,
RESET_CHAIN
,
0
,
1
)
return
c
:
IsSetCard
(
0x9b23
)
else
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
function
c60151125
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_XYZ
and
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
end
function
c60151125
.
chlimit
(
e
,
ep
,
tp
)
function
c60151125
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
==
ep
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_XYZ
and
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
end
function
c60151125
.
filter2
(
c
)
function
c60151125
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
c
:
IsAbleToGrave
()
if
chk
==
0
then
return
true
end
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
function
c60151125
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SetChainLimit
(
c60151125
.
chlimit
)
local
c
=
e
:
GetHandler
()
Duel
.
RegisterFlagEffect
(
tp
,
60151125
,
RESET_CHAIN
,
0
,
1
)
else
if
c
:
IsFacedown
()
then
return
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
local
res
=
0
end
if
Duel
.
GetFlagEffect
(
tp
,
60151125
)
>
0
then
end
res
=
1
function
c60151125
.
chlimit
(
e
,
ep
,
tp
)
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
return
tp
==
ep
if
res
==
0
then
end
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
function
c60151125
.
filter2
(
c
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
return
c
:
IsAbleToGrave
()
e11
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
end
e11
:
SetValue
(
1000
)
function
c60151125
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
local
c
=
e
:
GetHandler
()
e
:
GetHandler
():
RegisterEffect
(
e11
)
end
if
c
:
IsFacedown
()
then
return
end
if
res
==
1
then
local
res
=
0
--disable and destroy
if
Duel
.
GetFlagEffect
(
tp
,
60151125
)
>
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
res
=
1
e1
:
SetDescription
(
aux
.
Stringid
(
60151123
,
1
))
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
if
res
==
0
then
e1
:
SetRange
(
LOCATION_MZONE
)
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EVENT_CHAIN_ACTIVATING
)
e11
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e11
:
SetValue
(
1000
)
e1
:
SetCondition
(
c60151125
.
indcon
)
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetOperation
(
c60151125
.
disop
)
e
:
GetHandler
():
RegisterEffect
(
e11
)
c
:
RegisterEffect
(
e1
)
end
end
if
res
==
1
then
end
--disable and destroy
function
c60151125
.
indcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
c
)
return
e
:
GetHandler
():
GetOverlayCount
()
>
0
e1
:
SetDescription
(
aux
.
Stringid
(
60151123
,
1
))
end
e1
:
SetCategory
(
CATEGORY_DISABLE
)
function
c60151125
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
if
ep
==
tp
then
return
end
e1
:
SetRange
(
LOCATION_MZONE
)
local
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
if
(
loc
==
LOCATION_MZONE
or
loc
==
LOCATION_SZONE
)
then
Duel
.
Hint
(
HINT_CARD
,
0
,
60151125
)
e1
:
SetCode
(
EVENT_CHAIN_ACTIVATING
)
local
res
=
0
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
res
=
Duel
.
TossCoin
(
tp
,
1
)
e1
:
SetCondition
(
c60151125
.
indcon
)
if
res
==
0
then
e1
:
SetOperation
(
c60151125
.
disop
)
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
c
:
RegisterEffect
(
e1
)
end
end
if
res
==
1
then
end
local
rc
=
re
:
GetHandler
()
function
c60151125
.
indcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateEffect
(
ev
)
return
e
:
GetHandler
():
GetOverlayCount
()
>
0
if
rc
:
IsRelateToEffect
(
re
)
and
not
rc
:
IsImmuneToEffect
(
e
)
then
end
if
rc
:
IsType
(
TYPE_MONSTER
)
then
function
c60151125
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
og
=
rc
:
GetOverlayGroup
()
if
ep
==
tp
then
return
end
if
og
:
GetCount
()
>
0
then
local
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
Duel
.
SendtoGrave
(
og
,
REASON_RULE
)
if
(
loc
==
LOCATION_MZONE
or
loc
==
LOCATION_SZONE
)
then
Duel
.
Hint
(
HINT_CARD
,
0
,
60151125
)
end
local
res
=
0
Duel
.
Overlay
(
e
:
GetHandler
(),
Group
.
FromCards
(
rc
))
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
if
rc
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
then
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
rc
:
CancelToGrave
()
end
Duel
.
Overlay
(
e
:
GetHandler
(),
Group
.
FromCards
(
rc
))
if
res
==
1
then
end
local
rc
=
re
:
GetHandler
()
end
Duel
.
NegateEffect
(
ev
)
end
if
rc
:
IsRelateToEffect
(
re
)
and
not
rc
:
IsImmuneToEffect
(
e
)
then
end
if
rc
:
IsType
(
TYPE_MONSTER
)
then
end
local
og
=
rc
:
GetOverlayGroup
()
function
c60151125
.
filter3
(
c
)
if
og
:
GetCount
()
>
0
then
return
not
c
:
IsCode
(
60151125
)
and
c
:
IsAbleToGrave
()
Duel
.
SendtoGrave
(
og
,
REASON_RULE
)
end
end
function
c60151125
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
Duel
.
Overlay
(
e
:
GetHandler
(),
Group
.
FromCards
(
rc
))
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_EFFECT
)
end
end
end
if
rc
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
then
function
c60151125
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
rc
:
CancelToGrave
()
local
c
=
e
:
GetHandler
()
Duel
.
Overlay
(
e
:
GetHandler
(),
Group
.
FromCards
(
rc
))
if
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
then
end
local
e1
=
Effect
.
CreateEffect
(
c
)
end
e1
:
SetCategory
(
CATEGORY_NEGATE
)
end
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
end
e1
:
SetCode
(
EVENT_CHAIN_ACTIVATING
)
end
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
function
c60151125
.
filter3
(
c
)
e1
:
SetOperation
(
c60151125
.
activate
)
return
not
c
:
IsCode
(
60151125
)
and
c
:
IsAbleToGrave
()
Duel
.
RegisterEffect
(
e1
,
1
-
tp
)
end
end
function
c60151125
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_EFFECT
)
end
function
c60151125
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
function
c60151125
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
(
loc
==
LOCATION_HAND
or
loc
==
LOCATION_GRAVE
local
c
=
e
:
GetHandler
()
or
loc
==
LOCATION_DECK
or
loc
==
LOCATION_REMOVED
if
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
then
or
loc
==
LOCATION_EXTRA
or
loc
==
LOCATION_OVERLAY
)
and
not
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
Duel
.
NegateEffect
(
ev
)
e1
:
SetCategory
(
CATEGORY_NEGATE
)
end
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
end
\ No newline at end of file
expansions/script/c60151127.lua
View file @
d9d3234f
--├军团次席 律法者丽安塔┤
--├军团次席 律法者丽安塔┤
function
c60151127
.
initial_effect
(
c
)
function
c60151127
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
60151127
)
c
:
SetUniqueOnField
(
1
,
0
,
60151127
)
--synchro summon
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
c60151127
.
tfilter
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x9b23
),
2
)
aux
.
AddSynchroProcedure
(
c
,
c60151127
.
tfilter
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x9b23
),
2
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--coin
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e1
:
SetCategory
(
CATEGORY_COIN
)
e1
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c60151127
.
atkcon
)
e1
:
SetCondition
(
c60151127
.
atkcon
)
e1
:
SetTarget
(
c60151127
.
cointg
)
e1
:
SetTarget
(
c60151127
.
cointg
)
e1
:
SetOperation
(
c60151127
.
coinop
)
e1
:
SetOperation
(
c60151127
.
coinop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e111
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e111
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e111
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetRange
(
LOCATION_MZONE
)
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetCountLimit
(
1
)
e111
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e111
:
SetCondition
(
c60151127
.
atkcon2
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e111
:
SetTarget
(
c60151127
.
cointg
)
e2
:
SetTarget
(
c60151127
.
destg
)
e111
:
SetOperation
(
c60151127
.
coinop
)
e2
:
SetOperation
(
c60151127
.
desop
)
c
:
RegisterEffect
(
e111
)
c
:
RegisterEffect
(
e2
)
--to hand
end
local
e2
=
Effect
.
CreateEffect
(
c
)
function
c60151127
.
tfilter
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
+
CATEGORY_TOGRAVE
)
return
c
:
IsSetCard
(
0x9b23
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
end
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
function
c60151127
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e2
:
SetRange
(
LOCATION_MZONE
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
e2
:
SetCountLimit
(
1
)
end
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
function
c60151127
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
if
chk
==
0
then
return
true
end
e2
:
SetTarget
(
c60151127
.
destg
)
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
e2
:
SetOperation
(
c60151127
.
desop
)
Duel
.
SetChainLimit
(
c60151127
.
chlimit
)
c
:
RegisterEffect
(
e2
)
Duel
.
RegisterFlagEffect
(
tp
,
60151127
,
RESET_CHAIN
,
0
,
1
)
end
else
function
c60151127
.
tfilter
(
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
return
c
:
IsSetCard
(
0x9b23
)
end
end
end
function
c60151127
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60151127
.
chlimit
(
e
,
ep
,
tp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
and
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
return
tp
==
ep
end
end
function
c60151127
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60151127
.
filter2
(
c
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
and
e
:
GetHandler
():
IsHasEffect
(
60151199
)
return
c
:
IsAbleToGrave
()
end
end
function
c60151127
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c60151127
.
filter
(
c
)
if
chk
==
0
then
return
true
end
return
c
:
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
and
c
:
IsDestructable
()
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
end
Duel
.
SetChainLimit
(
c60151127
.
chlimit
)
function
c60151127
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
60151127
,
RESET_CHAIN
,
0
,
1
)
local
c
=
e
:
GetHandler
()
else
if
c
:
IsFacedown
()
then
return
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
local
res
=
0
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
1
-
tp
,
LOCATION_MZONE
)
if
Duel
.
GetFlagEffect
(
tp
,
60151127
)
>
0
then
end
res
=
1
end
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
function
c60151127
.
chlimit
(
e
,
ep
,
tp
)
if
res
==
0
then
return
tp
==
ep
local
g
=
Duel
.
GetMatchingGroup
(
c60151127
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
end
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
function
c60151127
.
filter2
(
c
)
end
return
c
:
IsAbleToGrave
()
if
res
==
1
then
end
--disable and destroy
function
c60151127
.
filter
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
return
bit
.
band
(
c
:
GetSummonType
(),
SUMMON_TYPE_SPECIAL
)
==
SUMMON_TYPE_SPECIAL
and
c
:
IsDestructable
()
e1
:
SetDescription
(
aux
.
Stringid
(
60151123
,
1
))
end
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
function
c60151127
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e1
:
SetRange
(
LOCATION_MZONE
)
local
c
=
e
:
GetHandler
()
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
if
c
:
IsFacedown
()
then
return
end
e1
:
SetCode
(
EVENT_SPSUMMON
)
local
res
=
0
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
if
Duel
.
GetFlagEffect
(
tp
,
60151127
)
>
0
then
e1
:
SetCondition
(
c60151127
.
condition
)
res
=
1
e1
:
SetOperation
(
c60151127
.
disop
)
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
c
:
RegisterEffect
(
e1
)
if
res
==
0
then
end
local
g
=
Duel
.
GetMatchingGroup
(
c60151127
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
end
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
function
c60151127
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
tp
~=
ep
if
res
==
1
then
end
--disable and destroy
function
c60151127
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
c
)
Duel
.
Hint
(
HINT_CARD
,
0
,
60151127
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151123
,
1
))
local
res
=
0
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_TOGRAVE
)
res
=
Duel
.
TossCoin
(
tp
,
1
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
if
res
==
0
then
e1
:
SetRange
(
LOCATION_MZONE
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151127
,
0
))
then
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
e1
:
SetCode
(
EVENT_SPSUMMON
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
if
g1
:
GetCount
()
>
0
then
e1
:
SetCondition
(
c60151127
.
condition
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
e1
:
SetOperation
(
c60151127
.
disop
)
end
c
:
RegisterEffect
(
e1
)
end
end
end
end
if
res
==
1
then
function
c60151127
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
)
return
tp
~=
ep
Duel
.
SendtoDeck
(
eg
,
nil
,
2
,
REASON_EFFECT
)
end
end
function
c60151127
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
Duel
.
Hint
(
HINT_CARD
,
0
,
60151127
)
function
c60151127
.
filter3
(
c
)
local
res
=
0
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
if
res
==
0
then
function
c60151127
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151127
,
0
))
then
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151127
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
and
Duel
.
IsExistingMatchingCard
(
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
if
g1
:
GetCount
()
>
0
then
local
g
=
Duel
.
GetMatchingGroup
(
c60151127
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
local
g1
=
Duel
.
GetMatchingGroup
(
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g1
,
1
,
0
,
0
)
if
res
==
1
then
end
Duel
.
NegateSummon
(
eg
)
function
c60151127
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SendtoDeck
(
eg
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151127
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
end
if
g
:
GetCount
()
>
0
then
function
c60151127
.
filter3
(
c
)
Duel
.
HintSelection
(
g
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
Duel
.
ShuffleDeck
(
tp
)
function
c60151127
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151127
,
0
))
then
Duel
.
BreakEffect
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151127
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
and
Duel
.
IsExistingMatchingCard
(
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
if
g1
:
GetCount
()
>
0
then
local
g
=
Duel
.
GetMatchingGroup
(
c60151127
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
local
g1
=
Duel
.
GetMatchingGroup
(
c60151127
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
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
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
)
function
c60151196
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_DRAW
+
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCountLimit
(
1
,
60151196
)
e1
:
SetCountLimit
(
1
,
60151196
)
e1
:
SetTarget
(
c60151196
.
target
)
e1
:
SetTarget
(
c60151196
.
target
)
e1
:
SetOperation
(
c60151196
.
activate
)
e1
:
SetOperation
(
c60151196
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--to hand
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
60151196
)
e2
:
SetCountLimit
(
1
,
60151196
)
e2
:
SetCondition
(
c60151196
.
drcon
)
e2
:
SetCondition
(
c60151196
.
drcon
)
e2
:
SetTarget
(
c60151196
.
drtg
)
e2
:
SetTarget
(
c60151196
.
drtg
)
e2
:
SetOperation
(
c60151196
.
drop
)
e2
:
SetOperation
(
c60151196
.
drop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c60151196
.
tgfilter
(
c
)
function
c60151196
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsAbleToGrave
()
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsAbleToGrave
()
end
end
function
c60151196
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
())
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151196
.
tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
1
-
tp
,
LOCATION_ONFIELD
)
function
c60151196
.
tgfilter2
(
c
,
ttype
)
end
return
c
:
IsType
(
ttype
)
and
c
:
IsFaceup
()
and
c
:
IsAbleToDeck
()
function
c60151196
.
tgfilter2
(
c
,
ttype
)
end
return
c
:
IsType
(
ttype
)
and
c
:
IsFaceup
()
and
c
:
IsAbleToDeck
()
function
c60151196
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
function
c60151196
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151196
.
tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
tc
=
g
:
GetFirst
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151196
.
tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
if
tc
and
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
~=
0
and
tc
:
IsLocation
(
LOCATION_GRAVE
)
then
local
tc
=
g
:
GetFirst
()
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
tc
and
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
~=
0
and
tc
:
IsLocation
(
LOCATION_GRAVE
)
then
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
local
ttype
=
bit
.
band
(
tc
:
GetType
(),
0x7
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
local
g2
=
Duel
.
GetMatchingGroup
(
c60151196
.
tgfilter2
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
ttype
)
local
ttype
=
bit
.
band
(
tc
:
GetType
(),
0x7
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151196
,
0
))
then
local
g2
=
Duel
.
GetMatchingGroup
(
c60151196
.
tgfilter2
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
ttype
)
Duel
.
BreakEffect
()
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151196
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
Duel
.
BreakEffect
()
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
Duel
.
HintSelection
(
sg
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
HintSelection
(
sg
)
end
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
function
c60151196
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
function
c60151196
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
function
c60151196
.
thfilter
(
c
)
end
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsAbleToHand
()
function
c60151196
.
thfilter
(
c
)
end
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsAbleToHand
()
function
c60151196
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151196
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
function
c60151196
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151196
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
function
c60151196
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151196
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
function
c60151196
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
HintSelection
(
g
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151196
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
HintSelection
(
g
)
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
BreakEffect
()
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
BreakEffect
()
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
end
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
end
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
end
end
end
end
\ No newline at end of file
expansions/script/c60151197.lua
View file @
d9d3234f
--├腹心反击┤
--├腹心反击┤
function
c60151197
.
initial_effect
(
c
)
function
c60151197
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e1
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e1
:
SetCountLimit
(
1
,
60151197
)
e1
:
SetCountLimit
(
1
,
60151197
)
e1
:
SetCondition
(
c60151197
.
condition
)
e1
:
SetCondition
(
c60151197
.
condition
)
e1
:
SetTarget
(
c60151197
.
target
)
e1
:
SetTarget
(
c60151197
.
target
)
e1
:
SetOperation
(
c60151197
.
activate
)
e1
:
SetOperation
(
c60151197
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e12
=
e1
:
Clone
()
local
e12
=
e1
:
Clone
()
e12
:
SetCode
(
EVENT_BECOME_TARGET
)
e12
:
SetCode
(
EVENT_BECOME_TARGET
)
c
:
RegisterEffect
(
e12
)
c
:
RegisterEffect
(
e12
)
--draw
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60151197
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
60151197
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
60151197
)
e2
:
SetCountLimit
(
1
,
60151197
)
e2
:
SetCondition
(
c60151197
.
drcon
)
e2
:
SetCondition
(
c60151197
.
drcon
)
e2
:
SetTarget
(
c60151197
.
drtg
)
e2
:
SetTarget
(
c60151197
.
drtg
)
e2
:
SetOperation
(
c60151197
.
drop
)
e2
:
SetOperation
(
c60151197
.
drop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c60151197
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60151197
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
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
)
return
tc
:
IsControler
(
tp
)
and
tc
:
IsFaceup
()
and
tc
:
IsSetCard
(
0x9b23
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
IsLocation
(
LOCATION_MZONE
)
end
end
function
c60151197
.
tgfilter
(
c
)
function
c60151197
.
tgfilter
(
c
)
return
c
:
IsAbleToGrave
()
return
c
:
IsAbleToGrave
()
end
end
function
c60151197
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
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
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
1
-
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
function
c60151197
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
g2
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
function
c60151197
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ConfirmCards
(
tp
,
g2
)
local
g2
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
ConfirmCards
(
tp
,
g2
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151197
.
tgfilter
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
if
g
:
GetCount
()
>
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151197
.
tgfilter
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
if
g
:
GetCount
()
>
0
then
local
g3
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
nil
)
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
local
g1
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
local
g3
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
nil
)
if
g3
:
GetCount
()
>
0
and
g1
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151197
,
0
))
then
local
g1
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
e
:
GetHandler
())
Duel
.
BreakEffect
()
if
g3
:
GetCount
()
>
0
and
g1
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151197
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
BreakEffect
()
local
sg
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
HintSelection
(
sg
)
local
sg
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
Duel
.
HintSelection
(
sg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_TOGRAVE
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
local
sg2
=
g3
:
Select
(
1
-
tp
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_TOGRAVE
)
Duel
.
HintSelection
(
sg2
)
local
sg2
=
g3
:
Select
(
1
-
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg2
,
REASON_RULE
)
Duel
.
HintSelection
(
sg2
)
end
Duel
.
SendtoGrave
(
sg2
,
REASON_RULE
)
end
end
end
end
Duel
.
ShuffleHand
(
1
-
tp
)
end
end
Duel
.
ShuffleHand
(
1
-
tp
)
function
c60151197
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
function
c60151197
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
function
c60151197
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
function
c60151197
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
SetTargetPlayer
(
tp
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetParam
(
1
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetTargetParam
(
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
function
c60151197
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
function
c60151197
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c60151198.lua
View file @
d9d3234f
--├深夜行军┤
--├深夜行军┤
function
c60151198
.
initial_effect
(
c
)
function
c60151198
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
60151198
)
e1
:
SetCountLimit
(
1
,
60151198
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
c60151198
.
target
)
e1
:
SetTarget
(
c60151198
.
target
)
e1
:
SetOperation
(
c60151198
.
operation
)
e1
:
SetOperation
(
c60151198
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--draw
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60151198
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
60151198
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
60151198
)
e2
:
SetCountLimit
(
1
,
60151198
)
e2
:
SetCondition
(
c60151198
.
drcon
)
e2
:
SetCondition
(
c60151198
.
drcon
)
e2
:
SetTarget
(
c60151198
.
drtg
)
e2
:
SetTarget
(
c60151198
.
drtg
)
e2
:
SetOperation
(
c60151198
.
drop
)
e2
:
SetOperation
(
c60151198
.
drop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c60151198
.
filter
(
c
,
e
,
tp
)
function
c60151198
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c60151198
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c60151198
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
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
and
Duel
.
IsExistingTarget
(
c60151198
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c60151198
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
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_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
function
c60151198
.
filter2
(
c
)
end
return
c
:
IsAbleToGrave
()
function
c60151198
.
filter2
(
c
)
end
return
c
:
IsAbleToGrave
()
function
c60151198
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
e
:
GetHandler
()
function
c60151198
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
c
=
e
:
GetHandler
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151198
,
0
))
then
Duel
.
BreakEffect
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151198
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
e
:
GetHandler
())
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
g1
:
GetCount
()
>
0
then
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
Duel
.
BreakEffect
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
end
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
end
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
function
c60151198
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
end
end
function
c60151198
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c60151198
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
Duel
.
SetTargetPlayer
(
tp
)
end
Duel
.
SetTargetParam
(
1
)
function
c60151198
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
end
Duel
.
SetTargetPlayer
(
tp
)
function
c60151198
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SetTargetParam
(
1
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
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
)
function
c60151199
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x1b
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
60151199
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
60151199
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c60151199
.
cointg
)
e1
:
SetTarget
(
c60151199
.
cointg
)
e1
:
SetOperation
(
c60151199
.
coinop
)
e1
:
SetOperation
(
c60151199
.
coinop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--counter
--counter
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c60151199
.
ctcon
)
e2
:
SetCondition
(
c60151199
.
ctcon
)
e2
:
SetOperation
(
c60151199
.
ctop
)
e2
:
SetOperation
(
c60151199
.
ctop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
--
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
60151199
)
e3
:
SetCode
(
60151199
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x9b23
))
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x9b23
))
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--special summon
--special summon
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_DRAW
)
e5
:
SetCategory
(
CATEGORY_DRAW
)
e5
:
SetDescription
(
aux
.
Stringid
(
60151199
,
0
))
e5
:
SetDescription
(
aux
.
Stringid
(
60151199
,
0
))
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCost
(
c60151199
.
cost3
)
e5
:
SetCost
(
c60151199
.
cost3
)
e5
:
SetOperation
(
c60151199
.
op3
)
e5
:
SetOperation
(
c60151199
.
op3
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
end
end
function
c60151199
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c60151199
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
end
end
function
c60151199
.
filter2
(
c
)
function
c60151199
.
filter2
(
c
)
return
c
:
IsAbleToGrave
()
return
c
:
IsAbleToGrave
()
end
end
function
c60151199
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60151199
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
res
=
0
local
res
=
0
res
=
Duel
.
TossCoin
(
tp
,
1
)
res
=
Duel
.
TossCoin
(
tp
,
1
)
if
res
==
0
then
if
res
==
0
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
end
end
end
function
c60151199
.
cfilter
(
c
)
function
c60151199
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsReason
(
REASON_EFFECT
))
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsReason
(
REASON_EFFECT
))
end
end
function
c60151199
.
ctcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
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
)
return
eg
and
eg
:
IsExists
(
c60151199
.
cfilter
,
1
,
nil
)
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
end
end
function
c60151199
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60151199
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
eg
then
return
end
if
not
eg
then
return
end
local
ct
=
eg
:
FilterCount
(
c60151199
.
cfilter
,
nil
)
local
ct
=
eg
:
FilterCount
(
c60151199
.
cfilter
,
nil
)
e
:
GetHandler
():
AddCounter
(
0x101b
,
ct
)
e
:
GetHandler
():
AddCounter
(
0x1b
,
ct
)
end
end
function
c60151199
.
cost3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0x1b
,
3
,
REASON_COST
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
e
:
GetHandler
():
RemoveCounter
(
tp
,
0x101b
,
3
,
REASON_COST
)
e
:
GetHandler
():
RemoveCounter
(
tp
,
0x1b
,
3
,
REASON_COST
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
function
c60151199
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60151199
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
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
()
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
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151199
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151199
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g1
:
GetCount
()
>
0
then
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
end
end
end
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