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
5eb93685
Commit
5eb93685
authored
Jun 15, 2019
by
mercury233
Committed by
DailyShana
Jun 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update Card.IsLinkSummonable and Duel.LinkSummon (#1190)
parent
2419fc3e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
43 deletions
+42
-43
c12989604.lua
c12989604.lua
+2
-2
c15447747.lua
c15447747.lua
+6
-31
utility.lua
utility.lua
+34
-10
No files found.
c12989604.lua
View file @
5eb93685
...
...
@@ -11,7 +11,7 @@ function c12989604.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c12989604
.
filter
(
c
)
return
c
:
Is
SpecialSummonable
(
SUMMON_TYPE_LINK
)
return
c
:
Is
LinkSummonable
(
nil
)
end
function
c12989604
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12989604
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
...
...
@@ -22,6 +22,6 @@ function c12989604.activate(e,tp,eg,ep,ev,re,r,rp)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12989604
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummonRule
(
tp
,
tc
,
SUMMON_TYPE_LINK
)
Duel
.
LinkSummon
(
tp
,
tc
,
nil
)
end
end
c15447747.lua
View file @
5eb93685
...
...
@@ -36,50 +36,25 @@ end
function
c15447747
.
matfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x120
)
end
function
c15447747
.
lkfilter
(
c
)
return
c
:
IsSetCard
(
0x120
)
and
c
:
Is
Type
(
TYPE_LINK
)
and
c
:
IsSpecialSummonable
(
SUMMON_TYPE_LINK
)
function
c15447747
.
lkfilter
(
c
,
mg
)
return
c
:
IsSetCard
(
0x120
)
and
c
:
Is
LinkSummonable
(
mg
)
end
function
c15447747
.
lktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
el
=
{}
local
mg
=
Duel
.
GetMatchingGroup
(
c15447747
.
matfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
mg
)
for
tc
in
aux
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
tc
:
RegisterEffect
(
e1
)
table.insert
(
el
,
e1
)
end
local
res
=
Duel
.
IsExistingMatchingCard
(
c15447747
.
lkfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
for
_
,
e
in
ipairs
(
el
)
do
e
:
Reset
()
end
return
res
return
Duel
.
IsExistingMatchingCard
(
c15447747
.
lkfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
mg
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c15447747
.
lkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
el
=
{}
local
mg
=
Duel
.
GetMatchingGroup
(
c15447747
.
matfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
mg
)
for
tc
in
aux
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
tc
:
RegisterEffect
(
e1
)
table.insert
(
el
,
e1
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
xg
=
Duel
.
SelectMatchingCard
(
tp
,
c15447747
.
lkfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
local
tc
=
x
g
:
GetFirst
()
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c15447747
.
lkfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
mg
)
local
tc
=
t
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummonRule
(
tp
,
tc
,
SUMMON_TYPE_LINK
)
end
for
_
,
e
in
ipairs
(
el
)
do
e
:
Reset
()
Duel
.
LinkSummon
(
tp
,
tc
,
mg
)
end
end
function
c15447747
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
utility.lua
View file @
5eb93685
...
...
@@ -1827,26 +1827,50 @@ function Auxiliary.LCheckGoal(sg,tp,lc,gf)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
,
lc
)
>
0
and
(
not
gf
or
gf
(
sg
))
and
not
sg
:
IsExists
(
Auxiliary
.
LUncompatibilityFilter
,
1
,
nil
,
sg
,
lc
)
end
function
Auxiliary
.
LinkCondition
(
f
,
min
,
max
,
gf
)
return
function
(
e
,
c
)
function
Auxiliary
.
LinkCondition
(
f
,
min
c
,
maxc
,
gf
)
return
function
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
minc
=
minc
local
maxc
=
maxc
if
min
then
if
min
>
minc
then
minc
=
min
end
if
max
<
maxc
then
maxc
=
max
end
if
minc
>
maxc
then
return
false
end
end
local
tp
=
c
:
GetControler
()
local
mg
=
Auxiliary
.
GetLinkMaterials
(
tp
,
f
,
c
)
local
mg
=
nil
if
og
then
mg
=
og
:
Filter
(
Auxiliary
.
LConditionFilter
,
nil
,
f
,
c
)
else
mg
=
Auxiliary
.
GetLinkMaterials
(
tp
,
f
,
c
)
end
local
fg
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)
if
fg
:
IsExists
(
Auxiliary
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
Duel
.
SetSelectedCard
(
fg
)
return
mg
:
CheckSubGroup
(
Auxiliary
.
LCheckGoal
,
min
,
max
,
tp
,
c
,
gf
)
return
mg
:
CheckSubGroup
(
Auxiliary
.
LCheckGoal
,
min
c
,
maxc
,
tp
,
c
,
gf
)
end
end
function
Auxiliary
.
LinkTarget
(
f
,
min
,
max
,
gf
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
)
local
mg
=
Auxiliary
.
GetLinkMaterials
(
tp
,
f
,
c
)
function
Auxiliary
.
LinkTarget
(
f
,
minc
,
maxc
,
gf
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
og
,
min
,
max
)
local
minc
=
minc
local
maxc
=
maxc
if
min
then
if
min
>
minc
then
minc
=
min
end
if
max
<
maxc
then
maxc
=
max
end
if
minc
>
maxc
then
return
false
end
end
local
mg
=
nil
if
og
then
mg
=
og
:
Filter
(
Auxiliary
.
LConditionFilter
,
nil
,
f
,
c
)
else
mg
=
Auxiliary
.
GetLinkMaterials
(
tp
,
f
,
c
)
end
local
fg
=
Auxiliary
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)
Duel
.
SetSelectedCard
(
fg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LMATERIAL
)
local
cancel
=
Duel
.
GetCurrentChain
()
==
0
local
sg
=
mg
:
SelectSubGroup
(
tp
,
Auxiliary
.
LCheckGoal
,
cancel
,
min
,
max
,
tp
,
c
,
gf
)
local
sg
=
mg
:
SelectSubGroup
(
tp
,
Auxiliary
.
LCheckGoal
,
cancel
,
min
c
,
maxc
,
tp
,
c
,
gf
)
if
sg
then
sg
:
KeepAlive
()
e
:
SetLabelObject
(
sg
)
...
...
@@ -1854,8 +1878,8 @@ function Auxiliary.LinkTarget(f,min,max,gf)
else
return
false
end
end
end
function
Auxiliary
.
LinkOperation
(
f
,
min
,
max
,
gf
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
smat
,
mg
)
function
Auxiliary
.
LinkOperation
(
f
,
min
c
,
maxc
,
gf
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
local
g
=
e
:
GetLabelObject
()
c
:
SetMaterial
(
g
)
Duel
.
SendtoGrave
(
g
,
REASON_MATERIAL
+
REASON_LINK
)
...
...
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