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
nanahira
ygopro-scripts
Commits
757eb906
You need to sign in or sign up before continuing.
Commit
757eb906
authored
Jul 19, 2019
by
nekrozar
Committed by
GitHub
Jul 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update EFFECT_EXTRA_LINK_MATERIAL (#1206)
parent
fee0ec6a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
62 deletions
+27
-62
c2347477.lua
c2347477.lua
+2
-18
c30114823.lua
c30114823.lua
+2
-18
c75130221.lua
c75130221.lua
+2
-18
utility.lua
utility.lua
+21
-8
No files found.
c2347477.lua
View file @
757eb906
...
...
@@ -6,16 +6,9 @@ function c2347477.initial_effect(c)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_EXTRA_LINK_MATERIAL
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCo
ndition
(
c2347477
.
matcon
)
e1
:
SetCo
untLimit
(
1
,
2347477
)
e1
:
SetValue
(
c2347477
.
matval
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_BE_MATERIAL
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCondition
(
c2347477
.
ctcon
)
e2
:
SetOperation
(
c2347477
.
ctop
)
c
:
RegisterEffect
(
e2
)
--search
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
2347477
,
0
))
...
...
@@ -23,15 +16,12 @@ function c2347477.initial_effect(c)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_BE_MATERIAL
)
e3
:
SetCountLimit
(
1
,
234747
7
)
e3
:
SetCountLimit
(
1
,
234747
8
)
e3
:
SetCondition
(
c2347477
.
thcon
)
e3
:
SetTarget
(
c2347477
.
thtg
)
e3
:
SetOperation
(
c2347477
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
c2347477
.
matcon
(
e
)
return
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
2347477
)
==
0
end
function
c2347477
.
mfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsRace
(
RACE_CYBERSE
)
end
...
...
@@ -41,12 +31,6 @@ end
function
c2347477
.
matval
(
e
,
c
,
mg
)
return
c
:
IsSetCard
(
0x101
)
and
mg
:
IsExists
(
c2347477
.
mfilter
,
1
,
nil
)
and
not
mg
:
IsExists
(
c2347477
.
exmfilter
,
1
,
nil
)
end
function
c2347477
.
ctcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_HAND
)
end
function
c2347477
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
2347477
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c2347477
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
e
:
SetLabel
(
0
)
...
...
c30114823.lua
View file @
757eb906
...
...
@@ -6,16 +6,9 @@ function c30114823.initial_effect(c)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_EXTRA_LINK_MATERIAL
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCo
ndition
(
c30114823
.
matcon
)
e1
:
SetCo
untLimit
(
1
,
30114823
)
e1
:
SetValue
(
c30114823
.
matval
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_BE_MATERIAL
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCondition
(
c30114823
.
ctcon
)
e2
:
SetOperation
(
c30114823
.
ctop
)
c
:
RegisterEffect
(
e2
)
--to grave
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
30114823
,
0
))
...
...
@@ -23,15 +16,12 @@ function c30114823.initial_effect(c)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_BE_MATERIAL
)
e3
:
SetCountLimit
(
1
,
3011482
3
)
e3
:
SetCountLimit
(
1
,
3011482
4
)
e3
:
SetCondition
(
c30114823
.
tdcon
)
e3
:
SetTarget
(
c30114823
.
tdtg
)
e3
:
SetOperation
(
c30114823
.
tdop
)
c
:
RegisterEffect
(
e3
)
end
function
c30114823
.
matcon
(
e
)
return
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
30114823
)
==
0
end
function
c30114823
.
mfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsRace
(
RACE_CYBERSE
)
end
...
...
@@ -41,12 +31,6 @@ end
function
c30114823
.
matval
(
e
,
c
,
mg
)
return
c
:
IsSetCard
(
0x101
)
and
mg
:
IsExists
(
c30114823
.
mfilter
,
1
,
nil
)
and
not
mg
:
IsExists
(
c30114823
.
exmfilter
,
1
,
nil
)
end
function
c30114823
.
ctcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_HAND
)
end
function
c30114823
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
30114823
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c30114823
.
tdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
e
:
SetLabel
(
0
)
...
...
c75130221.lua
View file @
757eb906
...
...
@@ -6,16 +6,9 @@ function c75130221.initial_effect(c)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_EXTRA_LINK_MATERIAL
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCo
ndition
(
c75130221
.
matcon
)
e1
:
SetCo
untLimit
(
1
,
75130221
)
e1
:
SetValue
(
c75130221
.
matval
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_BE_MATERIAL
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCondition
(
c75130221
.
ctcon
)
e2
:
SetOperation
(
c75130221
.
ctop
)
c
:
RegisterEffect
(
e2
)
--disable
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
75130221
,
0
))
...
...
@@ -23,15 +16,12 @@ function c75130221.initial_effect(c)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCode
(
EVENT_BE_MATERIAL
)
e3
:
SetCountLimit
(
1
,
7513022
1
)
e3
:
SetCountLimit
(
1
,
7513022
2
)
e3
:
SetCondition
(
c75130221
.
discon
)
e3
:
SetTarget
(
c75130221
.
distg
)
e3
:
SetOperation
(
c75130221
.
disop
)
c
:
RegisterEffect
(
e3
)
end
function
c75130221
.
matcon
(
e
)
return
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
75130221
)
==
0
end
function
c75130221
.
mfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsRace
(
RACE_CYBERSE
)
end
...
...
@@ -41,12 +31,6 @@ end
function
c75130221
.
matval
(
e
,
c
,
mg
)
return
c
:
IsSetCard
(
0x101
)
and
mg
:
IsExists
(
c75130221
.
mfilter
,
1
,
nil
)
and
not
mg
:
IsExists
(
c75130221
.
exmfilter
,
1
,
nil
)
end
function
c75130221
.
ctcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_HAND
)
end
function
c75130221
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RegisterFlagEffect
(
tp
,
75130221
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c75130221
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
e
:
SetLabel
(
0
)
...
...
utility.lua
View file @
757eb906
...
...
@@ -1823,9 +1823,9 @@ end
function
Auxiliary
.
LConditionFilter
(
c
,
f
,
lc
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeLinkMaterial
(
lc
)
and
(
not
f
or
f
(
c
))
end
function
Auxiliary
.
LExtraFilter
(
c
,
f
,
lc
)
function
Auxiliary
.
LExtraFilter
(
c
,
f
,
lc
,
tp
)
if
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
not
c
:
IsFaceup
()
then
return
false
end
return
c
:
IsHasEffect
(
EFFECT_EXTRA_LINK_MATERIAL
)
and
c
:
IsCanBeLinkMaterial
(
lc
)
and
(
not
f
or
f
(
c
))
return
c
:
IsHasEffect
(
EFFECT_EXTRA_LINK_MATERIAL
,
tp
)
and
c
:
IsCanBeLinkMaterial
(
lc
)
and
(
not
f
or
f
(
c
))
end
function
Auxiliary
.
GetLinkCount
(
c
)
if
c
:
IsType
(
TYPE_LINK
)
and
c
:
GetLink
()
>
1
then
...
...
@@ -1834,28 +1834,40 @@ function Auxiliary.GetLinkCount(c)
end
function
Auxiliary
.
GetLinkMaterials
(
tp
,
f
,
lc
)
local
mg
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
LConditionFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
f
,
lc
)
local
mg2
=
Duel
.
GetMatchingGroup
(
Auxiliary
.
LExtraFilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
LOCATION_ONFIELD
,
nil
,
f
,
lc
)
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
return
mg
end
function
Auxiliary
.
LCheckOtherMaterial
(
c
,
mg
,
lc
)
local
le
=
{
c
:
IsHasEffect
(
EFFECT_EXTRA_LINK_MATERIAL
)}
function
Auxiliary
.
LCheckOtherMaterial
(
c
,
mg
,
lc
,
tp
)
local
le
=
{
c
:
IsHasEffect
(
EFFECT_EXTRA_LINK_MATERIAL
,
tp
)}
for
_
,
te
in
pairs
(
le
)
do
local
f
=
te
:
GetValue
()
if
f
and
not
f
(
te
,
lc
,
mg
)
then
return
false
end
end
return
true
end
function
Auxiliary
.
LUncompatibilityFilter
(
c
,
sg
,
lc
)
function
Auxiliary
.
LUncompatibilityFilter
(
c
,
sg
,
lc
,
tp
)
local
mg
=
sg
:
Filter
(
aux
.
TRUE
,
c
)
return
not
Auxiliary
.
LCheckOtherMaterial
(
c
,
mg
,
lc
)
return
not
Auxiliary
.
LCheckOtherMaterial
(
c
,
mg
,
lc
,
tp
)
end
function
Auxiliary
.
LCheckGoal
(
sg
,
tp
,
lc
,
gf
,
lmat
)
return
sg
:
CheckWithSumEqual
(
Auxiliary
.
GetLinkCount
,
lc
:
GetLink
(),
#
sg
,
#
sg
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
,
lc
)
>
0
and
(
not
gf
or
gf
(
sg
))
and
not
sg
:
IsExists
(
Auxiliary
.
LUncompatibilityFilter
,
1
,
nil
,
sg
,
lc
)
and
not
sg
:
IsExists
(
Auxiliary
.
LUncompatibilityFilter
,
1
,
nil
,
sg
,
lc
,
tp
)
and
(
not
lmat
or
sg
:
IsContains
(
lmat
))
end
function
Auxiliary
.
LExtraMaterialCount
(
mg
,
lc
,
tp
)
for
tc
in
aux
.
Next
(
mg
)
do
local
le
=
{
tc
:
IsHasEffect
(
EFFECT_EXTRA_LINK_MATERIAL
,
tp
)}
for
_
,
te
in
pairs
(
le
)
do
local
sg
=
mg
:
Filter
(
aux
.
TRUE
,
tc
)
local
f
=
te
:
GetValue
()
if
not
f
or
f
(
te
,
lc
,
sg
)
then
te
:
UseCountLimit
(
tp
)
end
end
end
end
function
Auxiliary
.
LinkCondition
(
f
,
minc
,
maxc
,
gf
)
return
function
(
e
,
c
,
og
,
lmat
,
min
,
max
)
if
c
==
nil
then
return
true
end
...
...
@@ -1919,6 +1931,7 @@ function Auxiliary.LinkOperation(f,minc,maxc,gf)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
lmat
,
min
,
max
)
local
g
=
e
:
GetLabelObject
()
c
:
SetMaterial
(
g
)
Auxiliary
.
LExtraMaterialCount
(
g
,
c
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_MATERIAL
+
REASON_LINK
)
g
:
DeleteGroup
()
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