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
Expand all
Hide 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)
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
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
)
end
function
cm
.
matfilter
(
c
)
...
...
@@ -49,7 +49,7 @@ function cm.matfilter(c)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
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
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
sc
=
g
:
GetFirst
()
...
...
expansions/script/c37564010.lua
View file @
28a43eb5
...
...
@@ -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
)
end
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
function
cm
.
chkfilter
(
c
,
tc
)
local
rk
=
tc
:
GetRank
()
...
...
expansions/script/c37564013.lua
View file @
28a43eb5
...
...
@@ -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
end
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
)
end
function
cm
.
sppop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
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
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
fffilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
sc
=
g
:
GetFirst
()
...
...
expansions/script/c37564021.lua
View file @
28a43eb5
...
...
@@ -65,7 +65,7 @@ end
function
cm
.
rmcon
(
e
,
c
,
og
)
local
tp
=
e
:
GetHandlerPlayer
()
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
function
cm
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
sg
,
og
)
Duel
.
Hint
(
HINT_CARD
,
0
,
e
:
GetHandler
():
GetOriginalCode
())
...
...
expansions/script/c37564042.lua
View file @
28a43eb5
...
...
@@ -14,7 +14,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
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
)
end
function
cm
.
filter2
(
c
,
e
,
tp
,
mc
,
rk
)
...
...
expansions/script/c37564055.lua
View file @
28a43eb5
...
...
@@ -118,6 +118,10 @@ end
function
cm
.
goal
(
g
,
tp
,
lv
,
syncard
,
tuc
)
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
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
()
return
g
:
CheckWithSumEqual
(
cm
.
val
,
lv
,
ct
,
ct
,
syncard
)
end
...
...
@@ -139,13 +143,10 @@ function cm.syncon(e,c,tuner,mg)
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
)
end
local
pe
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_SMATERIAL
)
local
lv
=
c
:
GetLevel
()
local
sg
=
nil
if
tuner
then
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
return
g1
:
IsExists
(
cm
.
synfilter
,
1
,
nil
,
c
,
lv
,
g2
,
g3
,
minc
,
maxc
,
tp
)
end
...
...
@@ -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
)
g3
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter2
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
LOCATION_MZONE
,
nil
,
c
)
end
local
pe
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_SMATERIAL
)
local
lv
=
c
:
GetLevel
()
local
tuc
=
nil
if
tuner
then
tuner
=
tuc
else
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
)
tuc
=
t1
:
GetFirst
()
else
tuc
=
pe
:
GetOwner
()
Group
.
FromCards
(
tuc
):
Select
(
tp
,
1
,
1
,
nil
)
end
local
t1
=
g1
:
FilterSelect
(
tp
,
cm
.
synfilter
,
1
,
1
,
nil
,
c
,
lv
,
g2
,
g3
,
minc
,
maxc
,
tp
)
tuc
=
t1
:
GetFirst
()
end
tuc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
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)
if
g
:
GetCount
()
==
0
then
return
end
local
gc
=
g
:
RandomSelect
(
tp
,
1
):
GetFirst
()
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
()
if
mg
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
gc
,
mg
)
...
...
expansions/script/c37564412.lua
View file @
28a43eb5
...
...
@@ -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
end
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
)
end
function
cm
.
matfilter
(
c
)
...
...
@@ -28,7 +28,7 @@ function cm.matfilter(c)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
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
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
sc
=
g
:
GetFirst
()
...
...
expansions/script/c37564558.lua
View file @
28a43eb5
--
Secret Scarlet
--
Nanahira & Senne
local
m
=
37564558
local
cm
=
_G
[
"c"
..
m
]
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,...)
return
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
and
(
not
f
or
f
(
g
,
...
))
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
function
cm
.
AddXyzProcedureRank
(
c
,
rk
,
f
,
minct
,
maxct
,
xm
,
...
)
local
ext_params
=
{
...
}
...
...
@@ -2634,4 +2645,4 @@ function cm.AddAttackSE(c,desc)
Duel
.
RegisterEffect
(
e1
,
0
)
end
cm
.
AttackSEList
[
c
]
=
desc
end
\ No newline at end of file
end
expansions/script/c37564832.lua
View file @
28a43eb5
...
...
@@ -16,7 +16,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
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
)
end
function
cm
.
tgfilter
(
c
,
e
,
tp
)
...
...
expansions/script/c37564844.lua
View file @
28a43eb5
...
...
@@ -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
end
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
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
sfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
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
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
...
...
expansions/script/c37564850.lua
View file @
28a43eb5
...
...
@@ -5,16 +5,7 @@ xpcall(function() require("expansions/script/c37564765") end,function() require(
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
Senya
.
AddSummonMusic
(
c
,
m
*
16
+
2
,
SUMMON_TYPE_LINK
)
--Senya.CommonEffect_3L(c,m)
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
)
aux
.
AddLinkProcedure
(
c
,
Senya
.
check_set_3L
,
2
,
2
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
...
...
@@ -26,6 +17,7 @@ function cm.initial_effect(c)
e0
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
code
=
c
:
GetFlagEffectLabel
(
m
)
c
:
ResetFlagEffect
(
m
)
Senya
.
GainEffect_3L
(
c
,
code
)
end
)
c
:
RegisterEffect
(
e0
)
...
...
@@ -39,31 +31,15 @@ function cm.effect_operation_3L(c)
c
:
RegisterEffect
(
e1
,
true
)
return
e1
end
function
cm
.
linkfilter1
(
c
,
tp
,
ec
)
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
)
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
)
function
cm
.
SetMaterial
(
c
,
g
)
local
efg
=
g
:
Filter
(
function
(
c
)
return
c
.
effect_operation_3L
end
,
nil
)
if
efg
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
m
*
16
)
local
tg
=
efg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
Duel
.
HintSelection
(
tg
)
e
:
GetHandler
()
:
RegisterFlagEffect
(
m
,
0xfe1000
,
0
,
1
,
tc
:
GetOriginalCode
())
c
:
RegisterFlagEffect
(
m
,
0xfe1000
,
0
,
1
,
tc
:
GetOriginalCode
())
end
c
:
SetMaterial
(
g1
)
Duel
.
SendtoGrave
(
g1
,
REASON_MATERIAL
+
REASON_LINK
)
return
Card
.
SetMaterial
(
c
,
g
)
end
\ No newline at end of file
expansions/script/c37564919.lua
View file @
28a43eb5
...
...
@@ -6,15 +6,7 @@ cm.Senya_name_with_sayuri=true
function
cm
.
initial_effect
(
c
)
Senya
.
AddSummonMusic
(
c
,
m
*
16
,
SUMMON_TYPE_LINK
)
c
:
EnableReviveLimit
()
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
)
aux
.
AddLinkProcedure
(
c
,
cm
.
mfilter
,
3
,
3
,
cm
.
lcheck
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
37564765
,
0
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
...
...
@@ -27,28 +19,15 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e3
)
Senya
.
NegateEffectModule
(
c
,
1
,
nil
,
cm
.
cost
)
end
function
cm
.
mfilter
(
c
,
lc
)
return
c
:
IsFaceup
()
and
Senya
.
check_set_sayuri
(
c
)
and
c
:
IsLinkType
(
TYPE_RITUAL
)
and
c
:
IsCanBeLinkMaterial
(
lc
)
function
cm
.
mfilter
(
c
)
return
c
:
IsFaceup
()
and
Senya
.
check_set_sayuri
(
c
)
and
c
:
IsLinkType
(
TYPE_RITUAL
)
end
function
cm
.
lcheck
(
g
,
tp
,
lc
)
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
lc
)
>
0
and
not
g
:
IsExists
(
cm
.
lfilter
,
1
,
nil
,
g
)
function
cm
.
lcheck
(
g
)
return
not
g
:
IsExists
(
cm
.
lfilter
,
1
,
nil
,
g
)
end
function
cm
.
lfilter
(
c
,
g
)
return
g
:
IsExists
(
Card
.
IsCode
,
1
,
c
,
c
:
GetCode
())
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
)
return
g
:
IsContains
(
c
)
end
...
...
expansions/script/c57300000.lua
View file @
28a43eb5
This diff is collapsed.
Click to expand it.
expansions/script/c57300010.lua
View file @
28a43eb5
--库拉丽丝-怨念
function
c57300010
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
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
(
c57300010
.
xyzcon
)
e1
:
SetOperation
(
c57300010
.
xyzop
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
miyuki
.
AddXyzProcedureClariS
(
c
,
2
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
57300010
,
0
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
...
...
@@ -25,80 +16,6 @@ function c57300010.initial_effect(c)
e1
:
SetOperation
(
c57300010
.
operation
)
c
:
RegisterEffect
(
e1
)
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
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
...
...
expansions/script/c57300011.lua
View file @
28a43eb5
--库拉丽丝-尝试
function
c57300011
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
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
(
c57300011
.
xyzcon
)
e1
:
SetOperation
(
c57300011
.
xyzop
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
miyuki
.
AddXyzProcedureClariS
(
c
,
2
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetDescription
(
aux
.
Stringid
(
57300011
,
0
))
...
...
@@ -24,80 +15,6 @@ function c57300011.initial_effect(c)
e1
:
SetOperation
(
c57300011
.
operation
)
c
:
RegisterEffect
(
e1
)
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
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
...
...
expansions/script/c57300012.lua
View file @
28a43eb5
--库拉丽丝-心配
function
c57300012
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
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
)
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
miyuki
.
AddXyzProcedureClariS
(
c
,
3
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
57300012
,
0
))
e2
:
SetCategory
(
CATEGORY_REMOVE
)
...
...
@@ -32,81 +23,6 @@ function c57300012.initial_effect(c)
e4
:
SetOperation
(
c57300012
.
tdop
)
c
:
RegisterEffect
(
e4
)
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
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
...
...
expansions/script/c57300013.lua
View file @
28a43eb5
--库拉丽丝-初梦
function
c57300013
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
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
)
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
miyuki
.
AddXyzProcedureClariS
(
c
,
3
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
...
...
@@ -27,80 +18,6 @@ function c57300013.initial_effect(c)
e5
:
SetOperation
(
c57300013
.
desop
)
c
:
RegisterEffect
(
e5
)
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
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
...
...
expansions/script/c57300014.lua
View file @
28a43eb5
--库拉丽丝-终曲
function
c57300014
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--xs
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
)
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
miyuki
.
AddXyzProcedureClariS
(
c
,
2
,
true
)
--material
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -42,78 +32,6 @@ function c57300014.initial_effect(c)
e3
:
SetOperation
(
c57300014
.
disop
)
c
:
RegisterEffect
(
e3
)
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
)
return
not
c
:
IsType
(
TYPE_TOKEN
)
and
(
c
:
IsControler
(
tp
)
or
c
:
IsAbleToChangeControler
())
end
...
...
expansions/script/c57300019.lua
View file @
28a43eb5
--Approved·樱野美雪
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
function
c57300019
.
initial_effect
(
c
)
miyuki
.
rxyz1
(
c
,
nil
,
nil
,
3
,
3
)
miyuki
.
AddXyzProcedureRank
(
c
,
nil
,
nil
,
3
,
3
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
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
)
function
c57300020
.
initial_effect
(
c
)
miyuki
.
rxyz1
(
c
,
nil
,
nil
,
2
,
63
)
miyuki
.
AddXyzProcedureRank
(
c
,
nil
,
nil
,
2
,
63
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
...
...
expansions/script/c57300022.lua
View file @
28a43eb5
--库拉丽丝-银莲
function
c57300022
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
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
)
xpcall
(
function
()
require
(
"expansions/script/c57300000"
)
end
,
function
()
require
(
"script/c57300000"
)
end
)
miyuki
.
AddXyzProcedureClariS
(
c
,
3
)
local
ex
=
Effect
.
CreateEffect
(
c
)
ex
:
SetType
(
EFFECT_TYPE_SINGLE
)
ex
:
SetCode
(
57300022
)
...
...
@@ -96,81 +87,7 @@ function c57300022.rcon(con,tc,copyt)
copyt
[
tc
]
=
nil
return
false
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
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)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
cm
.
discon
)
e3
:
SetCost
(
cm
.
cost
)
e3
:
SetCost
(
cm
.
cost
(
c
)
)
e3
:
SetTarget
(
cm
.
distg
)
e3
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e3
)
...
...
@@ -55,7 +55,7 @@ function cm.initial_effect(c)
e9
:
SetCode
(
EVENT_FREE_CHAIN
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetHintTiming
(
0
,
0x1e0
)
e9
:
SetCost
(
cm
.
cost
)
e9
:
SetCost
(
cm
.
cost
(
c
)
)
e9
:
SetTarget
(
cm
.
tdtg
)
e9
:
SetOperation
(
cm
.
tdop
)
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