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
ec74cffc
Commit
ec74cffc
authored
Apr 21, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new
parent
86dc7967
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
159 additions
and
0 deletions
+159
-0
expansions/7cgl.cdb
expansions/7cgl.cdb
+0
-0
expansions/script/c37564567.lua
expansions/script/c37564567.lua
+159
-0
No files found.
expansions/7cgl.cdb
View file @
ec74cffc
No preview for this file type
expansions/script/c37564567.lua
0 → 100644
View file @
ec74cffc
--Sound Voltex
local
m
=
37564567
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
cm
.
Senya_desc_with_nanahira
=
true
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
cm
.
target1
)
e1
:
SetOperation
(
cm
.
activate1
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
sfilter
(
c
)
return
c
.
Senya_desc_with_nanahira
and
(
c
:
IsSpecialSummonable
(
SUMMON_TYPE_LINK
)
or
c
:
IsSpecialSummonable
(
SUMMON_TYPE_SYNCHRO
)
or
c
:
IsSpecialSummonable
(
SUMMON_TYPE_XYZ
))
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
sfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
sfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummonRule
(
tp
,
tc
)
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
function
cm
.
filter
(
c
,
e
)
local
code
=
c
:
GetOriginalCode
()
return
c
:
IsFaceup
()
and
c
:
IsCanBeEffectTarget
(
e
)
and
(
code
==
37564765
or
code
==
37564565
)
end
function
cm
.
xyzfilter
(
c
,
mg
)
return
c
:
IsXyzSummonable
(
mg
,
2
,
2
)
end
function
cm
.
mfilter1
(
c
,
mg
,
exg
,
tp
)
return
mg
:
IsExists
(
cm
.
mfilter2
,
1
,
c
,
c
,
exg
,
tp
)
end
function
cm
.
mfilter2
(
c
,
mc
,
exg
,
tp
)
local
code1
=
c
:
GetOriginalCode
()
local
code2
=
mc
:
GetOriginalCode
()
local
g
=
Group
.
FromCards
(
c
,
mc
)
return
code1
~=
code2
and
exg
:
IsExists
(
Card
.
IsXyzSummonable
,
1
,
nil
,
g
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
)
>
0
end
function
cm
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
e
)
local
exg
=
Duel
.
GetMatchingGroup
(
cm
.
xyzfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
mg
)
if
chk
==
0
then
return
mg
:
IsExists
(
cm
.
mfilter1
,
1
,
nil
,
mg
,
exg
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
sg1
=
mg
:
FilterSelect
(
tp
,
cm
.
mfilter1
,
1
,
1
,
nil
,
mg
,
exg
,
tp
)
local
tc1
=
sg1
:
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
sg2
=
mg
:
FilterSelect
(
tp
,
cm
.
mfilter2
,
1
,
1
,
tc1
,
tc1
,
exg
,
tp
)
sg1
:
Merge
(
sg2
)
Duel
.
SetTargetCard
(
sg1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
cm
.
tfilter
(
c
,
e
)
return
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
end
function
cm
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
cm
.
tfilter
,
nil
,
e
)
if
g
:
GetCount
()
<
2
then
return
end
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
)
<=
0
then
return
end
local
xyzg
=
Duel
.
GetMatchingGroup
(
cm
.
xyzfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
g
)
if
xyzg
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
xyz
=
xyzg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
xyzmt
=
getmetatable
(
xyz
)
local
oldf
=
xyzmt
.
SetMaterial
xyzmt
.
SetMaterial
=
cm
.
ReplaceSetMaterial
Duel
.
XyzSummon
(
tp
,
xyz
,
g
)
xyzmt
.
SetMaterial
=
oldf
end
end
function
cm
.
ReplaceSetMaterial
(
c
,
...
)
local
res
=
{
Card
.
SetMaterial
(
c
,
...
)}
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_ADJUST
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetLabel
(
Senya
.
order_table_new
({}))
e2
:
SetOperation
(
cm
.
op
)
e2
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
c
:
RegisterEffect
(
e2
,
true
)
local
ex
=
Effect
.
CreateEffect
(
c
)
ex
:
SetType
(
EFFECT_TYPE_SINGLE
)
ex
:
SetCode
(
m
-
1000
)
ex
:
SetRange
(
LOCATION_MZONE
)
ex
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
ex
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
c
:
RegisterEffect
(
ex
,
true
)
return
table.unpack
(
res
)
end
function
cm
.
copyfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
not
c
:
IsType
(
TYPE_TRAPMONSTER
)
end
function
cm
.
gfilter
(
c
,
g
)
if
not
g
then
return
true
end
return
not
g
:
IsContains
(
c
)
end
function
cm
.
gfilter1
(
c
,
g
)
if
not
g
then
return
true
end
return
not
g
:
IsExists
(
cm
.
gfilter2
,
1
,
nil
,
c
:
GetOriginalCode
())
end
function
cm
.
gfilter2
(
c
,
code
)
return
c
:
GetOriginalCode
()
==
code
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
copyt
=
Senya
.
order_table
[
e
:
GetLabel
()]
local
exg
=
Group
.
CreateGroup
()
for
tc
,
cid
in
pairs
(
copyt
)
do
if
tc
and
cid
then
exg
:
AddCard
(
tc
)
end
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
copyfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
dg
=
exg
:
Filter
(
cm
.
gfilter
,
nil
,
g
)
for
tc
in
aux
.
Next
(
dg
)
do
c
:
ResetEffect
(
copyt
[
tc
],
RESET_COPY
)
exg
:
RemoveCard
(
tc
)
copyt
[
tc
]
=
nil
end
local
cg
=
g
:
Filter
(
cm
.
gfilter1
,
nil
,
exg
)
local
f
=
Card
.
RegisterEffect
Card
.
RegisterEffect
=
function
(
tc
,
e
,
forced
)
e
:
SetCondition
(
cm
.
rcon
(
e
:
GetCondition
(),
tc
,
copyt
))
f
(
tc
,
e
,
forced
)
end
for
tc
in
aux
.
Next
(
cg
)
do
copyt
[
tc
]
=
c
:
CopyEffect
(
tc
:
GetOriginalCode
(),
RESET_EVENT
+
0x1fe0000
,
1
)
end
Card
.
RegisterEffect
=
f
end
function
cm
.
rcon
(
con
,
tc
,
copyt
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsHasEffect
(
m
-
1000
)
then
c
:
ResetEffect
(
c
,
copyt
[
tc
],
RESET_COPY
)
copyt
[
tc
]
=
nil
return
false
end
return
not
con
or
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
\ No newline at end of file
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