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
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
Vee4
ygopro-scripts-888
Commits
ac17edef
Commit
ac17edef
authored
Aug 12, 2022
by
mercury233
Committed by
GitHub
Aug 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename Auxiliary.XyzAlter related (#1937)
parent
ed6bed24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
utility.lua
utility.lua
+26
-26
No files found.
utility.lua
View file @
ac17edef
...
@@ -680,11 +680,11 @@ function Auxiliary.TuneMagicianCheckAdditionalX(ecode)
...
@@ -680,11 +680,11 @@ function Auxiliary.TuneMagicianCheckAdditionalX(ecode)
return
not
g
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
g
,
ecode
)
return
not
g
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
g
,
ecode
)
end
end
end
end
function
Auxiliary
.
XyzAlterFilter
(
c
,
alterf
,
xyzc
,
e
,
tp
,
op
)
function
Auxiliary
.
XyzAlterFilter
(
c
,
alterf
,
xyzc
,
e
,
tp
,
alter
op
)
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
))
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
alterop
or
alter
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
,
alterdesc
,
maxct
,
alter
op
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
1165
)
e1
:
SetDescription
(
1165
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
...
@@ -693,9 +693,9 @@ function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,desc,maxct,op)
...
@@ -693,9 +693,9 @@ function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,desc,maxct,op)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetRange
(
LOCATION_EXTRA
)
if
not
maxct
then
maxct
=
ct
end
if
not
maxct
then
maxct
=
ct
end
if
alterf
then
if
alterf
then
e1
:
SetCondition
(
Auxiliary
.
XyzCondition
2
(
f
,
lv
,
ct
,
maxct
,
alterf
,
desc
,
op
))
e1
:
SetCondition
(
Auxiliary
.
XyzCondition
Alter
(
f
,
lv
,
ct
,
maxct
,
alterf
,
alterdesc
,
alter
op
))
e1
:
SetTarget
(
Auxiliary
.
XyzTarget
2
(
f
,
lv
,
ct
,
maxct
,
alterf
,
desc
,
op
))
e1
:
SetTarget
(
Auxiliary
.
XyzTarget
Alter
(
f
,
lv
,
ct
,
maxct
,
alterf
,
alterdesc
,
alter
op
))
e1
:
SetOperation
(
Auxiliary
.
XyzOperation
2
(
f
,
lv
,
ct
,
maxct
,
alterf
,
desc
,
op
))
e1
:
SetOperation
(
Auxiliary
.
XyzOperation
Alter
(
f
,
lv
,
ct
,
maxct
,
alterf
,
alterdesc
,
alter
op
))
else
else
e1
:
SetCondition
(
Auxiliary
.
XyzCondition
(
f
,
lv
,
ct
,
maxct
))
e1
:
SetCondition
(
Auxiliary
.
XyzCondition
(
f
,
lv
,
ct
,
maxct
))
e1
:
SetTarget
(
Auxiliary
.
XyzTarget
(
f
,
lv
,
ct
,
maxct
))
e1
:
SetTarget
(
Auxiliary
.
XyzTarget
(
f
,
lv
,
ct
,
maxct
))
...
@@ -770,7 +770,7 @@ function Auxiliary.XyzOperation(f,lv,minc,maxc)
...
@@ -770,7 +770,7 @@ function Auxiliary.XyzOperation(f,lv,minc,maxc)
end
end
end
end
--Xyz summon(alterf)
--Xyz summon(alterf)
function
Auxiliary
.
XyzCondition
2
(
f
,
lv
,
minc
,
maxc
,
alterf
,
desc
,
op
)
function
Auxiliary
.
XyzCondition
Alter
(
f
,
lv
,
minc
,
maxc
,
alterf
,
alterdesc
,
alter
op
)
return
function
(
e
,
c
,
og
,
min
,
max
)
return
function
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
...
@@ -781,7 +781,7 @@ function Auxiliary.XyzCondition2(f,lv,minc,maxc,alterf,desc,op)
...
@@ -781,7 +781,7 @@ function Auxiliary.XyzCondition2(f,lv,minc,maxc,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
if
(
not
min
or
min
<=
1
)
and
mg
:
IsExists
(
Auxiliary
.
XyzAlterFilter
,
1
,
nil
,
alterf
,
c
,
e
,
tp
,
alter
op
)
then
return
true
return
true
end
end
local
minc
=
minc
local
minc
=
minc
...
@@ -794,7 +794,7 @@ function Auxiliary.XyzCondition2(f,lv,minc,maxc,alterf,desc,op)
...
@@ -794,7 +794,7 @@ function Auxiliary.XyzCondition2(f,lv,minc,maxc,alterf,desc,op)
return
Duel
.
CheckXyzMaterial
(
c
,
f
,
lv
,
minc
,
maxc
,
og
)
return
Duel
.
CheckXyzMaterial
(
c
,
f
,
lv
,
minc
,
maxc
,
og
)
end
end
end
end
function
Auxiliary
.
XyzTarget
2
(
f
,
lv
,
minc
,
maxc
,
alterf
,
desc
,
op
)
function
Auxiliary
.
XyzTarget
Alter
(
f
,
lv
,
minc
,
maxc
,
alterf
,
alterdesc
,
alter
op
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
og
,
min
,
max
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
og
,
min
,
max
)
if
og
and
not
min
then
if
og
and
not
min
then
return
true
return
true
...
@@ -812,13 +812,13 @@ function Auxiliary.XyzTarget2(f,lv,minc,maxc,alterf,desc,op)
...
@@ -812,13 +812,13 @@ function Auxiliary.XyzTarget2(f,lv,minc,maxc,alterf,desc,op)
mg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
mg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
end
end
local
b1
=
Duel
.
CheckXyzMaterial
(
c
,
f
,
lv
,
minc
,
maxc
,
og
)
local
b1
=
Duel
.
CheckXyzMaterial
(
c
,
f
,
lv
,
minc
,
maxc
,
og
)
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
,
alter
op
)
local
g
=
nil
local
g
=
nil
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
desc
))
then
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
alter
desc
))
then
e
:
SetLabel
(
1
)
e
:
SetLabel
(
1
)
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
)
g
=
mg
:
FilterSelect
(
tp
,
Auxiliary
.
XyzAlterFilter
,
1
,
1
,
nil
,
alterf
,
c
,
e
,
tp
,
alter
op
)
if
op
then
op
(
e
,
tp
,
1
,
g
:
GetFirst
())
end
if
alterop
then
alter
op
(
e
,
tp
,
1
,
g
:
GetFirst
())
end
else
else
e
:
SetLabel
(
0
)
e
:
SetLabel
(
0
)
g
=
Duel
.
SelectXyzMaterial
(
tp
,
c
,
f
,
lv
,
minc
,
maxc
,
og
)
g
=
Duel
.
SelectXyzMaterial
(
tp
,
c
,
f
,
lv
,
minc
,
maxc
,
og
)
...
@@ -830,7 +830,7 @@ function Auxiliary.XyzTarget2(f,lv,minc,maxc,alterf,desc,op)
...
@@ -830,7 +830,7 @@ function Auxiliary.XyzTarget2(f,lv,minc,maxc,alterf,desc,op)
else
return
false
end
else
return
false
end
end
end
end
end
function
Auxiliary
.
XyzOperation
2
(
f
,
lv
,
minc
,
maxc
,
alterf
,
desc
,
op
)
function
Auxiliary
.
XyzOperation
Alter
(
f
,
lv
,
minc
,
maxc
,
alterf
,
alterdesc
,
alter
op
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
if
og
and
not
min
then
if
og
and
not
min
then
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
...
@@ -866,7 +866,7 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
...
@@ -866,7 +866,7 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
end
end
end
end
end
end
function
Auxiliary
.
AddXyzProcedureLevelFree
(
c
,
f
,
gf
,
minc
,
maxc
,
alterf
,
desc
,
op
)
function
Auxiliary
.
AddXyzProcedureLevelFree
(
c
,
f
,
gf
,
minc
,
maxc
,
alterf
,
alterdesc
,
alter
op
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
1165
)
e1
:
SetDescription
(
1165
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
...
@@ -874,9 +874,9 @@ function Auxiliary.AddXyzProcedureLevelFree(c,f,gf,minc,maxc,alterf,desc,op)
...
@@ -874,9 +874,9 @@ function Auxiliary.AddXyzProcedureLevelFree(c,f,gf,minc,maxc,alterf,desc,op)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetRange
(
LOCATION_EXTRA
)
if
alterf
then
if
alterf
then
e1
:
SetCondition
(
Auxiliary
.
XyzLevelFreeCondition
2
(
f
,
gf
,
minc
,
maxc
,
alterf
,
desc
,
op
))
e1
:
SetCondition
(
Auxiliary
.
XyzLevelFreeCondition
Alter
(
f
,
gf
,
minc
,
maxc
,
alterf
,
alterdesc
,
alter
op
))
e1
:
SetTarget
(
Auxiliary
.
XyzLevelFreeTarget
2
(
f
,
gf
,
minc
,
maxc
,
alterf
,
desc
,
op
))
e1
:
SetTarget
(
Auxiliary
.
XyzLevelFreeTarget
Alter
(
f
,
gf
,
minc
,
maxc
,
alterf
,
alterdesc
,
alter
op
))
e1
:
SetOperation
(
Auxiliary
.
XyzLevelFreeOperation
2
(
f
,
gf
,
minc
,
maxc
,
alterf
,
desc
,
op
))
e1
:
SetOperation
(
Auxiliary
.
XyzLevelFreeOperation
Alter
(
f
,
gf
,
minc
,
maxc
,
alterf
,
alterdesc
,
alter
op
))
else
else
e1
:
SetCondition
(
Auxiliary
.
XyzLevelFreeCondition
(
f
,
gf
,
minc
,
maxc
))
e1
:
SetCondition
(
Auxiliary
.
XyzLevelFreeCondition
(
f
,
gf
,
minc
,
maxc
))
e1
:
SetTarget
(
Auxiliary
.
XyzLevelFreeTarget
(
f
,
gf
,
minc
,
maxc
))
e1
:
SetTarget
(
Auxiliary
.
XyzLevelFreeTarget
(
f
,
gf
,
minc
,
maxc
))
...
@@ -987,7 +987,7 @@ function Auxiliary.XyzLevelFreeOperation(f,gf,minct,maxct)
...
@@ -987,7 +987,7 @@ function Auxiliary.XyzLevelFreeOperation(f,gf,minct,maxct)
end
end
end
end
--Xyz summon(level free&alterf)
--Xyz summon(level free&alterf)
function
Auxiliary
.
XyzLevelFreeCondition
2
(
f
,
gf
,
minct
,
maxct
,
alterf
,
desc
,
op
)
function
Auxiliary
.
XyzLevelFreeCondition
Alter
(
f
,
gf
,
minct
,
maxct
,
alterf
,
alterdesc
,
alter
op
)
return
function
(
e
,
c
,
og
,
min
,
max
)
return
function
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
...
@@ -998,7 +998,7 @@ function Auxiliary.XyzLevelFreeCondition2(f,gf,minct,maxct,alterf,desc,op)
...
@@ -998,7 +998,7 @@ 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
local
altg
=
mg
:
Filter
(
Auxiliary
.
XyzAlterFilter
,
nil
,
alterf
,
c
,
e
,
tp
,
op
):
Filter
(
Auxiliary
.
MustMaterialCheck
,
nil
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
altg
=
mg
:
Filter
(
Auxiliary
.
XyzAlterFilter
,
nil
,
alterf
,
c
,
e
,
tp
,
alter
op
):
Filter
(
Auxiliary
.
MustMaterialCheck
,
nil
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
if
(
not
min
or
min
<=
1
)
and
altg
:
GetCount
()
>
0
then
if
(
not
min
or
min
<=
1
)
and
altg
:
GetCount
()
>
0
then
return
true
return
true
end
end
...
@@ -1019,7 +1019,7 @@ function Auxiliary.XyzLevelFreeCondition2(f,gf,minct,maxct,alterf,desc,op)
...
@@ -1019,7 +1019,7 @@ function Auxiliary.XyzLevelFreeCondition2(f,gf,minct,maxct,alterf,desc,op)
return
res
return
res
end
end
end
end
function
Auxiliary
.
XyzLevelFreeTarget
2
(
f
,
gf
,
minct
,
maxct
,
alterf
,
desc
,
op
)
function
Auxiliary
.
XyzLevelFreeTarget
Alter
(
f
,
gf
,
minct
,
maxct
,
alterf
,
alterdesc
,
alter
op
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
og
,
min
,
max
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
og
,
min
,
max
)
if
og
and
not
min
then
if
og
and
not
min
then
return
true
return
true
...
@@ -1040,13 +1040,13 @@ function Auxiliary.XyzLevelFreeTarget2(f,gf,minct,maxct,alterf,desc,op)
...
@@ -1040,13 +1040,13 @@ function Auxiliary.XyzLevelFreeTarget2(f,gf,minct,maxct,alterf,desc,op)
local
mg2
=
mg
:
Filter
(
Auxiliary
.
XyzLevelFreeFilter
,
nil
,
c
,
f
)
local
mg2
=
mg
:
Filter
(
Auxiliary
.
XyzLevelFreeFilter
,
nil
,
c
,
f
)
Duel
.
SetSelectedCard
(
sg
)
Duel
.
SetSelectedCard
(
sg
)
local
b1
=
mg2
:
CheckSubGroup
(
Auxiliary
.
XyzLevelFreeGoal
,
minc
,
maxc
,
tp
,
c
,
gf
)
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
,
alter
op
)
local
g
=
nil
local
g
=
nil
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
desc
))
then
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
alter
desc
))
then
e
:
SetLabel
(
1
)
e
:
SetLabel
(
1
)
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
)
g
=
mg
:
FilterSelect
(
tp
,
Auxiliary
.
XyzAlterFilter
,
1
,
1
,
nil
,
alterf
,
c
,
e
,
tp
,
alter
op
)
if
op
then
op
(
e
,
tp
,
1
,
g
:
GetFirst
())
end
if
alterop
then
alter
op
(
e
,
tp
,
1
,
g
:
GetFirst
())
end
else
else
e
:
SetLabel
(
0
)
e
:
SetLabel
(
0
)
Duel
.
SetSelectedCard
(
sg
)
Duel
.
SetSelectedCard
(
sg
)
...
@@ -1063,7 +1063,7 @@ function Auxiliary.XyzLevelFreeTarget2(f,gf,minct,maxct,alterf,desc,op)
...
@@ -1063,7 +1063,7 @@ function Auxiliary.XyzLevelFreeTarget2(f,gf,minct,maxct,alterf,desc,op)
else
return
false
end
else
return
false
end
end
end
end
end
function
Auxiliary
.
XyzLevelFreeOperation
2
(
f
,
gf
,
minct
,
maxct
,
alterf
,
desc
,
op
)
function
Auxiliary
.
XyzLevelFreeOperation
Alter
(
f
,
gf
,
minct
,
maxct
,
alterf
,
alterdesc
,
alter
op
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
if
og
and
not
min
then
if
og
and
not
min
then
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
...
...
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