Healing: Perform rest healing on turn 2.
This commit is contained in:
parent
2f62302dc7
commit
00c2ed6aa9
3 changed files with 13 additions and 10 deletions
|
@ -72,24 +72,24 @@
|
|||
[end_turn][/end_turn]
|
||||
[/event]
|
||||
|
||||
# side 1 gets healing but no rest healing (??)
|
||||
# side 1 gets healing and rest healing
|
||||
[event]
|
||||
name=side 1 turn 2 refresh
|
||||
{EXPECT_HITPOINTS 9 1 9 1}
|
||||
{EXPECT_HITPOINTS 11 3 9 1}
|
||||
[end_turn][/end_turn]
|
||||
[/event]
|
||||
|
||||
# side 2 gets healing and rest healing
|
||||
[event]
|
||||
name=side 2 turn 2 refresh
|
||||
{EXPECT_HITPOINTS 9 1 19 3}
|
||||
{EXPECT_HITPOINTS 11 3 19 3}
|
||||
[end_turn][/end_turn]
|
||||
[/event]
|
||||
|
||||
# side 1 gets healing and rest healing
|
||||
[event]
|
||||
name=side 1 turn 3 refresh
|
||||
{EXPECT_HITPOINTS 19 3 19 3}
|
||||
{EXPECT_HITPOINTS 21 5 19 3}
|
||||
[move_unit]
|
||||
side=1
|
||||
canrecruit=yes
|
||||
|
@ -112,7 +112,7 @@
|
|||
# side 2 gets healing and rest healing
|
||||
[event]
|
||||
name=side 2 turn 3 refresh
|
||||
{EXPECT_HITPOINTS 19 3 29 5}
|
||||
{EXPECT_HITPOINTS 21 5 29 5}
|
||||
[move_unit]
|
||||
side=2
|
||||
canrecruit=yes
|
||||
|
@ -135,14 +135,14 @@
|
|||
# side 1 gets healing but not rest healing
|
||||
[event]
|
||||
name=side 1 turn 4 refresh
|
||||
{EXPECT_HITPOINTS 27 3 29 5}
|
||||
{EXPECT_HITPOINTS 29 5 29 5}
|
||||
[end_turn][/end_turn]
|
||||
[/event]
|
||||
|
||||
# side 2 gets healing but not rest healing
|
||||
[event]
|
||||
name=side 2 turn 4 refresh
|
||||
{EXPECT_HITPOINTS 27 3 37 5}
|
||||
{EXPECT_HITPOINTS 29 5 37 5}
|
||||
[end_turn][/end_turn]
|
||||
[/event]
|
||||
|
||||
|
|
|
@ -299,8 +299,6 @@ void calculate_healing(int side, bool update_display)
|
|||
for (unit &patient : resources::gameboard->units()) {
|
||||
|
||||
if ( patient.get_state("unhealable") || patient.incapacitated() ) {
|
||||
if ( patient.side() == side )
|
||||
patient.set_resting(true);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -315,7 +313,6 @@ void calculate_healing(int side, bool update_display)
|
|||
if ( patient.side() == side ) {
|
||||
if ( patient.resting() || patient.is_healthy() )
|
||||
healing += game_config::rest_heal_amount;
|
||||
patient.set_resting(true);
|
||||
}
|
||||
|
||||
// Main healing.
|
||||
|
|
|
@ -492,6 +492,12 @@ void play_controller::do_init_side()
|
|||
// Do healing on every side turn except the very first side turn.
|
||||
// (1.14 and earlier did healing whenever turn >= 2.)
|
||||
set_do_healing(true);
|
||||
// Set resting now after the healing has been done.
|
||||
for(unit &patient : resources::gameboard->units()) {
|
||||
if(patient.side() == current_side()) {
|
||||
patient.set_resting(true);
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare the undo stack.
|
||||
undo_stack().new_side_turn(current_side());
|
||||
|
|
Loading…
Add table
Reference in a new issue