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
72564d42
Commit
72564d42
authored
Oct 30, 2021
by
mercury233
Committed by
GitHub
Oct 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add EFFECT_FLAG_SET_AVAILABLE check for link procedure (#1722)
parent
c597e372
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
utility.lua
utility.lua
+12
-10
No files found.
utility.lua
View file @
72564d42
...
@@ -1929,9 +1929,11 @@ function Auxiliary.AddLinkProcedure(c,f,min,max,gf)
...
@@ -1929,9 +1929,11 @@ function Auxiliary.AddLinkProcedure(c,f,min,max,gf)
e1
:
SetOperation
(
Auxiliary
.
LinkOperation
(
f
,
min
,
max
,
gf
))
e1
:
SetOperation
(
Auxiliary
.
LinkOperation
(
f
,
min
,
max
,
gf
))
e1
:
SetValue
(
SUMMON_TYPE_LINK
)
e1
:
SetValue
(
SUMMON_TYPE_LINK
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
return
e1
end
end
function
Auxiliary
.
LConditionFilter
(
c
,
f
,
lc
)
function
Auxiliary
.
LConditionFilter
(
c
,
f
,
lc
,
e
)
return
(
c
:
IsFaceup
()
or
not
c
:
IsOnField
())
and
c
:
IsCanBeLinkMaterial
(
lc
)
and
(
not
f
or
f
(
c
))
return
(
c
:
IsFaceup
()
or
not
c
:
IsOnField
()
or
e
:
IsHasProperty
(
EFFECT_FLAG_SET_AVAILABLE
))
and
c
:
IsCanBeLinkMaterial
(
lc
)
and
(
not
f
or
f
(
c
))
end
end
function
Auxiliary
.
LExtraFilter
(
c
,
f
,
lc
,
tp
)
function
Auxiliary
.
LExtraFilter
(
c
,
f
,
lc
,
tp
)
if
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
not
c
:
IsFaceup
()
then
return
false
end
if
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
not
c
:
IsFaceup
()
then
return
false
end
...
@@ -1949,8 +1951,8 @@ function Auxiliary.GetLinkCount(c)
...
@@ -1949,8 +1951,8 @@ function Auxiliary.GetLinkCount(c)
return
1
+
0x10000
*
c
:
GetLink
()
return
1
+
0x10000
*
c
:
GetLink
()
else
return
1
end
else
return
1
end
end
end
function
Auxiliary
.
GetLinkMaterials
(
tp
,
f
,
lc
)
function
Auxiliary
.
GetLinkMaterials
(
tp
,
f
,
lc
,
e
)
local
mg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
LConditionFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
f
,
lc
)
local
mg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
LConditionFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
f
,
lc
,
e
)
local
mg2
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
LExtraFilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
LOCATION_ONFIELD
,
nil
,
f
,
lc
,
tp
)
local
mg2
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
LExtraFilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
LOCATION_ONFIELD
,
nil
,
f
,
lc
,
tp
)
if
mg2
:
GetCount
()
>
0
then
mg
:
Merge
(
mg2
)
end
if
mg2
:
GetCount
()
>
0
then
mg
:
Merge
(
mg2
)
end
return
mg
return
mg
...
@@ -2004,12 +2006,12 @@ function Auxiliary.LinkCondition(f,minc,maxc,gf)
...
@@ -2004,12 +2006,12 @@ function Auxiliary.LinkCondition(f,minc,maxc,gf)
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
mg
=
nil
local
mg
=
nil
if
og
then
if
og
then
mg
=
og
:
Filter
(
Auxiliary
.
LConditionFilter
,
nil
,
f
,
c
)
mg
=
og
:
Filter
(
Auxiliary
.
LConditionFilter
,
nil
,
f
,
c
,
e
)
else
else
mg
=
Auxiliary
.
GetLinkMaterials
(
tp
,
f
,
c
)
mg
=
Auxiliary
.
GetLinkMaterials
(
tp
,
f
,
c
,
e
)
end
end
if
lmat
~=
nil
then
if
lmat
~=
nil
then
if
not
Auxiliary
.
LConditionFilter
(
lmat
,
f
,
c
)
then
return
false
end
if
not
Auxiliary
.
LConditionFilter
(
lmat
,
f
,
c
,
e
)
then
return
false
end
mg
:
AddCard
(
lmat
)
mg
:
AddCard
(
lmat
)
end
end
local
fg
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)
local
fg
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)
...
@@ -2029,12 +2031,12 @@ function Auxiliary.LinkTarget(f,minc,maxc,gf)
...
@@ -2029,12 +2031,12 @@ function Auxiliary.LinkTarget(f,minc,maxc,gf)
end
end
local
mg
=
nil
local
mg
=
nil
if
og
then
if
og
then
mg
=
og
:
Filter
(
Auxiliary
.
LConditionFilter
,
nil
,
f
,
c
)
mg
=
og
:
Filter
(
Auxiliary
.
LConditionFilter
,
nil
,
f
,
c
,
e
)
else
else
mg
=
Auxiliary
.
GetLinkMaterials
(
tp
,
f
,
c
)
mg
=
Auxiliary
.
GetLinkMaterials
(
tp
,
f
,
c
,
e
)
end
end
if
lmat
~=
nil
then
if
lmat
~=
nil
then
if
not
Auxiliary
.
LConditionFilter
(
lmat
,
f
,
c
)
then
return
false
end
if
not
Auxiliary
.
LConditionFilter
(
lmat
,
f
,
c
,
e
)
then
return
false
end
mg
:
AddCard
(
lmat
)
mg
:
AddCard
(
lmat
)
end
end
local
fg
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)
local
fg
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)
...
...
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