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
c78fe0bf
Commit
c78fe0bf
authored
Dec 16, 2024
by
wind2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Temp removed monsters can change position
parent
836bacd5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
card.cpp
card.cpp
+2
-6
operations.cpp
operations.cpp
+11
-2
processor.cpp
processor.cpp
+4
-0
No files found.
card.cpp
View file @
c78fe0bf
...
...
@@ -3419,9 +3419,7 @@ int32_t card::get_set_tribute_count() {
return
min
+
(
max
<<
16
);
}
int32_t
card
::
is_can_be_flip_summoned
(
uint8_t
playerid
)
{
if
(
is_status
(
STATUS_SUMMON_TURN
)
||
is_status
(
STATUS_FLIP_SUMMON_TURN
)
||
is_status
(
STATUS_SPSUMMON_TURN
)
||
is_status
(
STATUS_FORM_CHANGED
))
return
FALSE
;
if
(
announce_count
>
0
)
if
(
is_status
(
STATUS_FORM_CHANGED
))
return
FALSE
;
if
(
current
.
location
!=
LOCATION_MZONE
)
return
FALSE
;
...
...
@@ -3949,12 +3947,10 @@ int32_t card::is_capable_attack_announce(uint8_t playerid) {
return
TRUE
;
}
int32_t
card
::
is_capable_change_position
(
uint8_t
playerid
)
{
if
(
get_status
(
STATUS_SUMMON_TURN
|
STATUS_FLIP_SUMMON_TURN
|
STATUS_SPSUMMON_TURN
|
STATUS_FORM_CHANGED
))
if
(
is_status
(
STATUS_FORM_CHANGED
))
return
FALSE
;
if
(
data
.
type
&
TYPE_LINK
)
return
FALSE
;
if
(
announce_count
>
0
)
return
FALSE
;
if
(
is_status
(
STATUS_FORBIDDEN
))
return
FALSE
;
if
(
is_affected_by_effect
(
EFFECT_CANNOT_CHANGE_POSITION
))
...
...
operations.cpp
View file @
c78fe0bf
...
...
@@ -1938,6 +1938,7 @@ int32_t field::summon(uint16_t step, uint8_t sumplayer, card* target, effect* pr
target
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
target
->
set_status
(
STATUS_FLIP_SUMMONING
,
FALSE
);
target
->
set_status
(
STATUS_SUMMON_TURN
,
TRUE
);
target
->
set_status
(
STATUS_FORM_CHANGED
,
TRUE
);
target
->
enable_field_effect
(
true
);
if
(
target
->
is_status
(
STATUS_DISABLED
))
target
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
...
...
@@ -2048,6 +2049,7 @@ int32_t field::flip_summon(uint16_t step, uint8_t sumplayer, card * target, uint
if
(
target
->
is_status
(
STATUS_DISABLED
))
target
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
target
->
set_status
(
STATUS_FLIP_SUMMON_TURN
,
TRUE
);
target
->
set_status
(
STATUS_FORM_CHANGED
,
TRUE
);
return
FALSE
;
}
case
4
:
{
...
...
@@ -2395,6 +2397,7 @@ int32_t field::mset(uint16_t step, uint8_t setplayer, card* target, effect* proc
++
core
.
normalsummon_state_count
[
setplayer
];
check_card_counter
(
target
,
ACTIVITY_NORMALSUMMON
,
setplayer
);
target
->
set_status
(
STATUS_SUMMON_TURN
,
TRUE
);
target
->
set_status
(
STATUS_FORM_CHANGED
,
TRUE
);
pduel
->
write_buffer8
(
MSG_SET
);
pduel
->
write_buffer32
(
target
->
data
.
code
);
pduel
->
write_buffer32
(
target
->
get_info_location
());
...
...
@@ -3136,6 +3139,7 @@ int32_t field::special_summon_rule(uint16_t step, uint8_t sumplayer, card* targe
for
(
auto
&
pcard
:
pgroup
->
container
)
{
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SPSUMMON_TURN
,
TRUE
);
pcard
->
set_status
(
STATUS_FORM_CHANGED
,
TRUE
);
pcard
->
enable_field_effect
(
true
);
if
(
pcard
->
is_status
(
STATUS_DISABLED
))
pcard
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
...
...
@@ -3352,6 +3356,7 @@ int32_t field::special_summon(uint16_t step, effect* reason_effect, uint8_t reas
for
(
auto
&
pcard
:
targets
->
container
)
{
pcard
->
set_status
(
STATUS_SPSUMMON_STEP
,
FALSE
);
pcard
->
set_status
(
STATUS_SPSUMMON_TURN
,
TRUE
);
pcard
->
set_status
(
STATUS_FORM_CHANGED
,
TRUE
);
if
(
pcard
->
is_position
(
POS_FACEUP
))
pcard
->
enable_field_effect
(
true
);
}
...
...
@@ -4265,8 +4270,10 @@ int32_t field::send_to(uint16_t step, group * targets, effect * reason_effect, u
if
(
nloc
==
LOCATION_GRAVE
)
pcard
->
reset
(
RESET_TOGRAVE
,
RESET_EVENT
);
if
(
nloc
==
LOCATION_REMOVED
||
((
pcard
->
data
.
type
&
TYPE_TOKEN
)
&&
pcard
->
sendto_param
.
location
==
LOCATION_REMOVED
))
{
if
(
pcard
->
current
.
reason
&
REASON_TEMPORARY
)
if
(
pcard
->
current
.
reason
&
REASON_TEMPORARY
)
{
pcard
->
reset
(
RESET_TEMP_REMOVE
,
RESET_EVENT
);
pcard
->
set_status
(
STATUS_FORM_CHANGED
,
FALSE
);
}
else
pcard
->
reset
(
RESET_REMOVE
,
RESET_EVENT
);
}
...
...
@@ -4645,8 +4652,10 @@ int32_t field::move_to_field(uint16_t step, card* target, uint32_t enable, uint3
}
if
(
!
(
target
->
current
.
location
&
LOCATION_ONFIELD
))
target
->
clear_relate_effect
();
if
(
ret
==
RETURN_TEMP_REMOVE_TO_FIELD
)
if
(
ret
==
RETURN_TEMP_REMOVE_TO_FIELD
)
{
target
->
current
.
reason
&=
~
REASON_TEMPORARY
;
target
->
set_status
(
STATUS_FORM_CHANGED
,
FALSE
);
}
if
(
ret
==
0
&&
location
!=
target
->
current
.
location
||
ret
==
RETURN_TEMP_REMOVE_TO_FIELD
&&
target
->
turnid
!=
infos
.
turn_id
)
{
target
->
set_status
(
STATUS_SUMMON_TURN
,
FALSE
);
...
...
processor.cpp
View file @
c78fe0bf
...
...
@@ -2665,6 +2665,7 @@ int32_t field::process_battle_command(uint16_t step) {
}
if
(
core
.
units
.
begin
()
->
arg3
)
{
//attack announce failed
++
core
.
attacker
->
announce_count
;
core
.
attacker
->
set_status
(
STATUS_FORM_CHANGED
,
TRUE
);
core
.
chain_attack
=
FALSE
;
core
.
units
.
begin
()
->
step
=
-
1
;
}
...
...
@@ -2739,6 +2740,7 @@ int32_t field::process_battle_command(uint16_t step) {
// go to damage step
if
(
!
core
.
attack_rollback
)
{
++
core
.
attacker
->
announce_count
;
core
.
attacker
->
set_status
(
STATUS_FORM_CHANGED
,
TRUE
);
core
.
attacker
->
announced_cards
.
addcard
(
core
.
attack_target
);
attack_all_target_check
();
core
.
units
.
begin
()
->
step
=
18
;
...
...
@@ -2771,6 +2773,7 @@ int32_t field::process_battle_command(uint16_t step) {
case
13
:
{
if
(
core
.
attacker
->
fieldid_r
==
core
.
pre_field
[
0
])
{
++
core
.
attacker
->
announce_count
;
core
.
attacker
->
set_status
(
STATUS_FORM_CHANGED
,
TRUE
);
core
.
attacker
->
announced_cards
.
addcard
(
core
.
attack_target
);
attack_all_target_check
();
}
...
...
@@ -3323,6 +3326,7 @@ int32_t field::process_damage_step(uint16_t step, uint32_t new_attack) {
if
(
core
.
attacker
)
{
core
.
attacker
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
++
core
.
attacker
->
announce_count
;
core
.
attacker
->
set_status
(
STATUS_FORM_CHANGED
,
TRUE
);
core
.
attacker
->
announced_cards
.
addcard
(
core
.
attack_target
);
attack_all_target_check
();
}
...
...
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