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
a1e809fc
Commit
a1e809fc
authored
Oct 27, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push by Appveyor
parent
a7e71361
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
83 additions
and
405 deletions
+83
-405
expansions/script/c37564309.lua
expansions/script/c37564309.lua
+5
-7
expansions/script/c37564317.lua
expansions/script/c37564317.lua
+2
-25
expansions/script/c37564333.lua
expansions/script/c37564333.lua
+5
-7
expansions/script/c37564426.lua
expansions/script/c37564426.lua
+4
-4
expansions/script/c37564427.lua
expansions/script/c37564427.lua
+18
-15
expansions/script/c37564430.lua
expansions/script/c37564430.lua
+1
-1
expansions/script/c37564508.lua
expansions/script/c37564508.lua
+5
-5
expansions/script/c37564549.lua
expansions/script/c37564549.lua
+1
-4
expansions/script/c37564765.lua
expansions/script/c37564765.lua
+29
-52
expansions/script/c37564844.lua
expansions/script/c37564844.lua
+2
-4
expansions/script/c37564846.lua
expansions/script/c37564846.lua
+2
-2
expansions/script/c37564901.lua
expansions/script/c37564901.lua
+2
-23
expansions/script/c37564902.lua
expansions/script/c37564902.lua
+2
-23
expansions/script/c37564903.lua
expansions/script/c37564903.lua
+3
-24
expansions/script/c57300000.lua
expansions/script/c57300000.lua
+2
-2
expansions/script/c57310001.lua
expansions/script/c57310001.lua
+0
-9
expansions/script/c57310002.lua
expansions/script/c57310002.lua
+0
-36
expansions/script/c57310003.lua
expansions/script/c57310003.lua
+0
-33
expansions/script/c57310004.lua
expansions/script/c57310004.lua
+0
-38
expansions/script/c57310005.lua
expansions/script/c57310005.lua
+0
-26
expansions/script/c57310006.lua
expansions/script/c57310006.lua
+0
-28
expansions/script/c57310007.lua
expansions/script/c57310007.lua
+0
-37
No files found.
expansions/script/c37564309.lua
View file @
a1e809fc
...
...
@@ -84,19 +84,17 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
function
cm
.
filter
(
c
,
e
,
tp
,
ec
)
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetMZoneCount
(
tp
,
ec
,
tp
)
>
0
end
function
cm
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsLevelBelow
(
4
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
ft
=
e
:
GetLabel
()
or
0
local
ec
=
e
:
GetLabel
()
==
1
and
e
:
GetHandler
()
or
nil
e
:
SetLabel
(
0
)
local
ct
=-
ft
return
Duel
.
GetMZoneCount
(
tp
)
>
ct
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
ec
)
end
e
:
SetLabel
(
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
...
...
@@ -104,7 +102,7 @@ end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
or
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
and
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
expansions/script/c37564317.lua
View file @
a1e809fc
...
...
@@ -46,17 +46,7 @@ function cm.filter(c,e,tp,m,ft)
if
c
.
mat_filter
then
mg
=
mg
:
Filter
(
c
.
mat_filter
,
nil
)
end
if
ft
>
0
then
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
else
return
ft
>-
1
and
mg
:
IsExists
(
cm
.
mfilterf
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
function
cm
.
mfilterf
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
0
,
99
,
rc
)
else
return
false
end
return
Senya
.
CheckRitualMaterial
(
c
,
mg
,
tp
,
c
:
GetLevel
())
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
...
...
@@ -82,20 +72,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if
tc
.
mat_filter
then
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
nil
)
end
local
mat
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
cm
.
mfilterf
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
mat
:
Merge
(
mat2
)
end
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
local
mat
=
Senya
.
CheckRitualMaterial
(
tc
,
mg
,
tp
,
tc
:
GetLevel
())
end
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
...
...
expansions/script/c37564333.lua
View file @
a1e809fc
...
...
@@ -75,12 +75,13 @@ function cm.mtop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Overlay
(
c
,
g
)
end
end
function
cm
.
filter1
(
c
,
e
,
tp
,
og
,
ft
)
function
cm
.
filter1
(
c
,
e
,
tp
,
og
)
if
ft
==
0
and
c
:
GetSequence
()
>
4
then
return
false
end
return
c
:
IsFaceup
()
and
Duel
.
IsExistingTarget
(
cm
.
filter2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
e
,
tp
,
og
,
c
)
end
function
cm
.
filter2
(
c
,
e
,
tp
,
og
,
mc
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToChangeControler
()
and
og
:
IsExists
(
cm
.
filter3
,
1
,
nil
,
e
,
tp
,
Group
.
FromCards
(
c
,
mc
))
local
g
=
Group
.
FromCards
(
c
,
mc
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToChangeControler
()
and
og
:
IsExists
(
cm
.
filter3
,
1
,
nil
,
e
,
tp
,
g
)
and
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
end
function
cm
.
filter3
(
c
,
e
,
tp
,
mg
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
true
)
and
Senya
.
CheckFusionMaterialExact
(
c
,
mg
,
PLAYER_NONE
)
...
...
@@ -88,9 +89,8 @@ end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
og
=
e
:
GetHandler
():
GetOverlayGroup
()
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
ft
>=-
1
and
Duel
.
IsExistingTarget
(
cm
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
e
,
tp
,
og
,
ft
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
e
,
tp
,
og
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
cm
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
c
,
e
,
tp
,
og
,
ft
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
...
...
@@ -107,11 +107,9 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
or
c
:
IsControler
(
1
-
tp
)
then
return
end
local
og
=
e
:
GetHandler
():
GetOverlayGroup
()
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
if
ft
<
0
then
return
end
local
mg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
if
mg
:
IsExists
(
cm
.
counterfilter
,
1
,
nil
,
e
)
then
return
end
if
ft
==
0
and
not
mg
:
IsExists
(
cm
.
checklocationfilter
,
1
,
nil
,
tp
)
then
return
end
if
Duel
.
GetMZoneCount
(
tp
,
mg
,
tp
)
<=
0
then
return
end
local
fg
=
og
:
Filter
(
cm
.
filter3
,
nil
,
e
,
tp
,
mg
)
if
fg
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
...
...
expansions/script/c37564426.lua
View file @
a1e809fc
...
...
@@ -52,18 +52,18 @@ end
function
cm
.
spfilter
(
c
)
return
Senya
.
check_set_prism
(
c
)
and
(
c
:
IsAbleToHandAsCost
()
or
c
:
IsAbleToExtraAsCost
())
end
function
cm
.
spgcheck
(
g
,
ft
)
return
g
:
FilterCount
(
function
(
c
)
return
c
:
GetSequence
()
<
4
end
,
nil
)
+
ft
>
0
function
cm
.
spgcheck
(
g
,
tp
)
return
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
end
function
cm
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
Senya
.
CheckGroup
(
mg
,
cm
.
spgcheck
,
nil
,
3
,
3
,
Duel
.
GetMZoneCount
(
tp
)
)
return
Senya
.
CheckGroup
(
mg
,
cm
.
spgcheck
,
nil
,
3
,
3
,
tp
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Senya
.
SelectGroup
(
tp
,
HINTMSG_RTOHAND
,
mg
,
cm
.
spgcheck
,
nil
,
3
,
3
,
Duel
.
GetMZoneCount
(
tp
)
)
local
g
=
Senya
.
SelectGroup
(
tp
,
HINTMSG_RTOHAND
,
mg
,
cm
.
spgcheck
,
nil
,
3
,
3
,
tp
)
c
:
SetMaterial
(
g
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
+
REASON_FUSION
+
REASON_MATERIAL
)
end
...
...
expansions/script/c37564427.lua
View file @
a1e809fc
...
...
@@ -28,17 +28,19 @@ function cm.initial_effect(c)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
sfilter
(
c
,
e
,
tp
,
z
)
if
z
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
z
)
else
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
sfilter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
thgcheck
(
g
,
tp
,
z
)
return
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
,
LOCATION_REASON_TOFIELD
,
z
)
>
0
end
function
cm
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
e
:
GetHandler
():
GetLinkedGroup
()
local
g
=
e
:
GetHandler
():
GetLinkedGroup
()
:
Filter
(
Card
.
IsAbleToHand
,
nil
)
local
z
=
e
:
GetHandler
():
GetLinkedZone
()
if
chk
==
0
then
return
z
~=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
z
)
>-
1
and
g
:
IsExists
(
Card
.
IsAbleToHand
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
sfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
local
sg
=
Duel
.
GetMatchingGroup
(
cm
.
sfilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
tp
)
local
ct
=
sg
:
GetCount
()
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ct
=
math.min
(
ct
,
1
)
end
if
chk
==
0
then
return
z
~=
0
and
ct
>
0
and
Senya
.
CheckGroup
(
g
,
cm
.
thgcheck
,
nil
,
1
,
ct
,
tp
,
z
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
g
:
GetCount
(),
tp
,
LOCATION_HAND
)
end
...
...
@@ -48,17 +50,18 @@ function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local
sg
=
Duel
.
GetMatchingGroup
(
cm
.
sfilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
tp
)
local
tg
=
e
:
GetHandler
():
GetLinkedGroup
():
Filter
(
Card
.
IsAbleToHand
,
nil
)
local
ct
=
sg
:
GetCount
()
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ct
=
1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g1
=
tg
:
Select
(
tp
,
1
,
ct
,
nil
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ct
=
math.min
(
ct
,
1
)
end
local
g1
=
Senya
.
SelectGroup
(
tp
,
HINTMSG_RTOHAND
,
g
,
cm
.
thgcheck
,
nil
,
1
,
ct
,
tp
,
z
)
local
rct
=
Duel
.
SendtoHand
(
g1
,
nil
,
REASON_EFFECT
)
local
tsg
=
Duel
.
GetMatchingGroup
(
cm
.
sfilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
tp
,
z
)
if
math.min
(
tsg
:
GetCount
(),
rct
)
==
0
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
z
)
<=
0
then
return
end
local
tsg
=
Duel
.
GetMatchingGroup
(
cm
.
sfilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
tp
)
local
minct
=
math.min
(
tsg
:
GetCount
(),
rct
)
minct
=
math.min
(
minct
,
Duel
.
GetMZoneCount
(
tp
,
nil
,
tp
,
LOCATION_REASON_TOFIELD
,
z
))
if
minct
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g2
=
tsg
:
Select
(
tp
,
1
,
r
ct
,
nil
)
local
g2
=
tsg
:
Select
(
tp
,
1
,
min
ct
,
nil
)
local
sct
=
Duel
.
SpecialSummon
(
g2
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
z
)
local
og
=
Duel
.
GetOperatedGroup
()
if
og
:
FilterCount
(
Senya
.
check_set_prism
,
nil
)
>
1
then
if
og
:
FilterCount
(
Senya
.
check_set_prism
,
nil
)
==
2
then
local
rg
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
rg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
m
*
16
+
1
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
...
...
expansions/script/c37564430.lua
View file @
a1e809fc
...
...
@@ -33,7 +33,7 @@ function cm.sfilter(c,e,tp,g)
end
function
cm
.
scheck
(
g
,
c
,
tp
)
if
c
:
IsLocation
(
LOCATION_EXTRA
)
then
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
c
)
>
0
end
return
Duel
.
GetMZoneCount
(
tp
)
+
g
:
GetCount
(
)
>
0
return
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
end
function
cm
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
rfilter
,
tp
,
LOCATION_MZONE
,
0
,
e
:
GetHandler
())
...
...
expansions/script/c37564508.lua
View file @
a1e809fc
...
...
@@ -27,21 +27,21 @@ function cm.spcon(e,c)
if
c
==
nil
then
return
true
end
return
Duel
.
GetFieldGroupCount
(
c
:
GetControler
(),
LOCATION_MZONE
,
0
)
==
0
and
Duel
.
GetMZoneCount
(
c
:
GetControler
())
>
0
end
function
cm
.
filter
(
c
,
e
,
tp
)
function
cm
.
filter
(
c
,
e
,
tp
,
ec
)
return
c
:
IsCode
(
37564765
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
and
Duel
.
GetMZoneCount
(
tp
,
ec
,
tp
)
>
0
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
l
=
e
:
GetLabel
()
e
:
SetLabel
(
0
)
local
mft
=
0
if
l
==
1
and
e
:
GetHandler
():
GetSequence
()
<
5
then
mft
=-
1
end
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
mft
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
local
ec
=
l
==
1
and
e
:
GetHandler
()
or
nil
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
mft
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
ec
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
cm
.
operation
(
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_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
...
...
expansions/script/c37564549.lua
View file @
a1e809fc
...
...
@@ -94,7 +94,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function
cm
.
f2
(
c
,
e
,
tp
,
tc
)
return
c
.
Senya_desc_with_nanahira
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationFromEx
(
tp
,
tp
,
Group
.
FromCards
(
tc
)
,
c
)
>
0
return
c
.
Senya_desc_with_nanahira
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationFromEx
(
tp
,
tp
,
tc
,
c
)
>
0
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
te
=
e
:
GetLabelObject
()
...
...
@@ -102,9 +102,6 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if
not
te
then
return
false
end
local
tc
=
te
:
GetLabelObject
()
if
not
tc
or
tc
:
GetFlagEffect
(
m
)
==
0
or
not
tc
:
IsAbleToExtra
()
then
return
false
end
local
ft
=
0
if
tc
:
IsControler
(
tp
)
then
ft
=-
1
end
if
Duel
.
GetMZoneCount
(
tp
)
<=
ft
then
return
false
end
if
not
Duel
.
IsExistingMatchingCard
(
cm
.
f2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
tc
,
e
,
tp
,
tc
)
then
return
false
end
return
tc
==
Duel
.
GetAttacker
()
or
tc
==
Duel
.
GetAttackTarget
()
end
...
...
expansions/script/c37564765.lua
View file @
a1e809fc
...
...
@@ -9,38 +9,7 @@ aux.BeginPuzzle=aux.TRUE
cm
.
delay
=
0x14000
cm
.
fix
=
0x40400
cm
.
m
=
37564765
--supporting mr3
if
not
Duel
.
GetLocationCountFromEx
then
cm
.
master_rule_3_flag
=
true
Card
.
IsSynchroType
=
Card
.
IsFusionType
Card
.
IsXyzType
=
Card
.
IsFusionType
Card
.
IsLinkType
=
Card
.
IsFusionType
Duel
.
FilterPlayerEffect
=
Duel
.
IsPlayerAffectedByEffect
TYPE_LINK
=
bit
.
lshift
(
TYPE_SPSUMMON
,
1
)
SUMMON_TYPE_LINK
=
0x4c000000
EFFECT_CANNOT_BE_LINK_MATERIAL
=
0
function
Duel
.
GetLocationCountFromEx
(
tp
,
p
,
sg
,
c
)
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
if
sg
then
ft
=
ft
+
sg
:
FilterCount
(
aux
.
FConditionCheckF
,
nil
,
tp
)
end
return
ft
end
function
Duel
.
GetUsableMZoneCount
(
tp
)
return
Duel
.
GetMZoneCount
(
tp
)
end
local
pz
=
LOCATION_PZONE
LOCATION_PZONE
=
LOCATION_SZONE
local
effect_set_range
=
Effect
.
SetRange
function
Effect
.
SetRange
(
e
,
r
)
local
r
=
r
if
e
:
GetOwner
():
IsType
(
TYPE_PENDULUM
)
and
r
==
LOCATION_SZONE
then
r
=
pz
end
return
effect_set_range
(
e
,
r
)
end
function
Card
.
IsSummonType
(
c
,
t
)
return
bit
.
band
(
c
:
GetSummonType
(),
t
)
==
t
end
end
function
cm
.
DescriptionInNanahira
(
id
)
id
=
id
or
0
return
37564765
*
16
+
id
...
...
@@ -308,7 +277,11 @@ function cm.OverlayGroup(c,g,xm,nchk)
Duel
.
Overlay
(
c
,
tg
)
end
function
cm
.
CheckFieldFilter
(
g
,
tp
,
c
,
f
,
...
)
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
c
)
>
0
and
(
not
f
or
f
(
g
,
...
))
if
c
:
IsLocation
(
LOCATION_EXTRA
)
then
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
c
)
>
0
and
(
not
f
or
f
(
g
,
...
))
else
return
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
and
(
not
f
or
f
(
g
,
...
))
end
end
--xyz summon of prim
function
cm
.
AddXyzProcedureRank
(
c
,
rk
,
f
,
minct
,
maxct
,
xm
,
...
)
...
...
@@ -772,9 +745,8 @@ function cm.PrismCommonEffect(c,tg,op,istg,ctg)
end
return
e1
end
function
cm
.
PrismSpsummonFilter
(
c
,
ft
)
if
ft
==
0
and
c
:
GetSequence
()
>
4
then
return
false
end
return
c
:
IsAbleToHand
()
and
cm
.
CheckPrism
(
c
)
and
c
:
IsFaceup
()
function
cm
.
PrismSpsummonFilter
(
c
,
tp
)
return
c
:
IsAbleToHand
()
and
cm
.
CheckPrism
(
c
)
and
c
:
IsFaceup
()
and
Duel
.
GetMZoneCount
(
tp
,
c
,
tp
)
>
0
end
function
cm
.
PrismSpsummonCost
(
cd
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
@@ -784,12 +756,10 @@ return function(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
cm
.
PrismSpsummonTarget
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
PrismSpsummonFilter
(
chkc
,
ft
)
end
if
chk
==
0
then
return
ft
>-
1
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingTarget
(
cm
.
PrismSpsummonFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
ft
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
PrismSpsummonFilter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingTarget
(
cm
.
PrismSpsummonFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
PrismSpsummonFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
ft
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
PrismSpsummonFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
tp
,
LOCATION_MZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
...
...
@@ -934,19 +904,16 @@ function cm.PrismAdvanceCommonEffect(c,fr)
end
return
e1
end
function
cm
.
PrismProcFilter
(
c
,
ft
)
if
ft
==
0
and
c
:
GetSequence
()
>
4
then
return
false
end
return
cm
.
CheckPrism
(
c
)
function
cm
.
PrismProcFilter
(
c
,
tp
)
return
cm
.
CheckPrism
(
c
)
and
Duel
.
GetMZoneCount
(
tp
,
c
,
tp
)
>
0
end
function
cm
.
PrismProcCondition
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
return
ft
>-
1
and
Duel
.
CheckReleaseGroup
(
tp
,
cm
.
PrismProcFilter
,
1
,
nil
,
ft
)
return
Duel
.
CheckReleaseGroup
(
tp
,
cm
.
PrismProcFilter
,
1
,
nil
,
tp
)
end
function
cm
.
PrismProcOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
ft
=
Duel
.
GetMZoneCount
(
tp
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
cm
.
PrismProcFilter
,
1
,
1
,
nil
,
ft
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
cm
.
PrismProcFilter
,
1
,
1
,
nil
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
end
--prism xyz multi-count xyz proc
...
...
@@ -2429,13 +2396,10 @@ function cm.CheckPendulum(c)
local
tp
=
c
:
GetControler
()
return
cm
.
GetPendulumCard
(
tp
,
0
)
==
c
or
cm
.
GetPendulumCard
(
tp
,
1
)
==
c
end
function
cm
.
CheckMFilter
(
c
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
and
c
:
IsControler
(
tp
)
end
function
cm
.
CheckSummonLocation
(
c
,
tp
,
g
)
local
g
=
g
or
Group
.
CreateGroup
()
if
c
:
IsLocation
(
LOCATION_EXTRA
)
then
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
c
)
>
0
end
return
Duel
.
GetMZoneCount
(
tp
)
+
g
:
FilterCount
(
cm
.
CheckMFilter
,
nil
)
>
0
return
Duel
.
GetMZoneCount
(
tp
,
g
,
tp
)
>
0
end
function
cm
.
AND
(
...
)
local
t
=
{
...
}
...
...
@@ -2549,4 +2513,17 @@ function cm.DFCBackSideCommonEffect(c)
Duel
.
SetMetatable
(
c
,
_G
[
"c"
..
tcode
])
end
)
c
:
RegisterEffect
(
e2
)
end
--for ritual update
function
cm
.
CheckRitualMaterialGoal
(
g
,
c
,
tp
,
lv
,
f
)
local
ct
=
g
:
GetCount
()
return
cm
.
CheckSummonLocation
(
c
,
tp
,
g
)
and
g
:
CheckWithSumEqual
(
f
,
lv
,
ct
,
ct
,
c
)
end
function
cm
.
CheckRitualMaterial
(
c
,
g
,
tp
,
lv
,
f
)
local
f
=
f
or
Card
.
GetRitualLevel
return
cm
.
CheckGroup
(
g
,
cm
.
CheckRitualMaterialGoal
,
nil
,
1
,
99
,
c
,
tp
,
lv
,
f
)
end
function
cm
.
SelectRitualMaterial
(
c
,
g
,
tp
,
lv
,
f
)
local
f
=
f
or
Card
.
GetRitualLevel
return
cm
.
SelectGroup
(
tp
,
HINTMSG_RELEASE
,
g
,
cm
.
CheckRitualMaterialGoal
,
nil
,
1
,
99
,
c
,
tp
,
lv
,
f
)
end
\ No newline at end of file
expansions/script/c37564844.lua
View file @
a1e809fc
...
...
@@ -80,15 +80,13 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
Release
(
c
,
REASON_COST
)
end
function
cm
.
sfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
()
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
.
GetMZoneCount
(
tp
)
>-
1
and
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
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
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
.
sfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
...
...
expansions/script/c37564846.lua
View file @
a1e809fc
...
...
@@ -33,7 +33,7 @@ function cm.battlecheck(c,tp)
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
rp
==
tp
or
eg
:
GetCount
()
~=
1
or
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
false
end
if
rp
==
tp
or
eg
:
GetCount
()
~=
then
return
false
end
local
tc
=
eg
:
GetFirst
()
if
not
Senya
.
check_set_3L
(
tc
)
or
not
tc
:
IsType
(
TYPE_MONSTER
)
or
not
tc
:
IsLocation
(
LOCATION_GRAVE
)
or
not
tc
:
IsAbleToRemove
()
or
not
cm
.
battlecheck
(
tc
,
tp
)
then
return
false
end
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
mfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
...
...
@@ -44,7 +44,7 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
or
not
tc
:
IsRelateToEffect
(
e
)
or
not
tc
:
IsAbleToRemove
()
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
if
not
tc
:
IsRelateToEffect
(
e
)
or
not
tc
:
IsAbleToRemove
()
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
mfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
,
tc
)
...
...
expansions/script/c37564901.lua
View file @
a1e809fc
...
...
@@ -21,17 +21,7 @@ function cm.filter(c,e,tp,m1,m2,ft)
if
c
.
mat_filter
then
mg
=
mg
:
Filter
(
c
.
mat_filter
,
nil
)
end
if
ft
>
0
then
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
else
return
ft
>-
1
and
mg
:
IsExists
(
cm
.
mfilterf
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
function
cm
.
mfilterf
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
0
,
99
,
rc
)
else
return
false
end
return
Senya
.
CheckRitualMaterial
(
c
,
mg
,
tp
,
c
:
GetLevel
())
end
function
cm
.
mfilter
(
c
)
return
c
:
GetLevel
()
>
0
and
Senya
.
check_set_sayuri
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemove
()
...
...
@@ -64,18 +54,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if
tc
.
mat_filter
then
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
nil
)
end
local
mat
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
cm
.
mfilterf
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
mat
:
Merge
(
mat2
)
end
local
mat
=
mat
=
Senya
.
CheckRitualMaterial
(
tc
,
mg
,
tp
,
tc
:
GetLevel
())
tc
:
SetMaterial
(
mat
)
Senya
.
SayuriCheckTrigger
(
tc
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ReleaseRitualMaterial
(
mat
)
...
...
expansions/script/c37564902.lua
View file @
a1e809fc
...
...
@@ -20,17 +20,7 @@ function cm.filter(c,e,tp,mg,ft)
if
c
.
mat_filter
then
mg
=
mg
:
Filter
(
c
.
mat_filter
,
nil
)
end
if
ft
>
0
then
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
else
return
ft
>-
1
and
mg
:
IsExists
(
cm
.
mfilterf
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
function
cm
.
mfilterf
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
0
,
99
,
rc
)
else
return
false
end
return
Senya
.
CheckRitualMaterial
(
c
,
mg
,
tp
,
c
:
GetLevel
())
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
...
...
@@ -57,18 +47,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if
tc
.
mat_filter
then
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
nil
)
end
local
mat
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
cm
.
mfilterf
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
mat
:
Merge
(
mat2
)
end
local
mat
=
mat
=
Senya
.
CheckRitualMaterial
(
tc
,
mg
,
tp
,
tc
:
GetLevel
())
tc
:
SetMaterial
(
mat
)
Senya
.
SayuriCheckTrigger
(
tc
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ReleaseRitualMaterial
(
mat
)
...
...
expansions/script/c37564903.lua
View file @
a1e809fc
--
graz
e
--
alic
e
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
local
m
,
cm
=
Senya
.
SayuriSpellPreload
(
37564903
)
function
cm
.
initial_effect
(
c
)
...
...
@@ -20,17 +20,7 @@ function cm.filter(c,e,tp,mg,ft)
if
c
.
mat_filter
then
mg
=
mg
:
Filter
(
c
.
mat_filter
,
nil
)
end
if
ft
>
0
then
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
1
,
99
,
c
)
else
return
ft
>-
1
and
mg
:
IsExists
(
cm
.
mfilterf
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
function
cm
.
mfilterf
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumEqual
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
0
,
99
,
rc
)
else
return
false
end
return
Senya
.
CheckRitualMaterial
(
c
,
mg
,
tp
,
c
:
GetLevel
())
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
...
...
@@ -57,18 +47,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if
tc
.
mat_filter
then
mg
=
mg
:
Filter
(
tc
.
mat_filter
,
nil
)
end
local
mat
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
1
,
99
,
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
cm
.
mfilterf
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumEqual
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
0
,
99
,
tc
)
mat
:
Merge
(
mat2
)
end
local
mat
=
mat
=
Senya
.
CheckRitualMaterial
(
tc
,
mg
,
tp
,
tc
:
GetLevel
())
tc
:
SetMaterial
(
mat
)
Senya
.
SayuriCheckTrigger
(
tc
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ReleaseRitualMaterial
(
mat
)
...
...
expansions/script/c57300000.lua
View file @
a1e809fc
...
...
@@ -494,10 +494,10 @@ function cm.WindbotSSCost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
function
cm
.
WindbotSSFilter
(
c
,
e
,
tp
)
return
cm
.
IsWindbot
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
and
not
c
:
IsCode
(
e
:
GetHandler
():
GetCode
())
return
cm
.
IsWindbot
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
and
not
c
:
IsCode
(
e
:
GetHandler
():
GetCode
())
and
Duel
.
GetMZoneCount
(
tp
,
c
,
tp
)
>
0
end
function
cm
.
WindbotSSTarget
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
WindbotSSFilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
WindbotSSFilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
LOCATION_DECK
)
end
function
cm
.
WindbotSSOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
expansions/script/c57310001.lua
deleted
100644 → 0
View file @
a7e71361
--ENS·绯色月下、狂咲之绝
if
not
pcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
)
then
require
(
"script/c37564765"
)
end
function
c57310001
.
initial_effect
(
c
)
Senya
.
ens
(
c
,
57310001
)
Senya
.
NegateEffectModule
(
c
,
1
,
57310001
,
Senya
.
SelfReleaseCost
,
c57310001
.
con
,
Senya
.
ensop
(
57310001
))
end
function
c57310001
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
end
\ No newline at end of file
expansions/script/c57310002.lua
deleted
100644 → 0
View file @
a7e71361
--ENS·死奏怜音、玲珑之终
if
not
pcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
)
then
require
(
"script/c37564765"
)
end
function
c57310002
.
initial_effect
(
c
)
Senya
.
ens
(
c
,
57310002
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
37564765
,
5
))
e3
:
SetCategory
(
CATEGORY_DISABLE_SUMMON
+
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EVENT_SPSUMMON
)
e3
:
SetCountLimit
(
1
,
57310002
)
e3
:
SetCondition
(
c57310002
.
discon
)
e3
:
SetCost
(
Senya
.
SelfReleaseCost
)
e3
:
SetTarget
(
c57310002
.
distg
)
e3
:
SetOperation
(
c57310002
.
disop
)
c
:
RegisterEffect
(
e3
)
local
e1
=
e3
:
Clone
()
e1
:
SetCode
(
EVENT_FLIP_SUMMON
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e3
:
Clone
()
e2
:
SetCode
(
EVENT_SUMMON
)
c
:
RegisterEffect
(
e2
)
end
function
c57310002
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentChain
()
==
0
end
function
c57310002
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
eg
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
eg
:
GetCount
(),
0
,
0
)
end
function
c57310002
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Senya
.
ensop
(
57310002
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
\ No newline at end of file
expansions/script/c57310003.lua
deleted
100644 → 0
View file @
a7e71361
--ENS·风导星歌、黎明之景
if
not
pcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
)
then
require
(
"script/c37564765"
)
end
function
c57310003
.
initial_effect
(
c
)
Senya
.
ens
(
c
,
57310003
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
37564765
,
5
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
Senya
.
SelfReleaseCost
)
e1
:
SetCondition
(
c57310003
.
condition
)
e1
:
SetTarget
(
c57310003
.
target
)
e1
:
SetOperation
(
c57310003
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c57310003
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
Duel
.
GetTurnPlayer
()
end
function
c57310003
.
filter
(
c
)
return
c
:
IsAttackPos
()
and
c
:
IsAbleToRemove
()
end
function
c57310003
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c57310003
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c57310003
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c57310003
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c57310003
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
>
0
then
Senya
.
ensop
(
57310003
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
\ No newline at end of file
expansions/script/c57310004.lua
deleted
100644 → 0
View file @
a7e71361
--ENS·幽音绝花、缭乱之彩
if
not
pcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
)
then
require
(
"script/c37564765"
)
end
function
c57310004
.
initial_effect
(
c
)
Senya
.
ens
(
c
,
57310004
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
37564765
,
5
))
e3
:
SetCategory
(
CATEGORY_REMOVE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_HAND
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
57310004
)
e3
:
SetCost
(
Senya
.
SelfReleaseCost
)
e3
:
SetCondition
(
c57310004
.
hdcon
)
e3
:
SetTarget
(
c57310004
.
hdtg
)
e3
:
SetOperation
(
c57310004
.
hdop
)
c
:
RegisterEffect
(
e3
)
end
function
c57310004
.
cfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_DECK
)
end
function
c57310004
.
hdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DRAW
and
eg
:
IsExists
(
c57310004
.
cfilter
,
1
,
nil
,
1
-
tp
)
end
function
c57310004
.
hdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
e
:
GetHandler
():
IsFaceup
()
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_HAND
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c57310004
.
hdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_HAND
,
nil
)
if
g
:
GetCount
()
>
0
then
local
sg
=
g
:
RandomSelect
(
tp
,
1
)
if
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_EFFECT
)
>
0
then
Senya
.
ensop
(
57310004
)(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
\ No newline at end of file
expansions/script/c57310005.lua
deleted
100644 → 0
View file @
a7e71361
--樱华月想
function
c57310005
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c57310005
.
target
)
e1
:
SetOperation
(
c57310005
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c57310005
.
filter
(
c
)
return
c
:
IsHasEffect
(
57310000
)
and
c
:
IsAbleToHand
()
end
function
c57310005
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c57310005
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c57310005
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c57310005
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
\ No newline at end of file
expansions/script/c57310006.lua
deleted
100644 → 0
View file @
a7e71361
--梦幻泡影
function
c57310006
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
57310006
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c57310006
.
target
)
e1
:
SetOperation
(
c57310006
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c57310006
.
filter
(
c
,
e
,
tp
)
return
c
:
IsHasEffect
(
57310000
)
end
function
c57310006
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c57310006
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingTarget
(
c57310006
.
filter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c57310006
.
filter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
1
,
nil
,
e
,
tp
)
end
function
c57310006
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
GetMZoneCount
(
tp
)
>
0
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_MZONE
,
POS_FACEUP
,
true
)
end
end
expansions/script/c57310007.lua
deleted
100644 → 0
View file @
a7e71361
--Sweets Time
function
c57310007
.
initial_effect
(
c
)
--Senya.nntr(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
57310007
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
57310007
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c57310007
.
decon
)
e1
:
SetTarget
(
c57310007
.
target
)
e1
:
SetOperation
(
c57310007
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c57310007
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsHasEffect
(
57310000
)
end
function
c57310007
.
decon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c57310007
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c57310007
.
defilter
(
c
)
return
c
:
IsDestructable
()
end
function
c57310007
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c57310007
.
defilter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c57310007
.
defilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c57310007
.
defilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c57310007
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
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