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
3
Merge Requests
3
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
75551df0
Commit
75551df0
authored
Jan 21, 2026
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check for goal before doing recursive when full mat group is provided
parent
0a8cb015
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
26 deletions
+36
-26
procedure.lua
procedure.lua
+36
-26
No files found.
procedure.lua
View file @
75551df0
...
@@ -202,14 +202,22 @@ function Auxiliary.SynMixCondition(f1,f2,f3,f4,minct,maxct,gc)
...
@@ -202,14 +202,22 @@ function Auxiliary.SynMixCondition(f1,f2,f3,f4,minct,maxct,gc)
end
end
local
mg
local
mg
local
mgchk
=
false
local
mgchk
=
false
local
goalchk
=
false
if
mg1
then
if
mg1
then
mg
=
mg1
:
Filter
(
Card
.
IsCanBeSynchroMaterial
,
nil
,
c
)
mgchk
=
true
mgchk
=
true
if
min
==
max
and
#
mg1
==
min
+
1
then
goalchk
=
Auxiliary
.
SynMixCheckGoal
(
tp
,
mg1
,
0
,
0
,
c
,
Group
.
CreateGroup
(),
smat
,
gc
,
mgchk
,
goalchk
)
if
not
goalchk
then
Duel
.
ResetFlagEffect
(
tp
,
8173184
+
1
)
return
false
end
end
mg
=
mg1
:
Filter
(
Card
.
IsCanBeSynchroMaterial
,
nil
,
c
)
else
else
mg
=
Auxiliary
.
GetSynMaterials
(
tp
,
c
)
mg
=
Auxiliary
.
GetSynMaterials
(
tp
,
c
)
end
end
if
smat
~=
nil
then
mg
:
AddCard
(
smat
)
end
if
smat
~=
nil
then
mg
:
AddCard
(
smat
)
end
local
res
=
mg
:
IsExists
(
Auxiliary
.
SynMixFilter1
,
1
,
nil
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
gc
,
mgchk
)
local
res
=
mg
:
IsExists
(
Auxiliary
.
SynMixFilter1
,
1
,
nil
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
gc
,
mgchk
,
goalchk
)
Duel
.
ResetFlagEffect
(
tp
,
8173184
+
1
)
Duel
.
ResetFlagEffect
(
tp
,
8173184
+
1
)
return
res
return
res
end
end
...
@@ -233,6 +241,7 @@ function Auxiliary.SynMixTarget(f1,f2,f3,f4,minct,maxct,gc)
...
@@ -233,6 +241,7 @@ function Auxiliary.SynMixTarget(f1,f2,f3,f4,minct,maxct,gc)
local
g
=
Group
.
CreateGroup
()
local
g
=
Group
.
CreateGroup
()
local
mg
local
mg
local
mgchk
=
false
local
mgchk
=
false
local
goalchk
=
false
if
mg1
then
if
mg1
then
mg
=
mg1
:
Filter
(
Card
.
IsCanBeSynchroMaterial
,
nil
,
c
)
mg
=
mg1
:
Filter
(
Card
.
IsCanBeSynchroMaterial
,
nil
,
c
)
mgchk
=
true
mgchk
=
true
...
@@ -246,18 +255,18 @@ function Auxiliary.SynMixTarget(f1,f2,f3,f4,minct,maxct,gc)
...
@@ -246,18 +255,18 @@ function Auxiliary.SynMixTarget(f1,f2,f3,f4,minct,maxct,gc)
local
g4
=
Group
.
CreateGroup
()
local
g4
=
Group
.
CreateGroup
()
local
cancel
=
Duel
.
IsSummonCancelable
()
local
cancel
=
Duel
.
IsSummonCancelable
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
c1
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter1
,
nil
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
gc
,
mgchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
c1
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter1
,
nil
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
gc
,
mgchk
,
goalchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
if
not
c1
then
goto
SynMixTargetSelectCancel
end
if
not
c1
then
goto
SynMixTargetSelectCancel
end
g
:
AddCard
(
c1
)
g
:
AddCard
(
c1
)
if
f2
then
if
f2
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
c2
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter2
,
g
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
c1
,
gc
,
mgchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
c2
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter2
,
g
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
c1
,
gc
,
mgchk
,
goalchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
if
not
c2
then
goto
SynMixTargetSelectCancel
end
if
not
c2
then
goto
SynMixTargetSelectCancel
end
if
g
:
IsContains
(
c2
)
then
goto
SynMixTargetSelectStart
end
if
g
:
IsContains
(
c2
)
then
goto
SynMixTargetSelectStart
end
g
:
AddCard
(
c2
)
g
:
AddCard
(
c2
)
if
f3
then
if
f3
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
c3
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter3
,
g
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
c1
,
c2
,
gc
,
mgchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
c3
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter3
,
g
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
c1
,
c2
,
gc
,
mgchk
,
goalchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
if
not
c3
then
goto
SynMixTargetSelectCancel
end
if
not
c3
then
goto
SynMixTargetSelectCancel
end
if
g
:
IsContains
(
c3
)
then
goto
SynMixTargetSelectStart
end
if
g
:
IsContains
(
c3
)
then
goto
SynMixTargetSelectStart
end
g
:
AddCard
(
c3
)
g
:
AddCard
(
c3
)
...
@@ -271,9 +280,9 @@ function Auxiliary.SynMixTarget(f1,f2,f3,f4,minct,maxct,gc)
...
@@ -271,9 +280,9 @@ function Auxiliary.SynMixTarget(f1,f2,f3,f4,minct,maxct,gc)
mg2
:
Sub
(
g
)
mg2
:
Sub
(
g
)
end
end
local
fulltraversal
=
mg
:
IsExists
(
Card
.
IsHasEffect
,
1
,
nil
,
89818984
)
local
fulltraversal
=
mg
:
IsExists
(
Card
.
IsHasEffect
,
1
,
nil
,
89818984
)
local
cg
=
mg2
:
Filter
(
Auxiliary
.
SynMixCheckRecursive
,
g4
,
tp
,
g4
,
mg2
,
i
,
minc
,
maxc
,
c
,
g
,
smat
,
gc
,
mgchk
,
fulltraversal
)
local
cg
=
mg2
:
Filter
(
Auxiliary
.
SynMixCheckRecursive
,
g4
,
tp
,
g4
,
mg2
,
i
,
minc
,
maxc
,
c
,
g
,
smat
,
gc
,
mgchk
,
goalchk
,
fulltraversal
)
if
cg
:
GetCount
()
==
0
then
break
end
if
cg
:
GetCount
()
==
0
then
break
end
local
finish
=
Auxiliary
.
SynMixCheckGoal
(
tp
,
g4
,
minc
,
i
,
c
,
g
,
smat
,
gc
,
mgchk
)
local
finish
=
Auxiliary
.
SynMixCheckGoal
(
tp
,
g4
,
minc
,
i
,
c
,
g
,
smat
,
gc
,
mgchk
,
goalchk
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
c4
=
cg
:
SelectUnselect
(
g
+
g4
,
tp
,
finish
,
cancel
,
minc
,
maxc
)
local
c4
=
cg
:
SelectUnselect
(
g
+
g4
,
tp
,
finish
,
cancel
,
minc
,
maxc
)
if
not
c4
then
if
not
c4
then
...
@@ -303,28 +312,28 @@ function Auxiliary.SynMixOperation(f1,f2,f3,f4,minct,maxct,gc)
...
@@ -303,28 +312,28 @@ function Auxiliary.SynMixOperation(f1,f2,f3,f4,minct,maxct,gc)
g
:
DeleteGroup
()
g
:
DeleteGroup
()
end
end
end
end
function
Auxiliary
.
SynMixFilter1
(
c
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
gc
,
mgchk
)
function
Auxiliary
.
SynMixFilter1
(
c
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
gc
,
mgchk
,
goalchk
)
return
(
not
f1
or
f1
(
c
,
syncard
))
and
mg
:
IsExists
(
Auxiliary
.
SynMixFilter2
,
1
,
c
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c
,
gc
,
mgchk
)
return
(
not
f1
or
f1
(
c
,
syncard
))
and
mg
:
IsExists
(
Auxiliary
.
SynMixFilter2
,
1
,
c
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c
,
gc
,
mgchk
,
goalchk
)
end
end
function
Auxiliary
.
SynMixFilter2
(
c
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
gc
,
mgchk
)
function
Auxiliary
.
SynMixFilter2
(
c
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
gc
,
mgchk
,
goalchk
)
if
f2
then
if
f2
then
return
f2
(
c
,
syncard
,
c1
)
return
f2
(
c
,
syncard
,
c1
)
and
(
mg
:
IsExists
(
Auxiliary
.
SynMixFilter3
,
1
,
Group
.
FromCards
(
c1
,
c
),
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c
,
gc
,
mgchk
)
and
(
mg
:
IsExists
(
Auxiliary
.
SynMixFilter3
,
1
,
Group
.
FromCards
(
c1
,
c
),
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c
,
gc
,
mgchk
,
goalchk
)
or
minc
==
0
and
Auxiliary
.
SynMixFilter4
(
c
,
nil
,
1
,
1
,
syncard
,
mg
,
smat
,
c1
,
nil
,
nil
,
gc
,
mgchk
))
or
minc
==
0
and
Auxiliary
.
SynMixFilter4
(
c
,
nil
,
1
,
1
,
syncard
,
mg
,
smat
,
c1
,
nil
,
nil
,
gc
,
mgchk
,
goalchk
))
else
else
return
mg
:
IsExists
(
Auxiliary
.
SynMixFilter4
,
1
,
c1
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
nil
,
nil
,
gc
,
mgchk
)
return
mg
:
IsExists
(
Auxiliary
.
SynMixFilter4
,
1
,
c1
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
nil
,
nil
,
gc
,
mgchk
,
goalchk
)
end
end
end
end
function
Auxiliary
.
SynMixFilter3
(
c
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
gc
,
mgchk
)
function
Auxiliary
.
SynMixFilter3
(
c
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
gc
,
mgchk
,
goalchk
)
if
f3
then
if
f3
then
return
f3
(
c
,
syncard
,
c1
,
c2
)
return
f3
(
c
,
syncard
,
c1
,
c2
)
and
(
mg
:
IsExists
(
Auxiliary
.
SynMixFilter4
,
1
,
Group
.
FromCards
(
c1
,
c2
,
c
),
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
c
,
gc
,
mgchk
)
and
(
mg
:
IsExists
(
Auxiliary
.
SynMixFilter4
,
1
,
Group
.
FromCards
(
c1
,
c2
,
c
),
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
c
,
gc
,
mgchk
,
goalchk
)
or
minc
==
0
and
Auxiliary
.
SynMixFilter4
(
c
,
nil
,
1
,
1
,
syncard
,
mg
,
smat
,
c1
,
c2
,
nil
,
gc
,
mgchk
))
or
minc
==
0
and
Auxiliary
.
SynMixFilter4
(
c
,
nil
,
1
,
1
,
syncard
,
mg
,
smat
,
c1
,
c2
,
nil
,
gc
,
mgchk
,
goalchk
))
else
else
return
mg
:
IsExists
(
Auxiliary
.
SynMixFilter4
,
1
,
Group
.
FromCards
(
c1
,
c2
),
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
nil
,
gc
,
mgchk
)
return
mg
:
IsExists
(
Auxiliary
.
SynMixFilter4
,
1
,
Group
.
FromCards
(
c1
,
c2
),
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
nil
,
gc
,
mgchk
,
goalchk
)
end
end
end
end
function
Auxiliary
.
SynMixFilter4
(
c
,
f4
,
minc
,
maxc
,
syncard
,
mg1
,
smat
,
c1
,
c2
,
c3
,
gc
,
mgchk
)
function
Auxiliary
.
SynMixFilter4
(
c
,
f4
,
minc
,
maxc
,
syncard
,
mg1
,
smat
,
c1
,
c2
,
c3
,
gc
,
mgchk
,
goalchk
)
if
f4
and
not
f4
(
c
,
syncard
,
c1
,
c2
,
c3
)
then
return
false
end
if
f4
and
not
f4
(
c
,
syncard
,
c1
,
c2
,
c3
)
then
return
false
end
local
sg
=
Group
.
FromCards
(
c1
,
c
)
local
sg
=
Group
.
FromCards
(
c1
,
c
)
sg
:
AddCard
(
c1
)
sg
:
AddCard
(
c1
)
...
@@ -336,23 +345,23 @@ function Auxiliary.SynMixFilter4(c,f4,minc,maxc,syncard,mg1,smat,c1,c2,c3,gc,mgc
...
@@ -336,23 +345,23 @@ function Auxiliary.SynMixFilter4(c,f4,minc,maxc,syncard,mg1,smat,c1,c2,c3,gc,mgc
else
else
mg
:
Sub
(
sg
)
mg
:
Sub
(
sg
)
end
end
return
Auxiliary
.
SynMixCheck
(
mg
,
sg
,
minc
-
1
,
maxc
-
1
,
syncard
,
mg1
,
smat
,
gc
,
mgchk
)
return
Auxiliary
.
SynMixCheck
(
mg
,
sg
,
minc
-
1
,
maxc
-
1
,
syncard
,
mg1
,
smat
,
gc
,
mgchk
,
goalchk
)
end
end
function
Auxiliary
.
SynMixCheck
(
mg
,
sg1
,
minc
,
maxc
,
syncard
,
mg1
,
smat
,
gc
,
mgchk
)
function
Auxiliary
.
SynMixCheck
(
mg
,
sg1
,
minc
,
maxc
,
syncard
,
mg1
,
smat
,
gc
,
mgchk
,
goalchk
)
local
tp
=
syncard
:
GetControler
()
local
tp
=
syncard
:
GetControler
()
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
if
minc
<=
0
and
Auxiliary
.
SynMixCheckGoal
(
tp
,
sg1
,
0
,
0
,
syncard
,
sg
,
smat
,
gc
,
mgchk
)
then
return
true
end
if
minc
<=
0
and
Auxiliary
.
SynMixCheckGoal
(
tp
,
sg1
,
0
,
0
,
syncard
,
sg
,
smat
,
gc
,
mgchk
,
goalchk
)
then
return
true
end
if
maxc
==
0
then
return
false
end
if
maxc
==
0
then
return
false
end
local
fulltraversal
=#
mg
<=
5
or
mg1
:
IsExists
(
Card
.
IsHasEffect
,
1
,
nil
,
89818984
)
local
fulltraversal
=#
mg
<=
5
or
mg1
:
IsExists
(
Card
.
IsHasEffect
,
1
,
nil
,
89818984
)
return
mg
:
IsExists
(
Auxiliary
.
SynMixCheckRecursive
,
1
,
nil
,
tp
,
sg
,
mg
,
0
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
,
fulltraversal
)
return
mg
:
IsExists
(
Auxiliary
.
SynMixCheckRecursive
,
1
,
nil
,
tp
,
sg
,
mg
,
0
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
,
goalchk
,
fulltraversal
)
end
end
function
Auxiliary
.
SynMixCheckRecursive
(
c
,
tp
,
sg
,
mg
,
ct
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
,
fulltraversal
)
function
Auxiliary
.
SynMixCheckRecursive
(
c
,
tp
,
sg
,
mg
,
ct
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
,
goalchk
,
fulltraversal
)
sg
:
AddCard
(
c
)
sg
:
AddCard
(
c
)
ct
=
ct
+
1
ct
=
ct
+
1
local
res
=
Auxiliary
.
SynMixCheckGoal
(
tp
,
sg
,
minc
,
ct
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
)
local
res
=
Auxiliary
.
SynMixCheckGoal
(
tp
,
sg
,
minc
,
ct
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
,
goalchk
)
if
not
res
and
ct
<
maxc
if
not
res
and
ct
<
maxc
and
(
fulltraversal
or
not
Auxiliary
.
SynMixCheckPrune
(
sg
,
sg1
,
syncard
))
then
and
(
fulltraversal
or
not
Auxiliary
.
SynMixCheckPrune
(
sg
,
sg1
,
syncard
))
then
res
=
mg
:
IsExists
(
Auxiliary
.
SynMixCheckRecursive
,
1
,
sg
,
tp
,
sg
,
mg
,
ct
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
,
fulltraversal
)
res
=
mg
:
IsExists
(
Auxiliary
.
SynMixCheckRecursive
,
1
,
sg
,
tp
,
sg
,
mg
,
ct
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
,
goalchk
,
fulltraversal
)
end
end
sg
:
RemoveCard
(
c
)
sg
:
RemoveCard
(
c
)
ct
=
ct
-
1
ct
=
ct
-
1
...
@@ -395,7 +404,8 @@ function Auxiliary.SynMixHandCheck(g,tp,syncard)
...
@@ -395,7 +404,8 @@ function Auxiliary.SynMixHandCheck(g,tp,syncard)
end
end
return
true
return
true
end
end
function
Auxiliary
.
SynMixCheckGoal
(
tp
,
sg
,
minc
,
ct
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
)
function
Auxiliary
.
SynMixCheckGoal
(
tp
,
sg
,
minc
,
ct
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
,
goalchk
)
if
goalchk
then
return
true
end
if
ct
<
minc
then
return
false
end
if
ct
<
minc
then
return
false
end
local
g
=
sg
+
sg1
local
g
=
sg
+
sg1
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
syncard
)
<=
0
then
return
false
end
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
syncard
)
<=
0
then
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