Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts-888
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
4
Merge Requests
4
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
MyCard
ygopro-scripts-888
Commits
d0a226a4
Commit
d0a226a4
authored
Oct 30, 2023
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workaround fix #1269
parent
5b0dd112
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
utility.lua
utility.lua
+11
-7
No files found.
utility.lua
View file @
d0a226a4
...
...
@@ -45,8 +45,12 @@ function bit.replace(r,v,field,width)
return
(
r
&~
(
m
<<
f
))
|
((
v
&
m
)
<<
f
)
end
--Group check functions
Auxiliary
.
GCheckAdditional
=
nil
---Subgroup check function
---@param sg Group
---@param c Card
---@param g Group
---@return boolean
Auxiliary
.
GCheckAdditional
=
function
(
sg
,
c
,
g
)
return
true
end
--the table of xyz number
Auxiliary
.
xyz_number
=
{}
...
...
@@ -939,7 +943,7 @@ end
Auxiliary
.
SubGroupCaptured
=
nil
function
Auxiliary
.
CheckGroupRecursive
(
c
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
sg
:
AddCard
(
c
)
if
Auxiliary
.
GCheckAdditional
and
not
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
g
,
f
,
min
,
max
,
ext_params
)
then
if
Auxiliary
.
GCheckAdditional
and
not
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
g
)
then
sg
:
RemoveCard
(
c
)
return
false
end
...
...
@@ -950,7 +954,7 @@ function Auxiliary.CheckGroupRecursive(c,sg,g,f,min,max,ext_params)
end
function
Auxiliary
.
CheckGroupRecursiveCapture
(
c
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
sg
:
AddCard
(
c
)
if
Auxiliary
.
GCheckAdditional
and
not
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
g
,
f
,
min
,
max
,
ext_params
)
then
if
Auxiliary
.
GCheckAdditional
and
not
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
g
)
then
sg
:
RemoveCard
(
c
)
return
false
end
...
...
@@ -971,8 +975,8 @@ function Group.CheckSubGroup(g,f,min,max,...)
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
if
#
sg
==
max
and
(
not
f
(
sg
,
...
)
or
Auxiliary
.
GCheckAdditional
and
not
Auxiliary
.
GCheckAdditional
(
sg
,
nil
,
g
))
then
return
false
end
if
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
)
and
(
not
Auxiliary
.
GCheckAdditional
or
Auxiliary
.
GCheckAdditional
(
sg
,
nil
,
g
))
then
return
true
end
local
eg
=
g
:
Clone
()
for
c
in
Auxiliary
.
Next
(
g
-
sg
)
do
if
Auxiliary
.
CheckGroupRecursive
(
c
,
sg
,
eg
,
f
,
min
,
max
,
ext_params
)
then
return
true
end
...
...
@@ -1040,7 +1044,7 @@ function Auxiliary.CheckGroupRecursiveEach(c,sg,g,f,checks,ext_params)
return
false
end
sg
:
AddCard
(
c
)
if
Auxiliary
.
GCheckAdditional
and
not
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
g
,
f
,
min
,
max
,
ext_params
)
then
if
Auxiliary
.
GCheckAdditional
and
not
Auxiliary
.
GCheckAdditional
(
sg
,
c
,
g
)
then
sg
:
RemoveCard
(
c
)
return
false
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment