Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
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
八宫一月
ygopro-scripts
Commits
6730524c
Commit
6730524c
authored
May 04, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e6a3e6e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
+23
-10
utility.lua
utility.lua
+23
-10
No files found.
utility.lua
View file @
6730524c
...
@@ -541,6 +541,7 @@ function Auxiliary.FCheckMix(c,mg,sg,fc,sub,fun1,fun2,...)
...
@@ -541,6 +541,7 @@ function Auxiliary.FCheckMix(c,mg,sg,fc,sub,fun1,fun2,...)
return
fun1
(
c
,
fc
,
sub
)
return
fun1
(
c
,
fc
,
sub
)
end
end
end
end
--if sg1 is subset of sg2 then not Auxiliary.FCheckAdditional(tp,sg1,fc) -> not Auxiliary.FCheckAdditional(tp,sg2,fc)
Auxiliary
.
FCheckAdditional
=
nil
Auxiliary
.
FCheckAdditional
=
nil
function
Auxiliary
.
FCheckMixGoal
(
tp
,
sg
,
fc
,
sub
,
...
)
function
Auxiliary
.
FCheckMixGoal
(
tp
,
sg
,
fc
,
sub
,
...
)
local
g
=
Group
.
CreateGroup
()
local
g
=
Group
.
CreateGroup
()
...
@@ -642,6 +643,7 @@ function Auxiliary.FCheckMixRep(c,sg,g,fc,sub,cc,fun1,fun2,...)
...
@@ -642,6 +643,7 @@ function Auxiliary.FCheckMixRep(c,sg,g,fc,sub,cc,fun1,fun2,...)
res
=
sg
:
IsExists
(
Auxiliary
.
FCheckMixRep
,
1
,
g
,
sg
,
g
,
fc
,
false
,
cc
,
fun1
,
...
)
res
=
sg
:
IsExists
(
Auxiliary
.
FCheckMixRep
,
1
,
g
,
sg
,
g
,
fc
,
false
,
cc
,
fun1
,
...
)
end
end
elseif
fun1
(
c
,
fc
,
sub
)
then
elseif
fun1
(
c
,
fc
,
sub
)
then
if
sub
and
not
fun1
(
c
,
fc
,
false
)
then
sub
=
false
end
local
ct1
=
sg
:
FilterCount
(
fun1
,
g
,
fc
,
sub
)
local
ct1
=
sg
:
FilterCount
(
fun1
,
g
,
fc
,
sub
)
local
ct2
=
sg
:
FilterCount
(
fun1
,
g
,
fc
,
false
)
local
ct2
=
sg
:
FilterCount
(
fun1
,
g
,
fc
,
false
)
res
=
ct1
<=
cc
and
ct1
==
sg
:
GetCount
()
-
g
:
GetCount
()
and
(
not
sub
or
ct1
-
ct2
<=
1
)
res
=
ct1
<=
cc
and
ct1
==
sg
:
GetCount
()
-
g
:
GetCount
()
and
(
not
sub
or
ct1
-
ct2
<=
1
)
...
@@ -665,27 +667,38 @@ function Auxiliary.FCheckSelectMixRep(c,tp,mg,sg,g,fc,sub,cc,fun1,fun2,...)
...
@@ -665,27 +667,38 @@ function Auxiliary.FCheckSelectMixRep(c,tp,mg,sg,g,fc,sub,cc,fun1,fun2,...)
res
=
mg
:
IsExists
(
Auxiliary
.
FCheckSelectMixRep
,
1
,
g
,
tp
,
mg
,
sg
,
g
,
fc
,
false
,
cc
,
fun1
,
...
)
res
=
mg
:
IsExists
(
Auxiliary
.
FCheckSelectMixRep
,
1
,
g
,
tp
,
mg
,
sg
,
g
,
fc
,
false
,
cc
,
fun1
,
...
)
end
end
elseif
fun1
(
c
,
fc
,
sub
)
then
elseif
fun1
(
c
,
fc
,
sub
)
then
if
sub
and
not
fun1
(
c
,
fc
,
false
)
then
sub
=
false
end
local
ct1
=
sg
:
FilterCount
(
fun1
,
g
,
fc
,
sub
)
local
ct1
=
sg
:
FilterCount
(
fun1
,
g
,
fc
,
sub
)
local
ct2
=
sg
:
FilterCount
(
fun1
,
g
,
fc
,
false
)
local
ct2
=
sg
:
FilterCount
(
fun1
,
g
,
fc
,
false
)
if
ct1
<=
cc
and
ct1
==
sg
:
FilterCount
(
aux
.
TRUE
,
g
)
and
(
not
sub
or
ct1
-
ct2
<=
1
)
then
if
ct1
<=
cc
and
ct1
==
sg
:
FilterCount
(
aux
.
TRUE
,
g
)
and
(
not
sub
or
ct1
-
ct2
<=
1
)
then
local
g2
=
g
:
Clone
()
local
g2
=
g
:
Clone
()
g2
:
Merge
(
sg
)
g2
:
Merge
(
sg
)
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g2
,
fc
)
>
0
then
if
Auxiliary
.
FCheckAdditional
and
not
Auxiliary
.
FCheckAdditional
(
tp
,
g2
,
fc
)
then
res
=
not
Auxiliary
.
FCheckAdditional
or
Auxiliary
.
FCheckAdditional
(
tp
,
g2
,
fc
)
res
=
false
elseif
cc
>
0
then
elseif
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g2
,
fc
)
>
0
then
if
fun1
(
c
,
fc
,
false
)
then
res
=
true
res
=
mg
:
IsExists
(
Auxiliary
.
FCheckSelectMixRepM
,
1
,
g
,
tp
,
mg
,
sg
,
g
,
fc
,
sub
,
cc
-
1
,
fun1
)
else
elseif
sub
then
if
ct1
-
ct2
==
1
then
sub
=
false
end
res
=
mg
:
IsExists
(
Auxiliary
.
FCheckSelectMixRepM
,
1
,
g
,
tp
,
mg
,
sg
,
g
,
fc
,
false
,
cc
-
1
,
fun1
)
res
=
mg
:
IsExists
(
Auxiliary
.
FCheckSelectMixRepM
,
1
,
g
,
tp
,
mg
,
g2
,
fc
,
sub
,
cc
-
ct1
,
fun1
)
end
end
end
end
end
end
end
g
:
RemoveCard
(
c
)
g
:
RemoveCard
(
c
)
return
res
return
res
end
end
function
Auxiliary
.
FCheckSelectMixRepM
(
c
,
tp
,
...
)
function
Auxiliary
.
FCheckSelectMixRepM
(
c
,
tp
,
mg
,
g
,
fc
,
sub
,
cc
,
fun1
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
Auxiliary
.
FCheckSelectMixRep
(
c
,
tp
,
...
)
if
cc
>
0
and
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
fun1
(
c
,
fc
,
sub
)
then
g
:
AddCard
(
c
)
local
res
=
false
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
fc
)
>
0
then
res
=
true
else
if
not
fun1
(
c
,
fc
,
false
)
then
sub
=
false
end
res
=
mg
:
IsExists
(
Auxiliary
.
FCheckSelectMixRepM
,
1
,
g
,
tp
,
mg
,
g
,
fc
,
sub
,
cc
-
1
,
fun1
)
end
g
:
RemoveCard
(
c
)
return
res
end
end
end
function
Auxiliary
.
FSelectMixRep
(
c
,
tp
,
mg
,
sg
,
fc
,
sub
,
cc
,
...
)
function
Auxiliary
.
FSelectMixRep
(
c
,
tp
,
mg
,
sg
,
fc
,
sub
,
cc
,
...
)
sg
:
AddCard
(
c
)
sg
:
AddCard
(
c
)
...
...
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