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
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-core
Commits
80f2f60f
Commit
80f2f60f
authored
May 27, 2019
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update aborting damage step
parent
3b3ade97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
32 deletions
+28
-32
processor.cpp
processor.cpp
+28
-32
No files found.
processor.cpp
View file @
80f2f60f
...
...
@@ -3142,11 +3142,7 @@ int32 field::process_battle_command(uint16 step) {
return FALSE;
}
case 21: {
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
||
core
.
attacker
->
current
.
controler
!=
core
.
attacker
->
attack_controler
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
current
.
controler
!=
core
.
attack_target
->
attack_controler
||
core
.
attack_target
->
fieldid_r
!=
core
.
pre_field
[
1
])))
{
if(core.attacker->is_status(STATUS_ATTACK_CANCELED)) {
core.units.begin()->step = 32;
return FALSE;
}
...
...
@@ -3184,12 +3180,7 @@ int32 field::process_battle_command(uint16 step) {
return FALSE;
}
case 23: {
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
||
((
core
.
attacker
->
current
.
position
&
POS_DEFENSE
)
&&
!
(
core
.
attacker
->
is_affected_by_effect
(
EFFECT_DEFENSE_ATTACK
)))
||
core
.
attacker
->
current
.
controler
!=
core
.
attacker
->
attack_controler
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
current
.
controler
!=
core
.
attack_target
->
attack_controler
||
core
.
attack_target
->
fieldid_r
!=
core
.
pre_field
[
1
])))
{
if(core.attacker->is_status(STATUS_ATTACK_CANCELED)) {
core.units.begin()->step = 32;
return FALSE;
}
...
...
@@ -3219,11 +3210,7 @@ int32 field::process_battle_command(uint16 step) {
return FALSE;
}
case 25: {
if
(
core
.
attacker
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
||
core
.
attacker
->
current
.
controler
!=
core
.
attacker
->
attack_controler
||
(
core
.
attack_target
&&
(
core
.
attack_target
->
current
.
location
!=
LOCATION_MZONE
||
core
.
attack_target
->
current
.
controler
!=
core
.
attack_target
->
attack_controler
||
core
.
attack_target
->
fieldid_r
!=
core
.
pre_field
[
1
])))
{
if(core.attacker->is_status(STATUS_ATTACK_CANCELED)) {
reset_phase(PHASE_DAMAGE_CAL);
adjust_all();
infos.phase = PHASE_DAMAGE;
...
...
@@ -3472,7 +3459,6 @@ int32 field::process_battle_command(uint16 step) {
}
case 33: {
core.units.begin()->ptarget = 0;
// for unexpected end of damage step
core.damage_calculated = TRUE;
core.selfdes_disabled = FALSE;
core.flip_delayed = FALSE;
...
...
@@ -4970,7 +4956,7 @@ int32 field::adjust_step(uint16 step) {
return FALSE;
}
case 1: {
//win check
(deck=0 or lp=0)
//win check
uint32 winp = 5, rea = 1;
if(player[0].lp <= 0 && player[1].lp > 0) {
winp = 1;
...
...
@@ -5229,21 +5215,31 @@ int32 field::adjust_step(uint16 step) {
return FALSE;
if(attacker->is_status(STATUS_ATTACK_CANCELED))
return FALSE;
if
(
!
core
.
attacker
->
is_capable_attack
()
||
core
.
attacker
->
current
.
controler
!=
core
.
attacker
->
attack_controler
||
core
.
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
])
{
attacker
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
return
FALSE
;
}
if
(
core
.
attack_rollback
)
return
FALSE
;
std
::
set
<
uint16
>
fidset
;
for
(
auto
&
pcard
:
player
[
1
-
infos
.
turn_player
].
list_mzone
)
{
if
(
pcard
)
fidset
.
insert
(
pcard
->
fieldid_r
);
if(infos.phase != PHASE_DAMAGE && infos.phase != PHASE_DAMAGE_CAL) {
if(!core.attacker->is_capable_attack()
|| core.attacker->current.controler != core.attacker->attack_controler
|| core.attacker->fieldid_r != core.pre_field[0]) {
attacker->set_status(STATUS_ATTACK_CANCELED, TRUE);
return FALSE;
}
if(core.attack_rollback)
return FALSE;
std::set<uint16> fidset;
for(auto& pcard : player[1 - infos.turn_player].list_mzone) {
if(pcard)
fidset.insert(pcard->fieldid_r);
}
if(fidset != core.opp_mzone || !confirm_attack_target())
core.attack_rollback = TRUE;
} else {
if(core.attacker->current.location != LOCATION_MZONE || core.attacker->fieldid_r != core.pre_field[0]
|| ((core.attacker->current.position & POS_DEFENSE) && !(core.attacker->is_affected_by_effect(EFFECT_DEFENSE_ATTACK)))
|| core.attacker->current.controler != core.attacker->attack_controler
|| (core.attack_target && (core.attack_target->current.location != LOCATION_MZONE
|| core.attack_target->current.controler != core.attack_target->attack_controler
|| core.attack_target->fieldid_r != core.pre_field[1])))
core.attacker->set_status(STATUS_ATTACK_CANCELED, TRUE);
}
if
(
fidset
!=
core
.
opp_mzone
||
!
confirm_attack_target
())
core
.
attack_rollback
=
TRUE
;
return FALSE;
}
case 15: {
...
...
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