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
c9da4c2d
Commit
c9da4c2d
authored
Jun 15, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of github.com:moecube/ygopro-core into develop
parents
63d9a249
d750174f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
16 deletions
+32
-16
card.cpp
card.cpp
+6
-4
effect.cpp
effect.cpp
+16
-8
effect.h
effect.h
+1
-0
field.cpp
field.cpp
+4
-2
field.h
field.h
+1
-1
processor.cpp
processor.cpp
+4
-1
No files found.
card.cpp
View file @
c9da4c2d
...
...
@@ -2376,12 +2376,13 @@ int32_t card::leave_field_redirect(uint32_t reason) {
return
0
;
filter_effect
(
EFFECT_LEAVE_FIELD_REDIRECT
,
&
es
);
for
(
effect_set
::
size_type
i
=
0
;
i
<
es
.
size
();
++
i
)
{
redirect
=
es
[
i
]
->
get_value
(
this
,
0
);
effect
*
peffect
=
es
[
i
];
redirect
=
peffect
->
get_value
(
this
,
0
);
if
((
redirect
&
LOCATION_HAND
)
&&
!
is_affected_by_effect
(
EFFECT_CANNOT_TO_HAND
)
&&
pduel
->
game_field
->
is_player_can_send_to_hand
(
es
[
i
]
->
get_handler_player
(),
this
))
redirects
|=
redirect
;
else
if
((
redirect
&
LOCATION_DECK
)
&&
!
is_affected_by_effect
(
EFFECT_CANNOT_TO_DECK
)
&&
pduel
->
game_field
->
is_player_can_send_to_deck
(
es
[
i
]
->
get_handler_player
(),
this
))
redirects
|=
redirect
;
else
if
((
redirect
&
LOCATION_REMOVED
)
&&
!
is_affected_by_effect
(
EFFECT_CANNOT_REMOVE
)
&&
pduel
->
game_field
->
is_player_can_remove
(
es
[
i
]
->
get_handler_player
(),
this
,
REASON_EFFECT
))
else
if
((
redirect
&
LOCATION_REMOVED
)
&&
!
is_affected_by_effect
(
EFFECT_CANNOT_REMOVE
)
&&
pduel
->
game_field
->
is_player_can_remove
(
es
[
i
]
->
get_handler_player
(),
this
,
REASON_EFFECT
|
REASON_REDIRECT
,
peffect
))
redirects
|=
redirect
;
}
if
(
redirects
&
LOCATION_REMOVED
)
...
...
@@ -2414,12 +2415,13 @@ int32_t card::destination_redirect(uint8_t destination, uint32_t reason) {
else
return
0
;
for
(
effect_set
::
size_type
i
=
0
;
i
<
es
.
size
();
++
i
)
{
redirect
=
es
[
i
]
->
get_value
(
this
,
0
);
effect
*
peffect
=
es
[
i
];
redirect
=
peffect
->
get_value
(
this
,
0
);
if
((
redirect
&
LOCATION_HAND
)
&&
!
is_affected_by_effect
(
EFFECT_CANNOT_TO_HAND
)
&&
pduel
->
game_field
->
is_player_can_send_to_hand
(
es
[
i
]
->
get_handler_player
(),
this
))
return
redirect
;
if
((
redirect
&
LOCATION_DECK
)
&&
!
is_affected_by_effect
(
EFFECT_CANNOT_TO_DECK
)
&&
pduel
->
game_field
->
is_player_can_send_to_deck
(
es
[
i
]
->
get_handler_player
(),
this
))
return
redirect
;
if
((
redirect
&
LOCATION_REMOVED
)
&&
!
is_affected_by_effect
(
EFFECT_CANNOT_REMOVE
)
&&
pduel
->
game_field
->
is_player_can_remove
(
es
[
i
]
->
get_handler_player
(),
this
,
REASON_EFFECT
))
if
((
redirect
&
LOCATION_REMOVED
)
&&
!
is_affected_by_effect
(
EFFECT_CANNOT_REMOVE
)
&&
pduel
->
game_field
->
is_player_can_remove
(
es
[
i
]
->
get_handler_player
(),
this
,
REASON_EFFECT
|
REASON_REDIRECT
,
peffect
))
return
redirect
;
if
((
redirect
&
LOCATION_GRAVE
)
&&
!
is_affected_by_effect
(
EFFECT_CANNOT_TO_GRAVE
)
&&
pduel
->
game_field
->
is_player_can_send_to_grave
(
es
[
i
]
->
get_handler_player
(),
this
))
return
redirect
;
...
...
effect.cpp
View file @
c9da4c2d
...
...
@@ -808,10 +808,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
{
...
...
@@ -820,10 +824,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 @
c9da4c2d
...
...
@@ -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
};
...
...
field.cpp
View file @
c9da4c2d
...
...
@@ -3416,7 +3416,9 @@ int32_t field::is_player_can_send_to_deck(uint8_t playerid, card * pcard) {
}
return
TRUE
;
}
int32_t
field
::
is_player_can_remove
(
uint8_t
playerid
,
card
*
pcard
,
uint32_t
reason
)
{
int32_t
field
::
is_player_can_remove
(
uint8_t
playerid
,
card
*
pcard
,
uint32_t
reason
,
effect
*
reason_effect
)
{
if
(
!
reason_effect
)
reason_effect
=
core
.
reason_effect
;
effect_set
eset
;
filter_player_effect
(
playerid
,
EFFECT_CANNOT_REMOVE
,
&
eset
);
for
(
effect_set
::
size_type
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
...
...
@@ -3426,7 +3428,7 @@ int32_t field::is_player_can_remove(uint8_t playerid, card * pcard, uint32_t rea
pduel
->
lua
->
add_param
(
pcard
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
reason
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
core
.
reason_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
reason_effect
,
PARAM_TYPE_EFFECT
);
if
(
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
target
,
5
))
return
FALSE
;
}
...
...
field.h
View file @
c9da4c2d
...
...
@@ -503,7 +503,7 @@ public:
int32_t
is_player_can_send_to_grave
(
uint8_t
playerid
,
card
*
pcard
);
int32_t
is_player_can_send_to_hand
(
uint8_t
playerid
,
card
*
pcard
);
int32_t
is_player_can_send_to_deck
(
uint8_t
playerid
,
card
*
pcard
);
int32_t
is_player_can_remove
(
uint8_t
playerid
,
card
*
pcard
,
uint32_t
reason
);
int32_t
is_player_can_remove
(
uint8_t
playerid
,
card
*
pcard
,
uint32_t
reason
,
effect
*
reason_effect
=
nullptr
);
int32_t
is_chain_negatable
(
uint8_t
chaincount
);
int32_t
is_chain_disablable
(
uint8_t
chaincount
);
int32_t
is_chain_disabled
(
uint8_t
chaincount
);
...
...
processor.cpp
View file @
c9da4c2d
...
...
@@ -4070,7 +4070,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