Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts-888
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
2
Merge Requests
2
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
ygopro-scripts-888
Commits
cf528b53
Commit
cf528b53
authored
May 15, 2025
by
wind2009
Committed by
GitHub
May 15, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix RegisterMergedDelayedEvent_ToSingleCard (#2915)
parent
90cb264c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
9 deletions
+31
-9
utility.lua
utility.lua
+31
-9
No files found.
utility.lua
View file @
cf528b53
...
...
@@ -1631,6 +1631,7 @@ function Auxiliary.MergedDelayEventCheck2(e,tp,eg,ep,ev,re,r,rp)
end
end
--Once the card has been moved to the public area, it should be listened to again
Auxiliary
.
merge_single_effects
=
{}
function
Auxiliary
.
RegisterMergedDelayedEvent_ToSingleCard
(
c
,
code
,
events
)
local
g
=
Group
.
CreateGroup
()
g
:
KeepAlive
()
...
...
@@ -1660,9 +1661,20 @@ function Auxiliary.RegisterMergedDelayedEvent_ToSingleCard(c,code,events)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_SET_AVAILABLE
)
e3
:
SetCode
(
EVENT_MOVE
)
e3
:
SetLabel
(
event_code_single
)
e3
:
SetLabelObject
(
g
)
e3
:
SetOperation
(
Auxiliary
.
ThisCardMovedToPublicResetCheck_ToSingleCard
)
c
:
RegisterEffect
(
e3
)
table.insert
(
Auxiliary
.
merge_single_effects
,
e3
)
--use global effect to raise event for face-down cards
if
not
Auxiliary
.
merge_single_global_check
then
Auxiliary
.
merge_single_global_check
=
true
local
ge1
=
Effect
.
GlobalEffect
()
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_CHAIN_END
)
ge1
:
SetOperation
(
Auxiliary
.
RegisterMergedDelayedEvent_ToSingleCard_RaiseEvent
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
return
event_code_single
end
function
Auxiliary
.
RegisterMergedDelayedEvent_ToSingleCard_AddOperation
(
c
,
g
,
event
,
event_code_single
)
...
...
@@ -1671,7 +1683,7 @@ function Auxiliary.RegisterMergedDelayedEvent_ToSingleCard_AddOperation(c,g,even
e1
:
SetCode
(
event
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetRange
(
0xff
)
e1
:
SetLabel
(
event_code_single
)
e1
:
SetLabel
(
event_code_single
,
event
)
e1
:
SetLabelObject
(
g
)
e1
:
SetOperation
(
Auxiliary
.
MergedDelayEventCheck1_ToSingleCard
)
c
:
RegisterEffect
(
e1
)
...
...
@@ -1689,17 +1701,16 @@ function Auxiliary.ThisCardMovedToPublicResetCheck_ToSingleCard(e,tp,eg,ep,ev,re
end
function
Auxiliary
.
MergedDelayEventCheck1_ToSingleCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
e
:
GetLabelObject
()
local
c
=
e
:
GetOwner
()
g
:
Merge
(
eg
)
if
Duel
.
CheckEvent
(
EVENT_MOVE
)
then
local
_
,
meg
=
Duel
.
CheckEvent
(
EVENT_MOVE
,
true
)
if
meg
:
IsContains
(
c
)
and
(
c
:
IsFaceup
()
or
c
:
IsPublic
())
then
g
:
Clear
()
end
local
code
,
event
=
e
:
GetLabel
()
local
c
=
e
:
GetOwner
(
)
local
mr
,
meg
=
Duel
.
CheckEvent
(
event
,
true
)
if
mr
and
meg
:
IsContains
(
c
)
and
(
c
:
IsFaceup
()
or
c
:
IsPublic
())
then
g
:
Clear
()
end
if
Duel
.
GetCurrentChain
()
==
0
and
#
g
>
0
and
not
Duel
.
CheckEvent
(
EVENT_CHAIN_END
)
then
local
_eg
=
g
:
Clone
()
Duel
.
RaiseEvent
(
_eg
,
e
:
GetLabel
()
,
re
,
r
,
rp
,
ep
,
ev
)
Duel
.
RaiseEvent
(
_eg
,
code
,
re
,
r
,
rp
,
ep
,
ev
)
g
:
Clear
()
end
end
...
...
@@ -1708,7 +1719,7 @@ function Auxiliary.MergedDelayEventCheck2_ToSingleCard(e,tp,eg,ep,ev,re,r,rp)
if
Duel
.
CheckEvent
(
EVENT_MOVE
)
then
local
_
,
meg
=
Duel
.
CheckEvent
(
EVENT_MOVE
,
true
)
local
c
=
e
:
GetOwner
()
if
meg
:
IsContains
(
c
)
and
(
c
:
IsFaceup
()
or
c
:
IsPublic
())
then
if
meg
:
IsContains
(
c
)
and
(
c
:
IsFaceup
()
or
c
:
IsPublic
())
then
g
:
Clear
()
end
end
...
...
@@ -1718,6 +1729,17 @@ function Auxiliary.MergedDelayEventCheck2_ToSingleCard(e,tp,eg,ep,ev,re,r,rp)
g
:
Clear
()
end
end
function
Auxiliary
.
RegisterMergedDelayedEvent_ToSingleCard_RaiseEvent
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
for
_
,
mse
in
ipairs
(
Auxiliary
.
merge_single_effects
)
do
local
code
=
mse
:
GetLabel
()
local
g
=
mse
:
GetLabelObject
()
if
#
g
>
0
then
local
_eg
=
g
:
Clone
()
Duel
.
RaiseEvent
(
_eg
,
code
,
re
,
r
,
rp
,
ep
,
ev
)
g
:
Clear
()
end
end
end
--B.E.S. remove counter
function
Auxiliary
.
EnableBESRemove
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
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