Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Nanahira-Cards
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
Nanahira-Cards
Commits
a4020390
Commit
a4020390
authored
Apr 14, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d0cf4b04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
91 additions
and
0 deletions
+91
-0
expansions/script/c37564058.lua
expansions/script/c37564058.lua
+91
-0
No files found.
expansions/script/c37564058.lua
0 → 100644
View file @
a4020390
--元灵的轮回·Senya
local
m
=
37564058
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
cm
.
Senya_name_with_elem
=
true
function
cm
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLevel
,
3
),
2
,
2
)
--xm
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_OVERLAY_REMOVE_REPLACE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
cm
.
rcon
)
e2
:
SetOperation
(
aux
.
TRUE
)
c
:
RegisterEffect
(
e2
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_STANDBY_PHASE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
cm
.
tg
)
e1
:
SetOperation
(
cm
.
op
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
rcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
r
&
REASON_COST
)
~=
0
and
re
:
IsHasType
(
0x7e0
)
and
re
:
IsActiveType
(
TYPE_XYZ
)
and
Senya
.
check_set_elem
(
re
:
GetHandler
())
and
e
:
GetHandler
():
GetLinkedGroup
():
IsContains
(
re
:
GetHandler
())
end
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
e
:
GetHandler
():
GetLinkedGroup
():
IsContains
(
c
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
,
tc
)
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
GetRank
()
==
rk
+
1
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Senya
.
check_set_elem
(
c
)
and
tc
:
IsCanBeXyzMaterial
(
c
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
tc
,
c
)
>
0
and
Senya
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
and
c
:
IsAttribute
(
tc
:
GetAttribute
())
and
cm
.
mcheck
(
c
,
tc
)
end
function
cm
.
mcheck
(
c
,
tc
)
if
tc
:
IsStatus
(
STATUS_NO_LEVEL
)
then
return
false
elseif
tc
:
IsType
(
TYPE_XYZ
)
then
return
c
:
IsRank
(
tc
:
GetRank
()
+
1
)
elseif
tc
:
IsType
(
TYPE_LINK
)
then
return
c
:
IsRank
(
tc
:
GetLink
()
*
2
)
else
return
c
:
IsRank
(
tc
:
GetLevel
())
end
end
function
cm
.
mcheck_chkc
(
c
,
tc
)
if
tc
:
IsStatus
(
STATUS_NO_LEVEL
)
then
return
false
elseif
tc
:
IsType
(
TYPE_XYZ
)
then
return
c
:
IsRank
(
tc
:
GetRank
())
elseif
tc
:
IsType
(
TYPE_LINK
)
then
return
c
:
IsLink
(
tc
:
GetLink
())
else
return
c
:
IsLevel
(
tc
:
GetLevel
())
end
end
function
cm
.
chkfilter
(
c
,
tc
)
return
c
:
IsFaceup
()
and
c
:
GetType
()
&
tc
:
GetType
()
==
tc
:
GetType
()
and
cm
.
mcheck_chkc
(
c
,
tc
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
)
>
0
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
chkfilter
(
chkc
,
e
:
GetLabelObject
())
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
0
))
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
e
:
SetLabelObject
(
g
:
GetFirst
())
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
)
local
sc
=
g
:
GetFirst
()
if
sc
then
local
mg
=
tc
:
GetOverlayGroup
()
if
#
mg
~=
0
then
Duel
.
Overlay
(
sc
,
mg
)
end
sc
:
SetMaterial
(
Group
.
FromCards
(
c
))
Duel
.
Overlay
(
sc
,
tc
)
Duel
.
SpecialSummon
(
g
,
SUMMON_TYPE_XYZ
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
g
:
GetFirst
():
CompleteProcedure
()
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