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
Reinen
ygopro-scripts
Commits
d248c682
Commit
d248c682
authored
Nov 19, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5cf70d82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
12 deletions
+51
-12
utility.lua
utility.lua
+51
-12
No files found.
utility.lua
View file @
d248c682
...
@@ -401,8 +401,9 @@ function Auxiliary.SynMixCheckGoal(tp,sg,minc,ct,syncard,sg1,smat)
...
@@ -401,8 +401,9 @@ function Auxiliary.SynMixCheckGoal(tp,sg,minc,ct,syncard,sg1,smat)
g
:
Merge
(
sg1
)
g
:
Merge
(
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
if
smat
and
not
g
:
IsContains
(
smat
)
then
return
false
end
if
smat
and
not
g
:
IsContains
(
smat
)
then
return
false
end
local
pe
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_SMATERIAL
)
for
i
,
pe
in
ipairs
({
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_SMATERIAL
)})
do
if
pe
and
not
g
:
IsContains
(
pe
:
GetOwner
())
then
return
false
end
if
not
g
:
IsContains
(
pe
:
GetHandler
())
then
return
false
end
end
if
not
g
:
IsExists
(
Card
.
IsType
,
1
,
nil
,
TYPE_TUNER
)
and
not
syncard
:
IsHasEffect
(
80896940
)
then
return
false
end
if
not
g
:
IsExists
(
Card
.
IsType
,
1
,
nil
,
TYPE_TUNER
)
and
not
syncard
:
IsHasEffect
(
80896940
)
then
return
false
end
if
not
g
:
CheckWithSumEqual
(
Card
.
GetSynchroLevel
,
syncard
:
GetLevel
(),
g
:
GetCount
(),
g
:
GetCount
(),
syncard
)
if
not
g
:
CheckWithSumEqual
(
Card
.
GetSynchroLevel
,
syncard
:
GetLevel
(),
g
:
GetCount
(),
g
:
GetCount
(),
syncard
)
and
(
not
g
:
IsExists
(
Card
.
IsHasEffect
,
1
,
nil
,
89818984
)
and
(
not
g
:
IsExists
(
Card
.
IsHasEffect
,
1
,
nil
,
89818984
)
...
@@ -671,6 +672,7 @@ function Auxiliary.XyzLevelFreeCondition(f,gf,minct,maxct)
...
@@ -671,6 +672,7 @@ function Auxiliary.XyzLevelFreeCondition(f,gf,minct,maxct)
minc
=
math.max
(
minc
,
min
)
minc
=
math.max
(
minc
,
min
)
maxc
=
math.min
(
maxc
,
max
)
maxc
=
math.min
(
maxc
,
max
)
end
end
if
maxc
<
minc
then
return
false
end
local
mg
=
nil
local
mg
=
nil
if
og
then
if
og
then
mg
=
og
:
Filter
(
Auxiliary
.
XyzLevelFreeFilter
,
nil
,
c
,
f
)
mg
=
og
:
Filter
(
Auxiliary
.
XyzLevelFreeFilter
,
nil
,
c
,
f
)
...
@@ -678,7 +680,15 @@ function Auxiliary.XyzLevelFreeCondition(f,gf,minct,maxct)
...
@@ -678,7 +680,15 @@ function Auxiliary.XyzLevelFreeCondition(f,gf,minct,maxct)
mg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
XyzLevelFreeFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
f
)
mg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
XyzLevelFreeFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
f
)
end
end
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
return
maxc
>=
minc
and
mg
:
IsExists
(
Auxiliary
.
XyzLevelFreeCheck
,
1
,
sg
,
tp
,
c
,
mg
,
sg
,
gf
,
minc
,
maxc
)
for
i
,
pe
in
ipairs
({
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)})
do
local
pc
=
pe
:
GetHandler
()
if
not
mg
:
IsContains
(
pc
)
then
return
false
end
sg
:
AddCard
(
pc
)
end
local
ct
=
sg
:
GetCount
()
if
ct
>
maxc
then
return
false
end
return
(
ct
>=
minc
and
Auxiliary
.
XyzLevelFreeGoal
(
sg
,
tp
,
c
,
gf
))
or
mg
:
IsExists
(
Auxiliary
.
XyzLevelFreeCheck
,
1
,
sg
,
tp
,
c
,
mg
,
sg
,
gf
,
minc
,
maxc
)
end
end
end
end
function
Auxiliary
.
XyzLevelFreeTarget
(
f
,
gf
,
minct
,
maxct
)
function
Auxiliary
.
XyzLevelFreeTarget
(
f
,
gf
,
minct
,
maxct
)
...
@@ -699,8 +709,13 @@ function Auxiliary.XyzLevelFreeTarget(f,gf,minct,maxct)
...
@@ -699,8 +709,13 @@ function Auxiliary.XyzLevelFreeTarget(f,gf,minct,maxct)
mg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
mg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
end
end
local
g
=
Group
.
CreateGroup
()
local
g
=
Group
.
CreateGroup
()
local
ag
=
mg
:
Filter
(
Auxiliary
.
XyzLevelFreeCheck
,
g
,
tp
,
c
,
mg
,
g
,
gf
,
minc
,
maxc
)
for
i
,
pe
in
ipairs
({
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)})
do
sg
:
AddCard
(
pe
:
GetHandler
())
end
local
ct
=
g
:
GetCount
()
local
ct
=
g
:
GetCount
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
g
:
Select
(
tp
,
ct
,
ct
,
nil
)
local
ag
=
mg
:
Filter
(
Auxiliary
.
XyzLevelFreeCheck
,
g
,
tp
,
c
,
mg
,
g
,
gf
,
minc
,
maxc
)
while
ct
<
maxc
and
ag
:
GetCount
()
>
0
do
while
ct
<
maxc
and
ag
:
GetCount
()
>
0
do
local
minsct
=
1
local
minsct
=
1
local
finish
=
(
ct
>=
minc
and
Auxiliary
.
XyzLevelFreeGoal
(
g
,
tp
,
c
,
gf
))
local
finish
=
(
ct
>=
minc
and
Auxiliary
.
XyzLevelFreeGoal
(
g
,
tp
,
c
,
gf
))
...
@@ -770,8 +785,16 @@ function Auxiliary.XyzLevelFreeCondition2(f,gf,minct,maxct,alterf,desc,op)
...
@@ -770,8 +785,16 @@ function Auxiliary.XyzLevelFreeCondition2(f,gf,minct,maxct,alterf,desc,op)
else
else
mg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
mg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
end
end
if
(
not
min
or
min
<=
1
)
and
mg
:
IsExists
(
Auxiliary
.
XyzAlterFilter
,
1
,
nil
,
alterf
,
c
,
e
,
tp
,
op
)
then
local
altg
=
mg
:
Filter
(
Auxiliary
.
XyzAlterFilter
,
nil
,
alterf
,
c
,
e
,
tp
,
op
)
return
true
if
(
not
min
or
min
<=
1
)
and
altg
:
GetCount
()
>
0
then
local
ct
=
0
local
res
=
false
for
i
,
pe
in
ipairs
({
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)})
do
ct
=
ct
+
1
if
ct
>
1
then
return
false
end
if
altg
:
IsContains
(
pe
:
GetHandler
())
then
res
=
true
end
end
return
ct
==
0
or
res
end
end
local
minc
=
minct
local
minc
=
minct
local
maxc
=
maxct
local
maxc
=
maxct
...
@@ -782,7 +805,15 @@ function Auxiliary.XyzLevelFreeCondition2(f,gf,minct,maxct,alterf,desc,op)
...
@@ -782,7 +805,15 @@ function Auxiliary.XyzLevelFreeCondition2(f,gf,minct,maxct,alterf,desc,op)
end
end
mg
=
mg
:
Filter
(
Auxiliary
.
XyzLevelFreeFilter
,
nil
,
c
,
f
)
mg
=
mg
:
Filter
(
Auxiliary
.
XyzLevelFreeFilter
,
nil
,
c
,
f
)
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
return
maxc
>=
minc
and
mg
:
IsExists
(
Auxiliary
.
XyzLevelFreeCheck
,
1
,
sg
,
tp
,
c
,
mg
,
sg
,
gf
,
minc
,
maxc
)
for
i
,
pe
in
ipairs
({
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)})
do
local
pc
=
pe
:
GetHandler
()
if
not
mg
:
IsContains
(
pc
)
then
return
false
end
sg
:
AddCard
(
pc
)
end
local
ct
=
sg
:
GetCount
()
if
ct
>
maxc
then
return
false
end
return
(
ct
>=
minc
and
Auxiliary
.
XyzLevelFreeGoal
(
sg
,
tp
,
c
,
gf
))
or
mg
:
IsExists
(
Auxiliary
.
XyzLevelFreeCheck
,
1
,
sg
,
tp
,
c
,
mg
,
sg
,
gf
,
minc
,
maxc
)
end
end
end
end
function
Auxiliary
.
XyzLevelFreeTarget2
(
f
,
gf
,
minct
,
maxct
,
alterf
,
desc
,
op
)
function
Auxiliary
.
XyzLevelFreeTarget2
(
f
,
gf
,
minct
,
maxct
,
alterf
,
desc
,
op
)
...
@@ -803,15 +834,23 @@ function Auxiliary.XyzLevelFreeTarget2(f,gf,minct,maxct,alterf,desc,op)
...
@@ -803,15 +834,23 @@ function Auxiliary.XyzLevelFreeTarget2(f,gf,minct,maxct,alterf,desc,op)
mg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
mg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
end
end
local
g
=
Group
.
CreateGroup
()
local
g
=
Group
.
CreateGroup
()
for
i
,
pe
in
ipairs
({
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)})
do
g
:
AddCard
(
pe
:
GetHandler
())
end
local
ct
=
g
:
GetCount
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
g
:
Select
(
tp
,
ct
,
ct
,
nil
)
local
ag
=
mg
:
Filter
(
Auxiliary
.
XyzLevelFreeFilter
,
nil
,
c
,
f
):
Filter
(
Auxiliary
.
XyzLevelFreeCheck
,
g
,
tp
,
c
,
mg
,
g
,
gf
,
minc
,
maxc
)
local
ag
=
mg
:
Filter
(
Auxiliary
.
XyzLevelFreeFilter
,
nil
,
c
,
f
):
Filter
(
Auxiliary
.
XyzLevelFreeCheck
,
g
,
tp
,
c
,
mg
,
g
,
gf
,
minc
,
maxc
)
local
b1
=
ag
:
GetCount
()
>
0
local
b1
=
ag
:
GetCount
()
>
0
local
b2
=
(
not
min
or
min
<=
1
)
and
mg
:
IsExists
(
Auxiliary
.
XyzAlterFilter
,
1
,
nil
,
alterf
,
c
,
e
,
tp
,
op
)
local
b2
=
(
not
min
or
min
<=
1
)
and
mg
:
IsExists
(
Auxiliary
.
XyzAlterFilter
,
1
,
nil
,
alterf
,
c
,
e
,
tp
,
op
)
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
desc
))
then
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
desc
))
then
e
:
SetLabel
(
1
)
e
:
SetLabel
(
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
if
g
:
GetCount
()
==
0
then
local
sg
=
mg
:
FilterSelect
(
tp
,
Auxiliary
.
XyzAlterFilter
,
1
,
1
,
nil
,
alterf
,
c
,
e
,
tp
,
op
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
if
op
then
op
(
e
,
tp
,
1
,
sg
:
GetFirst
())
end
local
sg
=
mg
:
FilterSelect
(
tp
,
Auxiliary
.
XyzAlterFilter
,
1
,
1
,
nil
,
alterf
,
c
,
e
,
tp
,
op
)
g
:
Merge
(
sg
)
g
:
Merge
(
sg
)
end
if
op
then
op
(
e
,
tp
,
1
,
g
:
GetFirst
())
end
else
else
e
:
SetLabel
(
0
)
e
:
SetLabel
(
0
)
local
ct
=
g
:
GetCount
()
local
ct
=
g
:
GetCount
()
...
@@ -1724,7 +1763,7 @@ function Auxiliary.LinkCondition(f,minc,maxc,gf)
...
@@ -1724,7 +1763,7 @@ function Auxiliary.LinkCondition(f,minc,maxc,gf)
local
ct
=
sg
:
GetCount
()
local
ct
=
sg
:
GetCount
()
if
ct
>
maxc
then
return
false
end
if
ct
>
maxc
then
return
false
end
return
Auxiliary
.
LCheckGoal
(
tp
,
sg
,
c
,
minc
,
ct
,
gf
)
return
Auxiliary
.
LCheckGoal
(
tp
,
sg
,
c
,
minc
,
ct
,
gf
)
or
mg
:
IsExists
(
Auxiliary
.
LCheckRecursive
,
1
,
nil
,
tp
,
sg
,
mg
,
c
,
ct
,
minc
,
maxc
,
gf
)
or
mg
:
IsExists
(
Auxiliary
.
LCheckRecursive
,
1
,
sg
,
tp
,
sg
,
mg
,
c
,
ct
,
minc
,
maxc
,
gf
)
end
end
end
end
function
Auxiliary
.
LinkOperation
(
f
,
minc
,
maxc
,
gf
)
function
Auxiliary
.
LinkOperation
(
f
,
minc
,
maxc
,
gf
)
...
...
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