Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
P
pre-release-database-cdb
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
八宫一月
pre-release-database-cdb
Commits
5961a7b6
Commit
5961a7b6
authored
Sep 16, 2024
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://code.moenext.com/mycard/pre-release-database-cdb
parents
ddf0229d
c4ff1baf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
120 additions
and
0 deletions
+120
-0
script/c100228001.lua
script/c100228001.lua
+120
-0
No files found.
script/c100228001.lua
0 → 100644
View file @
5961a7b6
--封印の魔道士 スプーン
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--search or half atk
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCost
(
s
.
cost
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
operation
)
c
:
RegisterEffect
(
e1
)
--equip
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_EQUIP
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
s
.
eqtg
)
e2
:
SetOperation
(
s
.
eqop
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
s
.
filter
(
c
)
return
not
c
:
IsCode
(
id
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x150
)
and
c
:
IsAbleToHand
()
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
if
chk
==
0
then
return
b1
or
b2
end
local
off
=
1
local
ops
=
{}
local
opval
=
{}
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
id
,
2
)
opval
[
off
-
1
]
=
1
off
=
off
+
1
end
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
id
,
3
)
opval
[
off
-
1
]
=
2
off
=
off
+
1
end
if
off
==
1
then
return
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
if
opval
[
op
]
==
1
then
e
:
SetLabel
(
1
)
e
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
elseif
opval
[
op
]
==
2
then
e
:
SetLabel
(
2
)
e
:
SetCategory
(
CATEGORY_ATKCHANGE
)
end
end
function
s
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
elseif
e
:
GetLabel
()
==
2
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
math.ceil
(
tc
:
GetAttack
()
/
2
))
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
end
end
end
function
s
.
eqfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x150
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
CheckUniqueOnField
(
tp
,
LOCATION_SZONE
)
and
not
c
:
IsForbidden
()
end
function
s
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
s
.
eqfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
1
,
e
:
GetHandler
(),
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_EXTRA
)
end
function
s
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
s
.
eqfilter
),
tp
,
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
tp
)
local
ec
=
g
:
GetFirst
()
if
ec
then
if
not
Duel
.
Equip
(
tp
,
ec
,
tc
)
then
return
end
--equip limit
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetValue
(
s
.
eqlimit
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
ec
:
RegisterEffect
(
e1
)
end
end
end
function
s
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
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