Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nemo Ma
no81cards
Commits
c231efb9
Commit
c231efb9
authored
Mar 23, 2024
by
POLYMER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
0b0c3e21
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
435 additions
and
18 deletions
+435
-18
expansions/script/c11451462.lua
expansions/script/c11451462.lua
+61
-1
expansions/script/c11451463.lua
expansions/script/c11451463.lua
+61
-1
expansions/script/c11451464.lua
expansions/script/c11451464.lua
+61
-1
expansions/script/c11451465.lua
expansions/script/c11451465.lua
+61
-1
expansions/script/c11451466.lua
expansions/script/c11451466.lua
+87
-4
expansions/script/c11451467.lua
expansions/script/c11451467.lua
+87
-4
expansions/script/c11451549.lua
expansions/script/c11451549.lua
+2
-1
expansions/script/c60152905.lua
expansions/script/c60152905.lua
+10
-3
expansions/script/c60152913.lua
expansions/script/c60152913.lua
+5
-2
No files found.
expansions/script/c11451462.lua
View file @
c231efb9
...
...
@@ -71,6 +71,66 @@ function cm.hspgcheck(lv,tp)
return
cm
.
fselect
(
g
,
lv
,
tp
)
--g:CheckSubGroup(cm.fselect,1,#g,lv,tp)
end
end
function
cm
.
CheckGroupRecursiveCapture
(
bool
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
eg
=
g
:
Clone
()
if
bool
then
cm
.
esg
=
sg
:
Clone
()
end
for
c
in
aux
.
Next
(
g
-
sg
)
do
sg
:
AddCard
(
c
)
if
not
Auxiliary
.
GCheckAdditional
or
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
eg
,
f
,
min
,
max
,
ext_params
)
then
if
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
table.unpack
(
ext_params
)))
then
for
sc
in
aux
.
Next
(
sg
-
cm
.
esg
)
do
Auxiliary
.
SubGroupCaptured
:
Merge
(
eg
:
Filter
(
cm
.
slfilter
,
nil
,
sc
))
end
end
if
#
sg
<
max
then
cm
.
CheckGroupRecursiveCapture
(
false
,
sg
,
eg
,
f
,
min
,
max
,
ext_params
)
end
end
sg
:
RemoveCard
(
c
)
eg
:
Sub
(
eg
:
Filter
(
cm
.
slfilter
,
nil
,
c
))
end
end
function
cm
.
slfilter
(
c
,
sc
)
return
cm
.
lvplus
(
c
)
==
cm
.
lvplus
(
sc
)
end
function
cm
.
SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
local
min
=
min
or
1
local
max
=
max
or
#
g
local
ext_params
=
{
...
}
local
sg
=
Group
.
CreateGroup
()
local
fg
=
Duel
.
GrabSelectedCard
()
if
#
fg
>
max
or
min
>
max
or
#
(
g
+
fg
)
<
min
then
return
nil
end
for
tc
in
aux
.
Next
(
fg
)
do
fg
:
SelectUnselect
(
sg
,
tp
,
false
,
false
,
min
,
max
)
end
sg
:
Merge
(
fg
)
local
finish
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
))
while
#
sg
<
max
do
Auxiliary
.
SubGroupCaptured
=
Group
.
CreateGroup
()
cm
.
CheckGroupRecursiveCapture
(
true
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
cg
=
Auxiliary
.
SubGroupCaptured
:
Clone
()
Auxiliary
.
SubGroupCaptured
:
Clear
()
cg
:
Sub
(
sg
)
finish
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
))
if
#
cg
==
0
then
break
end
local
cancel
=
not
finish
and
cancelable
local
tc
=
cg
:
SelectUnselect
(
sg
,
tp
,
finish
,
cancel
,
min
,
max
)
if
not
tc
then
break
end
if
not
fg
:
IsContains
(
tc
)
then
if
not
sg
:
IsContains
(
tc
)
then
sg
:
AddCard
(
tc
)
if
#
sg
==
max
then
finish
=
true
end
else
sg
:
RemoveCard
(
tc
)
end
elseif
cancelable
then
return
nil
end
end
if
finish
then
return
sg
else
return
nil
end
end
function
cm
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
...
...
@@ -143,7 +203,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
tc
=
tg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
aux
.
GCheckAdditional
=
cm
.
hspgcheck
(
cm
.
lvplus
(
tc
),
tp
)
rg
=
mg
:
SelectSubGroup
(
tp
,
cm
.
hspcheck
,
true
,
1
,
#
mg
,
cm
.
lvplus
(
tc
),
tp
)
rg
=
cm
.
SelectSubGroup
(
mg
,
tp
,
cm
.
hspcheck
,
true
,
1
,
#
mg
,
cm
.
lvplus
(
tc
),
tp
)
aux
.
GCheckAdditional
=
nil
end
Duel
.
ConfirmCards
(
1
-
tp
,
rg
:
Filter
(
Card
.
IsFacedown
,
nil
))
...
...
expansions/script/c11451463.lua
View file @
c231efb9
...
...
@@ -67,6 +67,66 @@ function cm.hspgcheck(lv,tp)
return
cm
.
fselect
(
g
,
lv
,
tp
)
end
end
function
cm
.
CheckGroupRecursiveCapture
(
bool
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
eg
=
g
:
Clone
()
if
bool
then
cm
.
esg
=
sg
:
Clone
()
end
for
c
in
aux
.
Next
(
g
-
sg
)
do
sg
:
AddCard
(
c
)
if
not
Auxiliary
.
GCheckAdditional
or
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
eg
,
f
,
min
,
max
,
ext_params
)
then
if
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
table.unpack
(
ext_params
)))
then
for
sc
in
aux
.
Next
(
sg
-
cm
.
esg
)
do
Auxiliary
.
SubGroupCaptured
:
Merge
(
eg
:
Filter
(
cm
.
slfilter
,
nil
,
sc
))
end
end
if
#
sg
<
max
then
cm
.
CheckGroupRecursiveCapture
(
false
,
sg
,
eg
,
f
,
min
,
max
,
ext_params
)
end
end
sg
:
RemoveCard
(
c
)
eg
:
Sub
(
eg
:
Filter
(
cm
.
slfilter
,
nil
,
c
))
end
end
function
cm
.
slfilter
(
c
,
sc
)
return
cm
.
lvplus
(
c
)
==
cm
.
lvplus
(
sc
)
end
function
cm
.
SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
local
min
=
min
or
1
local
max
=
max
or
#
g
local
ext_params
=
{
...
}
local
sg
=
Group
.
CreateGroup
()
local
fg
=
Duel
.
GrabSelectedCard
()
if
#
fg
>
max
or
min
>
max
or
#
(
g
+
fg
)
<
min
then
return
nil
end
for
tc
in
aux
.
Next
(
fg
)
do
fg
:
SelectUnselect
(
sg
,
tp
,
false
,
false
,
min
,
max
)
end
sg
:
Merge
(
fg
)
local
finish
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
))
while
#
sg
<
max
do
Auxiliary
.
SubGroupCaptured
=
Group
.
CreateGroup
()
cm
.
CheckGroupRecursiveCapture
(
true
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
cg
=
Auxiliary
.
SubGroupCaptured
:
Clone
()
Auxiliary
.
SubGroupCaptured
:
Clear
()
cg
:
Sub
(
sg
)
finish
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
))
if
#
cg
==
0
then
break
end
local
cancel
=
not
finish
and
cancelable
local
tc
=
cg
:
SelectUnselect
(
sg
,
tp
,
finish
,
cancel
,
min
,
max
)
if
not
tc
then
break
end
if
not
fg
:
IsContains
(
tc
)
then
if
not
sg
:
IsContains
(
tc
)
then
sg
:
AddCard
(
tc
)
if
#
sg
==
max
then
finish
=
true
end
else
sg
:
RemoveCard
(
tc
)
end
elseif
cancelable
then
return
nil
end
end
if
finish
then
return
sg
else
return
nil
end
end
function
cm
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
...
...
@@ -124,7 +184,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
tc
=
tg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
aux
.
GCheckAdditional
=
cm
.
hspgcheck
(
cm
.
lvplus
(
tc
),
tp
)
rg
=
mg
:
SelectSubGroup
(
tp
,
cm
.
hspcheck
,
true
,
1
,
#
mg
,
cm
.
lvplus
(
tc
),
tp
)
rg
=
cm
.
SelectSubGroup
(
mg
,
tp
,
cm
.
hspcheck
,
true
,
1
,
#
mg
,
cm
.
lvplus
(
tc
),
tp
)
aux
.
GCheckAdditional
=
nil
end
Duel
.
ConfirmCards
(
1
-
tp
,
rg
:
Filter
(
Card
.
IsFacedown
,
nil
))
...
...
expansions/script/c11451464.lua
View file @
c231efb9
...
...
@@ -101,6 +101,66 @@ function cm.hspgcheck(lv,tp)
return
cm
.
fselect
(
g
,
lv
,
tp
)
end
end
function
cm
.
CheckGroupRecursiveCapture
(
bool
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
eg
=
g
:
Clone
()
if
bool
then
cm
.
esg
=
sg
:
Clone
()
end
for
c
in
aux
.
Next
(
g
-
sg
)
do
sg
:
AddCard
(
c
)
if
not
Auxiliary
.
GCheckAdditional
or
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
eg
,
f
,
min
,
max
,
ext_params
)
then
if
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
table.unpack
(
ext_params
)))
then
for
sc
in
aux
.
Next
(
sg
-
cm
.
esg
)
do
Auxiliary
.
SubGroupCaptured
:
Merge
(
eg
:
Filter
(
cm
.
slfilter
,
nil
,
sc
))
end
end
if
#
sg
<
max
then
cm
.
CheckGroupRecursiveCapture
(
false
,
sg
,
eg
,
f
,
min
,
max
,
ext_params
)
end
end
sg
:
RemoveCard
(
c
)
eg
:
Sub
(
eg
:
Filter
(
cm
.
slfilter
,
nil
,
c
))
end
end
function
cm
.
slfilter
(
c
,
sc
)
return
cm
.
lvplus
(
c
)
==
cm
.
lvplus
(
sc
)
end
function
cm
.
SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
local
min
=
min
or
1
local
max
=
max
or
#
g
local
ext_params
=
{
...
}
local
sg
=
Group
.
CreateGroup
()
local
fg
=
Duel
.
GrabSelectedCard
()
if
#
fg
>
max
or
min
>
max
or
#
(
g
+
fg
)
<
min
then
return
nil
end
for
tc
in
aux
.
Next
(
fg
)
do
fg
:
SelectUnselect
(
sg
,
tp
,
false
,
false
,
min
,
max
)
end
sg
:
Merge
(
fg
)
local
finish
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
))
while
#
sg
<
max
do
Auxiliary
.
SubGroupCaptured
=
Group
.
CreateGroup
()
cm
.
CheckGroupRecursiveCapture
(
true
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
cg
=
Auxiliary
.
SubGroupCaptured
:
Clone
()
Auxiliary
.
SubGroupCaptured
:
Clear
()
cg
:
Sub
(
sg
)
finish
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
))
if
#
cg
==
0
then
break
end
local
cancel
=
not
finish
and
cancelable
local
tc
=
cg
:
SelectUnselect
(
sg
,
tp
,
finish
,
cancel
,
min
,
max
)
if
not
tc
then
break
end
if
not
fg
:
IsContains
(
tc
)
then
if
not
sg
:
IsContains
(
tc
)
then
sg
:
AddCard
(
tc
)
if
#
sg
==
max
then
finish
=
true
end
else
sg
:
RemoveCard
(
tc
)
end
elseif
cancelable
then
return
nil
end
end
if
finish
then
return
sg
else
return
nil
end
end
function
cm
.
pccost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
not
c
:
IsPublic
()
end
...
...
@@ -180,7 +240,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
tc
=
tg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
aux
.
GCheckAdditional
=
cm
.
hspgcheck
(
cm
.
lvplus
(
tc
),
tp
)
rg
=
mg
:
SelectSubGroup
(
tp
,
cm
.
hspcheck
,
true
,
1
,
#
mg
,
cm
.
lvplus
(
tc
),
tp
)
rg
=
cm
.
SelectSubGroup
(
mg
,
tp
,
cm
.
hspcheck
,
true
,
1
,
#
mg
,
cm
.
lvplus
(
tc
),
tp
)
aux
.
GCheckAdditional
=
nil
end
Duel
.
ConfirmCards
(
1
-
tp
,
rg
:
Filter
(
Card
.
IsFacedown
,
nil
))
...
...
expansions/script/c11451465.lua
View file @
c231efb9
...
...
@@ -85,6 +85,66 @@ function cm.hspgcheck(lv,tp)
return
cm
.
fselect
(
g
,
lv
,
tp
)
end
end
function
cm
.
CheckGroupRecursiveCapture
(
bool
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
eg
=
g
:
Clone
()
if
bool
then
cm
.
esg
=
sg
:
Clone
()
end
for
c
in
aux
.
Next
(
g
-
sg
)
do
sg
:
AddCard
(
c
)
if
not
Auxiliary
.
GCheckAdditional
or
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
eg
,
f
,
min
,
max
,
ext_params
)
then
if
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
table.unpack
(
ext_params
)))
then
for
sc
in
aux
.
Next
(
sg
-
cm
.
esg
)
do
Auxiliary
.
SubGroupCaptured
:
Merge
(
eg
:
Filter
(
cm
.
slfilter
,
nil
,
sc
))
end
end
if
#
sg
<
max
then
cm
.
CheckGroupRecursiveCapture
(
false
,
sg
,
eg
,
f
,
min
,
max
,
ext_params
)
end
end
sg
:
RemoveCard
(
c
)
eg
:
Sub
(
eg
:
Filter
(
cm
.
slfilter
,
nil
,
c
))
end
end
function
cm
.
slfilter
(
c
,
sc
)
return
cm
.
lvplus
(
c
)
==
cm
.
lvplus
(
sc
)
end
function
cm
.
SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
local
min
=
min
or
1
local
max
=
max
or
#
g
local
ext_params
=
{
...
}
local
sg
=
Group
.
CreateGroup
()
local
fg
=
Duel
.
GrabSelectedCard
()
if
#
fg
>
max
or
min
>
max
or
#
(
g
+
fg
)
<
min
then
return
nil
end
for
tc
in
aux
.
Next
(
fg
)
do
fg
:
SelectUnselect
(
sg
,
tp
,
false
,
false
,
min
,
max
)
end
sg
:
Merge
(
fg
)
local
finish
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
))
while
#
sg
<
max
do
Auxiliary
.
SubGroupCaptured
=
Group
.
CreateGroup
()
cm
.
CheckGroupRecursiveCapture
(
true
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
cg
=
Auxiliary
.
SubGroupCaptured
:
Clone
()
Auxiliary
.
SubGroupCaptured
:
Clear
()
cg
:
Sub
(
sg
)
finish
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
))
if
#
cg
==
0
then
break
end
local
cancel
=
not
finish
and
cancelable
local
tc
=
cg
:
SelectUnselect
(
sg
,
tp
,
finish
,
cancel
,
min
,
max
)
if
not
tc
then
break
end
if
not
fg
:
IsContains
(
tc
)
then
if
not
sg
:
IsContains
(
tc
)
then
sg
:
AddCard
(
tc
)
if
#
sg
==
max
then
finish
=
true
end
else
sg
:
RemoveCard
(
tc
)
end
elseif
cancelable
then
return
nil
end
end
if
finish
then
return
sg
else
return
nil
end
end
function
cm
.
chcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
not
c
:
IsPublic
()
end
...
...
@@ -158,7 +218,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
tc
=
tg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
aux
.
GCheckAdditional
=
cm
.
hspgcheck
(
cm
.
lvplus
(
tc
),
tp
)
rg
=
mg
:
SelectSubGroup
(
tp
,
cm
.
hspcheck
,
true
,
1
,
#
mg
,
cm
.
lvplus
(
tc
),
tp
)
rg
=
cm
.
SelectSubGroup
(
mg
,
tp
,
cm
.
hspcheck
,
true
,
1
,
#
mg
,
cm
.
lvplus
(
tc
),
tp
)
aux
.
GCheckAdditional
=
nil
end
Duel
.
ConfirmCards
(
1
-
tp
,
rg
:
Filter
(
Card
.
IsFacedown
,
nil
))
...
...
expansions/script/c11451466.lua
View file @
c231efb9
...
...
@@ -84,7 +84,7 @@ function cm.fselect(g,ng,goal,tp)
return
true
end
aux
.
GCheckAdditional
=
cm
.
hspgcheck2
(
g
,
g
:
GetSum
(
cm
.
lvplus
)
-
goal
,
tp
)
local
tc
=
ng
:
CheckSubGroup
(
cm
.
fselect3
,
1
,
#
ng
,
g
,
g
:
GetSum
(
cm
.
lvplus
)
-
goal
,
tp
)
local
tc
=
cm
.
CheckSubGroup
(
ng
,
cm
.
fselect3
,
1
,
#
ng
,
g
,
g
:
GetSum
(
cm
.
lvplus
)
-
goal
,
tp
)
aux
.
GCheckAdditional
=
nil
return
tc
end
...
...
@@ -103,6 +103,89 @@ function cm.hspgcheck2(ng,goal,tp)
return
cm
.
fselect3
(
g
,
ng
,
goal
,
tp
)
end
end
function
cm
.
CheckSubGroup
(
g
,
f
,
min
,
max
,
...
)
local
min
=
min
or
1
local
max
=
max
or
#
g
if
min
>
max
then
return
false
end
local
ext_params
=
{
...
}
local
sg
=
Duel
.
GrabSelectedCard
()
if
#
sg
>
max
or
#
(
g
+
sg
)
<
min
then
return
false
end
if
#
sg
==
max
and
(
not
f
(
sg
,
...
)
or
Auxiliary
.
GCheckAdditional
and
not
Auxiliary
.
GCheckAdditional
(
sg
,
nil
,
g
,
f
,
min
,
max
,
ext_params
))
then
return
false
end
if
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
)
and
(
not
Auxiliary
.
GCheckAdditional
or
Auxiliary
.
GCheckAdditional
(
sg
,
nil
,
g
,
f
,
min
,
max
,
ext_params
))
then
return
true
end
return
cm
.
CheckGroupRecursive
(
sg
,
g
,
f
,
min
,
max
,
ext_params
)
end
function
cm
.
CheckGroupRecursive
(
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
eg
=
g
:
Clone
()
for
c
in
aux
.
Next
(
g
-
sg
)
do
sg
:
AddCard
(
c
)
if
not
Auxiliary
.
GCheckAdditional
or
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
eg
,
f
,
min
,
max
,
ext_params
)
then
if
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
table.unpack
(
ext_params
)))
or
(
#
sg
<
max
and
cm
.
CheckGroupRecursive
(
sg
,
eg
,
f
,
min
,
max
,
ext_params
))
then
return
true
end
end
sg
:
RemoveCard
(
c
)
eg
:
RemoveCard
(
c
)
end
return
false
end
function
cm
.
CheckGroupRecursiveCapture
(
bool
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
eg
=
g
:
Clone
()
if
bool
then
cm
.
esg
=
sg
:
Clone
()
end
for
c
in
aux
.
Next
(
g
-
sg
)
do
sg
:
AddCard
(
c
)
if
not
Auxiliary
.
GCheckAdditional
or
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
eg
,
f
,
min
,
max
,
ext_params
)
then
if
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
table.unpack
(
ext_params
)))
then
for
sc
in
aux
.
Next
(
sg
-
cm
.
esg
)
do
Auxiliary
.
SubGroupCaptured
:
Merge
(
eg
:
Filter
(
cm
.
slfilter
,
nil
,
sc
))
end
end
if
#
sg
<
max
then
cm
.
CheckGroupRecursiveCapture
(
false
,
sg
,
eg
,
f
,
min
,
max
,
ext_params
)
end
end
sg
:
RemoveCard
(
c
)
eg
:
Sub
(
eg
:
Filter
(
cm
.
slfilter
,
nil
,
c
))
end
end
function
cm
.
slfilter
(
c
,
sc
)
return
cm
.
lvplus
(
c
)
==
cm
.
lvplus
(
sc
)
end
function
cm
.
SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
local
min
=
min
or
1
local
max
=
max
or
#
g
local
ext_params
=
{
...
}
local
sg
=
Group
.
CreateGroup
()
local
fg
=
Duel
.
GrabSelectedCard
()
if
#
fg
>
max
or
min
>
max
or
#
(
g
+
fg
)
<
min
then
return
nil
end
for
tc
in
aux
.
Next
(
fg
)
do
fg
:
SelectUnselect
(
sg
,
tp
,
false
,
false
,
min
,
max
)
end
sg
:
Merge
(
fg
)
local
finish
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
))
while
#
sg
<
max
do
Auxiliary
.
SubGroupCaptured
=
Group
.
CreateGroup
()
cm
.
CheckGroupRecursiveCapture
(
true
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
cg
=
Auxiliary
.
SubGroupCaptured
:
Clone
()
Auxiliary
.
SubGroupCaptured
:
Clear
()
cg
:
Sub
(
sg
)
finish
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
))
if
#
cg
==
0
then
break
end
local
cancel
=
not
finish
and
cancelable
local
tc
=
cg
:
SelectUnselect
(
sg
,
tp
,
finish
,
cancel
,
min
,
max
)
if
not
tc
then
break
end
if
not
fg
:
IsContains
(
tc
)
then
if
not
sg
:
IsContains
(
tc
)
then
sg
:
AddCard
(
tc
)
if
#
sg
==
max
then
finish
=
true
end
else
sg
:
RemoveCard
(
tc
)
end
elseif
cancelable
then
return
nil
end
end
if
finish
then
return
sg
else
return
nil
end
end
function
cm
.
accost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
not
c
:
IsPublic
()
end
...
...
@@ -135,7 +218,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local
tg
=
Group
.
CreateGroup
()
for
sc
in
aux
.
Next
(
sg
)
do
--aux.GCheckAdditional=cm.hspgcheck
local
tc
=
trg
:
CheckSubGroup
(
cm
.
fselect
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
sc
),
tp
)
local
tc
=
cm
.
CheckSubGroup
(
trg
,
cm
.
fselect
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
sc
),
tp
)
--aux.GCheckAdditional=nil
if
tc
then
return
true
end
end
...
...
@@ -153,7 +236,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local
tg
=
Group
.
CreateGroup
()
for
sc
in
aux
.
Next
(
sg
)
do
--aux.GCheckAdditional=cm.hspgcheck
local
tc
=
trg
:
CheckSubGroup
(
cm
.
fselect
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
sc
),
tp
)
local
tc
=
cm
.
CheckSubGroup
(
trg
,
cm
.
fselect
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
sc
),
tp
)
--aux.GCheckAdditional=nil
if
tc
then
tg
:
AddCard
(
sc
)
end
end
...
...
@@ -170,7 +253,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if
rg
and
#
rg
>
0
and
rg
:
GetSum
(
cm
.
lvplus
)
>
cm
.
lvplus
(
tc
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
7
))
aux
.
GCheckAdditional
=
cm
.
hspgcheck2
(
rg
,
rg
:
GetSum
(
cm
.
lvplus
)
-
cm
.
lvplus
(
tc
),
tp
)
rg2
=
ng
:
SelectSubGroup
(
tp
,
cm
.
fselect3
,
true
,
1
,
#
ng
,
rg
,
rg
:
GetSum
(
cm
.
lvplus
)
-
cm
.
lvplus
(
tc
),
tp
)
rg2
=
cm
.
SelectSubGroup
(
ng
,
tp
,
cm
.
fselect3
,
true
,
1
,
#
ng
,
rg
,
rg
:
GetSum
(
cm
.
lvplus
)
-
cm
.
lvplus
(
tc
),
tp
)
aux
.
GCheckAdditional
=
nil
if
rg2
and
#
rg2
>
0
then
res
=
true
...
...
expansions/script/c11451467.lua
View file @
c231efb9
...
...
@@ -87,7 +87,7 @@ function cm.fselect(g,ng,goal,tp)
return
true
end
aux
.
GCheckAdditional
=
cm
.
hspgcheck2
(
g
,
g
:
GetSum
(
cm
.
lvplus
)
-
goal
,
tp
)
local
tc
=
ng
:
CheckSubGroup
(
cm
.
fselect3
,
1
,
#
ng
,
g
,
g
:
GetSum
(
cm
.
lvplus
)
-
goal
,
tp
)
local
tc
=
cm
.
CheckSubGroup
(
ng
,
cm
.
fselect3
,
1
,
#
ng
,
g
,
g
:
GetSum
(
cm
.
lvplus
)
-
goal
,
tp
)
aux
.
GCheckAdditional
=
nil
return
tc
end
...
...
@@ -106,6 +106,89 @@ function cm.hspgcheck2(ng,goal,tp)
return
cm
.
fselect3
(
g
,
ng
,
goal
,
tp
)
end
end
function
cm
.
CheckSubGroup
(
g
,
f
,
min
,
max
,
...
)
local
min
=
min
or
1
local
max
=
max
or
#
g
if
min
>
max
then
return
false
end
local
ext_params
=
{
...
}
local
sg
=
Duel
.
GrabSelectedCard
()
if
#
sg
>
max
or
#
(
g
+
sg
)
<
min
then
return
false
end
if
#
sg
==
max
and
(
not
f
(
sg
,
...
)
or
Auxiliary
.
GCheckAdditional
and
not
Auxiliary
.
GCheckAdditional
(
sg
,
nil
,
g
,
f
,
min
,
max
,
ext_params
))
then
return
false
end
if
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
)
and
(
not
Auxiliary
.
GCheckAdditional
or
Auxiliary
.
GCheckAdditional
(
sg
,
nil
,
g
,
f
,
min
,
max
,
ext_params
))
then
return
true
end
return
cm
.
CheckGroupRecursive
(
sg
,
g
,
f
,
min
,
max
,
ext_params
)
end
function
cm
.
CheckGroupRecursive
(
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
eg
=
g
:
Clone
()
for
c
in
aux
.
Next
(
g
-
sg
)
do
sg
:
AddCard
(
c
)
if
not
Auxiliary
.
GCheckAdditional
or
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
eg
,
f
,
min
,
max
,
ext_params
)
then
if
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
table.unpack
(
ext_params
)))
or
(
#
sg
<
max
and
cm
.
CheckGroupRecursive
(
sg
,
eg
,
f
,
min
,
max
,
ext_params
))
then
return
true
end
end
sg
:
RemoveCard
(
c
)
eg
:
RemoveCard
(
c
)
end
return
false
end
function
cm
.
CheckGroupRecursiveCapture
(
bool
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
eg
=
g
:
Clone
()
if
bool
then
cm
.
esg
=
sg
:
Clone
()
end
for
c
in
aux
.
Next
(
g
-
sg
)
do
sg
:
AddCard
(
c
)
if
not
Auxiliary
.
GCheckAdditional
or
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
eg
,
f
,
min
,
max
,
ext_params
)
then
if
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
table.unpack
(
ext_params
)))
then
for
sc
in
aux
.
Next
(
sg
-
cm
.
esg
)
do
Auxiliary
.
SubGroupCaptured
:
Merge
(
eg
:
Filter
(
cm
.
slfilter
,
nil
,
sc
))
end
end
if
#
sg
<
max
then
cm
.
CheckGroupRecursiveCapture
(
false
,
sg
,
eg
,
f
,
min
,
max
,
ext_params
)
end
end
sg
:
RemoveCard
(
c
)
eg
:
Sub
(
eg
:
Filter
(
cm
.
slfilter
,
nil
,
c
))
end
end
function
cm
.
slfilter
(
c
,
sc
)
return
cm
.
lvplus
(
c
)
==
cm
.
lvplus
(
sc
)
end
function
cm
.
SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
local
min
=
min
or
1
local
max
=
max
or
#
g
local
ext_params
=
{
...
}
local
sg
=
Group
.
CreateGroup
()
local
fg
=
Duel
.
GrabSelectedCard
()
if
#
fg
>
max
or
min
>
max
or
#
(
g
+
fg
)
<
min
then
return
nil
end
for
tc
in
aux
.
Next
(
fg
)
do
fg
:
SelectUnselect
(
sg
,
tp
,
false
,
false
,
min
,
max
)
end
sg
:
Merge
(
fg
)
local
finish
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
))
while
#
sg
<
max
do
Auxiliary
.
SubGroupCaptured
=
Group
.
CreateGroup
()
cm
.
CheckGroupRecursiveCapture
(
true
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
cg
=
Auxiliary
.
SubGroupCaptured
:
Clone
()
Auxiliary
.
SubGroupCaptured
:
Clear
()
cg
:
Sub
(
sg
)
finish
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
))
if
#
cg
==
0
then
break
end
local
cancel
=
not
finish
and
cancelable
local
tc
=
cg
:
SelectUnselect
(
sg
,
tp
,
finish
,
cancel
,
min
,
max
)
if
not
tc
then
break
end
if
not
fg
:
IsContains
(
tc
)
then
if
not
sg
:
IsContains
(
tc
)
then
sg
:
AddCard
(
tc
)
if
#
sg
==
max
then
finish
=
true
end
else
sg
:
RemoveCard
(
tc
)
end
elseif
cancelable
then
return
nil
end
end
if
finish
then
return
sg
else
return
nil
end
end
function
cm
.
chcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
not
c
:
IsPublic
()
end
...
...
@@ -175,7 +258,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local
tg
=
Group
.
CreateGroup
()
for
sc
in
aux
.
Next
(
sg
)
do
--aux.GCheckAdditional=cm.hspgcheck
local
tc
=
trg
:
CheckSubGroup
(
cm
.
fselect
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
sc
),
tp
)
local
tc
=
cm
.
CheckSubGroup
(
trg
,
cm
.
fselect
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
sc
),
tp
)
--aux.GCheckAdditional=nil
if
tc
then
return
true
end
end
...
...
@@ -193,7 +276,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local
tg
=
Group
.
CreateGroup
()
for
sc
in
aux
.
Next
(
sg
)
do
--aux.GCheckAdditional=cm.hspgcheck
local
tc
=
trg
:
CheckSubGroup
(
cm
.
fselect
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
sc
),
tp
)
local
tc
=
cm
.
CheckSubGroup
(
trg
,
cm
.
fselect
,
1
,
#
trg
,
ng
,
cm
.
lvplus
(
sc
),
tp
)
--aux.GCheckAdditional=nil
if
tc
then
tg
:
AddCard
(
sc
)
end
end
...
...
@@ -210,7 +293,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if
rg
and
#
rg
>
0
and
rg
:
GetSum
(
cm
.
lvplus
)
>
cm
.
lvplus
(
tc
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
7
))
aux
.
GCheckAdditional
=
cm
.
hspgcheck2
(
rg
,
rg
:
GetSum
(
cm
.
lvplus
)
-
cm
.
lvplus
(
tc
),
tp
)
rg2
=
ng
:
SelectSubGroup
(
tp
,
cm
.
fselect3
,
true
,
1
,
#
ng
,
rg
,
rg
:
GetSum
(
cm
.
lvplus
)
-
cm
.
lvplus
(
tc
),
tp
)
rg2
=
cm
.
SelectSubGroup
(
ng
,
tp
,
cm
.
fselect3
,
true
,
1
,
#
ng
,
rg
,
rg
:
GetSum
(
cm
.
lvplus
)
-
cm
.
lvplus
(
tc
),
tp
)
aux
.
GCheckAdditional
=
nil
if
rg2
and
#
rg2
>
0
then
res
=
true
...
...
expansions/script/c11451549.lua
View file @
c231efb9
...
...
@@ -61,13 +61,14 @@ function cm.CheckGroupRecursive(sg,g,f,min,max,ext_params)
end
function
cm
.
CheckGroupRecursiveCapture
(
bool
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
local
eg
=
g
:
Clone
()
if
bool
then
cm
.
esg
=
sg
:
Clone
()
end
for
c
in
aux
.
Next
(
g
-
sg
)
do
if
not
bool
or
not
Auxiliary
.
SubGroupCaptured
:
IsContains
(
c
)
then
sg
:
AddCard
(
c
)
if
not
Auxiliary
.
GCheckAdditional
or
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
eg
,
f
,
min
,
max
,
ext_params
)
then
if
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
table.unpack
(
ext_params
)))
then
-- or (#sg<max and cm.CheckGroupRecursiveCapture(false,sg,eg,f,min,max,ext_params)) then
--Debug.Message(cm[0])
for
sc
in
aux
.
Next
(
sg
)
do
for
sc
in
aux
.
Next
(
sg
-
cm
.
esg
)
do
Auxiliary
.
SubGroupCaptured
:
Merge
(
eg
:
Filter
(
cm
.
slfilter
,
nil
,
sc
))
end
end
...
...
expansions/script/c60152905.lua
View file @
c231efb9
...
...
@@ -16,7 +16,7 @@ function c60152905.initial_effect(c)
e1
:
SetOperation
(
c60152905
.
e1op
)
c
:
RegisterEffect
(
e1
)
Duel
.
AddCustomActivityCounter
(
60152905
,
ACTIVITY_CHAIN
,
aux
.
TRUE
)
Duel
.
AddCustomActivityCounter
(
60152905
,
ACTIVITY_CHAIN
,
c60152905
.
chainfilter
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60152905
,
1
))
...
...
@@ -25,7 +25,7 @@ function c60152905.initial_effect(c)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
6012905
)
e2
:
SetCondition
(
c60152905
.
con
)
e2
:
SetCondition
(
c60152905
.
e2
con
)
e2
:
SetTarget
(
c60152905
.
e2tg
)
e2
:
SetOperation
(
c60152905
.
e2op
)
c
:
RegisterEffect
(
e2
)
...
...
@@ -42,6 +42,10 @@ function c60152905.initial_effect(c)
e3
:
SetOperation
(
c60152905
.
e3op
)
c
:
RegisterEffect
(
e3
)
end
function
c60152905
.
chainfilter
(
re
,
tp
,
cid
)
local
tp
=
re
:
GetControler
()
return
not
(
re
:
IsControler
(
1
-
tp
))
end
function
c60152905
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetMatchingGroupCount
(
Card
.
IsFacedown
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
==
0
end
...
...
@@ -103,9 +107,12 @@ function c60152905.e1op(e,tp,eg,ep,ev,re,r,rp)
tc
:
CompleteProcedure
()
end
end
function
c60152905
.
e2con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCustomActivityCount
(
60152905
,
tp
,
ACTIVITY_CHAIN
)
>
0
end
function
c60152905
.
e2tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
p
=
PLAYER_ALL
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
60152905
,
1
-
tp
,
ACTIVITY_CHAIN
)
~=
0
end
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
p
)
Duel
.
SetTargetParam
(
1000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
p
,
1000
)
...
...
expansions/script/c60152913.lua
View file @
c231efb9
...
...
@@ -106,7 +106,7 @@ function c60152913.e3op(e,tp,eg,ep,ev,re,r,rp)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
,
6012905
)
e5
:
SetCondition
(
c60152913
.
con
)
e5
:
SetCondition
(
c60152913
.
e22905
con
)
e5
:
SetTarget
(
c60152913
.
e22905tg
)
e5
:
SetOperation
(
c60152913
.
e22905op
)
c
:
RegisterEffect
(
e5
)
...
...
@@ -290,9 +290,12 @@ function c60152913.e22904op(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function
c60152913
.
e22905con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCustomActivityCount
(
60152905
,
tp
,
ACTIVITY_CHAIN
)
>
0
end
function
c60152913
.
e22905tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
p
=
PLAYER_ALL
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
60152905
,
1
-
tp
,
ACTIVITY_CHAIN
)
~=
0
end
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
p
)
Duel
.
SetTargetParam
(
1000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
p
,
1000
)
...
...
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