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
673accbe
Commit
673accbe
authored
Mar 15, 2023
by
mercury233
Committed by
GitHub
Mar 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xyz summon using alter mat can be canceled (#2044)
parent
45f4ef3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
utility.lua
utility.lua
+19
-9
No files found.
utility.lua
View file @
673accbe
...
@@ -686,7 +686,8 @@ function Auxiliary.TuneMagicianCheckAdditionalX(ecode)
...
@@ -686,7 +686,8 @@ function Auxiliary.TuneMagicianCheckAdditionalX(ecode)
end
end
end
end
function
Auxiliary
.
XyzAlterFilter
(
c
,
alterf
,
xyzc
,
e
,
tp
,
alterop
)
function
Auxiliary
.
XyzAlterFilter
(
c
,
alterf
,
xyzc
,
e
,
tp
,
alterop
)
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
alterop
(
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
alterop
(
e
,
tp
,
0
,
c
))
end
end
--Xyz monster, lv k*n
--Xyz monster, lv k*n
function
Auxiliary
.
AddXyzProcedure
(
c
,
f
,
lv
,
ct
,
alterf
,
alterdesc
,
maxct
,
alterop
)
function
Auxiliary
.
AddXyzProcedure
(
c
,
f
,
lv
,
ct
,
alterf
,
alterdesc
,
maxct
,
alterop
)
...
@@ -816,14 +817,19 @@ function Auxiliary.XyzTargetAlter(f,lv,minc,maxc,alterf,alterdesc,alterop)
...
@@ -816,14 +817,19 @@ function Auxiliary.XyzTargetAlter(f,lv,minc,maxc,alterf,alterdesc,alterop)
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
,
alterop
)
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
,
alterop
)
local
b2
=
(
not
min
or
min
<=
1
)
and
#
altg
>
0
local
g
=
nil
local
g
=
nil
local
cancel
=
Duel
.
IsSummonCancelable
()
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
alterdesc
))
then
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
alterdesc
))
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
,
alterop
)
local
tc
=
altg
:
SelectUnselect
(
nil
,
tp
,
false
,
cancel
,
1
,
1
)
if
alterop
then
alterop
(
e
,
tp
,
1
,
g
:
GetFirst
())
end
if
tc
then
g
=
Group
.
FromCards
(
tc
)
if
alterop
then
alterop
(
e
,
tp
,
1
,
tc
)
end
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
)
...
@@ -1003,7 +1009,7 @@ function Auxiliary.XyzLevelFreeConditionAlter(f,gf,minct,maxct,alterf,alterdesc,
...
@@ -1003,7 +1009,7 @@ function Auxiliary.XyzLevelFreeConditionAlter(f,gf,minct,maxct,alterf,alterdesc,
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
,
alterop
)
:
Filter
(
Auxiliary
.
MustMaterialCheck
,
nil
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
altg
=
mg
:
Filter
(
Auxiliary
.
XyzAlterFilter
,
nil
,
alterf
,
c
,
e
,
tp
,
alterop
)
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
...
@@ -1042,21 +1048,25 @@ function Auxiliary.XyzLevelFreeTargetAlter(f,gf,minct,maxct,alterf,alterdesc,alt
...
@@ -1042,21 +1048,25 @@ function Auxiliary.XyzLevelFreeTargetAlter(f,gf,minct,maxct,alterf,alterdesc,alt
mg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
mg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
end
end
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
altg
=
mg
:
Filter
(
Auxiliary
.
XyzAlterFilter
,
nil
,
alterf
,
c
,
e
,
tp
,
alterop
)
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
,
alterop
)
local
b2
=
(
not
min
or
min
<=
1
)
and
#
altg
>
0
local
g
=
nil
local
g
=
nil
local
cancel
=
Duel
.
IsSummonCancelable
()
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
alterdesc
))
then
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
alterdesc
))
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
,
alterop
)
local
tc
=
altg
:
SelectUnselect
(
nil
,
tp
,
false
,
cancel
,
1
,
1
)
if
alterop
then
alterop
(
e
,
tp
,
1
,
g
:
GetFirst
())
end
if
tc
then
g
=
Group
.
FromCards
(
tc
)
if
alterop
then
alterop
(
e
,
tp
,
1
,
tc
)
end
end
else
else
e
:
SetLabel
(
0
)
e
:
SetLabel
(
0
)
Duel
.
SetSelectedCard
(
sg
)
Duel
.
SetSelectedCard
(
sg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
cancel
=
Duel
.
IsSummonCancelable
()
Auxiliary
.
GCheckAdditional
=
Auxiliary
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
Auxiliary
.
GCheckAdditional
=
Auxiliary
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
g
=
mg2
:
SelectSubGroup
(
tp
,
Auxiliary
.
XyzLevelFreeGoal
,
cancel
,
minc
,
maxc
,
tp
,
c
,
gf
)
g
=
mg2
:
SelectSubGroup
(
tp
,
Auxiliary
.
XyzLevelFreeGoal
,
cancel
,
minc
,
maxc
,
tp
,
c
,
gf
)
Auxiliary
.
GCheckAdditional
=
nil
Auxiliary
.
GCheckAdditional
=
nil
...
...
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