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
MyCard
pre-release-database-cdb
Commits
e2376929
Commit
e2376929
authored
Apr 22, 2025
by
wind2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix トラップホリック
parent
9261dc63
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
+15
-17
script/c101301078.lua
script/c101301078.lua
+15
-17
No files found.
script/c101301078.lua
View file @
e2376929
--
陷阱痴迷症
--
トラップホリック
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
...
...
@@ -13,35 +13,33 @@ function s.initial_effect(c)
e1
:
SetOperation
(
s
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
s
.
desfilter
(
c
,
ft
)
if
ft
<
1
and
(
not
c
:
IsLocation
(
LOCATION_SZONE
)
or
c
:
IsLocation
(
LOCATION_FZONE
))
then
return
false
end
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
function
s
.
desfilter
(
c
,
tp
,
ft
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
Duel
.
GetSZoneCount
(
tp
,
c
)
>
ft
end
function
s
.
setfilter
(
c
)
return
c
:
GetType
()
==
TYPE_TRAP
and
not
c
:
IsCode
(
id
)
and
c
:
IsSSetable
(
true
)
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
Is
Location
(
LOCATION_ONFIELD
)
and
chkc
:
IsControler
(
tp
)
and
chkc
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
if
chkc
then
return
chkc
:
Is
OnField
(
)
and
chkc
:
IsControler
(
tp
)
and
chkc
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
chkc
~=
e
:
GetHandler
(
)
end
local
ft
=
0
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
then
ft
=
ft
-
1
end
return
Duel
.
IsExistingTarget
(
s
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
ft
)
and
Duel
.
IsExistingMatchingCard
(
s
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
then
ft
=
1
end
return
Duel
.
IsExistingTarget
(
s
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
,
ft
)
and
Duel
.
IsExistingMatchingCard
(
s
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
s
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
ft
)
local
g
=
Duel
.
SelectTarget
(
tp
,
s
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
tp
,
ft
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateTo
Effect
(
e
)
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
>
0
then
if
tc
and
tc
:
IsRelateTo
Chain
(
)
and
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
t
c
=
g
:
GetFirst
()
if
tc
and
Duel
.
SSet
(
tp
,
t
c
)
~=
0
then
local
s
c
=
g
:
GetFirst
()
if
sc
and
Duel
.
SSet
(
tp
,
s
c
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -49,10 +47,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetCondition
(
s
.
actcon
)
t
c
:
RegisterEffect
(
e1
)
s
c
:
RegisterEffect
(
e1
)
end
end
end
function
s
.
actcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
3
,
nil
,
TYPE_TRAP
)
end
\ No newline at end of file
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