Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
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
ygopro-scripts
Commits
6b920a4f
Commit
6b920a4f
authored
Sep 07, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add patches
parent
f75ff8ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
0 deletions
+82
-0
patches/entry.lua
patches/entry.lua
+7
-0
patches/multiple-preloaduds.lua
patches/multiple-preloaduds.lua
+43
-0
patches/spsummon-once-hint.lua
patches/spsummon-once-hint.lua
+32
-0
No files found.
patches/entry.lua
0 → 100644
View file @
6b920a4f
function
load_patch
(
name
)
local
path
=
"patches/"
..
name
..
".lua"
Duel
.
LoadScript
(
path
)
end
load_patch
(
"multiple-preloaduds"
)
load_patch
(
"spsummon-once-hint"
)
patches/multiple-preloaduds.lua
0 → 100644
View file @
6b920a4f
AuxiliaryMetatable
=
{}
setmetatable
(
Auxiliary
,
AuxiliaryMetatable
)
local
PRELOAD_KEY
=
"PreloadUds"
local
preload_uds
=
{}
local
function
already_added
(
f
)
for
i
=
1
,
#
preload_uds
do
if
preload_uds
[
i
]
==
f
then
return
true
end
end
return
false
end
local
function
run_preload_uds
(
...
)
local
snapshot
=
{}
for
i
=
1
,
#
preload_uds
do
snapshot
[
i
]
=
preload_uds
[
i
]
end
for
_
,
ud
in
ipairs
(
snapshot
)
do
ud
(
...
)
end
end
function
AuxiliaryMetatable
.
__index
(
t
,
k
)
if
k
==
PRELOAD_KEY
then
return
run_preload_uds
end
return
nil
end
function
AuxiliaryMetatable
.
__newindex
(
t
,
k
,
v
)
if
k
==
PRELOAD_KEY
then
if
v
==
nil
then
preload_uds
=
{}
return
end
assert
(
type
(
v
)
==
"function"
,
"PreloadUds must be a function"
)
if
not
already_added
(
v
)
then
preload_uds
[
#
preload_uds
+
1
]
=
v
end
return
end
rawset
(
t
,
k
,
v
)
end
patches/spsummon-once-hint.lua
0 → 100644
View file @
6b920a4f
-- added client hint to monsters that special summons once per turn
local
function
init_spsummon_once
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
11111111
)
-- meaningless code
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_SET_AVAILABLE
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetDescription
(
aux
.
Stringid
(
47297616
,
0
))
-- 不能特殊召唤
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_SET_AVAILABLE
+
EFFECT_FLAG_IGNORE_RANGE
)
local
range
=
0xff
-
LOCATION_MZONE
e2
:
SetTargetRange
(
range
,
range
)
e2
:
SetTarget
(
function
(
e
,
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
CheckSPSummonOnce
(
c
:
GetControler
())
end
)
e2
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsGlobalFlag
(
GLOBALFLAG_SPSUMMON_ONCE
)
end
)
e2
:
SetLabelObject
(
e1
)
Duel
.
RegisterEffect
(
e2
,
0
)
end
local
spsummononce_initialized
=
false
local
original_SetSPSummonOnce
=
Card
.
SetSPSummonOnce
function
Card
.
SetSPSummonOnce
(
c
,
...
)
if
not
spsummononce_initialized
then
spsummononce_initialized
=
true
init_spsummon_once
(
c
)
end
return
original_SetSPSummonOnce
(
c
,
...
)
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