Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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-core
Commits
ba9740d9
Commit
ba9740d9
authored
May 25, 2025
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workwround: check last_handler after chain resolution
parent
cdc86e21
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
9 deletions
+21
-9
effect.cpp
effect.cpp
+16
-8
effect.h
effect.h
+1
-0
processor.cpp
processor.cpp
+4
-1
No files found.
effect.cpp
View file @
ba9740d9
...
...
@@ -805,10 +805,14 @@ effect* effect::clone() {
return
ceffect
;
}
card
*
effect
::
get_owner
()
const
{
if
(
active_handler
)
return
active_handler
;
if
(
type
&
EFFECT_TYPE_XMATERIAL
)
return
handler
->
overlay_target
;
if
(
type
&
EFFECT_TYPE_XMATERIAL
)
{
if
(
active_handler
)
return
active_handler
;
if
(
handler
->
overlay_target
)
return
handler
->
overlay_target
;
if
(
last_handler
)
return
last_handler
;
}
return
owner
;
}
uint8_t
effect
::
get_owner_player
()
const
{
...
...
@@ -817,10 +821,14 @@ uint8_t effect::get_owner_player() const {
return
get_owner
()
->
current
.
controler
;
}
card
*
effect
::
get_handler
()
const
{
if
(
active_handler
)
return
active_handler
;
if
(
type
&
EFFECT_TYPE_XMATERIAL
)
return
handler
->
overlay_target
;
if
(
type
&
EFFECT_TYPE_XMATERIAL
)
{
if
(
active_handler
)
return
active_handler
;
if
(
handler
->
overlay_target
)
return
handler
->
overlay_target
;
if
(
last_handler
)
return
last_handler
;
}
return
handler
;
}
uint8_t
effect
::
get_handler_player
()
const
{
...
...
effect.h
View file @
ba9740d9
...
...
@@ -54,6 +54,7 @@ public:
uint16_t
active_location
{
0
};
uint16_t
active_sequence
{
0
};
card
*
active_handler
{
nullptr
};
card
*
last_handler
{
nullptr
};
std
::
vector
<
lua_Integer
>
label
;
int32_t
label_object
{
0
};
int32_t
condition
{
0
};
...
...
processor.cpp
View file @
ba9740d9
...
...
@@ -4056,7 +4056,10 @@ int32_t field::add_chain(uint16_t step) {
if
((
peffect
->
card_type
&
(
TYPE_TRAP
|
TYPE_MONSTER
))
==
(
TYPE_TRAP
|
TYPE_MONSTER
))
peffect
->
card_type
-=
TYPE_TRAP
;
peffect
->
set_active_type
();
peffect
->
active_handler
=
peffect
->
handler
->
overlay_target
;
if
(
peffect
->
type
&
EFFECT_TYPE_XMATERIAL
)
{
peffect
->
active_handler
=
peffect
->
handler
->
overlay_target
;
peffect
->
last_handler
=
peffect
->
handler
->
overlay_target
;
}
clit
.
chain_count
=
(
uint8_t
)
core
.
current_chain
.
size
()
+
1
;
clit
.
target_cards
=
0
;
clit
.
target_player
=
PLAYER_NONE
;
...
...
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