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
c7d21f1b
Commit
c7d21f1b
authored
Dec 05, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
subgroup for xyz
parent
8053e1f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
61 deletions
+19
-61
utility.lua
utility.lua
+19
-61
No files found.
utility.lua
View file @
c7d21f1b
...
@@ -534,7 +534,7 @@ function Auxiliary.TuneMagicianCheckX(c,sg,ecode)
...
@@ -534,7 +534,7 @@ function Auxiliary.TuneMagicianCheckX(c,sg,ecode)
return
false
return
false
end
end
function
Auxiliary
.
XyzAlterFilter
(
c
,
alterf
,
xyzc
,
e
,
tp
,
op
)
function
Auxiliary
.
XyzAlterFilter
(
c
,
alterf
,
xyzc
,
e
,
tp
,
op
)
return
alterf
(
c
)
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
,
xyzc
)
>
0
and
(
not
op
or
op
(
e
,
tp
,
0
,
c
))
return
alterf
(
c
)
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
,
xyzc
)
>
0
and
Auxiliary
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
and
(
not
op
or
op
(
e
,
tp
,
0
,
c
))
end
end
--Xyz monster, lv k*n
--Xyz monster, lv k*n
function
Auxiliary
.
AddXyzProcedure
(
c
,
f
,
lv
,
ct
,
alterf
,
desc
,
maxct
,
op
)
function
Auxiliary
.
AddXyzProcedure
(
c
,
f
,
lv
,
ct
,
alterf
,
desc
,
maxct
,
op
)
...
@@ -748,14 +748,6 @@ end
...
@@ -748,14 +748,6 @@ end
function
Auxiliary
.
XyzLevelFreeFilter
(
c
,
xyzc
,
f
)
function
Auxiliary
.
XyzLevelFreeFilter
(
c
,
xyzc
,
f
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
(
not
f
or
f
(
c
,
xyzc
))
return
c
:
IsFaceup
()
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
(
not
f
or
f
(
c
,
xyzc
))
end
end
function
Auxiliary
.
XyzLevelFreeCheck
(
c
,
tp
,
xyzc
,
mg
,
sg
,
gf
,
minc
,
maxc
)
sg
:
AddCard
(
c
)
local
ct
=
sg
:
GetCount
()
local
res
=
(
ct
>=
minc
and
Auxiliary
.
XyzLevelFreeGoal
(
sg
,
tp
,
xyzc
,
gf
))
or
(
ct
<
maxc
and
mg
:
IsExists
(
Auxiliary
.
XyzLevelFreeCheck
,
1
,
sg
,
tp
,
xyzc
,
mg
,
sg
,
gf
,
minc
,
maxc
))
sg
:
RemoveCard
(
c
)
return
res
end
function
Auxiliary
.
XyzLevelFreeGoal
(
g
,
tp
,
xyzc
,
gf
)
function
Auxiliary
.
XyzLevelFreeGoal
(
g
,
tp
,
xyzc
,
gf
)
if
g
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
g
,
EFFECT_TUNE_MAGICIAN_X
)
then
return
false
end
if
g
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
g
,
EFFECT_TUNE_MAGICIAN_X
)
then
return
false
end
return
(
not
gf
or
gf
(
g
))
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
xyzc
)
>
0
return
(
not
gf
or
gf
(
g
))
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
xyzc
)
>
0
...
@@ -780,10 +772,8 @@ function Auxiliary.XyzLevelFreeCondition(f,gf,minct,maxct)
...
@@ -780,10 +772,8 @@ function Auxiliary.XyzLevelFreeCondition(f,gf,minct,maxct)
end
end
local
sg
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
if
sg
:
IsExists
(
Auxiliary
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
if
sg
:
IsExists
(
Auxiliary
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
local
ct
=
sg
:
GetCount
()
Duel
.
SetSelectedCard
(
sg
)
if
ct
>
maxc
then
return
false
end
return
mg
:
CheckSubGroup
(
Auxiliary
.
XyzLevelFreeGoal
,
minc
,
maxc
,
tp
,
c
,
gf
)
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
)
...
@@ -803,25 +793,11 @@ function Auxiliary.XyzLevelFreeTarget(f,gf,minct,maxct)
...
@@ -803,25 +793,11 @@ function Auxiliary.XyzLevelFreeTarget(f,gf,minct,maxct)
else
else
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
g
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
s
g
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
ct
=
g
:
GetCount
(
)
Duel
.
SetSelectedCard
(
sg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
g
:
Select
(
tp
,
ct
,
ct
,
nil
)
local
g
=
mg
:
SelectSubGroup
(
tp
,
Auxiliary
.
XyzLevelFreeGoal
,
true
,
minc
,
maxc
,
tp
,
c
,
gf
)
local
ag
=
mg
:
Filter
(
Auxiliary
.
XyzLevelFreeCheck
,
g
,
tp
,
c
,
mg
,
g
,
gf
,
minc
,
maxc
)
if
g
and
g
:
GetCount
()
>
0
then
while
ct
<
maxc
and
ag
:
GetCount
()
>
0
do
local
minsct
=
1
local
finish
=
(
ct
>=
minc
and
Auxiliary
.
XyzLevelFreeGoal
(
g
,
tp
,
c
,
gf
))
if
finish
then
minsct
=
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
tg
=
ag
:
Select
(
tp
,
minsct
,
1
,
nil
)
if
tg
:
GetCount
()
==
0
then
break
end
g
:
Merge
(
tg
)
ct
=
g
:
GetCount
()
ag
=
mg
:
Filter
(
Auxiliary
.
XyzLevelFreeCheck
,
g
,
tp
,
c
,
mg
,
g
,
gf
,
minc
,
maxc
)
end
if
g
:
GetCount
()
>
0
then
g
:
KeepAlive
()
g
:
KeepAlive
()
e
:
SetLabelObject
(
g
)
e
:
SetLabelObject
(
g
)
return
true
return
true
...
@@ -890,10 +866,8 @@ function Auxiliary.XyzLevelFreeCondition2(f,gf,minct,maxct,alterf,desc,op)
...
@@ -890,10 +866,8 @@ function Auxiliary.XyzLevelFreeCondition2(f,gf,minct,maxct,alterf,desc,op)
mg
=
mg
:
Filter
(
Auxiliary
.
XyzLevelFreeFilter
,
nil
,
c
,
f
)
mg
=
mg
:
Filter
(
Auxiliary
.
XyzLevelFreeFilter
,
nil
,
c
,
f
)
local
sg
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
if
sg
:
IsExists
(
Auxiliary
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
if
sg
:
IsExists
(
Auxiliary
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
local
ct
=
sg
:
GetCount
()
Duel
.
SetSelectedCard
(
sg
)
if
ct
>
maxc
then
return
false
end
return
mg
:
CheckSubGroup
(
Auxiliary
.
XyzLevelFreeGoal
,
minc
,
maxc
,
tp
,
c
,
gf
)
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
)
...
@@ -913,40 +887,24 @@ function Auxiliary.XyzLevelFreeTarget2(f,gf,minct,maxct,alterf,desc,op)
...
@@ -913,40 +887,24 @@ function Auxiliary.XyzLevelFreeTarget2(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
local
g
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
ct
=
g
:
GetCount
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
g
:
Select
(
tp
,
ct
,
ct
,
nil
)
local
mg2
=
mg
:
Filter
(
Auxiliary
.
XyzLevelFreeFilter
,
nil
,
c
,
f
)
local
mg2
=
mg
:
Filter
(
Auxiliary
.
XyzLevelFreeFilter
,
nil
,
c
,
f
)
local
ag
=
mg2
:
Filter
(
Auxiliary
.
XyzLevelFreeCheck
,
g
,
tp
,
c
,
mg2
,
g
,
gf
,
minc
,
maxc
)
Duel
.
SetSelectedCard
(
sg
)
local
b1
=
ag
:
GetCount
()
>
0
local
b1
=
mg2
:
CheckSubGroup
(
Auxiliary
.
XyzLevelFreeGoal
,
minc
,
maxc
,
tp
,
c
,
gf
)
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
)
local
g
=
nil
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
)
if
g
:
GetCount
()
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
g
=
mg
:
FilterSelect
(
tp
,
Auxiliary
.
XyzAlterFilter
,
1
,
1
,
nil
,
alterf
,
c
,
e
,
tp
,
op
)
local
sg
=
mg
:
FilterSelect
(
tp
,
Auxiliary
.
XyzAlterFilter
,
1
,
1
,
nil
,
alterf
,
c
,
e
,
tp
,
op
)
g
:
Merge
(
sg
)
end
if
op
then
op
(
e
,
tp
,
1
,
g
:
GetFirst
())
end
if
op
then
op
(
e
,
tp
,
1
,
g
:
GetFirst
())
end
else
else
e
:
SetLabel
(
0
)
e
:
SetLabel
(
0
)
local
ct
=
g
:
GetCount
()
Duel
.
SetSelectedCard
(
sg
)
while
ct
<
maxc
and
ag
:
GetCount
()
>
0
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
minsct
=
1
g
=
mg2
:
SelectSubGroup
(
tp
,
Auxiliary
.
XyzLevelFreeGoal
,
true
,
minc
,
maxc
,
tp
,
c
,
gf
)
local
finish
=
(
ct
>=
minc
and
Auxiliary
.
XyzLevelFreeGoal
(
g
,
tp
,
c
,
gf
))
if
finish
then
minsct
=
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
tg
=
ag
:
Select
(
tp
,
minsct
,
1
,
nil
)
if
tg
:
GetCount
()
==
0
then
break
end
g
:
Merge
(
tg
)
ct
=
g
:
GetCount
()
ag
=
mg2
:
Filter
(
Auxiliary
.
XyzLevelFreeCheck
,
g
,
tp
,
c
,
mg2
,
g
,
gf
,
minc
,
maxc
)
end
end
end
if
g
:
GetCount
()
>
0
then
if
g
and
g
:
GetCount
()
>
0
then
g
:
KeepAlive
()
g
:
KeepAlive
()
e
:
SetLabelObject
(
g
)
e
:
SetLabelObject
(
g
)
return
true
return
true
...
...
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