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
2a038f30
You need to sign in or sign up before continuing.
Commit
2a038f30
authored
Jan 18, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update_dazz
parent
9a82de62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
70 deletions
+37
-70
expansions/script/c37564538.lua
expansions/script/c37564538.lua
+37
-70
No files found.
expansions/script/c37564538.lua
View file @
2a038f30
...
...
@@ -19,22 +19,6 @@ function cm.initial_effect(c)
e2
:
SetCondition
(
cm
.
spcon
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
m
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetTargetRange
(
1
,
0
)
c
:
RegisterEffect
(
e3
)
if
not
cm
.
chk
then
cm
.
chk
=
true
cm
.
effect_list
=
{}
local
ex
=
Effect
.
GlobalEffect
()
ex
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ex
:
SetCode
(
EVENT_ADJUST
)
ex
:
SetOperation
(
cm
.
reg
)
Duel
.
RegisterEffect
(
ex
,
0
)
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
...
...
@@ -43,6 +27,38 @@ function cm.initial_effect(c)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
local
ex
=
Effect
.
CreateEffect
(
c
)
ex
:
SetDescription
(
m
*
16
)
ex
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
ex
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
,
0
)
ex
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
ex
:
SetCode
(
EVENT_CHAINING
)
ex
:
SetCost
(
cm
.
desccost
)
ex
:
SetCondition
(
cm
.
condition2
)
ex
:
SetTarget
(
cm
.
target2
)
ex
:
SetOperation
(
cm
.
activate2
)
local
ex_q
=
ex
:
Clone
()
ex_q
:
SetType
(
EFFECT_TYPE_ACTIVATE
+
EFFECT_TYPE_QUICK_O
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e3
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e3
:
SetTarget
(
function
(
e
,
c
)
return
c
:
IsType
(
TYPE_QUICKPLAY
+
TYPE_TRAP
)
and
c
:
GetSequence
()
<
5
end
)
e3
:
SetLabelObject
(
ex
)
c
:
RegisterEffect
(
e3
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e3
:
SetTargetRange
(
LOCATION_SZONE
,
0
)
e3
:
SetTarget
(
function
(
e
,
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
not
c
:
IsType
(
TYPE_QUICKPLAY
)
and
c
:
GetSequence
()
<
5
end
)
e3
:
SetLabelObject
(
ex_q
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
spfilter
(
c
)
return
c
.
Senya_desc_with_nanahira
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsAbleToGraveAsCost
()
...
...
@@ -50,72 +66,23 @@ end
function
cm
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
3
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
return
Senya
.
CheckGroup
(
g
,
Senya
.
CheckFieldFilter
,
nil
,
3
,
3
,
tp
,
c
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
3
,
3
,
nil
)
local
g
=
Senya
.
SelectGroup
(
tp
,
HINTMSG_TOGRAVE
,
g
,
Senya
.
CheckFieldFilter
,
nil
,
3
,
3
,
tp
,
c
)
c
:
SetMaterial
(
g
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
cm
.
f
(
c
)
return
c
:
GetSequence
()
<
5
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
cm
.
add
(
tc
)
local
p2
=
0
if
(
tc
:
GetOriginalType
()
&
TYPE_QUICKPLAY
+
TYPE_TRAP
)
==
0
then
p2
=
EFFECT_TYPE_QUICK_O
end
local
e2
=
Effect
.
CreateEffect
(
tc
)
e2
:
SetDescription
(
m
*
16
)
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
,
0
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
+
p2
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCost
(
cm
.
desccost
)
e2
:
SetCondition
(
cm
.
condition2
)
e2
:
SetTarget
(
cm
.
target2
)
e2
:
SetOperation
(
cm
.
activate2
)
tc
:
RegisterEffect
(
e2
)
cm
.
effect_list
[
tc
]
=
e2
end
function
cm
.
desccost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
cm
.
rmv
(
tc
)
local
e
=
cm
.
effect_list
[
tc
]
e
:
Reset
()
cm
.
effect_list
[
tc
]
=
nil
end
function
cm
.
reg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rg
=
Group
.
CreateGroup
()
for
tc
,
te
in
pairs
(
cm
.
effect_list
)
do
if
tc
and
te
then
rg
:
AddCard
(
tc
)
end
end
for
i
=
0
,
1
do
local
rg2
=
rg
:
Filter
(
Card
.
IsControler
,
nil
,
i
)
if
Duel
.
IsPlayerAffectedByEffect
(
i
,
m
)
then
rg2
:
ForEach
(
function
(
tc
)
if
tc
:
IsLocation
(
LOCATION_SZONE
)
and
cm
.
f
(
tc
)
then
return
end
rg
:
RemoveCard
(
tc
)
cm
.
rmv
(
tc
)
end
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
f
,
i
,
LOCATION_SZONE
,
0
,
nil
)
g
:
Sub
(
rg
)
g
:
ForEach
(
cm
.
add
)
else
rg2
:
ForEach
(
cm
.
rmv
)
end
end
end
function
cm
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsChainNegatable
(
ev
)
then
return
false
end
if
e
:
GetHandler
():
GetTurnID
()
==
Duel
.
GetTurnCount
()
and
(
e
:
GetHandler
():
GetOriginalType
()
&
TYPE_QUICKPLAY
+
TYPE_TRAP
)
==
0
then
return
false
end
local
t1
=
(
e
:
GetHandler
():
GetOriginalType
()
&
0x7
)
local
t2
=
(
re
:
GetHandler
():
GetOriginalType
()
&
0x7
)
return
(
t1
&
t2
)
~=
0
if
e
:
GetHandler
():
IsStatus
(
STATUS_SET_TURN
)
and
(
e
:
GetHandler
():
GetOriginalType
()
&
TYPE_QUICKPLAY
+
TYPE_TRAP
)
==
0
then
return
false
end
return
(
e
:
GetHandler
():
GetOriginalType
()
&
re
:
GetHandler
():
GetOriginalType
()
&
0x7
)
~=
0
end
function
cm
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
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