Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-THC-cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
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
HiiragiGuardians
ygopro-THC-cards
Commits
4f6c266a
Commit
4f6c266a
authored
Apr 02, 2024
by
wyykak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix exlink by gugu
Signed-off-by:
wyykak
<
wyy_1414@126.com
>
parent
c3cb0608
Pipeline
#26211
passed with stage
in 16 seconds
Changes
5
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
423 additions
and
453 deletions
+423
-453
expansions/script/nef/Exlink.lua
expansions/script/nef/Exlink.lua
+187
-0
expansions/script/special.lua
expansions/script/special.lua
+1
-0
script/c25501.lua
script/c25501.lua
+55
-129
script/c86379558.lua
script/c86379558.lua
+59
-131
script/c86379662.lua
script/c86379662.lua
+121
-193
No files found.
expansions/script/nef/Exlink.lua
0 → 100644
View file @
4f6c266a
Exlink
=
Exlink
or
{}
--extra link
function
Exlink
.
AddLinkProcedure
(
c
,
f
,
min
,
max
,
mattg
,
matval
,
loc1
,
loc2
,
count
,
code
,
gf
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
1166
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
if
max
==
nil
then
max
=
c
:
GetLink
()
end
e1
:
SetCondition
(
Exlink
.
LinkCondition
(
f
,
min
,
max
,
loc1
,
loc2
,
gf
))
e1
:
SetTarget
(
Exlink
.
LinkTarget
(
f
,
min
,
max
,
loc1
,
loc2
,
gf
))
e1
:
SetOperation
(
Exlink
.
LinkOperation
(
f
,
min
,
max
,
loc1
,
loc2
,
gf
))
e1
:
SetValue
(
SUMMON_TYPE_LINK
)
c
:
RegisterEffect
(
e1
)
--extra material
if
mattg
and
matval
and
(
loc1
or
loc2
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetCode
(
EFFECT_EXTRA_LINK_MATERIAL
)
e2
:
SetRange
(
LOCATION_EXTRA
)
if
count
then
if
code
==
nil
then
code
=
c
:
GetOriginalCode
()
end
e2
:
SetCountLimit
(
count
,
code
)
end
e2
:
SetLabel
(
404
)
e2
:
SetTarget
(
Exlink
.
exmattg
(
mattg
))
e2
:
SetTargetRange
(
loc1
,
loc2
)
e2
:
SetValue
(
Exlink
.
exmatval
(
matval
))
c
:
RegisterEffect
(
e2
)
end
return
e1
end
function
Exlink
.
LConditionFilter
(
c
,
f
,
lc
,
e
)
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
function
Exlink
.
LExtraFilter
(
c
,
f
,
lc
,
tp
)
if
c
:
IsOnField
()
and
c
:
IsFacedown
()
then
return
false
end
if
not
c
:
IsCanBeLinkMaterial
(
lc
)
or
f
and
not
f
(
c
)
then
return
false
end
local
le
=
{
c
:
IsHasEffect
(
EFFECT_EXTRA_LINK_MATERIAL
,
tp
)}
for
_
,
te
in
pairs
(
le
)
do
local
tf
=
te
:
GetValue
()
local
related
,
valid
=
tf
(
te
,
lc
,
nil
,
c
,
tp
)
if
related
and
valid
then
return
true
end
end
return
false
end
function
Exlink
.
LExtraFilter2
(
c
,
f
,
lc
,
tp
)
if
not
c
:
IsCanBeLinkMaterial
(
lc
)
or
f
and
not
f
(
c
)
then
return
false
end
local
le
=
{
c
:
IsHasEffect
(
EFFECT_EXTRA_LINK_MATERIAL
,
tp
)}
for
_
,
te
in
pairs
(
le
)
do
local
tf
=
te
:
GetValue
()
local
label
=
te
:
GetLabel
()
local
related
,
valid
=
tf
(
te
,
lc
,
nil
,
c
,
tp
)
if
related
and
valid
and
label
and
label
==
404
then
return
true
end
end
return
false
end
function
Exlink
.
GetLinkCount
(
c
)
if
c
:
IsType
(
TYPE_LINK
)
and
c
:
GetLink
()
>
1
then
return
1
+
0x10000
*
c
:
GetLink
()
else
return
1
end
end
function
Exlink
.
GetLinkMaterials
(
tp
,
f
,
lc
,
e
,
loc1
,
loc2
)
local
mg
=
Duel
.
GetMatchingGroup
(
Exlink
.
LConditionFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
f
,
lc
,
e
)
local
mg2
=
Duel
.
GetMatchingGroup
(
Exlink
.
LExtraFilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
LOCATION_ONFIELD
,
nil
,
f
,
lc
,
tp
)
local
mg3
=
Duel
.
GetMatchingGroup
(
Exlink
.
LExtraFilter2
,
tp
,
loc1
,
loc2
,
nil
,
f
,
lc
,
tp
)
if
mg2
:
GetCount
()
>
0
then
mg
:
Merge
(
mg2
)
end
if
mg3
:
GetCount
()
>
0
then
mg
:
Merge
(
mg3
)
end
return
mg
end
function
Exlink
.
LCheckOtherMaterial
(
c
,
mg
,
lc
,
tp
)
local
le
=
{
c
:
IsHasEffect
(
EFFECT_EXTRA_LINK_MATERIAL
,
tp
)}
local
res1
=
false
local
res2
=
true
for
_
,
te
in
pairs
(
le
)
do
local
f
=
te
:
GetValue
()
local
related
,
valid
=
f
(
te
,
lc
,
mg
,
c
,
tp
)
if
related
then
res2
=
false
end
if
related
and
valid
then
res1
=
true
end
end
return
res1
or
res2
end
function
Exlink
.
LUncompatibilityFilter
(
c
,
sg
,
lc
,
tp
)
local
mg
=
sg
:
Filter
(
aux
.
TRUE
,
c
)
return
not
Exlink
.
LCheckOtherMaterial
(
c
,
mg
,
lc
,
tp
)
end
function
Exlink
.
LCheckGoal
(
sg
,
tp
,
lc
,
gf
,
lmat
)
return
sg
:
CheckWithSumEqual
(
Exlink
.
GetLinkCount
,
lc
:
GetLink
(),
#
sg
,
#
sg
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
,
lc
)
>
0
and
(
not
gf
or
gf
(
sg
,
lc
,
tp
))
and
not
sg
:
IsExists
(
Exlink
.
LUncompatibilityFilter
,
1
,
nil
,
sg
,
lc
,
tp
)
and
(
not
lmat
or
sg
:
IsContains
(
lmat
))
end
function
Exlink
.
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
()
local
related
,
valid
=
f
(
te
,
lc
,
sg
,
tc
,
tp
)
if
related
and
valid
then
te
:
UseCountLimit
(
tp
)
end
end
end
end
function
Exlink
.
LinkCondition
(
f
,
minc
,
maxc
,
loc1
,
loc2
,
gf
)
return
function
(
e
,
c
,
og
,
lmat
,
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
=
nil
if
og
then
mg
=
og
:
Filter
(
Exlink
.
LConditionFilter
,
nil
,
f
,
c
,
e
)
else
mg
=
Exlink
.
GetLinkMaterials
(
tp
,
f
,
c
,
e
,
loc1
,
loc2
)
end
if
lmat
~=
nil
then
if
not
Exlink
.
LConditionFilter
(
lmat
,
f
,
c
,
e
)
then
return
false
end
mg
:
AddCard
(
lmat
)
end
local
fg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)
if
fg
:
IsExists
(
Auxiliary
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
Duel
.
SetSelectedCard
(
fg
)
return
mg
:
CheckSubGroup
(
Exlink
.
LCheckGoal
,
minc
,
maxc
,
tp
,
c
,
gf
,
lmat
)
end
end
function
Exlink
.
LinkTarget
(
f
,
minc
,
maxc
,
loc1
,
loc2
,
gf
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
og
,
lmat
,
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
(
Exlink
.
LConditionFilter
,
nil
,
f
,
c
,
e
)
else
mg
=
Exlink
.
GetLinkMaterials
(
tp
,
f
,
c
,
e
,
loc1
,
loc2
)
end
if
lmat
~=
nil
then
if
not
Exlink
.
LConditionFilter
(
lmat
,
f
,
c
,
e
)
then
return
false
end
mg
:
AddCard
(
lmat
)
end
local
fg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)
Duel
.
SetSelectedCard
(
fg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LMATERIAL
)
local
cancel
=
Duel
.
IsSummonCancelable
()
local
sg
=
mg
:
SelectSubGroup
(
tp
,
Exlink
.
LCheckGoal
,
cancel
,
minc
,
maxc
,
tp
,
c
,
gf
,
lmat
)
if
sg
then
sg
:
KeepAlive
()
e
:
SetLabelObject
(
sg
)
return
true
else
return
false
end
end
end
function
Exlink
.
LinkOperation
(
f
,
minc
,
maxc
,
loc1
,
loc2
,
gf
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
lmat
,
min
,
max
)
local
g
=
e
:
GetLabelObject
()
c
:
SetMaterial
(
g
)
Exlink
.
LExtraMaterialCount
(
g
,
c
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_MATERIAL
+
REASON_LINK
)
g
:
DeleteGroup
()
end
end
function
Exlink
.
exmattg
(
mattg
)
return
function
(
e
,
c
)
return
mattg
(
e
,
c
)
end
end
function
Exlink
.
exmatval
(
matval
)
return
function
(
e
,
lc
,
mg
,
c
,
tp
)
return
matval
(
e
,
lc
,
mg
,
c
,
tp
)
end
end
\ No newline at end of file
expansions/script/special.lua
View file @
4f6c266a
...
...
@@ -6,6 +6,7 @@ Duel.LoadScript("nef/elf.lua")
Duel
.
LoadScript
(
"nef/dss.lua"
)
Duel
.
LoadScript
(
"nef/afi.lua"
)
Duel
.
LoadScript
(
"nef/TheElementTheory.lua"
)
Duel
.
LoadScript
(
"nef/Exlink.lua"
)
-- require "expansions/script/nef/nef"
-- require "expansions/script/nef/msc"
...
...
script/c25501.lua
View file @
4f6c266a
--花与妖的连结✿风见幽香
function
c25501
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--link summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
c25501
.
lkcon
)
e1
:
SetOperation
(
c25501
.
lkop
)
e1
:
SetValue
(
SUMMON_TYPE_LINK
)
c
:
RegisterEffect
(
e1
)
--atk
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
c25501
.
atkval
)
c
:
RegisterEffect
(
e2
)
--cannot attack
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e4
:
SetOperation
(
c25501
.
atklimit
)
c
:
RegisterEffect
(
e4
)
--immune trap
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e6
:
SetCondition
(
c25501
.
econ
)
e6
:
SetValue
(
c25501
.
efilter
)
c
:
RegisterEffect
(
e6
)
end
--
function
c25501
.
lkfilter
(
c
,
lc
,
tp
)
local
flag
=
c
:
IsFaceup
()
and
c
:
IsCanBeLinkMaterial
(
lc
)
if
c
:
IsControler
(
tp
)
then
return
flag
and
c
:
IsType
(
TYPE_MONSTER
)
else
return
flag
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsType
(
TYPE_LINK
)
end
end
function
c25501
.
lvfilter
(
c
)
if
c
:
IsType
(
TYPE_LINK
)
and
c
:
GetLink
()
>
1
then
return
1
+
0x10000
*
c
:
GetLink
()
else
return
1
end
end
--
function
c25501
.
lcheck
(
tp
,
sg
,
lc
,
minc
,
ct
)
return
ct
>=
minc
and
sg
:
CheckWithSumEqual
(
c25501
.
lvfilter
,
lc
:
GetLink
(),
ct
,
ct
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
,
lc
)
>
0
end
function
c25501
.
lkchenk
(
c
,
tp
,
sg
,
mg
,
lc
,
ct
,
minc
,
maxc
)
sg
:
AddCard
(
c
)
ct
=
ct
+
1
local
res
=
c25501
.
lcheck
(
tp
,
sg
,
lc
,
minc
,
ct
)
or
(
ct
<
maxc
and
mg
:
IsExists
(
c25501
.
lkchenk
,
1
,
sg
,
tp
,
sg
,
mg
,
lc
,
ct
,
minc
,
maxc
))
sg
:
RemoveCard
(
c
)
ct
=
ct
-
1
return
res
end
--
function
c25501
.
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
()
local
mg
=
Duel
.
GetMatchingGroup
(
c25501
.
lkfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
c
,
tp
)
local
sg
=
Group
.
CreateGroup
()
for
i
,
pe
in
ipairs
({
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)})
do
local
pc
=
pe
:
GetHandler
()
if
not
mg
:
IsContains
(
pc
)
then
return
false
end
sg
:
AddCard
(
pc
)
end
local
ct
=
sg
:
GetCount
()
local
minc
=
7
local
maxc
=
8
if
ct
>
maxc
then
return
false
end
return
c25501
.
lcheck
(
tp
,
sg
,
c
,
minc
,
ct
)
or
mg
:
IsExists
(
c25501
.
lkchenk
,
1
,
nil
,
tp
,
sg
,
mg
,
c
,
ct
,
minc
,
maxc
)
end
--
function
c25501
.
lkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c25501
.
lkfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
c
,
tp
)
local
sg
=
Group
.
CreateGroup
()
for
i
,
pe
in
ipairs
({
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)})
do
sg
:
AddCard
(
pe
:
GetHandler
())
end
local
ct
=
sg
:
GetCount
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LMATERIAL
)
sg
:
Select
(
tp
,
ct
,
ct
,
nil
)
local
minc
=
7
local
maxc
=
8
for
i
=
ct
,
maxc
-
1
do
local
cg
=
mg
:
Filter
(
c25501
.
lkchenk
,
sg
,
tp
,
sg
,
mg
,
c
,
i
,
minc
,
maxc
)
if
cg
:
GetCount
()
==
0
then
break
end
local
minct
=
1
if
c25501
.
lcheck
(
tp
,
sg
,
c
,
minc
,
i
)
then
if
not
Duel
.
SelectYesNo
(
tp
,
210
)
then
break
end
minct
=
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LMATERIAL
)
local
g
=
cg
:
Select
(
tp
,
minct
,
1
,
nil
)
if
g
:
GetCount
()
==
0
then
break
end
sg
:
Merge
(
g
)
end
c
:
SetMaterial
(
sg
)
Duel
.
SendtoGrave
(
sg
,
REASON_MATERIAL
+
REASON_LINK
)
end
--
function
c25501
.
atkval
(
e
,
c
)
return
c
:
GetLinkedGroupCount
()
*
1000
end
function
c25501
.
atklimit
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
end
function
c25501
.
econ
(
e
)
local
tp
=
e
:
GetHandler
():
GetControler
()
return
Duel
.
GetLP
(
tp
)
>
Duel
.
GetLP
(
1
-
tp
)
end
function
c25501
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_TRAP
)
end
--花与妖的连结✿风见幽香
function
c25501
.
initial_effect
(
c
)
--link summon
Exlink
.
AddLinkProcedure
(
c
,
nil
,
7
,
nil
,
c25501
.
mattg
,
c25501
.
matval
,
0
,
LOCATION_MZONE
)
c
:
EnableReviveLimit
()
--atk
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
c25501
.
atkval
)
c
:
RegisterEffect
(
e2
)
--cannot attack
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e4
:
SetOperation
(
c25501
.
atklimit
)
c
:
RegisterEffect
(
e4
)
--immune trap
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e6
:
SetCondition
(
c25501
.
econ
)
e6
:
SetValue
(
c25501
.
efilter
)
c
:
RegisterEffect
(
e6
)
end
function
c25501
.
mattg
(
e
,
c
)
local
tp
=
e
:
GetHandler
():
GetControler
()
local
check1
=
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsOnField
()
or
c
:
IsFacedown
())
return
check1
and
not
(
c
:
IsType
(
TYPE_LINK
)
and
c
:
IsControler
(
1
-
tp
))
end
function
c25501
.
matval
(
e
,
lc
,
mg
,
c
,
tp
)
if
e
:
GetHandler
()
~=
lc
then
return
false
,
nil
end
return
true
,
not
mg
or
mg
end
function
c25501
.
atkval
(
e
,
c
)
return
c
:
GetLinkedGroupCount
()
*
1000
end
function
c25501
.
atklimit
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
end
function
c25501
.
econ
(
e
)
local
tp
=
e
:
GetHandler
():
GetControler
()
return
Duel
.
GetLP
(
tp
)
>
Duel
.
GetLP
(
1
-
tp
)
end
function
c25501
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_TRAP
)
end
script/c86379558.lua
View file @
4f6c266a
--蓬莱-永夜的隐者✿八意永琳
function
c86379558
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
local
e0
=
Effect
.
CreateEffect
(
c
)
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
(
c86379558
.
lkcon1
)
e0
:
SetOperation
(
c86379558
.
lkop1
)
e0
:
SetValue
(
SUMMON_TYPE_LINK
)
c
:
RegisterEffect
(
e0
)
--moon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_TRAP_ACT_IN_SET_TURN
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x257
))
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e2
:
SetTarget
(
c86379558
.
indes
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
--lp
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
86379558
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetTarget
(
c86379558
.
lptg
)
e3
:
SetOperation
(
c86379558
.
lpop
)
c
:
RegisterEffect
(
e3
)
end
--
function
c86379558
.
indes
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x257
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
--
function
c86379558
.
lptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
end
function
c86379558
.
lpop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetOperation
(
c86379558
.
damop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c86379558
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
86379558
)
Duel
.
SetLP
(
1
-
tp
,
Duel
.
GetLP
(
1
-
tp
)
-
1800
)
end
--
function
c86379558
.
lkfilter1
(
c
,
lc
,
tp
)
if
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
then
return
c
:
IsCanBeLinkMaterial
(
lc
)
and
c
:
IsControler
(
tp
)
else
return
c
:
IsFacedown
()
end
end
function
c86379558
.
lvfilter1
(
c
)
if
c
:
IsType
(
TYPE_LINK
)
and
c
:
GetLink
()
>
1
then
return
1
+
0x10000
*
c
:
GetLink
()
else
return
1
end
end
function
c86379558
.
lcheck1
(
tp
,
sg
,
lc
,
minc
,
ct
)
return
ct
>=
minc
and
sg
:
CheckWithSumEqual
(
c86379558
.
lvfilter1
,
lc
:
GetLink
(),
ct
,
ct
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
,
lc
)
>
0
end
function
c86379558
.
lkchenk1
(
c
,
tp
,
sg
,
mg
,
lc
,
ct
,
minc
,
maxc
)
sg
:
AddCard
(
c
)
ct
=
ct
+
1
local
res
=
c86379558
.
lcheck1
(
tp
,
sg
,
lc
,
minc
,
ct
)
or
(
ct
<
maxc
and
mg
:
IsExists
(
c86379558
.
lkchenk1
,
1
,
sg
,
tp
,
sg
,
mg
,
lc
,
ct
,
minc
,
maxc
))
sg
:
RemoveCard
(
c
)
ct
=
ct
-
1
return
res
end
function
c86379558
.
lkcon1
(
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
()
local
mg
=
Duel
.
GetMatchingGroup
(
c86379558
.
lkfilter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
c
,
tp
)
local
sg
=
Group
.
CreateGroup
()
for
i
,
pe
in
ipairs
({
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)})
do
local
pc
=
pe
:
GetHandler
()
if
not
mg
:
IsContains
(
pc
)
then
return
false
end
sg
:
AddCard
(
pc
)
end
local
ct
=
sg
:
GetCount
()
local
minc
=
7
local
maxc
=
8
if
ct
>
maxc
then
return
false
end
return
(
c86379558
.
lcheck1
(
tp
,
sg
,
c
,
minc
,
ct
)
or
mg
:
IsExists
(
c86379558
.
lkchenk1
,
1
,
nil
,
tp
,
sg
,
mg
,
c
,
ct
,
minc
,
maxc
))
end
function
c86379558
.
lkop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c86379558
.
lkfilter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
c
,
tp
)
local
sg
=
Group
.
CreateGroup
()
for
i
,
pe
in
ipairs
({
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_LMATERIAL
)})
do
sg
:
AddCard
(
pe
:
GetHandler
())
end
local
ct
=
sg
:
GetCount
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LMATERIAL
)
sg
:
Select
(
tp
,
ct
,
ct
,
nil
)
local
minc
=
7
local
maxc
=
8
for
i
=
ct
,
maxc
-
1
do
local
cg
=
mg
:
Filter
(
c86379558
.
lkchenk1
,
sg
,
tp
,
sg
,
mg
,
c
,
i
,
minc
,
maxc
)
if
cg
:
GetCount
()
==
0
then
break
end
local
minct
=
1
if
c86379558
.
lcheck1
(
tp
,
sg
,
c
,
minc
,
i
)
then
if
not
Duel
.
SelectYesNo
(
tp
,
210
)
then
break
end
minct
=
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_LMATERIAL
)
local
g
=
cg
:
Select
(
tp
,
minct
,
1
,
nil
)
if
g
:
GetCount
()
==
0
then
break
end
sg
:
Merge
(
g
)
end
c
:
SetMaterial
(
sg
)
Duel
.
SendtoGrave
(
sg
,
REASON_MATERIAL
+
REASON_LINK
)
end
--蓬莱-永夜的隐者✿八意永琳
function
c86379558
.
initial_effect
(
c
)
--link summon
Exlink
.
AddLinkProcedure
(
c
,
nil
,
7
,
nil
,
c86379558
.
mattg
,
c86379558
.
matval
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
--moon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_TRAP_ACT_IN_SET_TURN
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x257
))
c
:
RegisterEffect
(
e1
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e2
:
SetTarget
(
c86379558
.
indes
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
--lp
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
86379558
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetTarget
(
c86379558
.
lptg
)
e3
:
SetOperation
(
c86379558
.
lpop
)
c
:
RegisterEffect
(
e3
)
end
function
c86379558
.
mattg
(
e
,
c
)
return
c
:
IsOnField
()
and
c
:
IsFacedown
()
end
function
c86379558
.
matval
(
e
,
lc
,
mg
,
c
,
tp
)
if
e
:
GetHandler
()
~=
lc
then
return
false
,
nil
end
return
true
,
not
mg
or
mg
end
--
function
c86379558
.
indes
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x257
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
--
function
c86379558
.
lptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
end
function
c86379558
.
lpop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetOperation
(
c86379558
.
damop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c86379558
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
86379558
)
Duel
.
SetLP
(
1
-
tp
,
Duel
.
GetLP
(
1
-
tp
)
-
1800
)
end
script/c86379662.lua
View file @
4f6c266a
This diff is collapsed.
Click to expand it.
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