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
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
MyCard
ygopro-scripts
Commits
0a4dc03b
You need to sign in or sign up before continuing.
Commit
0a4dc03b
authored
Oct 16, 2017
by
nekrozar
Committed by
mercury233
Oct 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update aux.AddLinkProcedure (#952)
parent
e73c8365
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
72 deletions
+21
-72
c28776350.lua
c28776350.lua
+4
-29
c77610772.lua
c77610772.lua
+4
-30
utility.lua
utility.lua
+13
-13
No files found.
c28776350.lua
View file @
0a4dc03b
--アカシック・マジシャン
--アカシック・マジシャン
function
c28776350
.
initial_effect
(
c
)
function
c28776350
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--link summon
--link summon
local
e0
=
Effect
.
CreateEffect
(
c
)
aux
.
AddLinkProcedure
(
c
,
aux
.
NOT
(
aux
.
FilterBoolFunction
(
Card
.
IsLinkType
,
TYPE_TOKEN
)),
2
,
2
,
c28776350
.
lcheck
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
c
:
EnableReviveLimit
()
e0
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetRange
(
LOCATION_EXTRA
)
e0
:
SetCondition
(
c28776350
.
lkcon
)
e0
:
SetOperation
(
c28776350
.
lkop
)
e0
:
SetValue
(
SUMMON_TYPE_LINK
)
c
:
RegisterEffect
(
e0
)
--splimit
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
...
@@ -56,25 +48,8 @@ end
...
@@ -56,25 +48,8 @@ end
function
c28776350
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
function
c28776350
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
c
:
IsCode
(
28776350
)
and
bit
.
band
(
sumtype
,
SUMMON_TYPE_LINK
)
==
SUMMON_TYPE_LINK
return
c
:
IsCode
(
28776350
)
and
bit
.
band
(
sumtype
,
SUMMON_TYPE_LINK
)
==
SUMMON_TYPE_LINK
end
end
function
c28776350
.
lkfilter1
(
c
,
lc
,
tp
)
function
c28776350
.
lcheck
(
g
,
lc
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeLinkMaterial
(
lc
)
and
not
c
:
IsLinkType
(
TYPE_TOKEN
)
and
Duel
.
IsExistingMatchingCard
(
c28776350
.
lkfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
lc
,
c
,
tp
)
return
g
:
GetClassCount
(
Card
.
GetRace
)
==
1
end
function
c28776350
.
lkfilter2
(
c
,
lc
,
mc
,
tp
)
local
mg
=
Group
.
FromCards
(
c
,
mc
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeLinkMaterial
(
lc
)
and
c
:
IsRace
(
mc
:
GetRace
())
and
not
c
:
IsLinkType
(
TYPE_TOKEN
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
mg
,
lc
)
>
0
end
function
c28776350
.
lkcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
tp
=
c
:
GetControler
()
return
Duel
.
IsExistingMatchingCard
(
c28776350
.
lkfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
c
,
tp
)
end
function
c28776350
.
lkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c28776350
.
lkfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
c
,
tp
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c28776350
.
lkfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
g1
:
GetFirst
(),
c
,
g1
:
GetFirst
(),
tp
)
g1
:
Merge
(
g2
)
c
:
SetMaterial
(
g1
)
Duel
.
SendtoGrave
(
g1
,
REASON_MATERIAL
+
REASON_LINK
)
end
end
function
c28776350
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c28776350
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
...
...
c77610772.lua
View file @
0a4dc03b
--星杯神楽イヴ
--星杯神楽イヴ
function
c77610772
.
initial_effect
(
c
)
function
c77610772
.
initial_effect
(
c
)
--link summon
--link summon
local
e0
=
Effect
.
CreateEffect
(
c
)
aux
.
AddLinkProcedure
(
c
,
nil
,
2
,
2
,
c77610772
.
lcheck
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e0
:
SetRange
(
LOCATION_EXTRA
)
e0
:
SetCondition
(
c77610772
.
linkcon
)
e0
:
SetOperation
(
c77610772
.
linkop
)
e0
:
SetValue
(
SUMMON_TYPE_LINK
)
c
:
RegisterEffect
(
e0
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--indes
--indes
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
@@ -48,29 +40,11 @@ function c77610772.initial_effect(c)
...
@@ -48,29 +40,11 @@ function c77610772.initial_effect(c)
e5
:
SetOperation
(
c77610772
.
spop2
)
e5
:
SetOperation
(
c77610772
.
spop2
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
end
end
function
c77610772
.
linkfilter1
(
c
,
lc
,
tp
)
function
c77610772
.
lcheck
(
g
,
lc
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeLinkMaterial
(
lc
)
and
Duel
.
IsExistingMatchingCard
(
c77610772
.
linkfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
,
lc
,
c
,
tp
)
return
g
:
GetClassCount
(
Card
.
GetRace
)
==
g
:
GetCount
()
and
g
:
GetClassCount
(
Card
.
GetAttribute
)
==
g
:
GetCount
()
end
function
c77610772
.
linkfilter2
(
c
,
lc
,
mc
,
tp
)
local
mg
=
Group
.
FromCards
(
c
,
mc
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeLinkMaterial
(
lc
)
and
not
c
:
IsRace
(
mc
:
GetRace
())
and
not
c
:
IsAttribute
(
mc
:
GetAttribute
())
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
mg
,
lc
)
>
0
end
function
c77610772
.
linkcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
tp
=
c
:
GetControler
()
return
Duel
.
IsExistingMatchingCard
(
c77610772
.
linkfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
c
,
tp
)
end
function
c77610772
.
linkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c77610772
.
linkfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
c
,
tp
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c77610772
.
linkfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
g1
:
GetFirst
(),
c
,
g1
:
GetFirst
(),
tp
)
g1
:
Merge
(
g2
)
c
:
SetMaterial
(
g1
)
Duel
.
SendtoGrave
(
g1
,
REASON_MATERIAL
+
REASON_LINK
)
end
end
function
c77610772
.
incon
(
e
)
function
c77610772
.
incon
(
e
)
local
c
=
e
:
GetHandler
()
return
e
:
GetHandler
():
IsLinkState
()
return
c
:
IsLinkState
()
end
end
function
c77610772
.
repfilter
(
c
,
tp
,
hc
)
function
c77610772
.
repfilter
(
c
,
tp
,
hc
)
return
c
:
IsFaceup
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
return
c
:
IsFaceup
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
...
...
utility.lua
View file @
0a4dc03b
...
@@ -1593,15 +1593,15 @@ function Auxiliary.PendOperation()
...
@@ -1593,15 +1593,15 @@ function Auxiliary.PendOperation()
end
end
end
end
--Link Summon
--Link Summon
function
Auxiliary
.
AddLinkProcedure
(
c
,
f
,
min
,
max
)
function
Auxiliary
.
AddLinkProcedure
(
c
,
f
,
min
,
max
,
gf
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetRange
(
LOCATION_EXTRA
)
if
max
==
nil
then
max
=
99
end
if
max
==
nil
then
max
=
99
end
e1
:
SetCondition
(
Auxiliary
.
LinkCondition
(
f
,
min
,
max
))
e1
:
SetCondition
(
Auxiliary
.
LinkCondition
(
f
,
min
,
max
,
gf
))
e1
:
SetOperation
(
Auxiliary
.
LinkOperation
(
f
,
min
,
max
))
e1
:
SetOperation
(
Auxiliary
.
LinkOperation
(
f
,
min
,
max
,
gf
))
e1
:
SetValue
(
SUMMON_TYPE_LINK
)
e1
:
SetValue
(
SUMMON_TYPE_LINK
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
...
@@ -1613,37 +1613,37 @@ function Auxiliary.GetLinkCount(c)
...
@@ -1613,37 +1613,37 @@ 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
.
LCheckRecursive
(
c
,
tp
,
sg
,
mg
,
lc
,
ct
,
minc
,
maxc
)
function
Auxiliary
.
LCheckRecursive
(
c
,
tp
,
sg
,
mg
,
lc
,
ct
,
minc
,
maxc
,
gf
)
sg
:
AddCard
(
c
)
sg
:
AddCard
(
c
)
ct
=
ct
+
1
ct
=
ct
+
1
local
res
=
Auxiliary
.
LCheckGoal
(
tp
,
sg
,
lc
,
minc
,
ct
)
local
res
=
Auxiliary
.
LCheckGoal
(
tp
,
sg
,
lc
,
minc
,
ct
,
gf
)
or
(
ct
<
maxc
and
mg
:
IsExists
(
Auxiliary
.
LCheckRecursive
,
1
,
sg
,
tp
,
sg
,
mg
,
lc
,
ct
,
minc
,
maxc
))
or
(
ct
<
maxc
and
mg
:
IsExists
(
Auxiliary
.
LCheckRecursive
,
1
,
sg
,
tp
,
sg
,
mg
,
lc
,
ct
,
minc
,
maxc
,
gf
))
sg
:
RemoveCard
(
c
)
sg
:
RemoveCard
(
c
)
ct
=
ct
-
1
ct
=
ct
-
1
return
res
return
res
end
end
function
Auxiliary
.
LCheckGoal
(
tp
,
sg
,
lc
,
minc
,
ct
)
function
Auxiliary
.
LCheckGoal
(
tp
,
sg
,
lc
,
minc
,
ct
,
gf
)
return
ct
>=
minc
and
sg
:
CheckWithSumEqual
(
Auxiliary
.
GetLinkCount
,
lc
:
GetLink
(),
ct
,
ct
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
,
lc
)
>
0
return
ct
>=
minc
and
sg
:
CheckWithSumEqual
(
Auxiliary
.
GetLinkCount
,
lc
:
GetLink
(),
ct
,
ct
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
,
lc
)
>
0
and
(
not
gf
or
gf
(
sg
,
lc
))
end
end
function
Auxiliary
.
LinkCondition
(
f
,
minc
,
maxc
)
function
Auxiliary
.
LinkCondition
(
f
,
minc
,
maxc
,
gf
)
return
function
(
e
,
c
)
return
function
(
e
,
c
)
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
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
LConditionFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
f
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
LConditionFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
f
,
c
)
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
return
mg
:
IsExists
(
Auxiliary
.
LCheckRecursive
,
1
,
nil
,
tp
,
sg
,
mg
,
c
,
0
,
minc
,
maxc
)
return
mg
:
IsExists
(
Auxiliary
.
LCheckRecursive
,
1
,
nil
,
tp
,
sg
,
mg
,
c
,
0
,
minc
,
maxc
,
gf
)
end
end
end
end
function
Auxiliary
.
LinkOperation
(
f
,
minc
,
maxc
)
function
Auxiliary
.
LinkOperation
(
f
,
minc
,
maxc
,
gf
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
LConditionFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
f
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
LConditionFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
f
,
c
)
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
for
i
=
0
,
maxc
-
1
do
for
i
=
0
,
maxc
-
1
do
local
cg
=
mg
:
Filter
(
Auxiliary
.
LCheckRecursive
,
sg
,
tp
,
sg
,
mg
,
c
,
i
,
minc
,
maxc
)
local
cg
=
mg
:
Filter
(
Auxiliary
.
LCheckRecursive
,
sg
,
tp
,
sg
,
mg
,
c
,
i
,
minc
,
maxc
,
gf
)
if
cg
:
GetCount
()
==
0
then
break
end
if
cg
:
GetCount
()
==
0
then
break
end
local
minct
=
1
local
minct
=
1
if
Auxiliary
.
LCheckGoal
(
tp
,
sg
,
c
,
minc
,
i
)
then
if
Auxiliary
.
LCheckGoal
(
tp
,
sg
,
c
,
minc
,
i
,
gf
)
then
if
not
Duel
.
SelectYesNo
(
tp
,
210
)
then
break
end
if
not
Duel
.
SelectYesNo
(
tp
,
210
)
then
break
end
minct
=
0
minct
=
0
end
end
...
...
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