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
28a43eb5
Commit
28a43eb5
authored
Nov 24, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
mg
parents
8aa235aa
276b9150
Changes
26
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
427 additions
and
708 deletions
+427
-708
expansions/script/c37564006.lua
expansions/script/c37564006.lua
+2
-2
expansions/script/c37564010.lua
expansions/script/c37564010.lua
+1
-1
expansions/script/c37564013.lua
expansions/script/c37564013.lua
+2
-2
expansions/script/c37564021.lua
expansions/script/c37564021.lua
+1
-1
expansions/script/c37564042.lua
expansions/script/c37564042.lua
+1
-1
expansions/script/c37564055.lua
expansions/script/c37564055.lua
+6
-11
expansions/script/c37564211.lua
expansions/script/c37564211.lua
+1
-1
expansions/script/c37564412.lua
expansions/script/c37564412.lua
+2
-2
expansions/script/c37564558.lua
expansions/script/c37564558.lua
+1
-1
expansions/script/c37564564.lua
expansions/script/c37564564.lua
+89
-0
expansions/script/c37564765.lua
expansions/script/c37564765.lua
+12
-1
expansions/script/c37564832.lua
expansions/script/c37564832.lua
+1
-1
expansions/script/c37564844.lua
expansions/script/c37564844.lua
+2
-2
expansions/script/c37564850.lua
expansions/script/c37564850.lua
+6
-30
expansions/script/c37564919.lua
expansions/script/c37564919.lua
+5
-26
expansions/script/c57300000.lua
expansions/script/c57300000.lua
+181
-110
expansions/script/c57300010.lua
expansions/script/c57300010.lua
+2
-85
expansions/script/c57300011.lua
expansions/script/c57300011.lua
+2
-85
expansions/script/c57300012.lua
expansions/script/c57300012.lua
+2
-86
expansions/script/c57300013.lua
expansions/script/c57300013.lua
+2
-85
expansions/script/c57300014.lua
expansions/script/c57300014.lua
+2
-84
expansions/script/c57300019.lua
expansions/script/c57300019.lua
+1
-1
expansions/script/c57300020.lua
expansions/script/c57300020.lua
+1
-1
expansions/script/c57300022.lua
expansions/script/c57300022.lua
+4
-87
expansions/script/c57320010.lua
expansions/script/c57320010.lua
+2
-2
expansions/script/c57320013.lua
expansions/script/c57320013.lua
+96
-0
No files found.
expansions/script/c37564006.lua
View file @
28a43eb5
...
@@ -41,7 +41,7 @@ function cm.filter1(c,e,tp)
...
@@ -41,7 +41,7 @@ function cm.filter1(c,e,tp)
return
c
:
GetRank
()
==
4
and
Senya
.
check_set_elem
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
e
:
GetHandler
()),
c
)
>
0
return
c
:
GetRank
()
==
4
and
Senya
.
check_set_elem
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
e
:
GetHandler
()),
c
)
>
0
end
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
and
Senya
.
MustMaterialCheck
(
e
:
GetHandler
(),
tp
,
EFFECT_MUST_BE_XMATERIAL
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
cm
.
matfilter
(
c
)
function
cm
.
matfilter
(
c
)
...
@@ -49,7 +49,7 @@ function cm.matfilter(c)
...
@@ -49,7 +49,7 @@ function cm.matfilter(c)
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
()
local
tc
=
e
:
GetHandler
()
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsControler
(
1
-
tp
)
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsControler
(
1
-
tp
)
or
tc
:
IsImmuneToEffect
(
e
)
or
not
Senya
.
MustMaterialCheck
(
e
:
GetHandler
(),
tp
,
EFFECT_MUST_BE_XMATERIAL
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
sc
=
g
:
GetFirst
()
local
sc
=
g
:
GetFirst
()
...
...
expansions/script/c37564010.lua
View file @
28a43eb5
...
@@ -27,7 +27,7 @@ function cm.filter(c,e,tp)
...
@@ -27,7 +27,7 @@ function cm.filter(c,e,tp)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
rk
,
c
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
rk
,
c
)
end
end
function
cm
.
spfilter
(
c
,
e
,
tp
,
rk
,
tc
)
function
cm
.
spfilter
(
c
,
e
,
tp
,
rk
,
tc
)
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
GetRank
()
==
rk
+
1
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Senya
.
check_set_elem
(
c
)
and
tc
:
IsCanBeXyzMaterial
(
c
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
tc
),
c
)
>
0
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
GetRank
()
==
rk
+
1
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Senya
.
check_set_elem
(
c
)
and
tc
:
IsCanBeXyzMaterial
(
c
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
tc
,
c
)
>
0
and
Senya
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
end
end
function
cm
.
chkfilter
(
c
,
tc
)
function
cm
.
chkfilter
(
c
,
tc
)
local
rk
=
tc
:
GetRank
()
local
rk
=
tc
:
GetRank
()
...
...
expansions/script/c37564013.lua
View file @
28a43eb5
...
@@ -165,12 +165,12 @@ function cm.fffilter(c,e,tp)
...
@@ -165,12 +165,12 @@ function cm.fffilter(c,e,tp)
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
e
:
GetHandler
(),
c
)
>
0
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
e
:
GetHandler
(),
c
)
>
0
end
end
function
cm
.
spptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
spptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
fffilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
fffilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
and
Senya
.
MustMaterialCheck
(
e
:
GetHandler
(),
tp
,
EFFECT_MUST_BE_XMATERIAL
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
cm
.
sppop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
sppop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsControler
(
1
-
tp
)
or
c
:
IsImmuneToEffect
(
e
)
then
return
end
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsControler
(
1
-
tp
)
or
c
:
IsImmuneToEffect
(
e
)
or
not
Senya
.
MustMaterialCheck
(
e
:
GetHandler
(),
tp
,
EFFECT_MUST_BE_XMATERIAL
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
fffilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
fffilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
sc
=
g
:
GetFirst
()
local
sc
=
g
:
GetFirst
()
...
...
expansions/script/c37564021.lua
View file @
28a43eb5
...
@@ -65,7 +65,7 @@ end
...
@@ -65,7 +65,7 @@ end
function
cm
.
rmcon
(
e
,
c
,
og
)
function
cm
.
rmcon
(
e
,
c
,
og
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
and
c
:
IsFaceup
()
and
not
c
:
IsDisabled
()
and
c
:
GetOriginalCode
()
==
m
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
and
c
:
IsFaceup
()
and
not
c
:
IsDisabled
()
and
c
:
GetOriginalCode
()
==
m
and
Senya
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
end
end
function
cm
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
sg
,
og
)
function
cm
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
sg
,
og
)
Duel
.
Hint
(
HINT_CARD
,
0
,
e
:
GetHandler
():
GetOriginalCode
())
Duel
.
Hint
(
HINT_CARD
,
0
,
e
:
GetHandler
():
GetOriginalCode
())
...
...
expansions/script/c37564042.lua
View file @
28a43eb5
...
@@ -14,7 +14,7 @@ function cm.initial_effect(c)
...
@@ -14,7 +14,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
cm
.
filter1
(
c
,
e
,
tp
)
function
cm
.
filter1
(
c
,
e
,
tp
)
return
Senya
.
check_set_elem
(
c
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
Senya
.
check_set_elem
(
c
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Senya
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
,
c
:
GetRank
()
+
1
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
,
c
:
GetRank
()
+
1
)
end
end
function
cm
.
filter2
(
c
,
e
,
tp
,
mc
,
rk
)
function
cm
.
filter2
(
c
,
e
,
tp
,
mc
,
rk
)
...
...
expansions/script/c37564055.lua
View file @
28a43eb5
...
@@ -118,6 +118,10 @@ end
...
@@ -118,6 +118,10 @@ end
function
cm
.
goal
(
g
,
tp
,
lv
,
syncard
,
tuc
)
function
cm
.
goal
(
g
,
tp
,
lv
,
syncard
,
tuc
)
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
syncard
)
<=
0
then
return
false
end
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
syncard
)
<=
0
then
return
false
end
if
tuc
:
IsHasEffect
(
EFFECT_HAND_SYNCHRO
)
and
g
:
IsExists
(
Card
.
IsLocation
,
2
,
tuc
,
LOCATION_HAND
)
then
return
false
end
if
tuc
:
IsHasEffect
(
EFFECT_HAND_SYNCHRO
)
and
g
:
IsExists
(
Card
.
IsLocation
,
2
,
tuc
,
LOCATION_HAND
)
then
return
false
end
local
pe
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_SMATERIAL
)}
for
_
,
te
in
ipairs
(
pe
)
do
if
not
g
:
IsContains
(
te
:
GetHandler
())
then
return
false
end
end
local
ct
=
g
:
GetCount
()
local
ct
=
g
:
GetCount
()
return
g
:
CheckWithSumEqual
(
cm
.
val
,
lv
,
ct
,
ct
,
syncard
)
return
g
:
CheckWithSumEqual
(
cm
.
val
,
lv
,
ct
,
ct
,
syncard
)
end
end
...
@@ -139,13 +143,10 @@ function cm.syncon(e,c,tuner,mg)
...
@@ -139,13 +143,10 @@ function cm.syncon(e,c,tuner,mg)
g2
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
)
g2
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
)
g3
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter2
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
LOCATION_MZONE
,
nil
,
c
)
g3
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter2
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
LOCATION_MZONE
,
nil
,
c
)
end
end
local
pe
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_SMATERIAL
)
local
lv
=
c
:
GetLevel
()
local
lv
=
c
:
GetLevel
()
local
sg
=
nil
local
sg
=
nil
if
tuner
then
if
tuner
then
return
cm
.
matfilter1
(
c
,
tp
)
and
cm
.
synfilter
(
tuner
,
c
,
lv
,
g2
,
g3
,
minc
,
maxc
,
tp
)
return
cm
.
matfilter1
(
c
,
tp
)
and
cm
.
synfilter
(
tuner
,
c
,
lv
,
g2
,
g3
,
minc
,
maxc
,
tp
)
elseif
pe
then
return
cm
.
matfilter1
(
pe
:
GetOwner
(),
tp
)
and
cm
.
synfilter
(
pe
:
GetOwner
(),
c
,
lv
,
g2
,
g3
,
minc
,
maxc
,
tp
)
else
else
return
g1
:
IsExists
(
cm
.
synfilter
,
1
,
nil
,
c
,
lv
,
g2
,
g3
,
minc
,
maxc
,
tp
)
return
g1
:
IsExists
(
cm
.
synfilter
,
1
,
nil
,
c
,
lv
,
g2
,
g3
,
minc
,
maxc
,
tp
)
end
end
...
@@ -165,20 +166,14 @@ function cm.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
...
@@ -165,20 +166,14 @@ function cm.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg)
g2
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
)
g2
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
)
g3
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter2
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
LOCATION_MZONE
,
nil
,
c
)
g3
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter2
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
LOCATION_MZONE
,
nil
,
c
)
end
end
local
pe
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_SMATERIAL
)
local
lv
=
c
:
GetLevel
()
local
lv
=
c
:
GetLevel
()
local
tuc
=
nil
local
tuc
=
nil
if
tuner
then
if
tuner
then
tuner
=
tuc
tuner
=
tuc
else
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
if
not
pe
then
local
t1
=
g1
:
FilterSelect
(
tp
,
cm
.
synfilter
,
1
,
1
,
nil
,
c
,
lv
,
g2
,
g3
,
minc
,
maxc
,
tp
)
local
t1
=
g1
:
FilterSelect
(
tp
,
cm
.
synfilter
,
1
,
1
,
nil
,
c
,
lv
,
g2
,
g3
,
minc
,
maxc
,
tp
)
tuc
=
t1
:
GetFirst
()
tuc
=
t1
:
GetFirst
()
else
tuc
=
pe
:
GetOwner
()
Group
.
FromCards
(
tuc
):
Select
(
tp
,
1
,
1
,
nil
)
end
end
end
tuc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
tuc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
tsg
=
tuc
:
IsHasEffect
(
EFFECT_HAND_SYNCHRO
)
and
g3
or
g2
local
tsg
=
tuc
:
IsHasEffect
(
EFFECT_HAND_SYNCHRO
)
and
g3
or
g2
...
...
expansions/script/c37564211.lua
View file @
28a43eb5
...
@@ -28,7 +28,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -28,7 +28,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if
g
:
GetCount
()
==
0
then
return
end
if
g
:
GetCount
()
==
0
then
return
end
local
gc
=
g
:
RandomSelect
(
tp
,
1
):
GetFirst
()
local
gc
=
g
:
RandomSelect
(
tp
,
1
):
GetFirst
()
Duel
.
ConfirmCards
(
tp
,
gc
)
Duel
.
ConfirmCards
(
tp
,
gc
)
if
gc
:
IsType
(
TYPE_XYZ
)
and
gc
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
e
:
GetHandler
()),
gc
)
>
0
then
if
gc
:
IsType
(
TYPE_XYZ
)
and
gc
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
e
:
GetHandler
()),
gc
)
>
0
and
Senya
.
MustMaterialCheck
(
e
:
GetHandler
(),
tp
,
EFFECT_MUST_BE_XMATERIAL
)
then
local
mg
=
tc
:
GetOverlayGroup
()
local
mg
=
tc
:
GetOverlayGroup
()
if
mg
:
GetCount
()
~=
0
then
if
mg
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
gc
,
mg
)
Duel
.
Overlay
(
gc
,
mg
)
...
...
expansions/script/c37564412.lua
View file @
28a43eb5
...
@@ -20,7 +20,7 @@ function cm.filter1(c,e,tp)
...
@@ -20,7 +20,7 @@ function cm.filter1(c,e,tp)
return
c
:
GetRank
()
==
3
and
Senya
.
check_set_prism
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
e
:
GetHandler
()),
c
)
>
0
return
c
:
GetRank
()
==
3
and
Senya
.
check_set_prism
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
e
:
GetHandler
()),
c
)
>
0
end
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
and
Senya
.
MustMaterialCheck
(
e
:
GetHandler
(),
tp
,
EFFECT_MUST_BE_XMATERIAL
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
cm
.
matfilter
(
c
)
function
cm
.
matfilter
(
c
)
...
@@ -28,7 +28,7 @@ function cm.matfilter(c)
...
@@ -28,7 +28,7 @@ function cm.matfilter(c)
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
()
local
tc
=
e
:
GetHandler
()
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsControler
(
1
-
tp
)
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsControler
(
1
-
tp
)
or
tc
:
IsImmuneToEffect
(
e
)
or
not
Senya
.
MustMaterialCheck
(
e
:
GetHandler
(),
tp
,
EFFECT_MUST_BE_XMATERIAL
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
sc
=
g
:
GetFirst
()
local
sc
=
g
:
GetFirst
()
...
...
expansions/script/c37564558.lua
View file @
28a43eb5
--
Secret Scarlet
--
Nanahira & Senne
local
m
=
37564558
local
m
=
37564558
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
...
...
expansions/script/c37564564.lua
0 → 100644
View file @
28a43eb5
--Nanahira & Senne
local
m
=
37564564
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
function
cm
.
initial_effect
(
c
)
Senya
.
Nanahira
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsCode
,
37564765
),
3
,
3
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
37564765
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCondition
(
Senya
.
SummonTypeCondition
(
SUMMON_TYPE_LINK
))
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetHintTiming
(
0
,
0x1c0
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
function
(
e
)
return
e
:
GetHandler
():
GetLinkedGroup
():
IsExists
(
function
(
c
)
return
c
:
GetOriginalCode
()
==
37564765
end
,
1
,
nil
)
end
)
e1
:
SetTarget
(
cm
.
target1
)
e1
:
SetOperation
(
cm
.
operation1
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
GetOriginalCode
()
==
37564765
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
+
LOCATION_GRAVE
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
cm
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
and
aux
.
disfilter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
disfilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
disfilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
end
function
cm
.
operation1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
((
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
())
or
tc
:
IsType
(
TYPE_TRAPMONSTER
))
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e3
)
end
end
end
\ No newline at end of file
expansions/script/c37564765.lua
View file @
28a43eb5
...
@@ -283,6 +283,17 @@ function cm.CheckFieldFilter(g,tp,c,f,...)
...
@@ -283,6 +283,17 @@ function cm.CheckFieldFilter(g,tp,c,f,...)
return
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
and
(
not
f
or
f
(
g
,
...
))
return
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
and
(
not
f
or
f
(
g
,
...
))
end
end
end
end
function
cm
.
MustMaterialCheck
(
v
,
tp
,
code
)
if
not
v
then
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
code
)
end
local
t
=
cm
.
GetValueType
(
v
)
if
v
~=
"Card"
and
v
~=
"Group"
then
error
(
"Parameter 1 must be \"
Card
\
" or \"
Group
\
"."
,
2
)
end
local
ce
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
code
)}
for
_
,
te
in
ipairs
(
te
)
do
if
(
cm
.
GetValueType
(
v
)
==
"Card"
and
v
~=
te
:
GetHandler
())
or
(
cm
.
GetValueType
(
v
)
==
"Group"
and
not
v
:
IsExists
(
te
:
GetHandler
()))
then
return
false
end
end
return
true
end
--xyz summon of prim
--xyz summon of prim
function
cm
.
AddXyzProcedureRank
(
c
,
rk
,
f
,
minct
,
maxct
,
xm
,
...
)
function
cm
.
AddXyzProcedureRank
(
c
,
rk
,
f
,
minct
,
maxct
,
xm
,
...
)
local
ext_params
=
{
...
}
local
ext_params
=
{
...
}
...
...
expansions/script/c37564832.lua
View file @
28a43eb5
...
@@ -16,7 +16,7 @@ function cm.initial_effect(c)
...
@@ -16,7 +16,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
cm
.
tgfilter0
(
c
,
e
,
tp
)
function
cm
.
tgfilter0
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
Senya
.
check_set_3L
(
c
)
return
c
:
IsFaceup
()
and
Senya
.
check_set_3L
(
c
)
and
Senya
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_FMATERIAL
)
and
c
:
IsCanBeFusionMaterial
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
)
and
c
:
IsCanBeFusionMaterial
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
)
end
end
function
cm
.
tgfilter
(
c
,
e
,
tp
)
function
cm
.
tgfilter
(
c
,
e
,
tp
)
...
...
expansions/script/c37564844.lua
View file @
28a43eb5
...
@@ -83,14 +83,14 @@ function cm.sfilter(c,e,tp)
...
@@ -83,14 +83,14 @@ function cm.sfilter(c,e,tp)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
()
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
e
:
GetHandler
(),
c
)
>
0
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
()
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
e
:
GetHandler
(),
c
)
>
0
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
sfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
sfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_FMATERIAL
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
sfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
sfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
not
tc
then
return
end
if
not
tc
or
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_FMATERIAL
)
then
return
end
tc
:
SetMaterial
(
nil
)
tc
:
SetMaterial
(
nil
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
tc
:
CompleteProcedure
()
...
...
expansions/script/c37564850.lua
View file @
28a43eb5
...
@@ -5,16 +5,7 @@ xpcall(function() require("expansions/script/c37564765") end,function() require(
...
@@ -5,16 +5,7 @@ xpcall(function() require("expansions/script/c37564765") end,function() require(
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
Senya
.
AddSummonMusic
(
c
,
m
*
16
+
2
,
SUMMON_TYPE_LINK
)
Senya
.
AddSummonMusic
(
c
,
m
*
16
+
2
,
SUMMON_TYPE_LINK
)
--Senya.CommonEffect_3L(c,m)
aux
.
AddLinkProcedure
(
c
,
Senya
.
check_set_3L
,
2
,
2
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e0
:
SetRange
(
LOCATION_EXTRA
)
e0
:
SetCondition
(
cm
.
linkcon
)
e0
:
SetOperation
(
cm
.
linkop
)
e0
:
SetValue
(
SUMMON_TYPE_LINK
)
c
:
RegisterEffect
(
e0
)
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e0
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
...
@@ -26,6 +17,7 @@ function cm.initial_effect(c)
...
@@ -26,6 +17,7 @@ function cm.initial_effect(c)
e0
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e0
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
code
=
c
:
GetFlagEffectLabel
(
m
)
local
code
=
c
:
GetFlagEffectLabel
(
m
)
c
:
ResetFlagEffect
(
m
)
Senya
.
GainEffect_3L
(
c
,
code
)
Senya
.
GainEffect_3L
(
c
,
code
)
end
)
end
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
...
@@ -39,31 +31,15 @@ function cm.effect_operation_3L(c)
...
@@ -39,31 +31,15 @@ function cm.effect_operation_3L(c)
c
:
RegisterEffect
(
e1
,
true
)
c
:
RegisterEffect
(
e1
,
true
)
return
e1
return
e1
end
end
function
cm
.
linkfilter1
(
c
,
tp
,
ec
)
function
cm
.
SetMaterial
(
c
,
g
)
return
c
:
IsFaceup
()
and
Senya
.
check_set_3L
(
c
)
and
c
:
IsCanBeLinkMaterial
(
ec
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
linkfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
tp
,
c
,
ec
)
local
efg
=
g
:
Filter
(
function
(
c
)
return
c
.
effect_operation_3L
end
,
nil
)
end
function
cm
.
linkfilter2
(
c
,
tp
,
lc
,
ec
)
return
c
:
IsFaceup
()
and
Senya
.
check_set_3L
(
c
)
and
c
:
IsCanBeLinkMaterial
(
ec
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
c
,
lc
),
ec
)
>
0
end
function
cm
.
linkcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
tp
=
c
:
GetControler
()
return
Duel
.
IsExistingMatchingCard
(
cm
.
linkfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
,
c
)
end
function
cm
.
linkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
linkfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
,
c
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
linkfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
g1
:
GetFirst
(),
tp
,
g1
:
GetFirst
(),
c
)
g1
:
Merge
(
g2
)
local
efg
=
g1
:
Filter
(
function
(
c
)
return
c
.
effect_operation_3L
end
,
nil
)
if
efg
:
GetCount
()
>
0
then
if
efg
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
m
*
16
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
m
*
16
)
local
tg
=
efg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tg
=
efg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
local
tc
=
tg
:
GetFirst
()
Duel
.
HintSelection
(
tg
)
Duel
.
HintSelection
(
tg
)
e
:
GetHandler
()
:
RegisterFlagEffect
(
m
,
0xfe1000
,
0
,
1
,
tc
:
GetOriginalCode
())
c
:
RegisterFlagEffect
(
m
,
0xfe1000
,
0
,
1
,
tc
:
GetOriginalCode
())
end
end
c
:
SetMaterial
(
g1
)
return
Card
.
SetMaterial
(
c
,
g
)
Duel
.
SendtoGrave
(
g1
,
REASON_MATERIAL
+
REASON_LINK
)
end
end
\ No newline at end of file
expansions/script/c37564919.lua
View file @
28a43eb5
...
@@ -6,15 +6,7 @@ cm.Senya_name_with_sayuri=true
...
@@ -6,15 +6,7 @@ cm.Senya_name_with_sayuri=true
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
Senya
.
AddSummonMusic
(
c
,
m
*
16
,
SUMMON_TYPE_LINK
)
Senya
.
AddSummonMusic
(
c
,
m
*
16
,
SUMMON_TYPE_LINK
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
local
e0
=
Effect
.
CreateEffect
(
c
)
aux
.
AddLinkProcedure
(
c
,
cm
.
mfilter
,
3
,
3
,
cm
.
lcheck
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e0
:
SetRange
(
LOCATION_EXTRA
)
e0
:
SetCondition
(
cm
.
linkcon
)
e0
:
SetOperation
(
cm
.
linkop
)
e0
:
SetValue
(
SUMMON_TYPE_LINK
)
c
:
RegisterEffect
(
e0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
37564765
,
0
))
e3
:
SetDescription
(
aux
.
Stringid
(
37564765
,
0
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
...
@@ -27,28 +19,15 @@ function cm.initial_effect(c)
...
@@ -27,28 +19,15 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
Senya
.
NegateEffectModule
(
c
,
1
,
nil
,
cm
.
cost
)
Senya
.
NegateEffectModule
(
c
,
1
,
nil
,
cm
.
cost
)
end
end
function
cm
.
mfilter
(
c
,
lc
)
function
cm
.
mfilter
(
c
)
return
c
:
IsFaceup
()
and
Senya
.
check_set_sayuri
(
c
)
and
c
:
IsLinkType
(
TYPE_RITUAL
)
and
c
:
IsCanBeLinkMaterial
(
lc
)
return
c
:
IsFaceup
()
and
Senya
.
check_set_sayuri
(
c
)
and
c
:
IsLinkType
(
TYPE_RITUAL
)
end
end
function
cm
.
lcheck
(
g
,
tp
,
lc
)
function
cm
.
lcheck
(
g
)
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
lc
)
>
0
and
not
g
:
IsExists
(
cm
.
lfilter
,
1
,
nil
,
g
)
return
not
g
:
IsExists
(
cm
.
lfilter
,
1
,
nil
,
g
)
end
end
function
cm
.
lfilter
(
c
,
g
)
function
cm
.
lfilter
(
c
,
g
)
return
g
:
IsExists
(
Card
.
IsCode
,
1
,
c
,
c
:
GetCode
())
return
g
:
IsExists
(
Card
.
IsCode
,
1
,
c
,
c
:
GetCode
())
end
end
function
cm
.
linkcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
tp
=
c
:
GetControler
()
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
g
:
GetCount
()
>=
3
and
Senya
.
CheckGroup
(
g
,
cm
.
lcheck
,
nil
,
3
,
3
,
tp
,
c
)
end
function
cm
.
linkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g1
=
Senya
.
SelectGroup
(
tp
,
HINTMSG_LMATERIAL
,
g
,
cm
.
lcheck
,
nil
,
3
,
3
,
tp
,
c
)
c
:
SetMaterial
(
g1
)
Duel
.
SendtoGrave
(
g1
,
REASON_MATERIAL
+
REASON_LINK
)
end
function
cm
.
cfilter
(
c
,
g
)
function
cm
.
cfilter
(
c
,
g
)
return
g
:
IsContains
(
c
)
return
g
:
IsContains
(
c
)
end
end
...
...
expansions/script/c57300000.lua
View file @
28a43eb5
miyuki
=
miyuki
or
{}
miyuki
=
miyuki
or
{}
local
cm
=
miyuki
local
cm
=
miyuki
--updated overlay
--updated overlay
function
cm
.
overlayc
ard
(
c
,
tc
,
xm
,
nchk
)
function
cm
.
OverlayC
ard
(
c
,
tc
,
xm
,
nchk
)
if
not
nchk
and
(
not
c
:
IsLocation
(
LOCATION_MZONE
)
or
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_XYZ
)
or
tc
:
IsType
(
TYPE_TOKEN
))
then
return
end
if
not
nchk
and
(
not
c
:
IsLocation
(
LOCATION_MZONE
)
or
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_XYZ
)
or
tc
:
IsType
(
TYPE_TOKEN
))
then
return
end
if
tc
:
IsStatus
(
STATUS_LEAVE_CONFIRMED
)
then
if
tc
:
IsStatus
(
STATUS_LEAVE_CONFIRMED
)
then
tc
:
CancelToGrave
()
tc
:
CancelToGrave
()
...
@@ -16,12 +16,12 @@ function cm.overlaycard(c,tc,xm,nchk)
...
@@ -16,12 +16,12 @@ function cm.overlaycard(c,tc,xm,nchk)
end
end
Duel
.
Overlay
(
c
,
tc
)
Duel
.
Overlay
(
c
,
tc
)
end
end
function
cm
.
overlayf
ilter
(
c
,
nchk
)
function
cm
.
OverlayF
ilter
(
c
,
nchk
)
return
nchk
or
not
c
:
IsType
(
TYPE_TOKEN
)
return
nchk
or
not
c
:
IsType
(
TYPE_TOKEN
)
end
end
function
cm
.
overlayg
roup
(
c
,
g
,
xm
,
nchk
)
function
cm
.
OverlayG
roup
(
c
,
g
,
xm
,
nchk
)
if
not
nchk
and
(
not
c
:
IsLocation
(
LOCATION_MZONE
)
or
c
:
IsFacedown
()
or
g
:
GetCount
()
<=
0
or
not
c
:
IsType
(
TYPE_XYZ
))
then
return
end
if
not
nchk
and
(
not
c
:
IsLocation
(
LOCATION_MZONE
)
or
c
:
IsFacedown
()
or
g
:
GetCount
()
<=
0
or
not
c
:
IsType
(
TYPE_XYZ
))
then
return
end
local
tg
=
g
:
Filter
(
cm
.
overlayf
ilter
,
nil
,
nchk
)
local
tg
=
g
:
Filter
(
cm
.
OverlayF
ilter
,
nil
,
nchk
)
if
tg
:
GetCount
()
==
0
then
return
end
if
tg
:
GetCount
()
==
0
then
return
end
local
og
=
Group
.
CreateGroup
()
local
og
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
tg
)
do
for
tc
in
aux
.
Next
(
tg
)
do
...
@@ -40,85 +40,44 @@ function cm.overlaygroup(c,g,xm,nchk)
...
@@ -40,85 +40,44 @@ function cm.overlaygroup(c,g,xm,nchk)
Duel
.
Overlay
(
c
,
tg
)
Duel
.
Overlay
(
c
,
tg
)
end
end
--xyz summon of prim
--xyz summon of prim
function
cm
.
rxyz1
(
c
,
rk
,
f
,
minct
,
maxct
,
xm
,
...
)
local
ext_params
=
{
...
}
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
cm
.
xyzcon1
(
rk
,
f
,
minct
,
maxct
,
ext_params
))
e1
:
SetOperation
(
cm
.
xyzop1
(
rk
,
f
,
minct
,
maxct
,
xm
,
ext_params
))
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
return
e1
end
function
cm
.
mfilter
(
c
,
xyzc
,
rk
,
f
,
ext_params
)
return
c
:
IsFaceup
()
and
c
:
IsXyzType
(
TYPE_XYZ
)
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
(
not
rk
or
c
:
GetRank
()
==
rk
)
and
(
not
f
or
f
(
c
,
xyzc
,
table.unpack
(
ext_params
)))
end
function
cm
.
xyzfilter1
(
c
,
tp
,
g
,
xyzc
,
minc
,
maxc
)
local
tg
=
g
:
Filter
(
cm
.
xyzfilter2
,
c
,
c
:
GetRank
())
return
cm
.
CheckGroup
(
tg
,
cm
.
CheckFieldFilter
,
Group
.
FromCards
(
c
),
minc
,
maxc
,
tp
,
xyzc
)
end
function
cm
.
xyzfilter2
(
c
,
rk
)
return
c
:
GetRank
()
==
rk
end
function
cm
.
CheckFieldFilter
(
g
,
tp
,
c
,
f
,
...
)
function
cm
.
CheckFieldFilter
(
g
,
tp
,
c
,
f
,
...
)
if
c
:
IsLocation
(
LOCATION_EXTRA
)
then
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
c
)
>
0
and
(
not
f
or
f
(
g
,
...
))
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
c
)
>
0
and
(
not
f
or
f
(
g
,
...
))
end
function
cm
.
xyzcon1
(
rk
,
f
,
minct
,
maxct
,
ext_params
)
return
function
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
tp
=
c
:
GetControler
()
local
minc
=
minct
or
2
local
maxc
=
maxct
or
minct
or
63
if
min
then
minc
=
math.max
(
minc
,
min
)
maxc
=
math.min
(
maxc
,
max
)
end
local
mg
=
nil
if
og
then
mg
=
og
:
Filter
(
cm
.
mfilter
,
nil
,
c
,
rk
,
f
,
ext_params
)
else
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
rk
,
f
,
ext_params
)
return
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
and
(
not
f
or
f
(
g
,
...
)
)
end
end
return
maxc
>=
minc
and
mg
:
IsExists
(
cm
.
xyzfilter1
,
1
,
nil
,
tp
,
mg
,
c
,
minc
,
maxc
)
end
end
function
cm
.
AddXyzProcedureRank
(
c
,
rk
,
f
,
minct
,
maxct
,
xm
,
...
)
local
ext_params
=
{
...
}
return
cm
.
AddXyzProcedureCustom
(
c
,
cm
.
XyzProcedureRankFilter
(
rk
,
f
,
ext_params
),
cm
.
XyzProcedureRankCheck
,
minct
,
maxct
,
xm
)
end
end
function
cm
.
xyzop1
(
rk
,
f
,
minct
,
maxct
,
xm
,
ext_params
)
function
cm
.
XyzProcedureRankFilter
(
rk
,
f
,
ext_params
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
return
function
(
c
,
xyzc
)
local
g
=
nil
return
c
:
IsXyzType
(
TYPE_XYZ
)
and
(
not
rk
or
c
:
GetRank
()
==
rk
)
and
(
not
f
or
f
(
c
,
xyzc
,
table.unpack
(
ext_params
)))
if
og
and
not
min
then
g
=
og
else
local
mg
=
nil
if
og
then
mg
=
og
:
Filter
(
cm
.
mfilter
,
nil
,
c
,
rk
,
f
,
ext_params
)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
rk
,
f
,
ext_params
)
end
local
minc
=
minct
or
2
local
maxc
=
maxct
or
minct
or
63
if
min
then
minc
=
math.max
(
minc
,
min
)
maxc
=
math.min
(
maxc
,
max
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
g1
=
mg
:
FilterSelect
(
tp
,
cm
.
xyzfilter1
,
1
,
1
,
nil
,
tp
,
mg
,
c
,
minc
,
maxc
)
local
tg
=
mg
:
Filter
(
cm
.
xyzfilter2
,
g1
:
GetFirst
(),
g1
:
GetFirst
():
GetRank
())
g
=
cm
.
SelectGroup
(
tp
,
HINTMSG_XMATERIAL
,
tg
,
cm
.
CheckFieldFilter
,
g1
,
minc
,
maxc
,
tp
,
c
)
end
c
:
SetMaterial
(
g
)
cm
.
overlaygroup
(
c
,
g
,
xm
,
true
)
end
end
end
end
function
cm
.
XyzProcedureRankCheck
(
g
,
xyzc
)
return
g
:
GetClassCount
(
Card
.
GetRank
)
==
1
end
function
cm
.
rxyz2
(
c
,
rk
,
f
,
ct
,
xm
,
...
)
function
cm
.
rxyz2
(
c
,
rk
,
f
,
ct
,
xm
,
...
)
return
cm
.
rxyz1
(
c
,
rk
,
f
,
ct
,
ct
,
xm
,
...
)
return
cm
.
AddXyzProcedureRank
(
c
,
rk
,
f
,
ct
,
ct
,
xm
,
...
)
end
function
cm
.
XyzProcedureCustomTuneMagicianFilter
(
c
,
te
)
local
f
=
te
:
GetValue
()
return
f
(
te
,
c
)
end
function
cm
.
XyzProcedureCustomTuneMagicianCheck
(
c
,
g
)
local
eset
=
{
c
:
IsHasEffect
(
EFFECT_TUNE_MAGICIAN_X
)}
for
_
,
te
in
ipairs
(
eset
)
do
if
g
:
IsExists
(
cm
.
XyzProcedureCustomTuneMagicianFilter
,
1
,
c
,
te
)
then
return
true
end
end
return
false
end
end
function
cm
.
rxyz3
(
c
,
func
,
gf
,
minc
,
maxc
,
xm
,
...
)
function
cm
.
XyzProcedureCustomCheck
(
g
,
xyzc
,
tp
,
gf
)
if
g
:
IsExists
(
cm
.
XyzProcedureCustomTuneMagicianCheck
,
1
,
nil
,
g
)
then
return
false
end
return
not
gf
or
gf
(
g
,
xyzc
,
tp
)
end
function
cm
.
AddXyzProcedureCustom
(
c
,
func
,
gf
,
minc
,
maxc
,
xm
,
...
)
local
ext_params
=
{
...
}
local
ext_params
=
{
...
}
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
local
maxc
=
maxc
or
minc
local
maxc
=
maxc
or
minc
...
@@ -127,17 +86,18 @@ function cm.rxyz3(c,func,gf,minc,maxc,xm,...)
...
@@ -127,17 +86,18 @@ function cm.rxyz3(c,func,gf,minc,maxc,xm,...)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
cm
.
rxyz3Condition
(
func
,
gf
,
minc
,
maxc
,
ext_params
))
e1
:
SetCondition
(
cm
.
XyzProcedureCustomCondition
(
func
,
gf
,
minc
,
maxc
,
ext_params
))
e1
:
SetOperation
(
cm
.
rxyz3Operation
(
func
,
gf
,
minc
,
maxc
,
xm
,
ext_params
))
e1
:
SetTarget
(
cm
.
XyzProcedureCustomTarget
(
func
,
gf
,
minc
,
maxc
,
ext_params
))
e1
:
SetOperation
(
cm
.
XyzProcedureCustomOperation
(
xm
))
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
return
e1
return
e1
end
end
function
cm
.
rxyz3
Filter
(
c
,
xyzcard
,
func
,
ext_params
)
function
cm
.
XyzProcedureCustom
Filter
(
c
,
xyzcard
,
func
,
ext_params
)
if
c
:
IsLocation
(
LOCATION_ONFIELD
+
LOCATION_REMOVED
)
and
c
:
IsFacedown
()
then
return
false
end
if
c
:
IsLocation
(
LOCATION_ONFIELD
+
LOCATION_REMOVED
)
and
c
:
IsFacedown
()
then
return
false
end
return
c
:
IsCanBeXyzMaterial
(
xyzcard
)
and
(
not
func
or
func
(
c
,
xyzcard
,
table.unpack
(
ext_params
)))
return
c
:
IsCanBeXyzMaterial
(
xyzcard
)
and
(
not
func
or
func
(
c
,
xyzcard
,
table.unpack
(
ext_params
)))
end
end
function
cm
.
rxyz3
Condition
(
func
,
gf
,
minct
,
maxct
,
ext_params
)
function
cm
.
XyzProcedureCustom
Condition
(
func
,
gf
,
minct
,
maxct
,
ext_params
)
return
function
(
e
,
c
,
og
,
min
,
max
)
return
function
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
...
@@ -150,24 +110,31 @@ function cm.rxyz3Condition(func,gf,minct,maxct,ext_params)
...
@@ -150,24 +110,31 @@ function cm.rxyz3Condition(func,gf,minct,maxct,ext_params)
end
end
local
mg
=
nil
local
mg
=
nil
if
og
then
if
og
then
mg
=
og
:
Filter
(
cm
.
rxyz3
Filter
,
nil
,
c
,
func
,
ext_params
)
mg
=
og
:
Filter
(
cm
.
XyzProcedureCustom
Filter
,
nil
,
c
,
func
,
ext_params
)
else
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
rxyz3Filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
func
,
ext_params
)
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzProcedureCustomFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
func
,
ext_params
)
end
local
sg
=
Group
.
CreateGroup
()
local
ce
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)}
for
_
,
te
in
ipairs
(
ce
)
do
local
tc
=
te
:
GetHandler
()
if
not
mg
:
IsContains
(
tc
)
then
return
false
end
sg
:
AddCard
(
tc
)
end
end
return
maxc
>=
minc
and
cm
.
CheckGroup
(
mg
,
cm
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
,
gf
,
c
)
return
maxc
>=
minc
and
cm
.
CheckGroup
(
mg
,
cm
.
CheckFieldFilter
,
sg
,
minc
,
maxc
,
tp
,
c
,
cm
.
XyzProcedureCustomCheck
,
c
,
tp
,
gf
)
end
end
end
end
function
cm
.
rxyz3Operation
(
func
,
gf
,
minct
,
maxct
,
xm
,
ext_params
)
function
cm
.
XyzProcedureCustomTarget
(
func
,
gf
,
minct
,
maxct
,
ext_params
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
hk
,
c
,
og
,
min
,
max
)
local
g
=
nil
local
g
=
nil
if
og
and
not
min
then
if
og
and
not
min
then
g
=
og
g
=
og
else
else
local
mg
=
nil
local
mg
=
nil
if
og
then
if
og
then
mg
=
og
:
Filter
(
cm
.
rxyz3
Filter
,
nil
,
c
,
func
,
ext_params
)
mg
=
og
:
Filter
(
cm
.
XyzProcedureCustom
Filter
,
nil
,
c
,
func
,
ext_params
)
else
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
rxyz3
Filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
func
,
ext_params
)
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzProcedureCustom
Filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
func
,
ext_params
)
end
end
local
minc
=
minct
or
2
local
minc
=
minct
or
2
local
maxc
=
maxct
or
minct
or
63
local
maxc
=
maxct
or
minct
or
63
...
@@ -175,16 +142,54 @@ function cm.rxyz3Operation(func,gf,minct,maxct,xm,ext_params)
...
@@ -175,16 +142,54 @@ function cm.rxyz3Operation(func,gf,minct,maxct,xm,ext_params)
minc
=
math.max
(
minc
,
min
)
minc
=
math.max
(
minc
,
min
)
maxc
=
math.min
(
maxc
,
max
)
maxc
=
math.min
(
maxc
,
max
)
end
end
g
=
cm
.
SelectGroup
(
tp
,
HINTMSG_XMATERIAL
,
mg
,
cm
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
,
gf
,
c
)
local
ce
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)}
for
_
,
te
in
ipairs
(
ce
)
do
local
tc
=
te
:
GetHandler
()
sg
:
AddCard
(
tc
)
end
end
g
=
cm
.
SelectGroupWithCancel
(
tp
,
HINTMSG_XMATERIAL
,
mg
,
cm
.
CheckFieldFilter
,
sg
,
minc
,
maxc
,
tp
,
c
,
cm
.
XyzProcedureCustomCheck
,
c
,
tp
,
gf
)
end
if
g
then
g
:
KeepAlive
()
e
:
SetLabelObject
(
g
)
return
true
else
return
false
end
end
end
function
cm
.
XyzProcedureCustomOperation
(
xm
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
local
g
=
e
:
GetLabelObject
()
c
:
SetMaterial
(
g
)
c
:
SetMaterial
(
g
)
cm
.
overlaygroup
(
c
,
g
,
xm
,
true
)
cm
.
OverlayGroup
(
c
,
g
,
xm
,
true
)
g
:
DeleteGroup
()
end
end
end
end
function
cm
.
AddXyzProcedureClariS
(
c
,
ct
,
rk
)
local
f
=
rk
and
cm
.
ClariSRankFilter
or
cm
.
ClariSRankFilter
cm
.
AddXyzProcedureCustom
(
c
,
f
,
cm
.
ClariSXyzCheck
(
ct
),
1
,
ct
)
end
function
cm
.
ClariSXyzFilter
(
c
,
xyzc
)
return
c
:
IsSetCard
(
0x570
)
and
c
:
IsXyzLevel
(
xyzc
,
2
)
end
function
cm
.
ClariSRankFilter
(
c
,
xyzc
)
return
c
:
IsSetCard
(
0x570
)
and
c
:
IsXyzType
(
TYPE_XYZ
)
and
c
:
GetRank
()
==
2
end
function
cm
.
ClariSXyzValue
(
c
)
local
v
=
1
if
c
:
IsHasEffect
(
57300021
)
then
v
=
v
+
0x20000
end
return
v
end
function
cm
.
ClariSXyzCheck
(
ct
)
return
function
(
g
,
xyzc
)
local
i
=
g
:
GetCount
()
if
not
g
:
CheckWithSumEqual
(
c57300009
.
ClariSXyzValue
,
ct
,
i
,
i
)
then
return
false
end
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
xyzc
)
>
0
end
end
function
cm
.
CheckGroupRecursive
(
c
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
function
cm
.
CheckGroupRecursive
(
c
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
sg
:
AddCard
(
c
)
sg
:
AddCard
(
c
)
local
ct
=
sg
:
GetCount
()
local
ct
=
sg
:
GetCount
()
local
res
=
(
ct
>=
min
and
f
(
sg
,
table.unpack
(
ext_params
)))
local
res
=
(
ct
>=
min
and
ct
<=
max
and
f
(
sg
,
table.unpack
(
ext_params
)))
or
(
ct
<
max
and
g
:
IsExists
(
cm
.
CheckGroupRecursive
,
1
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
))
or
(
ct
<
max
and
g
:
IsExists
(
cm
.
CheckGroupRecursive
,
1
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
))
sg
:
RemoveCard
(
c
)
sg
:
RemoveCard
(
c
)
return
res
return
res
...
@@ -197,10 +202,72 @@ function cm.CheckGroup(g,f,cg,min,max,...)
...
@@ -197,10 +202,72 @@ function cm.CheckGroup(g,f,cg,min,max,...)
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
if
cg
then
sg
:
Merge
(
cg
)
end
if
cg
then
sg
:
Merge
(
cg
)
end
local
ct
=
sg
:
GetCount
()
local
ct
=
sg
:
GetCount
()
if
ct
>=
min
and
ct
<
max
and
f
(
sg
,
...
)
then
return
true
end
if
ct
>=
min
and
ct
<
=
max
and
f
(
sg
,
...
)
then
return
true
end
return
g
:
IsExists
(
cm
.
CheckGroupRecursive
,
1
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
return
g
:
IsExists
(
cm
.
CheckGroupRecursive
,
1
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
end
end
function
cm
.
SelectGroup
(
tp
,
desc
,
g
,
f
,
cg
,
min
,
max
,
...
)
if
Group
.
SelectUnselect
then
function
cm
.
SelectGroup
(
tp
,
desc
,
g
,
f
,
cg
,
min
,
max
,
...
)
local
min
=
min
or
1
local
max
=
max
or
g
:
GetCount
()
local
ext_params
=
{
...
}
local
sg
=
Group
.
CreateGroup
()
local
cg
=
cg
or
Group
.
CreateGroup
()
sg
:
Merge
(
cg
)
local
ct
=
sg
:
GetCount
()
local
ag
=
g
:
Filter
(
cm
.
CheckGroupRecursive
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
while
ct
<
max
and
ag
:
GetCount
()
>
0
do
local
finish
=
(
ct
>=
min
and
ct
<=
max
and
f
(
sg
,
...
))
local
seg
=
sg
:
Clone
()
local
dmin
=
min
-
cg
:
GetCount
()
local
dmax
=
math.min
(
max
-
cg
:
GetCount
(),
g
:
GetCount
())
seg
:
Sub
(
cg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
desc
)
local
tc
=
ag
:
SelectUnselect
(
seg
,
tp
,
finish
,
finish
,
dmin
,
dmax
)
if
not
tc
then
break
end
if
sg
:
IsContains
(
tc
)
then
sg
:
RemoveCard
(
tc
)
else
sg
:
AddCard
(
tc
)
end
ct
=
sg
:
GetCount
()
ag
=
g
:
Filter
(
cm
.
CheckGroupRecursive
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
end
return
sg
end
function
cm
.
SelectGroupWithCancel
(
tp
,
desc
,
g
,
f
,
cg
,
min
,
max
,
...
)
local
min
=
min
or
1
local
max
=
max
or
g
:
GetCount
()
local
ext_params
=
{
...
}
local
sg
=
Group
.
CreateGroup
()
local
cg
=
cg
or
Group
.
CreateGroup
()
sg
:
Merge
(
cg
)
local
ct
=
sg
:
GetCount
()
local
ag
=
g
:
Filter
(
cm
.
CheckGroupRecursive
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
while
ct
<
max
and
ag
:
GetCount
()
>
0
do
local
finish
=
(
ct
>=
min
and
ct
<=
max
and
f
(
sg
,
...
))
local
cancel
=
finish
or
ct
==
0
local
seg
=
sg
:
Clone
()
local
dmin
=
min
-
cg
:
GetCount
()
local
dmax
=
math.min
(
max
-
cg
:
GetCount
(),
g
:
GetCount
())
seg
:
Sub
(
cg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
desc
)
local
tc
=
ag
:
SelectUnselect
(
seg
,
tp
,
finish
,
cancel
,
dmin
,
dmax
)
if
not
tc
then
if
not
finish
then
return
end
break
end
if
sg
:
IsContains
(
tc
)
then
sg
:
RemoveCard
(
tc
)
else
sg
:
AddCard
(
tc
)
end
ct
=
sg
:
GetCount
()
ag
=
g
:
Filter
(
cm
.
CheckGroupRecursive
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
end
return
sg
end
else
function
cm
.
SelectGroup
(
tp
,
desc
,
g
,
f
,
cg
,
min
,
max
,
...
)
local
min
=
min
or
1
local
min
=
min
or
1
local
max
=
max
or
g
:
GetCount
()
local
max
=
max
or
g
:
GetCount
()
local
ext_params
=
{
...
}
local
ext_params
=
{
...
}
...
@@ -212,10 +279,10 @@ function cm.SelectGroup(tp,desc,g,f,cg,min,max,...)
...
@@ -212,10 +279,10 @@ function cm.SelectGroup(tp,desc,g,f,cg,min,max,...)
local
ag
=
g
:
Filter
(
cm
.
CheckGroupRecursive
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
ag
=
g
:
Filter
(
cm
.
CheckGroupRecursive
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
while
ct
<
max
and
ag
:
GetCount
()
>
0
do
while
ct
<
max
and
ag
:
GetCount
()
>
0
do
local
minc
=
1
local
minc
=
1
local
finish
=
(
ct
>=
min
and
f
(
sg
,
...
))
local
finish
=
(
ct
>=
min
and
ct
<=
max
and
f
(
sg
,
...
))
if
finish
then
if
finish
then
minc
=
0
minc
=
0
if
not
Duel
.
SelectYesNo
(
tp
,
210
)
then
break
end
if
cm
.
master_rule_3_flag
and
not
Duel
.
SelectYesNo
(
tp
,
210
)
then
break
end
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
desc
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
desc
)
local
tg
=
ag
:
Select
(
tp
,
minc
,
1
,
nil
)
local
tg
=
ag
:
Select
(
tp
,
minc
,
1
,
nil
)
...
@@ -225,6 +292,10 @@ function cm.SelectGroup(tp,desc,g,f,cg,min,max,...)
...
@@ -225,6 +292,10 @@ function cm.SelectGroup(tp,desc,g,f,cg,min,max,...)
ag
=
g
:
Filter
(
cm
.
CheckGroupRecursive
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
ag
=
g
:
Filter
(
cm
.
CheckGroupRecursive
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
end
end
return
sg
return
sg
end
function
cm
.
SelectGroupWithCancel
(
tp
,
desc
,
g
,
f
,
cg
,
min
,
max
,
...
)
return
cm
.
SelectGroup
(
tp
,
desc
,
g
,
f
,
cg
,
min
,
max
,
...
)
end
end
end
function
cm
.
exgoal
(
g
,
tp
,
fc
)
function
cm
.
exgoal
(
g
,
tp
,
fc
)
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
fc
)
>
0
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
fc
)
>
0
...
...
expansions/script/c57300010.lua
View file @
28a43eb5
--库拉丽丝-怨念
--库拉丽丝-怨念
function
c57300010
.
initial_effect
(
c
)
function
c57300010
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
local
e1
=
Effect
.
CreateEffect
(
c
)
miyuki
.
AddXyzProcedureClariS
(
c
,
2
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetLabel
(
2
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCondition
(
c57300010
.
xyzcon
)
e1
:
SetOperation
(
c57300010
.
xyzop
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
57300010
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
57300010
,
0
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetCategory
(
CATEGORY_DISABLE
)
...
@@ -25,80 +16,6 @@ function c57300010.initial_effect(c)
...
@@ -25,80 +16,6 @@ function c57300010.initial_effect(c)
e1
:
SetOperation
(
c57300010
.
operation
)
e1
:
SetOperation
(
c57300010
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c57300010
.
mfilter
(
c
,
xyzc
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x570
)
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
c
:
IsXyzLevel
(
xyzc
,
2
)
end
function
c57300010
.
xyzfilter
(
c
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
xyzc
)
sg
:
AddCard
(
c
)
local
i
=
sg
:
GetCount
()
local
res
=
(
i
>=
min
and
c57300010
.
xyzgoal
(
sg
,
ct
,
tp
,
xyzc
))
or
(
i
<
max
and
mg
:
IsExists
(
c57300010
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
xyzc
))
sg
:
RemoveCard
(
c
)
return
res
end
function
c57300010
.
xyzgoal
(
g
,
ct
,
tp
,
xyzc
)
local
i
=
g
:
GetCount
()
if
not
g
:
CheckWithSumEqual
(
c57300010
.
xyzval
,
ct
,
i
,
i
)
then
return
false
end
--to be changed in mr4
--return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
xyzc
)
>
0
end
function
c57300010
.
xyzval
(
c
)
local
v
=
1
if
c
:
IsHasEffect
(
57300021
)
then
v
=
v
+
0x20000
end
return
v
end
function
c57300010
.
xyzcon
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
nil
if
og
then
mg
=
og
:
Filter
(
c57300010
.
mfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
c57300010
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
end
local
ct
=
e
:
GetLabel
()
local
sg
=
Group
.
CreateGroup
()
local
min
=
min
or
1
local
max
=
max
and
math.min
(
max
,
ct
)
or
ct
return
min
<=
max
and
mg
:
IsExists
(
c57300010
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
end
function
c57300010
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
local
mg
=
nil
if
og
then
if
not
min
then
local
tg
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
og
)
do
tg
:
Merge
(
tc
:
GetOverlayGroup
())
end
c
:
SetMaterial
(
og
)
Duel
.
SendtoGrave
(
tg
,
REASON_RULE
)
Duel
.
Overlay
(
c
,
og
)
return
end
mg
=
og
:
Filter
(
c57300010
.
mfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
c57300010
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
end
local
ct
=
e
:
GetLabel
()
local
sg
=
Group
.
CreateGroup
()
local
min
=
min
or
1
local
max
=
max
and
math.min
(
max
,
ct
)
or
ct
local
i
=
sg
:
GetCount
()
repeat
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
g
=
mg
:
FilterSelect
(
tp
,
c57300010
.
xyzfilter
,
1
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
sg
:
Merge
(
g
)
i
=
sg
:
GetCount
()
until
i
>=
max
or
(
i
>=
min
and
c57300010
.
xyzgoal
(
sg
,
ct
,
tp
,
xyzc
)
and
not
(
mg
:
IsExists
(
c57300010
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
and
Duel
.
SelectYesNo
(
tp
,
210
)))
local
tg
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
sg
)
do
tg
:
Merge
(
tc
:
GetOverlayGroup
())
end
c
:
SetMaterial
(
sg
)
Duel
.
SendtoGrave
(
tg
,
REASON_RULE
)
Duel
.
Overlay
(
c
,
sg
)
end
function
c57300010
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c57300010
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
...
...
expansions/script/c57300011.lua
View file @
28a43eb5
--库拉丽丝-尝试
--库拉丽丝-尝试
function
c57300011
.
initial_effect
(
c
)
function
c57300011
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
local
e1
=
Effect
.
CreateEffect
(
c
)
miyuki
.
AddXyzProcedureClariS
(
c
,
2
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetLabel
(
2
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCondition
(
c57300011
.
xyzcon
)
e1
:
SetOperation
(
c57300011
.
xyzop
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetDescription
(
aux
.
Stringid
(
57300011
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
57300011
,
0
))
...
@@ -24,80 +15,6 @@ function c57300011.initial_effect(c)
...
@@ -24,80 +15,6 @@ function c57300011.initial_effect(c)
e1
:
SetOperation
(
c57300011
.
operation
)
e1
:
SetOperation
(
c57300011
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c57300011
.
mfilter
(
c
,
xyzc
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x570
)
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
c
:
IsXyzLevel
(
xyzc
,
2
)
end
function
c57300011
.
xyzfilter
(
c
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
xyzc
)
sg
:
AddCard
(
c
)
local
i
=
sg
:
GetCount
()
local
res
=
(
i
>=
min
and
c57300011
.
xyzgoal
(
sg
,
ct
,
tp
,
xyzc
))
or
(
i
<
max
and
mg
:
IsExists
(
c57300011
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
xyzc
))
sg
:
RemoveCard
(
c
)
return
res
end
function
c57300011
.
xyzgoal
(
g
,
ct
,
tp
,
xyzc
)
local
i
=
g
:
GetCount
()
if
not
g
:
CheckWithSumEqual
(
c57300011
.
xyzval
,
ct
,
i
,
i
)
then
return
false
end
--to be changed in mr4
--return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
xyzc
)
>
0
end
function
c57300011
.
xyzval
(
c
)
local
v
=
1
if
c
:
IsHasEffect
(
57300021
)
then
v
=
v
+
0x20000
end
return
v
end
function
c57300011
.
xyzcon
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
nil
if
og
then
mg
=
og
:
Filter
(
c57300011
.
mfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
c57300011
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
end
local
ct
=
e
:
GetLabel
()
local
sg
=
Group
.
CreateGroup
()
local
min
=
min
or
1
local
max
=
max
and
math.min
(
max
,
ct
)
or
ct
return
min
<=
max
and
mg
:
IsExists
(
c57300011
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
end
function
c57300011
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
local
mg
=
nil
if
og
then
if
not
min
then
local
tg
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
og
)
do
tg
:
Merge
(
tc
:
GetOverlayGroup
())
end
c
:
SetMaterial
(
og
)
Duel
.
SendtoGrave
(
tg
,
REASON_RULE
)
Duel
.
Overlay
(
c
,
og
)
return
end
mg
=
og
:
Filter
(
c57300011
.
mfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
c57300011
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
end
local
ct
=
e
:
GetLabel
()
local
sg
=
Group
.
CreateGroup
()
local
min
=
min
or
1
local
max
=
max
and
math.min
(
max
,
ct
)
or
ct
local
i
=
sg
:
GetCount
()
repeat
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
g
=
mg
:
FilterSelect
(
tp
,
c57300011
.
xyzfilter
,
1
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
sg
:
Merge
(
g
)
i
=
sg
:
GetCount
()
until
i
>=
max
or
(
i
>=
min
and
c57300011
.
xyzgoal
(
sg
,
ct
,
tp
,
xyzc
)
and
not
(
mg
:
IsExists
(
c57300011
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
and
Duel
.
SelectYesNo
(
tp
,
210
)))
local
tg
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
sg
)
do
tg
:
Merge
(
tc
:
GetOverlayGroup
())
end
c
:
SetMaterial
(
sg
)
Duel
.
SendtoGrave
(
tg
,
REASON_RULE
)
Duel
.
Overlay
(
c
,
sg
)
end
function
c57300011
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c57300011
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
...
...
expansions/script/c57300012.lua
View file @
28a43eb5
--库拉丽丝-心配
--库拉丽丝-心配
function
c57300012
.
initial_effect
(
c
)
function
c57300012
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
local
e1
=
Effect
.
CreateEffect
(
c
)
miyuki
.
AddXyzProcedureClariS
(
c
,
3
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetLabel
(
3
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCondition
(
c57300012
.
xyzcon
)
e1
:
SetOperation
(
c57300012
.
xyzop
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
57300012
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
57300012
,
0
))
e2
:
SetCategory
(
CATEGORY_REMOVE
)
e2
:
SetCategory
(
CATEGORY_REMOVE
)
...
@@ -32,81 +23,6 @@ function c57300012.initial_effect(c)
...
@@ -32,81 +23,6 @@ function c57300012.initial_effect(c)
e4
:
SetOperation
(
c57300012
.
tdop
)
e4
:
SetOperation
(
c57300012
.
tdop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
c57300012
.
mfilter
(
c
,
xyzc
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x570
)
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
c
:
IsXyzLevel
(
xyzc
,
2
)
end
function
c57300012
.
xyzfilter
(
c
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
xyzc
)
sg
:
AddCard
(
c
)
local
i
=
sg
:
GetCount
()
local
res
=
(
i
>=
min
and
c57300012
.
xyzgoal
(
sg
,
ct
,
tp
,
xyzc
))
or
(
i
<
max
and
mg
:
IsExists
(
c57300012
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
xyzc
))
sg
:
RemoveCard
(
c
)
return
res
end
function
c57300012
.
xyzgoal
(
g
,
ct
,
tp
,
xyzc
)
local
i
=
g
:
GetCount
()
if
not
g
:
CheckWithSumEqual
(
c57300012
.
xyzval
,
ct
,
i
,
i
)
then
return
false
end
--to be changed in mr4
--return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
xyzc
)
>
0
end
function
c57300012
.
xyzval
(
c
)
local
v
=
1
if
c
:
IsHasEffect
(
57300021
)
then
v
=
v
+
0x20000
end
return
v
end
function
c57300012
.
xyzcon
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
nil
if
og
then
mg
=
og
:
Filter
(
c57300012
.
mfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
c57300012
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
end
local
ct
=
e
:
GetLabel
()
local
sg
=
Group
.
CreateGroup
()
local
min
=
min
or
1
local
max
=
max
and
math.min
(
max
,
ct
)
or
ct
return
min
<=
max
and
mg
:
IsExists
(
c57300012
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
end
function
c57300012
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
local
mg
=
nil
if
og
then
if
not
min
then
local
tg
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
og
)
do
tg
:
Merge
(
tc
:
GetOverlayGroup
())
end
c
:
SetMaterial
(
og
)
Duel
.
SendtoGrave
(
tg
,
REASON_RULE
)
Duel
.
Overlay
(
c
,
og
)
return
end
mg
=
og
:
Filter
(
c57300012
.
mfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
c57300012
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
end
local
ct
=
e
:
GetLabel
()
local
sg
=
Group
.
CreateGroup
()
local
min
=
min
or
1
local
max
=
max
and
math.min
(
max
,
ct
)
or
ct
local
i
=
sg
:
GetCount
()
repeat
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
g
=
mg
:
FilterSelect
(
tp
,
c57300012
.
xyzfilter
,
1
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
sg
:
Merge
(
g
)
i
=
sg
:
GetCount
()
until
i
>=
max
or
(
i
>=
min
and
c57300012
.
xyzgoal
(
sg
,
ct
,
tp
,
xyzc
)
and
not
(
mg
:
IsExists
(
c57300012
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
and
Duel
.
SelectYesNo
(
tp
,
210
)))
local
tg
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
sg
)
do
tg
:
Merge
(
tc
:
GetOverlayGroup
())
end
c
:
SetMaterial
(
sg
)
Duel
.
SendtoGrave
(
tg
,
REASON_RULE
)
Duel
.
Overlay
(
c
,
sg
)
Duel
.
Hint
(
11
,
0
,
aux
.
Stringid
(
57300012
,
1
))
end
function
c57300012
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c57300012
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
...
...
expansions/script/c57300013.lua
View file @
28a43eb5
--库拉丽丝-初梦
--库拉丽丝-初梦
function
c57300013
.
initial_effect
(
c
)
function
c57300013
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
local
e1
=
Effect
.
CreateEffect
(
c
)
miyuki
.
AddXyzProcedureClariS
(
c
,
3
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetLabel
(
3
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCondition
(
c57300013
.
xyzcon
)
e1
:
SetOperation
(
c57300013
.
xyzop
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
...
@@ -27,80 +18,6 @@ function c57300013.initial_effect(c)
...
@@ -27,80 +18,6 @@ function c57300013.initial_effect(c)
e5
:
SetOperation
(
c57300013
.
desop
)
e5
:
SetOperation
(
c57300013
.
desop
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
end
end
function
c57300013
.
mfilter
(
c
,
xyzc
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x570
)
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
c
:
IsXyzLevel
(
xyzc
,
2
)
end
function
c57300013
.
xyzfilter
(
c
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
xyzc
)
sg
:
AddCard
(
c
)
local
i
=
sg
:
GetCount
()
local
res
=
(
i
>=
min
and
c57300013
.
xyzgoal
(
sg
,
ct
,
tp
,
xyzc
))
or
(
i
<
max
and
mg
:
IsExists
(
c57300013
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
xyzc
))
sg
:
RemoveCard
(
c
)
return
res
end
function
c57300013
.
xyzgoal
(
g
,
ct
,
tp
,
xyzc
)
local
i
=
g
:
GetCount
()
if
not
g
:
CheckWithSumEqual
(
c57300013
.
xyzval
,
ct
,
i
,
i
)
then
return
false
end
--to be changed in mr4
--return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
xyzc
)
>
0
end
function
c57300013
.
xyzval
(
c
)
local
v
=
1
if
c
:
IsHasEffect
(
57300021
)
then
v
=
v
+
0x20000
end
return
v
end
function
c57300013
.
xyzcon
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
nil
if
og
then
mg
=
og
:
Filter
(
c57300013
.
mfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
c57300013
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
end
local
ct
=
e
:
GetLabel
()
local
sg
=
Group
.
CreateGroup
()
local
min
=
min
or
1
local
max
=
max
and
math.min
(
max
,
ct
)
or
ct
return
min
<=
max
and
mg
:
IsExists
(
c57300013
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
end
function
c57300013
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
local
mg
=
nil
if
og
then
if
not
min
then
local
tg
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
og
)
do
tg
:
Merge
(
tc
:
GetOverlayGroup
())
end
c
:
SetMaterial
(
og
)
Duel
.
SendtoGrave
(
tg
,
REASON_RULE
)
Duel
.
Overlay
(
c
,
og
)
return
end
mg
=
og
:
Filter
(
c57300013
.
mfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
c57300013
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
end
local
ct
=
e
:
GetLabel
()
local
sg
=
Group
.
CreateGroup
()
local
min
=
min
or
1
local
max
=
max
and
math.min
(
max
,
ct
)
or
ct
local
i
=
sg
:
GetCount
()
repeat
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
g
=
mg
:
FilterSelect
(
tp
,
c57300013
.
xyzfilter
,
1
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
sg
:
Merge
(
g
)
i
=
sg
:
GetCount
()
until
i
>=
max
or
(
i
>=
min
and
c57300013
.
xyzgoal
(
sg
,
ct
,
tp
,
xyzc
)
and
not
(
mg
:
IsExists
(
c57300013
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
and
Duel
.
SelectYesNo
(
tp
,
210
)))
local
tg
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
sg
)
do
tg
:
Merge
(
tc
:
GetOverlayGroup
())
end
c
:
SetMaterial
(
sg
)
Duel
.
SendtoGrave
(
tg
,
REASON_RULE
)
Duel
.
Overlay
(
c
,
sg
)
end
function
c57300013
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c57300013
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
...
...
expansions/script/c57300014.lua
View file @
28a43eb5
--库拉丽丝-终曲
--库拉丽丝-终曲
function
c57300014
.
initial_effect
(
c
)
function
c57300014
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
--xs
miyuki
.
AddXyzProcedureClariS
(
c
,
2
,
true
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetLabel
(
2
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCondition
(
c57300014
.
xyzcon
)
e1
:
SetOperation
(
c57300014
.
xyzop
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
--material
--material
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
@@ -42,78 +32,6 @@ function c57300014.initial_effect(c)
...
@@ -42,78 +32,6 @@ function c57300014.initial_effect(c)
e3
:
SetOperation
(
c57300014
.
disop
)
e3
:
SetOperation
(
c57300014
.
disop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c57300014
.
mfilter
(
c
,
xyzc
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x570
)
and
c
:
IsXyzType
(
TYPE_XYZ
)
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
c
:
GetRank
()
==
2
end
function
c57300014
.
xyzfilter
(
c
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
xyzc
)
sg
:
AddCard
(
c
)
local
i
=
sg
:
GetCount
()
local
res
=
(
i
>=
min
and
c57300014
.
xyzgoal
(
sg
,
ct
,
tp
,
xyzc
))
or
(
i
<
max
and
mg
:
IsExists
(
c57300014
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
xyzc
))
sg
:
RemoveCard
(
c
)
return
res
end
function
c57300014
.
xyzgoal
(
g
,
ct
,
tp
,
xyzc
)
local
i
=
g
:
GetCount
()
if
not
g
:
CheckWithSumEqual
(
c57300014
.
xyzval
,
ct
,
i
,
i
)
then
return
false
end
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
xyzc
)
>
0
end
function
c57300014
.
xyzval
(
c
)
local
v
=
1
if
c
:
IsHasEffect
(
57300021
)
then
v
=
v
+
0x20000
end
return
v
end
function
c57300014
.
xyzcon
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
nil
if
og
then
mg
=
og
:
Filter
(
c57300014
.
mfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
c57300014
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
end
local
ct
=
e
:
GetLabel
()
local
sg
=
Group
.
CreateGroup
()
local
min
=
min
or
1
local
max
=
max
and
math.min
(
max
,
ct
)
or
ct
return
min
<=
max
and
mg
:
IsExists
(
c57300014
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
end
function
c57300014
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
local
mg
=
nil
if
og
then
if
not
min
then
local
tg
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
og
)
do
tg
:
Merge
(
tc
:
GetOverlayGroup
())
end
c
:
SetMaterial
(
og
)
Duel
.
SendtoGrave
(
tg
,
REASON_RULE
)
Duel
.
Overlay
(
c
,
og
)
return
end
mg
=
og
:
Filter
(
c57300014
.
mfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
c57300014
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
end
local
ct
=
e
:
GetLabel
()
local
sg
=
Group
.
CreateGroup
()
local
min
=
min
or
1
local
max
=
max
and
math.min
(
max
,
ct
)
or
ct
local
i
=
sg
:
GetCount
()
repeat
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
g
=
mg
:
FilterSelect
(
tp
,
c57300014
.
xyzfilter
,
1
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
sg
:
Merge
(
g
)
i
=
sg
:
GetCount
()
until
i
>=
max
or
(
i
>=
min
and
c57300014
.
xyzgoal
(
sg
,
ct
,
tp
,
xyzc
)
and
not
(
mg
:
IsExists
(
c57300014
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
and
Duel
.
SelectYesNo
(
tp
,
210
)))
local
tg
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
sg
)
do
tg
:
Merge
(
tc
:
GetOverlayGroup
())
end
c
:
SetMaterial
(
sg
)
Duel
.
SendtoGrave
(
tg
,
REASON_RULE
)
Duel
.
Overlay
(
c
,
sg
)
end
function
c57300014
.
filter
(
c
,
tp
)
function
c57300014
.
filter
(
c
,
tp
)
return
not
c
:
IsType
(
TYPE_TOKEN
)
and
(
c
:
IsControler
(
tp
)
or
c
:
IsAbleToChangeControler
())
return
not
c
:
IsType
(
TYPE_TOKEN
)
and
(
c
:
IsControler
(
tp
)
or
c
:
IsAbleToChangeControler
())
end
end
...
...
expansions/script/c57300019.lua
View file @
28a43eb5
--Approved·樱野美雪
--Approved·樱野美雪
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
function
c57300019
.
initial_effect
(
c
)
function
c57300019
.
initial_effect
(
c
)
miyuki
.
rxyz1
(
c
,
nil
,
nil
,
3
,
3
)
miyuki
.
AddXyzProcedureRank
(
c
,
nil
,
nil
,
3
,
3
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
...
...
expansions/script/c57300020.lua
View file @
28a43eb5
--终焉的物语·物凄
--终焉的物语·物凄
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
function
c57300020
.
initial_effect
(
c
)
function
c57300020
.
initial_effect
(
c
)
miyuki
.
rxyz1
(
c
,
nil
,
nil
,
2
,
63
)
miyuki
.
AddXyzProcedureRank
(
c
,
nil
,
nil
,
2
,
63
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
...
...
expansions/script/c57300022.lua
View file @
28a43eb5
--库拉丽丝-银莲
--库拉丽丝-银莲
function
c57300022
.
initial_effect
(
c
)
function
c57300022
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
local
e1
=
Effect
.
CreateEffect
(
c
)
miyuki
.
AddXyzProcedureClariS
(
c
,
3
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetLabel
(
3
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCondition
(
c57300022
.
xyzcon
)
e1
:
SetOperation
(
c57300022
.
xyzop
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
local
ex
=
Effect
.
CreateEffect
(
c
)
local
ex
=
Effect
.
CreateEffect
(
c
)
ex
:
SetType
(
EFFECT_TYPE_SINGLE
)
ex
:
SetType
(
EFFECT_TYPE_SINGLE
)
ex
:
SetCode
(
57300022
)
ex
:
SetCode
(
57300022
)
...
@@ -96,81 +87,7 @@ function c57300022.rcon(con,tc,copyt)
...
@@ -96,81 +87,7 @@ function c57300022.rcon(con,tc,copyt)
copyt
[
tc
]
=
nil
copyt
[
tc
]
=
nil
return
false
return
false
end
end
return
not
con
or
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
con
or
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
then
return
true
end
return
e
:
IsHasType
(
0x7e0
)
and
c
:
GetFlagEffect
(
m
)
>
0
end
end
end
end
\ No newline at end of file
function
c57300022
.
mfilter
(
c
,
xyzc
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x570
)
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
c
:
IsXyzLevel
(
xyzc
,
2
)
end
function
c57300022
.
xyzfilter
(
c
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
xyzc
)
sg
:
AddCard
(
c
)
local
i
=
sg
:
GetCount
()
local
res
=
(
i
>=
min
and
c57300022
.
xyzgoal
(
sg
,
ct
,
tp
,
xyzc
))
or
(
i
<
max
and
mg
:
IsExists
(
c57300022
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
xyzc
))
sg
:
RemoveCard
(
c
)
return
res
end
function
c57300022
.
xyzgoal
(
g
,
ct
,
tp
,
xyzc
)
local
i
=
g
:
GetCount
()
if
not
g
:
CheckWithSumEqual
(
c57300022
.
xyzval
,
ct
,
i
,
i
)
then
return
false
end
--to be changed in mr4
--return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
xyzc
)
>
0
end
function
c57300022
.
xyzval
(
c
)
local
v
=
1
if
c
:
IsHasEffect
(
57300021
)
then
v
=
v
+
0x20000
end
return
v
end
function
c57300022
.
xyzcon
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
nil
if
og
then
mg
=
og
:
Filter
(
c57300022
.
mfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
c57300022
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
end
local
ct
=
e
:
GetLabel
()
local
sg
=
Group
.
CreateGroup
()
local
min
=
min
or
1
local
max
=
max
and
math.min
(
max
,
ct
)
or
ct
return
min
<=
max
and
mg
:
IsExists
(
c57300022
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
end
function
c57300022
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
local
mg
=
nil
if
og
then
if
not
min
then
local
tg
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
og
)
do
tg
:
Merge
(
tc
:
GetOverlayGroup
())
end
c
:
SetMaterial
(
og
)
Duel
.
SendtoGrave
(
tg
,
REASON_RULE
)
Duel
.
Overlay
(
c
,
og
)
return
end
mg
=
og
:
Filter
(
c57300022
.
mfilter
,
nil
,
c
)
else
mg
=
Duel
.
GetMatchingGroup
(
c57300022
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
)
end
local
ct
=
e
:
GetLabel
()
local
sg
=
Group
.
CreateGroup
()
local
min
=
min
or
1
local
max
=
max
and
math.min
(
max
,
ct
)
or
ct
local
i
=
sg
:
GetCount
()
repeat
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
g
=
mg
:
FilterSelect
(
tp
,
c57300022
.
xyzfilter
,
1
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
sg
:
Merge
(
g
)
i
=
sg
:
GetCount
()
until
i
>=
max
or
(
i
>=
min
and
c57300022
.
xyzgoal
(
sg
,
ct
,
tp
,
xyzc
)
and
not
(
mg
:
IsExists
(
c57300022
.
xyzfilter
,
1
,
sg
,
mg
,
sg
,
ct
,
min
,
max
,
tp
,
c
)
and
Duel
.
SelectYesNo
(
tp
,
210
)))
local
tg
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
sg
)
do
tg
:
Merge
(
tc
:
GetOverlayGroup
())
end
c
:
SetMaterial
(
sg
)
Duel
.
SendtoGrave
(
tg
,
REASON_RULE
)
Duel
.
Overlay
(
c
,
sg
)
Duel
.
Hint
(
11
,
0
,
aux
.
Stringid
(
57300022
,
0
))
end
\ No newline at end of file
expansions/script/c57320010.lua
View file @
28a43eb5
...
@@ -31,7 +31,7 @@ function cm.initial_effect(c)
...
@@ -31,7 +31,7 @@ function cm.initial_effect(c)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
cm
.
discon
)
e3
:
SetCondition
(
cm
.
discon
)
e3
:
SetCost
(
cm
.
cost
)
e3
:
SetCost
(
cm
.
cost
(
c
)
)
e3
:
SetTarget
(
cm
.
distg
)
e3
:
SetTarget
(
cm
.
distg
)
e3
:
SetOperation
(
cm
.
disop
)
e3
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
...
@@ -55,7 +55,7 @@ function cm.initial_effect(c)
...
@@ -55,7 +55,7 @@ function cm.initial_effect(c)
e9
:
SetCode
(
EVENT_FREE_CHAIN
)
e9
:
SetCode
(
EVENT_FREE_CHAIN
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetHintTiming
(
0
,
0x1e0
)
e9
:
SetHintTiming
(
0
,
0x1e0
)
e9
:
SetCost
(
cm
.
cost
)
e9
:
SetCost
(
cm
.
cost
(
c
)
)
e9
:
SetTarget
(
cm
.
tdtg
)
e9
:
SetTarget
(
cm
.
tdtg
)
e9
:
SetOperation
(
cm
.
tdop
)
e9
:
SetOperation
(
cm
.
tdop
)
c
:
RegisterEffect
(
e9
)
c
:
RegisterEffect
(
e9
)
...
...
expansions/script/c57320013.lua
0 → 100644
View file @
28a43eb5
--少女人偶师·幽幽
local
m
=
57320013
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
function
cm
.
initial_effect
(
c
)
aux
.
AddLinkProcedure
(
c
,
function
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
end
,
2
,
2
)
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetRange
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
e1
:
SetValue
(
57320001
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
cm
.
target
)
e2
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e2
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
0x14000
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCondition
(
aux
.
dogcon
)
e1
:
SetTarget
(
cm
.
target1
)
e1
:
SetOperation
(
cm
.
activate1
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
tfilter
(
c
,
mc
,
e
,
tp
)
return
c
:
IsType
(
TYPE_FUSION
)
and
miyuki
.
isdoll
(
c
)
and
c
:
IsAttribute
(
mc
:
GetAttribute
())
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
mc
:
IsCanBeFusionMaterial
(
c
)
and
c
:
GetLevel
()
==
9
end
function
cm
.
filter
(
c
,
e
,
tp
)
local
ce
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_FMATERIAL
)}
for
_
,
te
in
ipairs
(
ce
)
do
if
c
~=
te
:
GetHandler
()
then
return
false
end
end
return
c
:
IsFaceup
()
and
e
:
GetHandler
():
GetLinkedGroup
():
IsContains
(
c
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
tfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
c
,
e
,
tp
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
)
>
0
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
not
tc
:
IsRelateToEffect
(
e
)
or
not
cm
.
filter
(
tc
,
e
,
tp
)
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
tc
,
e
,
tp
)
local
sc
=
sg
:
GetFirst
()
if
sc
then
sc
:
SetMaterial
(
sg
)
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
sc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
sc
:
CompleteProcedure
()
end
end
function
cm
.
tfilter1
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsCode
(
57320010
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
e
:
GetHandler
():
IsCanBeFusionMaterial
(
c
)
end
function
cm
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
local
ce
=
{
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_FMATERIAL
)}
for
_
,
te
in
ipairs
(
ce
)
do
if
c
~=
te
:
GetHandler
()
then
return
false
end
end
return
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsAbleToRemove
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
tfilter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
cm
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
not
cm
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tfilter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
sc
=
sg
:
GetFirst
()
if
sc
then
sc
:
SetMaterial
(
sg
)
Duel
.
Remove
(
c
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
sc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
sc
:
CompleteProcedure
()
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