Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaoye
ygopro-222DIY-cards
Commits
44b70027
Commit
44b70027
authored
Feb 21, 2020
by
TanakaKotoha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post
parent
c9d133c3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
374 additions
and
374 deletions
+374
-374
expansions/script/c14000031.lua
expansions/script/c14000031.lua
+1
-1
expansions/script/c60151731.lua
expansions/script/c60151731.lua
+110
-110
expansions/script/c60151732.lua
expansions/script/c60151732.lua
+127
-127
expansions/script/c60151733.lua
expansions/script/c60151733.lua
+136
-136
No files found.
expansions/script/c14000031.lua
View file @
44b70027
...
...
@@ -25,7 +25,7 @@ function cm.initial_effect(c)
Duel
.
AddCustomActivityCounter
(
m
,
ACTIVITY_CHAIN
,
aux
.
FALSE
)
end
function
cm
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsAbleToEnterBP
()
and
Duel
.
GetTurnPlayer
()
==
tp
and
not
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
GetDrawCount
(
tp
)
>
0
return
Duel
.
GetTurnPlayer
()
==
tp
and
not
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
GetDrawCount
(
tp
)
>
0
end
function
cm
.
counterfilter
(
c
)
return
c
:
GetSummonLocation
()
~=
LOCATION_EXTRA
...
...
expansions/script/c60151731.lua
View file @
44b70027
--天空的水晶部队 符文操控师
function
c60151731
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x3b26
),
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--dis
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151731
,
0
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetTarget
(
c60151731
.
distg
)
e1
:
SetOperation
(
c60151731
.
disop
)
c
:
RegisterEffect
(
e1
)
--des
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60151731
,
1
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
60151731
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetTarget
(
c60151731
.
destg
)
e2
:
SetOperation
(
c60151731
.
desop
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151731
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
,
6011731
)
e3
:
SetTarget
(
c60151731
.
target2
)
e3
:
SetOperation
(
c60151731
.
operation2
)
c
:
RegisterEffect
(
e3
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x3b26
),
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--dis
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151731
,
0
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetTarget
(
c60151731
.
distg
)
e1
:
SetOperation
(
c60151731
.
disop
)
c
:
RegisterEffect
(
e1
)
--des
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60151731
,
1
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
60151731
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetTarget
(
c60151731
.
destg
)
e2
:
SetOperation
(
c60151731
.
desop
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151731
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
,
6011731
)
e3
:
SetTarget
(
c60151731
.
target2
)
e3
:
SetOperation
(
c60151731
.
operation2
)
c
:
RegisterEffect
(
e3
)
end
function
c60151731
.
disfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
not
c
:
IsDisabled
()
and
bit
.
band
(
c
:
GetSummonType
(),
SUMMON_TYPE_SPECIAL
)
==
SUMMON_TYPE_SPECIAL
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
not
c
:
IsDisabled
()
and
bit
.
band
(
c
:
GetSummonType
(),
SUMMON_TYPE_SPECIAL
)
==
SUMMON_TYPE_SPECIAL
end
function
c60151731
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151731
.
disfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c60151731
.
disfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151731
.
disfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c60151731
.
disfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
end
function
c60151731
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
c60151731
.
disfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
c60151731
.
disfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
end
function
c60151731
.
desfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsDisabled
()
return
c
:
IsFaceup
()
and
c
:
IsDisabled
()
end
function
c60151731
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c60151731
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c60151731
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c60151731
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c60151731
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c60151731
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c60151731
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3b26
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x3b26
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c60151731
.
filter2
(
c
,
ft
)
if
ft
==
0
then
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDestructable
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
(
)
else
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDestructable
()
and
((
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
(
))
or
c
:
IsLocation
(
LOCATION_HAND
))
end
if
ft
==
0
then
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDestructable
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
else
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDestructable
()
and
((
c
:
IsLocation
(
LOCATION_MZONE
))
or
c
:
IsLocation
(
LOCATION_HAND
))
end
end
function
c60151731
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151731
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
,
ft
)
and
Duel
.
IsExistingTarget
(
c60151731
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c60151731
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
local
g2
=
Duel
.
GetMatchingGroup
(
c60151731
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
nil
,
ft
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g2
,
1
,
0
,
0
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151731
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
,
ft
)
and
Duel
.
IsExistingTarget
(
c60151731
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c60151731
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
local
g2
=
Duel
.
GetMatchingGroup
(
c60151731
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
nil
,
ft
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g2
,
1
,
0
,
0
)
end
function
c60151731
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151731
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151731
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151731
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151731
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
end
expansions/script/c60151732.lua
View file @
44b70027
--天空的水晶部队 魔物召唤师
function
c60151732
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x3b26
),
4
,
2
)
c
:
EnableReviveLimit
()
--attach
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151732
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
c60151732
.
target
)
e1
:
SetOperation
(
c60151732
.
operation
)
c
:
RegisterEffect
(
e1
)
--token
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60151732
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
60151732
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetCost
(
c60151732
.
thcost
)
e2
:
SetTarget
(
c60151732
.
destg
)
e2
:
SetOperation
(
c60151732
.
desop
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151732
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
,
6011732
)
e3
:
SetTarget
(
c60151732
.
target2
)
e3
:
SetOperation
(
c60151732
.
operation2
)
c
:
RegisterEffect
(
e3
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x3b26
),
4
,
2
)
c
:
EnableReviveLimit
()
--attach
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151732
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTarget
(
c60151732
.
target
)
e1
:
SetOperation
(
c60151732
.
operation
)
c
:
RegisterEffect
(
e1
)
--token
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60151732
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
60151732
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetCost
(
c60151732
.
thcost
)
e2
:
SetTarget
(
c60151732
.
destg
)
e2
:
SetOperation
(
c60151732
.
desop
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151732
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
,
6011732
)
e3
:
SetTarget
(
c60151732
.
target2
)
e3
:
SetOperation
(
c60151732
.
operation2
)
c
:
RegisterEffect
(
e3
)
end
function
c60151732
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
chkc
:
IsType
(
TYPE_MONSTER
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
TYPE_MONSTER
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
TYPE_MONSTER
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
g
,
1
,
0
,
0
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
chkc
:
IsType
(
TYPE_MONSTER
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
TYPE_MONSTER
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsType
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
TYPE_MONSTER
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
g
,
1
,
0
,
0
)
end
function
c60151732
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Overlay
(
c
,
Group
.
FromCards
(
tc
))
end
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Overlay
(
c
,
Group
.
FromCards
(
tc
))
end
end
function
c60151732
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c60151732
.
mfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsType
(
TYPE_XYZ
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsType
(
TYPE_XYZ
)
end
function
c60151732
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151732
.
mfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
60151784
,
0
,
0x4011
,
-
2
,
-
2
,
-
2
,
RACE_SPELLCASTER
,
ATTRIBUTE_WIND
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151732
.
mfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
60151784
,
0
,
0x4011
,
-
2
,
-
2
,
-
2
,
RACE_SPELLCASTER
,
ATTRIBUTE_WIND
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c60151732
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
or
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
60151784
,
0
,
0x4011
,
-
2
,
-
2
,
-
2
,
RACE_SPELLCASTER
,
ATTRIBUTE_WIND
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151732
.
mfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
tc
=
g
:
GetFirst
()
local
atk
=
tc
:
GetBaseAttack
()
local
def
=
tc
:
GetBaseDefense
()
local
lv
=
tc
:
GetLevel
()
local
token
=
Duel
.
CreateToken
(
tp
,
60151784
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
atk
)
token
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2
:
SetValue
(
def
)
token
:
RegisterEffect
(
e2
,
true
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e3
:
SetValue
(
lv
)
token
:
RegisterEffect
(
e3
,
true
)
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
or
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
60151784
,
0
,
0x4011
,
-
2
,
-
2
,
-
2
,
RACE_SPELLCASTER
,
ATTRIBUTE_WIND
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151732
.
mfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
local
tc
=
g
:
GetFirst
()
local
atk
=
tc
:
GetBaseAttack
()
local
def
=
tc
:
GetBaseDefense
()
local
lv
=
tc
:
GetLevel
()
local
token
=
Duel
.
CreateToken
(
tp
,
60151784
)
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
atk
)
token
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_SET_DEFENSE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2
:
SetValue
(
def
)
token
:
RegisterEffect
(
e2
,
true
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CHANGE_LEVEL
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e3
:
SetValue
(
lv
)
token
:
RegisterEffect
(
e3
,
true
)
end
end
function
c60151732
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3b26
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x3b26
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c60151732
.
filter2
(
c
,
ft
)
if
ft
==
0
then
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDestructable
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
(
)
else
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDestructable
()
and
((
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
(
))
or
c
:
IsLocation
(
LOCATION_HAND
))
end
if
ft
==
0
then
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDestructable
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
else
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDestructable
()
and
((
c
:
IsLocation
(
LOCATION_MZONE
))
or
c
:
IsLocation
(
LOCATION_HAND
))
end
end
function
c60151732
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151732
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
,
ft
)
and
Duel
.
IsExistingTarget
(
c60151732
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c60151732
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
local
g2
=
Duel
.
GetMatchingGroup
(
c60151732
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
nil
,
ft
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g2
,
1
,
0
,
0
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151732
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
,
ft
)
and
Duel
.
IsExistingTarget
(
c60151732
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c60151732
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
local
g2
=
Duel
.
GetMatchingGroup
(
c60151732
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
nil
,
ft
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g2
,
1
,
0
,
0
)
end
function
c60151732
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151732
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151732
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151732
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151732
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
end
expansions/script/c60151733.lua
View file @
44b70027
--天空的水晶部队 樱花公主
function
c60151733
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
--spsummon condition
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e0
:
SetValue
(
c60151733
.
splimit
)
c
:
RegisterEffect
(
e0
)
--special summon rule
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
)
e9
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e9
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e9
:
SetRange
(
LOCATION_EXTRA
)
e9
:
SetCondition
(
c60151733
.
spcon
)
e9
:
SetOperation
(
c60151733
.
spop
)
c
:
RegisterEffect
(
e9
)
--dis
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151733
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetTarget
(
c60151733
.
distg
)
e1
:
SetOperation
(
c60151733
.
disop
)
c
:
RegisterEffect
(
e1
)
--remove
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60151733
,
1
))
e2
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_DAMAGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
60151733
)
e2
:
SetTarget
(
c60151733
.
rmtg
)
e2
:
SetOperation
(
c60151733
.
rmop
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151733
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
,
6011733
)
e3
:
SetTarget
(
c60151733
.
target2
)
e3
:
SetOperation
(
c60151733
.
operation2
)
c
:
RegisterEffect
(
e3
)
--fusion material
c
:
EnableReviveLimit
()
--spsummon condition
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e0
:
SetValue
(
c60151733
.
splimit
)
c
:
RegisterEffect
(
e0
)
--special summon rule
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
)
e9
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e9
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e9
:
SetRange
(
LOCATION_EXTRA
)
e9
:
SetCondition
(
c60151733
.
spcon
)
e9
:
SetOperation
(
c60151733
.
spop
)
c
:
RegisterEffect
(
e9
)
--dis
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60151733
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetTarget
(
c60151733
.
distg
)
e1
:
SetOperation
(
c60151733
.
disop
)
c
:
RegisterEffect
(
e1
)
--remove
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60151733
,
1
))
e2
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_DAMAGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
60151733
)
e2
:
SetTarget
(
c60151733
.
rmtg
)
e2
:
SetOperation
(
c60151733
.
rmop
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60151733
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
,
6011733
)
e3
:
SetTarget
(
c60151733
.
target2
)
e3
:
SetOperation
(
c60151733
.
operation2
)
c
:
RegisterEffect
(
e3
)
end
function
c60151733
.
splimit
(
e
,
se
,
sp
,
st
)
return
e
:
GetHandler
():
GetLocation
()
~=
LOCATION_EXTRA
return
e
:
GetHandler
():
GetLocation
()
~=
LOCATION_EXTRA
end
function
c60151733
.
ffilter
(
c
)
return
c
:
IsFusionSetCard
(
0x3b26
)
and
c
:
IsFusionType
(
TYPE_MONSTER
)
return
c
:
IsFusionSetCard
(
0x3b26
)
and
c
:
IsFusionType
(
TYPE_MONSTER
)
end
function
c60151733
.
spfilter
(
c
,
fc
)
return
c60151733
.
ffilter
(
c
)
and
c
:
IsCanBeFusionMaterial
(
fc
)
return
c60151733
.
ffilter
(
c
)
and
c
:
IsCanBeFusionMaterial
(
fc
)
end
function
c60151733
.
spfilter1
(
c
,
tp
,
g
)
return
g
:
IsExists
(
c60151733
.
spfilter2
,
1
,
c
,
tp
,
c
)
return
g
:
IsExists
(
c60151733
.
spfilter2
,
1
,
c
,
tp
,
c
)
end
function
c60151733
.
spfilter2
(
c
,
tp
,
mc
)
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
c
,
mc
))
>
0
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
c
,
mc
))
>
0
end
function
c60151733
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
g
=
Duel
.
GetReleaseGroup
(
tp
):
Filter
(
c60151733
.
spfilter
,
nil
,
c
)
return
g
:
IsExists
(
c60151733
.
spfilter1
,
1
,
nil
,
tp
,
g
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
g
=
Duel
.
GetReleaseGroup
(
tp
):
Filter
(
c60151733
.
spfilter
,
nil
,
c
)
return
g
:
IsExists
(
c60151733
.
spfilter1
,
1
,
nil
,
tp
,
g
)
end
function
c60151733
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetReleaseGroup
(
tp
):
Filter
(
c60151733
.
spfilter
,
nil
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g1
=
g
:
FilterSelect
(
tp
,
c60151733
.
spfilter1
,
1
,
1
,
nil
,
tp
,
g
)
local
mc
=
g1
:
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g2
=
g
:
FilterSelect
(
tp
,
c60151733
.
spfilter2
,
1
,
1
,
mc
,
tp
,
mc
)
g1
:
Merge
(
g2
)
c
:
SetMaterial
(
g1
)
Duel
.
Release
(
g1
,
REASON_COST
+
REASON_FUSION
+
REASON_MATERIAL
)
local
g
=
Duel
.
GetReleaseGroup
(
tp
):
Filter
(
c60151733
.
spfilter
,
nil
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g1
=
g
:
FilterSelect
(
tp
,
c60151733
.
spfilter1
,
1
,
1
,
nil
,
tp
,
g
)
local
mc
=
g1
:
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g2
=
g
:
FilterSelect
(
tp
,
c60151733
.
spfilter2
,
1
,
1
,
mc
,
tp
,
mc
)
g1
:
Merge
(
g2
)
c
:
SetMaterial
(
g1
)
Duel
.
Release
(
g1
,
REASON_COST
+
REASON_FUSION
+
REASON_MATERIAL
)
end
function
c60151733
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
end
function
c60151733
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
--activate cost
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_ACTIVATE_COST
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
0
,
1
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetCost
(
c60151733
.
costchk
)
e2
:
SetOperation
(
c60151733
.
costop
)
Duel
.
RegisterEffect
(
e2
,
tp
)
local
c
=
e
:
GetHandler
()
--activate cost
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_ACTIVATE_COST
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
0
,
1
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetCost
(
c60151733
.
costchk
)
e2
:
SetOperation
(
c60151733
.
costop
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c60151733
.
costchk
(
e
,
te_or_c
,
tp
)
return
Duel
.
CheckLPCost
(
tp
,
200
)
return
Duel
.
CheckLPCost
(
tp
,
200
)
end
function
c60151733
.
costop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
PayLPCost
(
tp
,
200
)
Duel
.
PayLPCost
(
tp
,
200
)
end
function
c60151733
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsAbleToRemove
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
800
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsAbleToRemove
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
800
)
end
function
c60151733
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
then
Duel
.
BreakEffect
()
Duel
.
Damage
(
1
-
tp
,
800
,
REASON_EFFECT
)
end
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
then
Duel
.
BreakEffect
()
Duel
.
Damage
(
1
-
tp
,
800
,
REASON_EFFECT
)
end
end
end
function
c60151733
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3b26
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x3b26
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c60151733
.
filter2
(
c
,
ft
)
if
ft
==
0
then
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDestructable
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
(
)
else
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDestructable
()
and
((
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
(
))
or
c
:
IsLocation
(
LOCATION_HAND
))
end
if
ft
==
0
then
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDestructable
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
else
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDestructable
()
and
((
c
:
IsLocation
(
LOCATION_MZONE
))
or
c
:
IsLocation
(
LOCATION_HAND
))
end
end
function
c60151733
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151733
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
,
ft
)
and
Duel
.
IsExistingTarget
(
c60151733
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c60151733
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
local
g2
=
Duel
.
GetMatchingGroup
(
c60151733
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
nil
,
ft
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g2
,
1
,
0
,
0
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60151733
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
,
ft
)
and
Duel
.
IsExistingTarget
(
c60151733
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c60151733
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
local
g2
=
Duel
.
GetMatchingGroup
(
c60151733
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
nil
,
ft
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g2
,
1
,
0
,
0
)
end
function
c60151733
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151733
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151733
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151733
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60151733
.
filter2
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
end
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