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
45f4ef3e
Commit
45f4ef3e
authored
Mar 15, 2023
by
mercury233
Committed by
GitHub
Mar 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syn summon using SynMix can be canceled (#2048)
parent
46cead35
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
utility.lua
utility.lua
+24
-13
No files found.
utility.lua
View file @
45f4ef3e
...
...
@@ -508,6 +508,7 @@ function Auxiliary.SynMixTarget(f1,f2,f3,f4,minc,maxc,gc)
if
max
<
maxc
then
maxc
=
max
end
if
minc
>
maxc
then
return
false
end
end
::
SynMixTargetSelectStart
::
local
g
=
Group
.
CreateGroup
()
local
mg
local
mgchk
=
false
...
...
@@ -518,16 +519,25 @@ function Auxiliary.SynMixTarget(f1,f2,f3,f4,minc,maxc,gc)
mg
=
Auxiliary
.
GetSynMaterials
(
tp
,
c
)
end
if
smat
~=
nil
then
mg
:
AddCard
(
smat
)
end
local
c1
local
c2
local
c3
local
cancel
=
Duel
.
IsSummonCancelable
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
c1
=
mg
:
FilterSelect
(
tp
,
Auxiliary
.
SynMixFilter1
,
1
,
1
,
nil
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
gc
,
mgchk
):
GetFirst
()
c1
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter1
,
nil
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
gc
,
mgchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
if
not
c1
then
return
false
end
g
:
AddCard
(
c1
)
if
f2
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
c2
=
mg
:
FilterSelect
(
tp
,
Auxiliary
.
SynMixFilter2
,
1
,
1
,
c1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
c1
,
gc
,
mgchk
):
GetFirst
()
c2
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter2
,
g
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
c1
,
gc
,
mgchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
if
not
c2
then
return
false
end
if
g
:
IsContains
(
c2
)
then
goto
SynMixTargetSelectStart
end
g
:
AddCard
(
c2
)
if
f3
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
c3
=
mg
:
FilterSelect
(
tp
,
Auxiliary
.
SynMixFilter3
,
1
,
1
,
Group
.
FromCards
(
c1
,
c2
),
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
c1
,
c2
,
gc
,
mgchk
):
GetFirst
()
c3
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter3
,
g
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
c1
,
c2
,
gc
,
mgchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
if
not
c3
then
return
false
end
if
g
:
IsContains
(
c3
)
then
goto
SynMixTargetSelectStart
end
g
:
AddCard
(
c3
)
end
end
...
...
@@ -535,20 +545,21 @@ function Auxiliary.SynMixTarget(f1,f2,f3,f4,minc,maxc,gc)
for
i
=
0
,
maxc
-
1
do
local
mg2
=
mg
:
Clone
()
if
f4
then
mg2
=
mg2
:
Filter
(
f4
,
g
,
c
)
mg2
=
mg2
:
Filter
(
f4
,
g
,
c
,
c1
,
c2
,
c3
)
else
mg2
:
Sub
(
g
)
end
local
cg
=
mg2
:
Filter
(
Auxiliary
.
SynMixCheckRecursive
,
g4
,
tp
,
g4
,
mg2
,
i
,
minc
,
maxc
,
c
,
g
,
smat
,
gc
,
mgchk
)
if
cg
:
GetCount
()
==
0
then
break
end
local
minct
=
1
if
Auxiliary
.
SynMixCheckGoal
(
tp
,
g4
,
minc
,
i
,
c
,
g
,
smat
,
gc
,
mgchk
)
then
minct
=
0
end
local
finish
=
Auxiliary
.
SynMixCheckGoal
(
tp
,
g4
,
minc
,
i
,
c
,
g
,
smat
,
gc
,
mgchk
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
tg
=
cg
:
Select
(
tp
,
minct
,
1
,
nil
)
if
tg
:
GetCount
()
==
0
then
break
end
g4
:
Merge
(
tg
)
local
c4
=
cg
:
SelectUnselect
(
g
+
g4
,
tp
,
finish
,
cancel
,
minc
,
maxc
)
if
not
c4
then
if
finish
then
break
else
return
false
end
end
if
g
:
IsContains
(
c4
)
or
g4
:
IsContains
(
c4
)
then
goto
SynMixTargetSelectStart
end
g4
:
AddCard
(
c4
)
end
g
:
Merge
(
g4
)
if
g
:
GetCount
()
>
0
then
...
...
@@ -595,11 +606,11 @@ function Auxiliary.SynMixFilter4(c,f4,minc,maxc,syncard,mg1,smat,c1,c2,c3,gc,mgc
if
c3
then
sg
:
AddCard
(
c3
)
end
local
mg
=
mg1
:
Clone
()
if
f4
then
mg
=
mg
:
Filter
(
f4
,
sg
,
syncard
)
mg
=
mg
:
Filter
(
f4
,
sg
,
syncard
,
c1
,
c2
,
c3
)
else
mg
:
Sub
(
sg
)
end
return
aux
.
SynMixCheck
(
mg
,
sg
,
minc
-
1
,
maxc
-
1
,
syncard
,
smat
,
gc
,
mgchk
)
return
Auxiliary
.
SynMixCheck
(
mg
,
sg
,
minc
-
1
,
maxc
-
1
,
syncard
,
smat
,
gc
,
mgchk
)
end
function
Auxiliary
.
SynMixCheck
(
mg
,
sg1
,
minc
,
maxc
,
syncard
,
smat
,
gc
,
mgchk
)
local
tp
=
syncard
:
GetControler
()
...
...
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