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
Mr.Tan
pre-release-database-cdb
Commits
696df36e
Commit
696df36e
authored
Jun 07, 2025
by
Mr.Tan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 黒魔術の護符
parent
0df470de
Pipeline
#37277
failed with stages
in 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
100 additions
and
100 deletions
+100
-100
script/c100200273.lua
script/c100200273.lua
+100
-100
No files found.
script/c100200273.lua
View file @
696df36e
--黒魔術の護符
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
46986414
)
--act in set turn
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetValue
(
id
)
e0
:
SetCode
(
EFFECT_TRAP_ACT_IN_SET_TURN
)
e0
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCondition
(
s
.
condition
)
e0
:
SetCost
(
s
.
cost
)
c
:
RegisterEffect
(
e0
)
--disable
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCondition
(
s
.
discon
)
e1
:
SetTarget
(
s
.
distg
)
e1
:
SetOperation
(
s
.
disop
)
c
:
RegisterEffect
(
e1
)
--set
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
s
.
setcon
)
e2
:
SetCost
(
s
.
setcost
)
e2
:
SetTarget
(
s
.
settg
)
e2
:
SetOperation
(
s
.
setop
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
condition
(
e
)
return
e
:
GetHandler
():
IsStatus
(
STATUS_SET_TURN
)
and
e
:
GetHandler
():
IsLocation
(
LOCATION_ONFIELD
)
end
function
s
.
costfilter
(
c
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
and
not
c
:
IsPublic
()
end
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
end
function
s
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsChainDisablable
(
ev
)
then
return
false
end
local
te
=
Duel
.
GetChainInfo
(
ev
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
return
Duel
.
GetCurrentChain
()
>=
2
and
te
and
aux
.
IsCodeListed
(
te
:
GetHandler
(),
46986414
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
function
s
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
eg
,
1
,
0
,
0
)
end
function
s
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
Duel
.
NegateEffect
(
ev
)
and
rc
:
IsRelateToEffect
(
re
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e1
:
SetCondition
(
s
.
discon1
)
e1
:
SetOperation
(
s
.
disop1
)
e1
:
SetLabelObject
(
rc
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
s
.
discon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
return
re
:
GetHandler
():
IsOriginalCodeRule
(
tc
:
GetOriginalCodeRule
())
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
function
s
.
disop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateEffect
(
ev
)
end
function
s
.
setfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
46986414
)
and
c
:
IsSummonPlayer
(
tp
)
end
function
s
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
setfilter
,
1
,
nil
,
tp
)
end
function
s
.
setcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
2500
)
end
Duel
.
PayLPCost
(
tp
,
2500
)
end
function
s
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsSSetable
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateTo
Effect
(
e
)
then
Duel
.
SSet
(
tp
,
c
)
end
--黒魔術の護符
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
46986414
)
--act in set turn
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetValue
(
id
)
e0
:
SetCode
(
EFFECT_TRAP_ACT_IN_SET_TURN
)
e0
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCondition
(
s
.
condition
)
e0
:
SetCost
(
s
.
cost
)
c
:
RegisterEffect
(
e0
)
--disable
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCondition
(
s
.
discon
)
e1
:
SetTarget
(
s
.
distg
)
e1
:
SetOperation
(
s
.
disop
)
c
:
RegisterEffect
(
e1
)
--set
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
s
.
setcon
)
e2
:
SetCost
(
s
.
setcost
)
e2
:
SetTarget
(
s
.
settg
)
e2
:
SetOperation
(
s
.
setop
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
condition
(
e
)
return
e
:
GetHandler
():
IsStatus
(
STATUS_SET_TURN
)
and
e
:
GetHandler
():
IsLocation
(
LOCATION_ONFIELD
)
end
function
s
.
costfilter
(
c
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
and
not
c
:
IsPublic
()
end
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
end
function
s
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsChainDisablable
(
ev
)
then
return
false
end
local
te
=
Duel
.
GetChainInfo
(
ev
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
return
Duel
.
GetCurrentChain
()
>=
2
and
te
and
aux
.
IsCodeListed
(
te
:
GetHandler
(),
46986414
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
function
s
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
eg
,
1
,
0
,
0
)
end
function
s
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
Duel
.
NegateEffect
(
ev
)
and
rc
:
IsRelateToEffect
(
re
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e1
:
SetCondition
(
s
.
discon1
)
e1
:
SetOperation
(
s
.
disop1
)
e1
:
SetLabelObject
(
rc
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
s
.
discon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
return
re
:
GetHandler
():
IsOriginalCodeRule
(
tc
:
GetOriginalCodeRule
())
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
function
s
.
disop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateEffect
(
ev
)
end
function
s
.
setfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
46986414
)
and
c
:
IsSummonPlayer
(
tp
)
end
function
s
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
setfilter
,
1
,
nil
,
tp
)
end
function
s
.
setcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
2500
)
end
Duel
.
PayLPCost
(
tp
,
2500
)
end
function
s
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsSSetable
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateTo
Chain
()
and
aux
.
NecroValleyFilter
()(
c
)
then
Duel
.
SSet
(
tp
,
c
)
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