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
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
--├变节者 米拉┤
--├变节者 米拉┤
function
c60151101
.
initial_effect
(
c
)
function
c60151101
.
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
+
CATEGORY_TOHAND
)
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
,
6011101
)
e1
:
SetCountLimit
(
1
,
6011101
)
e1
:
SetTarget
(
c60151101
.
cointg
)
e1
:
SetCondition
(
c60151101
.
coincon
)
e1
:
SetOperation
(
c60151101
.
coinop
)
e1
:
SetTarget
(
c60151101
.
cointg
)
c
:
RegisterEffect
(
e1
)
e1
:
SetOperation
(
c60151101
.
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
(
60151101
,
1
))
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e111
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_TOHAND
)
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
,
60151101
)
e111
:
SetCountLimit
(
1
,
6011101
)
e3
:
SetCondition
(
c60151101
.
spcon
)
e111
:
SetCondition
(
c60151101
.
coincon2
)
e3
:
SetTarget
(
c60151101
.
sptg
)
e111
:
SetTarget
(
c60151101
.
cointg
)
e3
:
SetOperation
(
c60151101
.
spop
)
e111
:
SetOperation
(
c60151101
.
coinop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e111
)
end
local
e222
=
e111
:
Clone
()
function
c60151101
.
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
(
c60151101
.
chlimit
)
local
e3
=
Effect
.
CreateEffect
(
c
)
Duel
.
RegisterFlagEffect
(
tp
,
60151101
,
RESET_CHAIN
,
0
,
1
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151101
,
1
))
else
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
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
c60151101
.
chlimit
(
e
,
ep
,
tp
)
e3
:
SetCountLimit
(
1
,
60151101
)
return
tp
==
ep
e3
:
SetCondition
(
c60151101
.
spcon
)
end
e3
:
SetTarget
(
c60151101
.
sptg
)
function
c60151101
.
filter
(
c
)
e3
:
SetOperation
(
c60151101
.
spop
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
c
:
RegisterEffect
(
e3
)
end
end
function
c60151101
.
filter2
(
c
)
function
c60151101
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsAbleToGrave
()
return
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
end
function
c60151101
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60151101
.
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
local
res
=
0
function
c60151101
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
Duel
.
GetFlagEffect
(
tp
,
60151101
)
>
0
then
if
chk
==
0
then
return
true
end
res
=
1
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
Duel
.
SetChainLimit
(
c60151101
.
chlimit
)
if
res
==
0
then
Duel
.
RegisterFlagEffect
(
tp
,
60151101
,
RESET_CHAIN
,
0
,
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
else
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151101
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
if
g1
:
GetCount
()
>
0
then
end
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
end
if
res
==
1
then
function
c60151101
.
chlimit
(
e
,
ep
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
return
tp
==
ep
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151101
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
end
if
g
:
GetCount
()
>
0
then
function
c60151101
.
filter
(
c
)
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
then
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
function
c60151101
.
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
c60151101
.
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
local
res
=
0
end
if
Duel
.
GetFlagEffect
(
tp
,
60151101
)
>
0
then
end
res
=
1
end
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
end
if
res
==
0
then
function
c60151101
.
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
()
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151101
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
if
g1
:
GetCount
()
>
0
then
function
c60151101
.
spfilter
(
c
,
e
,
tp
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
return
c
:
IsSetCard
(
0x9b23
)
and
not
c
:
IsCode
(
60151101
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
end
function
c60151101
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
res
==
1
then
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
and
Duel
.
IsExistingMatchingCard
(
c60151101
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151101
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
if
g
:
GetCount
()
>
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
then
end
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
function
c60151101
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
local
c
=
e
:
GetHandler
()
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151101
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
if
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
end
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
end
e1
:
SetCode
(
EFFECT_DISABLE
)
end
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
end
tc
:
RegisterEffect
(
e1
,
true
)
function
c60151101
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
end
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
function
c60151101
.
spfilter
(
c
,
e
,
tp
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
return
c
:
IsSetCard
(
0x9b23
)
and
not
c
:
IsCode
(
60151101
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
tc
:
RegisterEffect
(
e2
,
true
)
end
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
function
c60151101
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
e11
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
and
Duel
.
IsExistingMatchingCard
(
c60151101
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
e11
:
SetValue
(
c60151101
.
xyzlimit
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
tc
:
RegisterEffect
(
e11
,
true
)
end
local
e12
=
e11
:
Clone
()
function
c60151101
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e12
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
tc
:
RegisterEffect
(
e12
,
true
)
local
c
=
e
:
GetHandler
()
Duel
.
SpecialSummonComplete
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151101
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
end
local
tc
=
g
:
GetFirst
()
function
c60151101
.
xyzlimit
(
e
,
c
)
if
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
if
not
c
then
return
false
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
return
not
c
:
IsSetCard
(
0x9b23
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
,
true
)
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
e11
:
SetValue
(
c60151101
.
xyzlimit
)
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e11
,
true
)
local
e12
=
e11
:
Clone
()
e12
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
tc
:
RegisterEffect
(
e12
,
true
)
Duel
.
SpecialSummonComplete
()
end
end
function
c60151101
.
xyzlimit
(
e
,
c
)
if
not
c
then
return
false
end
return
not
c
:
IsSetCard
(
0x9b23
)
end
end
\ No newline at end of file
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
--├执策者 菲尼亚┤
--├执策者 菲尼亚┤
function
c60151104
.
initial_effect
(
c
)
function
c60151104
.
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
+
CATEGORY_TOHAND
)
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
,
6011104
)
e1
:
SetCountLimit
(
1
,
6011104
)
e1
:
SetTarget
(
c60151104
.
cointg
)
e1
:
SetCondition
(
c60151104
.
coincon
)
e1
:
SetOperation
(
c60151104
.
coinop
)
e1
:
SetTarget
(
c60151104
.
cointg
)
c
:
RegisterEffect
(
e1
)
e1
:
SetOperation
(
c60151104
.
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
(
60151104
,
1
))
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e111
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_TOHAND
)
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
,
60151104
)
e111
:
SetCountLimit
(
1
,
6011104
)
e3
:
SetCondition
(
c60151104
.
spcon
)
e111
:
SetCondition
(
c60151104
.
coincon2
)
e3
:
SetTarget
(
c60151104
.
sptg
)
e111
:
SetTarget
(
c60151104
.
cointg
)
e3
:
SetOperation
(
c60151104
.
spop
)
e111
:
SetOperation
(
c60151104
.
coinop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e111
)
end
local
e222
=
e111
:
Clone
()
function
c60151104
.
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
(
c60151104
.
chlimit
)
local
e3
=
Effect
.
CreateEffect
(
c
)
Duel
.
RegisterFlagEffect
(
tp
,
60151104
,
RESET_CHAIN
,
0
,
1
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151104
,
1
))
else
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
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
c60151104
.
chlimit
(
e
,
ep
,
tp
)
e3
:
SetCountLimit
(
1
,
60151104
)
return
tp
==
ep
e3
:
SetCondition
(
c60151104
.
spcon
)
end
e3
:
SetTarget
(
c60151104
.
sptg
)
function
c60151104
.
filter
(
c
)
e3
:
SetOperation
(
c60151104
.
spop
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
c
:
RegisterEffect
(
e3
)
end
end
function
c60151104
.
filter2
(
c
)
function
c60151104
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsAbleToGrave
()
return
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
end
function
c60151104
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60151104
.
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
c60151104
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
res
=
0
if
chk
==
0
then
return
true
end
if
Duel
.
GetFlagEffect
(
tp
,
60151104
)
>
0
then
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
res
=
1
Duel
.
SetChainLimit
(
c60151104
.
chlimit
)
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
Duel
.
RegisterFlagEffect
(
tp
,
60151104
,
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
,
c60151104
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
if
g1
:
GetCount
()
>
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
end
end
function
c60151104
.
chlimit
(
e
,
ep
,
tp
)
if
res
==
1
then
return
tp
==
ep
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151104
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
function
c60151104
.
filter
(
c
)
if
g
:
GetCount
()
>
0
then
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
end
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
function
c60151104
.
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
c60151104
.
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
,
60151104
)
>
0
then
end
res
=
1
end
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
end
if
res
==
0
then
function
c60151104
.
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
,
c60151104
.
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
c60151104
.
spfilter
(
c
,
e
,
tp
)
end
return
c
:
IsSetCard
(
0x9b23
)
and
not
c
:
IsCode
(
60151104
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
if
res
==
1
then
function
c60151104
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151104
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c60151104
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
function
c60151104
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151104
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
if
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
end
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
end
e1
:
SetCode
(
EFFECT_DISABLE
)
end
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
end
tc
:
RegisterEffect
(
e1
,
true
)
function
c60151104
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
end
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
function
c60151104
.
spfilter
(
c
,
e
,
tp
)
tc
:
RegisterEffect
(
e2
,
true
)
return
c
:
IsSetCard
(
0x9b23
)
and
not
c
:
IsCode
(
60151104
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
end
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
function
c60151104
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
e11
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
e11
:
SetValue
(
c60151104
.
xyzlimit
)
and
Duel
.
IsExistingMatchingCard
(
c60151104
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
tc
:
RegisterEffect
(
e11
,
true
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
local
e12
=
e11
:
Clone
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
e12
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
end
tc
:
RegisterEffect
(
e12
,
true
)
function
c60151104
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SpecialSummonComplete
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151104
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
function
c60151104
.
xyzlimit
(
e
,
c
)
local
tc
=
g
:
GetFirst
()
if
not
c
then
return
false
end
if
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
return
not
c
:
IsSetCard
(
0x9b23
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
,
true
)
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
e11
:
SetValue
(
c60151104
.
xyzlimit
)
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e11
,
true
)
local
e12
=
e11
:
Clone
()
e12
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
tc
:
RegisterEffect
(
e12
,
true
)
Duel
.
SpecialSummonComplete
()
end
end
function
c60151104
.
xyzlimit
(
e
,
c
)
if
not
c
then
return
false
end
return
not
c
:
IsSetCard
(
0x9b23
)
end
end
\ No newline at end of file
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
--├红枫指挥官 文┤
--├红枫指挥官 文┤
function
c60151106
.
initial_effect
(
c
)
function
c60151106
.
initial_effect
(
c
)
--sp
--sp
local
e12
=
Effect
.
CreateEffect
(
c
)
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetType
(
EFFECT_TYPE_FIELD
)
e12
:
SetType
(
EFFECT_TYPE_FIELD
)
e12
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e12
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e12
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e12
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e12
:
SetRange
(
LOCATION_HAND
)
e12
:
SetRange
(
LOCATION_HAND
)
e12
:
SetCountLimit
(
1
,
60111061
)
e12
:
SetCountLimit
(
1
,
60111061
)
e12
:
SetCondition
(
c60151106
.
spcon2
)
e12
:
SetCondition
(
c60151106
.
spcon2
)
e12
:
SetOperation
(
c60151106
.
spop2
)
e12
:
SetOperation
(
c60151106
.
spop2
)
c
:
RegisterEffect
(
e12
)
c
:
RegisterEffect
(
e12
)
--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_SPECIAL_SUMMON
+
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
,
6011106
)
e1
:
SetCountLimit
(
1
,
6011106
)
e1
:
SetTarget
(
c60151106
.
cointg
)
e1
:
SetCondition
(
c60151106
.
coincon
)
e1
:
SetOperation
(
c60151106
.
coinop
)
e1
:
SetTarget
(
c60151106
.
cointg
)
c
:
RegisterEffect
(
e1
)
e1
:
SetOperation
(
c60151106
.
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
(
60151106
,
1
))
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e111
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
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
,
60151106
)
e111
:
SetCountLimit
(
1
,
6011106
)
e3
:
SetCondition
(
c60151106
.
spcon
)
e111
:
SetCondition
(
c60151106
.
coincon2
)
e3
:
SetTarget
(
c60151106
.
sptg
)
e111
:
SetTarget
(
c60151106
.
cointg
)
e3
:
SetOperation
(
c60151106
.
spop
)
e111
:
SetOperation
(
c60151106
.
coinop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e111
)
end
local
e222
=
e111
:
Clone
()
function
c60151106
.
spfilter2
(
c
)
e222
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
60151106
)
and
c
:
IsAbleToGrave
()
c
:
RegisterEffect
(
e222
)
end
--
function
c60151106
.
spcon2
(
e
,
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
if
c
==
nil
then
return
true
end
e3
:
SetDescription
(
aux
.
Stringid
(
60151106
,
1
))
local
tp
=
c
:
GetControler
()
e3
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_TODECK
+
CATEGORY_TOGRAVE
)
if
Duel
.
GetMZoneCount
(
tp
)
<
1
and
Duel
.
GetMZoneCount
(
tp
)
>-
2
then
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
return
Duel
.
IsExistingMatchingCard
(
c60151106
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
and
Duel
.
IsExistingMatchingCard
(
c60151106
.
spfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
else
e3
:
SetCountLimit
(
1
,
60151106
)
return
Duel
.
GetMZoneCount
(
tp
)
>
0
e3
:
SetCondition
(
c60151106
.
spcon
)
and
Duel
.
IsExistingMatchingCard
(
c60151106
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
2
,
nil
)
e3
:
SetTarget
(
c60151106
.
sptg
)
end
e3
:
SetOperation
(
c60151106
.
spop
)
end
c
:
RegisterEffect
(
e3
)
function
c60151106
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
end
if
Duel
.
GetMZoneCount
(
tp
)
<
1
and
Duel
.
GetMZoneCount
(
tp
)
>-
2
then
function
c60151106
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
return
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151106
.
spfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
local
tc
=
g1
:
GetFirst
()
function
c60151106
.
coincon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
return
e
:
GetHandler
():
IsHasEffect
(
60151199
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c60151106
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
tc
)
end
local
g
=
Group
.
CreateGroup
()
function
c60151106
.
spfilter2
(
c
)
g
:
Merge
(
g1
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
60151106
)
and
c
:
IsAbleToGrave
()
g
:
Merge
(
g2
)
end
local
tc2
=
g
:
GetFirst
()
function
c60151106
.
spcon2
(
e
,
c
)
while
tc2
do
if
c
==
nil
then
return
true
end
if
not
tc2
:
IsFaceup
()
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc2
)
end
local
tp
=
c
:
GetControler
()
tc2
=
g
:
GetNext
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
2
then
end
return
Duel
.
IsExistingMatchingCard
(
c60151106
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
and
Duel
.
IsExistingMatchingCard
(
c60151106
.
spfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
else
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151106
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
2
,
2
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c60151106
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
2
,
nil
)
local
tc
=
g1
:
GetFirst
()
end
while
tc
do
end
if
not
tc
:
IsFaceup
()
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
function
c60151106
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
tc
=
g1
:
GetNext
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
2
then
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151106
.
spfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
local
tc
=
g1
:
GetFirst
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
function
c60151106
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c60151106
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
tc
)
if
chk
==
0
then
return
true
end
local
g
=
Group
.
CreateGroup
()
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
g
:
Merge
(
g1
)
Duel
.
SetChainLimit
(
c60151106
.
chlimit
)
g
:
Merge
(
g2
)
Duel
.
RegisterFlagEffect
(
tp
,
60151106
,
RESET_CHAIN
,
0
,
1
)
local
tc2
=
g
:
GetFirst
()
else
while
tc2
do
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
if
not
tc2
:
IsFaceup
()
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc2
)
end
end
tc2
=
g
:
GetNext
()
end
end
function
c60151106
.
chlimit
(
e
,
ep
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
return
tp
==
ep
else
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
function
c60151106
.
spfilter
(
c
,
e
,
tp
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151106
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
2
,
2
,
nil
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
GetLevel
()
==
4
and
not
c
:
IsCode
(
60151106
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
local
tc
=
g1
:
GetFirst
()
end
while
tc
do
function
c60151106
.
filter2
(
c
)
if
not
tc
:
IsFaceup
()
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
return
c
:
IsAbleToGrave
()
tc
=
g1
:
GetNext
()
end
end
function
c60151106
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
end
local
c
=
e
:
GetHandler
()
end
if
c
:
IsFacedown
()
then
return
end
function
c60151106
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
res
=
0
if
chk
==
0
then
return
true
end
if
Duel
.
GetFlagEffect
(
tp
,
60151106
)
>
0
then
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
res
=
1
Duel
.
SetChainLimit
(
c60151106
.
chlimit
)
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
Duel
.
RegisterFlagEffect
(
tp
,
60151106
,
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
,
c60151106
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
if
g1
:
GetCount
()
>
0
then
end
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
end
end
function
c60151106
.
chlimit
(
e
,
ep
,
tp
)
if
res
==
1
then
return
tp
==
ep
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
end
if
Duel
.
GetMZoneCount
(
tp
)
<
2
then
function
c60151106
.
spfilter
(
c
,
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
GetLevel
()
==
4
and
not
c
:
IsCode
(
60151106
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151106
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
end
local
tc
=
g
:
GetFirst
()
function
c60151106
.
filter2
(
c
)
while
tc
do
return
c
:
IsAbleToGrave
()
if
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
function
c60151106
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
e1
:
SetCode
(
EFFECT_DISABLE
)
local
c
=
e
:
GetHandler
()
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
if
c
:
IsFacedown
()
then
return
end
tc
:
RegisterEffect
(
e1
,
true
)
local
res
=
0
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
if
Duel
.
GetFlagEffect
(
tp
,
60151106
)
>
0
then
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
res
=
1
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
if
res
==
0
then
tc
:
RegisterEffect
(
e2
,
true
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151106
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
if
g1
:
GetCount
()
>
0
then
e11
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
e11
:
SetValue
(
c60151106
.
xyzlimit
)
end
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
end
tc
:
RegisterEffect
(
e11
,
true
)
if
res
==
1
then
local
e12
=
e11
:
Clone
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
e12
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
2
then
tc
:
RegisterEffect
(
e12
,
true
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
SpecialSummonComplete
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151106
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
end
local
tc
=
g
:
GetFirst
()
tc
=
g
:
GetNext
()
while
tc
do
end
if
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
else
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151106
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
2
,
nil
,
e
,
tp
)
e1
:
SetCode
(
EFFECT_DISABLE
)
local
tc
=
g
:
GetFirst
()
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
while
tc
do
tc
:
RegisterEffect
(
e1
,
true
)
if
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
,
true
)
tc
:
RegisterEffect
(
e1
,
true
)
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e11
:
SetValue
(
c60151106
.
xyzlimit
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
,
true
)
tc
:
RegisterEffect
(
e11
,
true
)
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e12
=
e11
:
Clone
()
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e12
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
e11
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
tc
:
RegisterEffect
(
e12
,
true
)
e11
:
SetValue
(
c60151106
.
xyzlimit
)
Duel
.
SpecialSummonComplete
()
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
end
tc
:
RegisterEffect
(
e11
,
true
)
tc
=
g
:
GetNext
()
local
e12
=
e11
:
Clone
()
end
e12
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
else
tc
:
RegisterEffect
(
e12
,
true
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
SpecialSummonComplete
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151106
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
2
,
nil
,
e
,
tp
)
end
local
tc
=
g
:
GetFirst
()
tc
=
g
:
GetNext
()
while
tc
do
end
if
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
end
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
end
e1
:
SetCode
(
EFFECT_DISABLE
)
function
c60151106
.
xyzlimit
(
e
,
c
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
if
not
c
then
return
false
end
tc
:
RegisterEffect
(
e1
,
true
)
return
not
c
:
IsSetCard
(
0x9b23
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
end
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
function
c60151106
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
tc
:
RegisterEffect
(
e2
,
true
)
end
local
e11
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
function
c60151106
.
filter
(
c
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsAbleToDeck
()
e11
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
end
e11
:
SetValue
(
c60151106
.
xyzlimit
)
function
c60151106
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
e11
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
tc
:
RegisterEffect
(
e11
,
true
)
and
Duel
.
IsExistingMatchingCard
(
c60151106
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
local
e12
=
e11
:
Clone
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
e12
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
tc
:
RegisterEffect
(
e12
,
true
)
end
Duel
.
SpecialSummonComplete
()
function
c60151106
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
tc
=
g
:
GetNext
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151106
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
2
,
nil
)
end
if
g
:
GetCount
()
>
0
then
end
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
Duel
.
ShuffleDeck
(
tp
)
end
if
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
~=
0
then
function
c60151106
.
xyzlimit
(
e
,
c
)
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
not
c
then
return
false
end
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
return
not
c
:
IsSetCard
(
0x9b23
)
Duel
.
BreakEffect
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
function
c60151106
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
end
end
end
function
c60151106
.
filter
(
c
)
end
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsAbleToDeck
()
end
function
c60151106
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c60151106
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
end
function
c60151106
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151106
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
2
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
tp
)
if
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
~=
0
then
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
if
g2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151101
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
end
end
end
\ No newline at end of file
expansions/script/c60151107.lua
View file @
d9d3234f
--├红瑰执行官 音┤
--├红瑰执行官 音┤
function
c60151107
.
initial_effect
(
c
)
function
c60151107
.
initial_effect
(
c
)
--sp
--sp
local
e12
=
Effect
.
CreateEffect
(
c
)
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetType
(
EFFECT_TYPE_FIELD
)
e12
:
SetType
(
EFFECT_TYPE_FIELD
)
e12
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e12
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e12
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e12
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e12
:
SetRange
(
LOCATION_GRAVE
)
e12
:
SetRange
(
LOCATION_GRAVE
)
e12
:
SetCountLimit
(
1
,
60111071
)
e12
:
SetCountLimit
(
1
,
60111071
)
e12
:
SetCondition
(
c60151107
.
spcon2
)
e12
:
SetCondition
(
c60151107
.
spcon2
)
e12
:
SetOperation
(
c60151107
.
spop2
)
e12
:
SetOperation
(
c60151107
.
spop2
)
c
:
RegisterEffect
(
e12
)
c
:
RegisterEffect
(
e12
)
--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
,
6011107
)
e1
:
SetCountLimit
(
1
,
6011107
)
e1
:
SetTarget
(
c60151107
.
cointg
)
e1
:
SetCondition
(
c60151107
.
coincon
)
e1
:
SetOperation
(
c60151107
.
coinop
)
e1
:
SetTarget
(
c60151107
.
cointg
)
c
:
RegisterEffect
(
e1
)
e1
:
SetOperation
(
c60151107
.
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
(
60151107
,
1
))
e111
:
SetDescription
(
aux
.
Stringid
(
60151101
,
2
))
e3
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DRAW
)
e111
:
SetCategory
(
CATEGORY_DESTROY
)
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
,
60151107
)
e111
:
SetCountLimit
(
1
,
6011107
)
e3
:
SetCondition
(
c60151107
.
spcon
)
e111
:
SetCondition
(
c60151107
.
coincon2
)
e3
:
SetTarget
(
c60151107
.
sptg
)
e111
:
SetTarget
(
c60151107
.
cointg
)
e3
:
SetOperation
(
c60151107
.
spop
)
e111
:
SetOperation
(
c60151107
.
coinop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e111
)
end
local
e222
=
e111
:
Clone
()
function
c60151107
.
spfilter2
(
c
)
e222
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
60151107
)
and
c
:
IsAbleToGrave
()
c
:
RegisterEffect
(
e222
)
end
--
function
c60151107
.
spcon2
(
e
,
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
if
c
==
nil
then
return
true
end
e3
:
SetDescription
(
aux
.
Stringid
(
60151107
,
1
))
local
tp
=
c
:
GetControler
()
e3
:
SetCategory
(
CATEGORY_DESTROY
)
if
Duel
.
GetMZoneCount
(
tp
)
<
1
and
Duel
.
GetMZoneCount
(
tp
)
>-
2
then
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
return
Duel
.
IsExistingMatchingCard
(
c60151107
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
and
Duel
.
IsExistingMatchingCard
(
c60151107
.
spfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
else
e3
:
SetCountLimit
(
1
,
60151107
)
return
Duel
.
GetMZoneCount
(
tp
)
>
0
e3
:
SetCondition
(
c60151107
.
spcon
)
and
Duel
.
IsExistingMatchingCard
(
c60151107
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
2
,
nil
)
e3
:
SetTarget
(
c60151107
.
sptg
)
end
e3
:
SetOperation
(
c60151107
.
spop
)
end
c
:
RegisterEffect
(
e3
)
function
c60151107
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
end
if
Duel
.
GetMZoneCount
(
tp
)
<
1
and
Duel
.
GetMZoneCount
(
tp
)
>-
2
then
function
c60151107
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
return
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151107
.
spfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
local
tc
=
g1
:
GetFirst
()
function
c60151107
.
coincon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
return
e
:
GetHandler
():
IsHasEffect
(
60151199
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c60151107
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
tc
)
end
local
g
=
Group
.
CreateGroup
()
function
c60151107
.
spfilter2
(
c
)
g
:
Merge
(
g1
)
return
c
:
IsSetCard
(
0x9b23
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsCode
(
60151107
)
and
c
:
IsAbleToGrave
()
g
:
Merge
(
g2
)
end
local
tc2
=
g
:
GetFirst
()
function
c60151107
.
spcon2
(
e
,
c
)
while
tc2
do
if
c
==
nil
then
return
true
end
if
not
tc2
:
IsFaceup
()
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc2
)
end
local
tp
=
c
:
GetControler
()
tc2
=
g
:
GetNext
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
2
then
end
return
Duel
.
IsExistingMatchingCard
(
c60151107
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
and
Duel
.
IsExistingMatchingCard
(
c60151107
.
spfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
else
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151107
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
2
,
2
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c60151107
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
2
,
nil
)
local
tc
=
g1
:
GetFirst
()
end
while
tc
do
end
if
not
tc
:
IsFaceup
()
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
function
c60151107
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
tc
=
g1
:
GetNext
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
2
then
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151107
.
spfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
local
tc
=
g1
:
GetFirst
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
function
c60151107
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c60151107
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
tc
)
if
chk
==
0
then
return
true
end
local
g
=
Group
.
CreateGroup
()
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
g
:
Merge
(
g1
)
Duel
.
SetChainLimit
(
c60151107
.
chlimit
)
g
:
Merge
(
g2
)
Duel
.
RegisterFlagEffect
(
tp
,
60151107
,
RESET_CHAIN
,
0
,
1
)
local
tc2
=
g
:
GetFirst
()
else
while
tc2
do
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
if
not
tc2
:
IsFaceup
()
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc2
)
end
end
tc2
=
g
:
GetNext
()
end
end
function
c60151107
.
chlimit
(
e
,
ep
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
return
tp
==
ep
else
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
function
c60151107
.
filter
(
c
,
atk
,
def
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151107
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
2
,
2
,
nil
)
return
c
:
IsFaceup
()
and
(
c
:
IsAttackBelow
(
atk
)
or
c
:
IsDefenseBelow
(
atk
))
local
tc
=
g1
:
GetFirst
()
and
c
:
IsDestructable
()
while
tc
do
end
if
not
tc
:
IsFaceup
()
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
function
c60151107
.
filter2
(
c
)
tc
=
g1
:
GetNext
()
return
c
:
IsAbleToGrave
()
end
end
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
function
c60151107
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
end
local
c
=
e
:
GetHandler
()
function
c60151107
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
c
:
IsFacedown
()
then
return
end
if
chk
==
0
then
return
true
end
local
res
=
0
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
if
Duel
.
GetFlagEffect
(
tp
,
60151107
)
>
0
then
Duel
.
SetChainLimit
(
c60151107
.
chlimit
)
res
=
1
Duel
.
RegisterFlagEffect
(
tp
,
60151107
,
RESET_CHAIN
,
0
,
1
)
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
else
if
res
==
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151107
.
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
)
end
end
function
c60151107
.
chlimit
(
e
,
ep
,
tp
)
end
return
tp
==
ep
if
res
==
1
then
end
local
c
=
e
:
GetHandler
()
function
c60151107
.
filter
(
c
,
atk
,
def
)
if
c
:
IsFacedown
()
then
return
end
return
c
:
IsFaceup
()
and
(
c
:
IsAttackBelow
(
atk
)
or
c
:
IsDefenseBelow
(
atk
))
local
g
=
Duel
.
GetMatchingGroup
(
c60151107
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
c
,
c
:
GetAttack
())
and
c
:
IsDestructable
()
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
function
c60151107
.
filter2
(
c
)
end
return
c
:
IsAbleToGrave
()
function
c60151107
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
function
c60151107
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
end
local
c
=
e
:
GetHandler
()
function
c60151107
.
filter3
(
c
)
if
c
:
IsFacedown
()
then
return
end
return
c
:
IsDestructable
()
local
res
=
0
end
if
Duel
.
GetFlagEffect
(
tp
,
60151107
)
>
0
then
function
c60151107
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
res
=
1
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151107
.
filter3
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c60151107
.
filter3
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
res
==
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
end
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151107
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
function
c60151107
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
g1
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151107
.
filter3
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
end
if
g
:
GetCount
()
>
0
then
end
Duel
.
HintSelection
(
g
)
if
res
==
1
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
local
c
=
e
:
GetHandler
()
end
if
c
:
IsFacedown
()
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c60151107
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
c
,
c
:
GetAttack
())
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
function
c60151107
.
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
c60151107
.
filter3
(
c
)
return
c
:
IsDestructable
()
end
function
c60151107
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151107
.
filter3
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c60151107
.
filter3
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c60151107
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151107
.
filter3
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
end
\ No newline at end of file
expansions/script/c60151108.lua
View file @
d9d3234f
--├黑魔司令 谢赛伽特┤
--├黑魔司令 谢赛伽特┤
function
c60151108
.
initial_effect
(
c
)
function
c60151108
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--cannot special summon
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--special summon
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCondition
(
c60151108
.
spcon
)
e2
:
SetCondition
(
c60151108
.
spcon
)
e2
:
SetOperation
(
c60151108
.
spop
)
e2
:
SetOperation
(
c60151108
.
spop
)
e2
:
SetValue
(
1
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--summon success
--summon success
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCondition
(
c60151108
.
sumsuccon
)
e3
:
SetCondition
(
c60151108
.
sumsuccon
)
e3
:
SetOperation
(
c60151108
.
sumsuc
)
e3
:
SetOperation
(
c60151108
.
sumsuc
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--coin
--coin
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_COIN
)
e4
:
SetCategory
(
CATEGORY_COIN
+
CATEGORY_TOGRAVE
+
CATEGORY_DRAW
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e4
:
SetCountLimit
(
1
,
60151108
)
e4
:
SetCountLimit
(
1
,
60151108
)
e4
:
SetTarget
(
c60151108
.
cointg
)
e4
:
SetCondition
(
c60151108
.
coincon
)
e4
:
SetOperation
(
c60151108
.
coinop
)
e4
:
SetTarget
(
c60151108
.
cointg
)
c
:
RegisterEffect
(
e4
)
e4
:
SetOperation
(
c60151108
.
coinop
)
--
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e444
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
60151108
,
1
))
e444
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_DRAW
)
e5
:
SetCategory
(
CATEGORY_TOHAND
)
e444
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e444
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e444
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e5
:
SetCode
(
EVENT_TO_GRAVE
)
e444
:
SetCountLimit
(
1
,
60151108
)
e5
:
SetCountLimit
(
1
,
6011108
)
e444
:
SetCondition
(
c60151108
.
coincon2
)
e5
:
SetCondition
(
c60151108
.
spcon2
)
e444
:
SetTarget
(
c60151108
.
cointg
)
e5
:
SetTarget
(
c60151108
.
sptg2
)
e444
:
SetOperation
(
c60151108
.
coinop
)
e5
:
SetOperation
(
c60151108
.
spop2
)
c
:
RegisterEffect
(
e444
)
c
:
RegisterEffect
(
e5
)
--
end
local
e5
=
Effect
.
CreateEffect
(
c
)
function
c60151108
.
cfilter
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
60151108
,
1
))
return
not
c
:
IsAbleToDeckOrExtraAsCost
()
e5
:
SetCategory
(
CATEGORY_TOHAND
)
end
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
function
c60151108
.
cfilter2
(
c
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x9b23
)
e5
:
SetCode
(
EVENT_TO_GRAVE
)
end
e5
:
SetCountLimit
(
1
,
6011108
)
function
c60151108
.
spcon
(
e
,
c
)
e5
:
SetCondition
(
c60151108
.
spcon2
)
if
c
==
nil
then
return
true
end
e5
:
SetTarget
(
c60151108
.
sptg2
)
local
tp
=
c
:
GetControler
()
e5
:
SetOperation
(
c60151108
.
spop2
)
local
g
=
Duel
.
GetMatchingGroup
(
c60151108
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
c
:
RegisterEffect
(
e5
)
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
g
:
GetCount
()
>
0
end
and
not
g
:
IsExists
(
c60151108
.
cfilter
,
1
,
nil
)
function
c60151108
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
function
c60151108
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c60151108
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
function
c60151108
.
coincon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
return
e
:
GetHandler
():
IsHasEffect
(
60151199
)
if
ct
>
0
then
end
local
a
=
Group
.
CreateGroup
()
function
c60151108
.
cfilter
(
c
)
for
i
=
1
,
ct
do
return
not
c
:
IsAbleToDeckOrExtraAsCost
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
end
local
g1
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
function
c60151108
.
cfilter2
(
c
)
g
:
Remove
(
Card
.
IsCode
,
nil
,
g1
:
GetFirst
():
GetCode
())
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x9b23
)
if
g1
:
GetFirst
():
IsAbleToDeckOrExtraAsCost
()
then
end
a
:
Merge
(
g1
)
function
c60151108
.
spcon
(
e
,
c
)
end
if
c
==
nil
then
return
true
end
end
local
tp
=
c
:
GetControler
()
Duel
.
SendtoDeck
(
a
,
nil
,
2
,
REASON_COST
)
local
g
=
Duel
.
GetMatchingGroup
(
c60151108
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
a1
=
a
:
GetCount
()
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
g
:
GetCount
()
>
0
for
i
=
1
,
a1
do
and
not
g
:
IsExists
(
c60151108
.
cfilter
,
1
,
nil
)
e
:
GetHandler
():
RegisterFlagEffect
(
60151108
,
RESET_EVENT
+
0xfe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c60151108
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c60151108
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
end
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
function
c60151108
.
sumsuccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
ct
>
0
then
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
+
1
local
a
=
Group
.
CreateGroup
()
end
for
i
=
1
,
ct
do
function
c60151108
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
ct
=
e
:
GetHandler
():
GetFlagEffect
(
60151108
)
local
g1
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
g
:
Remove
(
Card
.
IsCode
,
nil
,
g1
:
GetFirst
():
GetCode
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
if
g1
:
GetFirst
():
IsAbleToDeckOrExtraAsCost
()
then
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
a
:
Merge
(
g1
)
e1
:
SetRange
(
LOCATION_MZONE
)
end
e1
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
end
e1
:
SetValue
(
ct
*
400
)
Duel
.
SendtoDeck
(
a
,
nil
,
2
,
REASON_COST
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
local
a1
=
a
:
GetCount
()
e
:
GetHandler
():
RegisterEffect
(
e1
)
for
i
=
1
,
a1
do
local
e2
=
e1
:
Clone
()
e
:
GetHandler
():
RegisterFlagEffect
(
60151108
,
RESET_EVENT
+
0xfe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
e2
:
SetCode
(
EFFECT_SET_BASE_DEFENSE
)
end
e
:
GetHandler
():
RegisterEffect
(
e2
)
end
end
end
function
c60151108
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c60151108
.
sumsuccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
true
end
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SPECIAL
+
1
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
end
Duel
.
SetChainLimit
(
c60151108
.
chlimit
)
function
c60151108
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
60151108
,
RESET_CHAIN
,
0
,
1
)
local
ct
=
e
:
GetHandler
():
GetFlagEffect
(
60151108
)
else
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
end
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
end
e1
:
SetRange
(
LOCATION_MZONE
)
function
c60151108
.
chlimit
(
e
,
ep
,
tp
)
e1
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
return
tp
==
ep
e1
:
SetValue
(
ct
*
400
)
end
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
function
c60151108
.
filter2
(
c
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
return
c
:
IsAbleToGrave
()
local
e2
=
e1
:
Clone
()
end
e2
:
SetCode
(
EFFECT_SET_BASE_DEFENSE
)
function
c60151108
.
filter3
(
c
)
e
:
GetHandler
():
RegisterEffect
(
e2
)
return
true
end
end
function
c60151108
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c60151108
.
filter4
(
c
,
tp
)
if
chk
==
0
then
return
true
end
return
c
:
GetOwner
()
==
tp
and
c
:
IsLocation
(
LOCATION_GRAVE
)
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
end
Duel
.
SetChainLimit
(
c60151108
.
chlimit
)
function
c60151108
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
60151108
,
RESET_CHAIN
,
0
,
1
)
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
else
local
c
=
e
:
GetHandler
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
if
c
:
IsFacedown
()
then
return
end
end
local
res
=
0
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
1
,
tp
,
LOCATION_DECK
)
if
Duel
.
GetFlagEffect
(
tp
,
60151108
)
>
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
1
-
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
res
=
1
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
end
if
res
==
0
then
function
c60151108
.
chlimit
(
e
,
ep
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
return
tp
==
ep
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151108
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
if
g1
:
GetCount
()
>
0
then
function
c60151108
.
filter2
(
c
)
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
return
c
:
IsAbleToGrave
()
end
end
end
function
c60151108
.
filter3
(
c
)
if
res
==
1
then
return
true
local
ct1
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
)
end
local
ct2
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
)
function
c60151108
.
filter4
(
c
,
tp
)
local
a
=
Group
.
CreateGroup
()
return
c
:
GetOwner
()
==
tp
and
c
:
IsLocation
(
LOCATION_GRAVE
)
if
ct1
>
ct2
then
end
local
g2
=
Duel
.
GetMatchingGroup
(
c60151108
.
filter3
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
nil
)
function
c60151108
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
g2
:
GetCount
()
>
0
then
if
e
:
GetHandler
():
IsFacedown
()
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
c
=
e
:
GetHandler
()
local
sg
=
g2
:
Select
(
tp
,
ct1
-
ct2
,
ct1
-
ct2
,
nil
)
if
c
:
IsFacedown
()
then
return
end
Duel
.
HintSelection
(
sg
)
local
res
=
0
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
if
Duel
.
GetFlagEffect
(
tp
,
60151108
)
>
0
then
Duel
.
BreakEffect
()
res
=
1
local
og
=
Duel
.
GetOperatedGroup
()
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
local
ct
=
og
:
FilterCount
(
c60151108
.
filter4
,
nil
,
tp
)
if
res
==
0
then
if
ct
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Draw
(
tp
,
ct
-
1
,
REASON_EFFECT
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c60151108
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
if
g1
:
GetCount
()
>
0
then
end
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
elseif
ct1
<
ct2
then
end
local
g2
=
Duel
.
GetMatchingGroup
(
c60151108
.
filter3
,
1
-
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
nil
)
end
if
g2
:
GetCount
()
>
0
then
if
res
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_TOGRAVE
)
local
ct1
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
)
local
sg
=
g2
:
Select
(
1
-
tp
,
ct2
-
ct1
,
ct2
-
ct1
,
nil
)
local
ct2
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
)
Duel
.
HintSelection
(
sg
)
local
a
=
Group
.
CreateGroup
()
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
if
ct1
>
ct2
then
Duel
.
BreakEffect
()
local
g2
=
Duel
.
GetMatchingGroup
(
c60151108
.
filter3
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
nil
)
local
og
=
Duel
.
GetOperatedGroup
()
if
g2
:
GetCount
()
>
0
then
local
ct
=
og
:
FilterCount
(
c60151108
.
filter4
,
nil
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
if
ct
>
0
then
local
sg
=
g2
:
Select
(
tp
,
ct1
-
ct2
,
ct1
-
ct2
,
nil
)
Duel
.
Draw
(
tp
,
ct
-
1
,
REASON_EFFECT
)
Duel
.
HintSelection
(
sg
)
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
end
Duel
.
BreakEffect
()
else
local
og
=
Duel
.
GetOperatedGroup
()
return
false
local
ct
=
og
:
FilterCount
(
c60151108
.
filter4
,
nil
,
tp
)
end
if
ct
>
0
then
end
Duel
.
Draw
(
tp
,
ct
-
1
,
REASON_EFFECT
)
end
end
function
c60151108
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
elseif
ct1
<
ct2
then
and
re
:
GetHandler
():
IsSetCard
(
0x9b23
)
local
g2
=
Duel
.
GetMatchingGroup
(
c60151108
.
filter3
,
1
-
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
nil
)
end
if
g2
:
GetCount
()
>
0
then
function
c60151108
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_TOGRAVE
)
if
chk
==
0
then
return
true
end
local
sg
=
g2
:
Select
(
1
-
tp
,
ct2
-
ct1
,
ct2
-
ct1
,
nil
)
end
Duel
.
HintSelection
(
sg
)
function
c60151108
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
Duel
.
BreakEffect
()
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
local
og
=
Duel
.
GetOperatedGroup
()
e2
:
SetCode
(
60151199
)
local
ct
=
og
:
FilterCount
(
c60151108
.
filter4
,
nil
,
tp
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x9b23
))
if
ct
>
0
then
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
Duel
.
Draw
(
tp
,
ct
-
1
,
REASON_EFFECT
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
end
Duel
.
RegisterEffect
(
e2
,
tp
)
end
else
return
false
end
end
end
function
c60151108
.
spcon2
(
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
c60151108
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
true
end
end
function
c60151108
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
60151199
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x9b23
))
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
\ No newline at end of file
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
--├军团首席 全能之玛特咖┤
--├军团首席 全能之玛特咖┤
function
c60151128
.
initial_effect
(
c
)
function
c60151128
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
60151128
)
c
:
SetUniqueOnField
(
1
,
0
,
60151128
)
--xyz summon
--xyz summon
aux
.
AddXyzProcedure
(
c
,
c60151128
.
xyzfilter
,
12
,
2
)
aux
.
AddXyzProcedure
(
c
,
c60151128
.
xyzfilter
,
12
,
2
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--coin
--coin
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
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
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c60151128
.
atkcon
)
e1
:
SetCondition
(
c60151128
.
atkcon
)
e1
:
SetTarget
(
c60151128
.
cointg
)
e1
:
SetTarget
(
c60151128
.
cointg
)
e1
:
SetOperation
(
c60151128
.
coinop
)
e1
:
SetOperation
(
c60151128
.
coinop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e111
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e111
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCategory
(
CATEGORY_DISABLE
)
e111
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e111
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e111
:
SetCondition
(
c60151128
.
atkcon2
)
e2
:
SetRange
(
LOCATION_MZONE
)
e111
:
SetTarget
(
c60151128
.
cointg
)
e2
:
SetCondition
(
c60151128
.
atkcon2
)
e111
:
SetOperation
(
c60151128
.
coinop
)
e2
:
SetTarget
(
c60151128
.
target
)
c
:
RegisterEffect
(
e111
)
e2
:
SetOperation
(
c60151128
.
activate
)
c
:
RegisterEffect
(
e2
)
local
e2
=
Effect
.
CreateEffect
(
c
)
--destroy replace
e2
:
SetCategory
(
CATEGORY_DISABLE
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetCondition
(
c60151128
.
atkcon2
)
e7
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
c60151128
.
target
)
e7
:
SetTarget
(
c60151128
.
reptg
)
e2
:
SetOperation
(
c60151128
.
activate
)
c
:
RegisterEffect
(
e7
)
c
:
RegisterEffect
(
e2
)
end
--destroy replace
function
c60151128
.
xyzfilter
(
c
)
local
e7
=
Effect
.
CreateEffect
(
c
)
return
c
:
IsSetCard
(
0x9b23
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
end
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
function
c60151128
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e7
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
and
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x9b23
)
e7
:
SetRange
(
LOCATION_MZONE
)
end
e7
:
SetTarget
(
c60151128
.
reptg
)
function
c60151128
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
c
:
RegisterEffect
(
e7
)
if
chk
==
0
then
return
true
end
end
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
function
c60151128
.
xyzfilter
(
c
)
Duel
.
SetChainLimit
(
c60151128
.
chlimit
)
return
c
:
IsSetCard
(
0x9b23
)
Duel
.
RegisterFlagEffect
(
tp
,
60151128
,
RESET_CHAIN
,
0
,
1
)
end
else
function
c60151128
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_XYZ
and
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x9b23
)
end
and
not
e
:
GetHandler
():
IsHasEffect
(
60151199
)
end
end
function
c60151128
.
chlimit
(
e
,
ep
,
tp
)
function
c60151128
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
==
ep
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_XYZ
and
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x9b23
)
end
and
e
:
GetHandler
():
IsHasEffect
(
60151199
)
function
c60151128
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
e
:
GetHandler
()
function
c60151128
.
cointg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
c
:
IsFacedown
()
then
return
end
if
chk
==
0
then
return
true
end
local
res
=
0
if
e
:
GetHandler
():
IsHasEffect
(
60151199
)
then
if
Duel
.
GetFlagEffect
(
tp
,
60151128
)
>
0
then
Duel
.
SetChainLimit
(
c60151128
.
chlimit
)
res
=
1
Duel
.
RegisterFlagEffect
(
tp
,
60151128
,
RESET_CHAIN
,
0
,
1
)
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
else
if
res
==
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COIN
,
nil
,
0
,
tp
,
1
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
e
:
GetHandler
())
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
e
:
GetHandler
())
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
sg
,
sg
:
GetCount
(),
0
,
0
)
end
end
if
res
==
1
then
end
--
function
c60151128
.
chlimit
(
e
,
ep
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
return
tp
==
ep
e2
:
SetDescription
(
aux
.
Stringid
(
60151123
,
1
))
end
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
function
c60151128
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e2
:
SetRange
(
LOCATION_MZONE
)
local
c
=
e
:
GetHandler
()
e2
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
if
c
:
IsFacedown
()
then
return
end
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
local
res
=
0
e2
:
SetTargetRange
(
0
,
1
)
if
Duel
.
GetFlagEffect
(
tp
,
60151128
)
>
0
then
e2
:
SetValue
(
aux
.
TRUE
)
res
=
1
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
else
res
=
Duel
.
TossCoin
(
tp
,
1
)
end
e2
:
SetCondition
(
c60151128
.
limcon
)
if
res
==
0
then
e
:
GetHandler
():
RegisterEffect
(
e2
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
e
:
GetHandler
())
end
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
function
c60151128
.
limcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
res
==
1
then
return
Duel
.
GetCurrentChain
()
<
1
--
end
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
function
c60151128
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e2
:
SetDescription
(
aux
.
Stringid
(
60151123
,
1
))
return
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x9b23
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
end
e2
:
SetRange
(
LOCATION_MZONE
)
function
c60151128
.
filter
(
c
,
e
,
tp
)
e2
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
return
c
:
GetSummonPlayer
()
==
tp
and
not
c
:
IsDisabled
()
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
and
(
not
e
or
(
c
:
IsRelateToEffect
(
e
)
and
c
:
IsLocation
(
LOCATION_MZONE
)))
e2
:
SetTargetRange
(
0
,
1
)
end
e2
:
SetValue
(
aux
.
TRUE
)
function
c60151128
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
local
c
=
e
:
GetHandler
()
e2
:
SetCondition
(
c60151128
.
limcon
)
if
chk
==
0
then
e
:
GetHandler
():
RegisterEffect
(
e2
)
local
a
=
eg
:
FilterCount
(
c60151128
.
filter
,
nil
,
nil
,
1
-
tp
)
end
local
b
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
end
return
eg
:
IsExists
(
c60151128
.
filter
,
1
,
nil
,
nil
,
1
-
tp
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
function
c60151128
.
limcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
b
>=
a
and
c
:
GetFlagEffect
(
60151128
)
==
0
return
Duel
.
GetCurrentChain
()
<
1
end
end
local
g
=
eg
:
Filter
(
c60151128
.
filter
,
nil
,
nil
,
1
-
tp
)
function
c60151128
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g1
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
return
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x9b23
)
Duel
.
SetTargetCard
(
g
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g1
,
g
:
GetCount
(),
0
,
0
)
function
c60151128
.
filter
(
c
,
e
,
tp
)
c
:
RegisterFlagEffect
(
60151128
,
RESET_CHAIN
,
0
,
1
)
return
c
:
GetSummonPlayer
()
==
tp
and
not
c
:
IsDisabled
()
end
and
(
not
e
or
(
c
:
IsRelateToEffect
(
e
)
and
c
:
IsLocation
(
LOCATION_MZONE
)))
function
c60151128
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
e
:
GetHandler
()
function
c60151128
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
c
=
e
:
GetHandler
()
local
g
=
tg
:
Filter
(
c60151128
.
filter
,
nil
,
e
,
1
-
tp
)
if
chk
==
0
then
local
b
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
local
a
=
eg
:
FilterCount
(
c60151128
.
filter
,
nil
,
nil
,
1
-
tp
)
if
g
:
GetCount
()
>
0
and
b
>
0
and
b
>=
g
:
GetCount
()
then
local
b
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
return
eg
:
IsExists
(
c60151128
.
filter
,
1
,
nil
,
nil
,
1
-
tp
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
g
:
GetCount
(),
g
:
GetCount
(),
nil
)
and
b
>=
a
and
c
:
GetFlagEffect
(
60151128
)
==
0
if
g1
:
GetCount
()
>
0
then
end
if
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
then
local
g
=
eg
:
Filter
(
c60151128
.
filter
,
nil
,
nil
,
1
-
tp
)
local
tc
=
g
:
GetFirst
()
local
g1
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
while
tc
do
Duel
.
SetTargetCard
(
g
)
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
()
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g1
,
g
:
GetCount
(),
0
,
0
)
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
c
:
RegisterFlagEffect
(
60151128
,
RESET_CHAIN
,
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
end
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
function
c60151128
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e1
:
SetCode
(
EFFECT_DISABLE
)
local
c
=
e
:
GetHandler
()
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
tc
:
RegisterEffect
(
e1
)
local
g
=
tg
:
Filter
(
c60151128
.
filter
,
nil
,
e
,
1
-
tp
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
b
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
if
g
:
GetCount
()
>
0
and
b
>
0
and
b
>=
g
:
GetCount
()
then
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
e2
:
SetValue
(
RESET_TURN_SET
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToGrave
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
g
:
GetCount
(),
g
:
GetCount
(),
nil
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
if
g1
:
GetCount
()
>
0
then
tc
:
RegisterEffect
(
e2
)
if
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
then
local
e3
=
Effect
.
CreateEffect
(
c
)
local
tc
=
g
:
GetFirst
()
e3
:
SetDescription
(
aux
.
Stringid
(
60151128
,
1
))
while
tc
do
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
()
then
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CLIENT_HINT
)
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e3
:
SetValue
(
1
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetCode
(
EFFECT_DISABLE
)
tc
:
RegisterEffect
(
e3
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
local
e4
=
e3
:
Clone
()
tc
:
RegisterEffect
(
e1
)
e4
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
local
e2
=
Effect
.
CreateEffect
(
c
)
tc
:
RegisterEffect
(
e4
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
e5
=
e3
:
Clone
()
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e5
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
e2
:
SetValue
(
RESET_TURN_SET
)
tc
:
RegisterEffect
(
e5
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
end
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
local
e3
=
Effect
.
CreateEffect
(
c
)
end
e3
:
SetDescription
(
aux
.
Stringid
(
60151128
,
1
))
end
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
end
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CLIENT_HINT
)
end
e3
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
end
e3
:
SetValue
(
1
)
function
c60151128
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
local
c
=
e
:
GetHandler
()
tc
:
RegisterEffect
(
e3
)
if
chk
==
0
then
return
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_EFFECT
)
end
local
e4
=
e3
:
Clone
()
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151128
,
2
))
then
e4
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
c
:
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
tc
:
RegisterEffect
(
e4
)
return
true
local
e5
=
e3
:
Clone
()
else
return
false
end
e5
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
tc
:
RegisterEffect
(
e5
)
end
tc
=
g
:
GetNext
()
end
end
end
end
end
function
c60151128
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_EFFECT
)
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60151128
,
2
))
then
c
:
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_EFFECT
)
return
true
else
return
false
end
end
end
\ No newline at end of file
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