Skip to content

Commit

Permalink
Change x2 healing multiplier for having both bandages and disinfectan…
Browse files Browse the repository at this point in the history
…t to 1.25 (#40483)
  • Loading branch information
CodeBandit authored May 12, 2020
1 parent 78d353f commit 10dbb76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6912,7 +6912,7 @@ float Character::healing_rate_medicine( float at_rest_quality, const bodypart_id

// increase healing if character has both effects
if( has_effect( effect_bandaged ) && has_effect( effect_disinfected ) ) {
rate_medicine *= 2;
rate_medicine *= 1.25;
}

if( get_healthy() > 0.0f ) {
Expand Down
26 changes: 13 additions & 13 deletions tests/char_healing_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,24 +365,24 @@ TEST_CASE( "healing_rate_medicine with bandages and/or disinfectant", "[heal][ba
}
}

// Combined, healing is 4-12 HP per day while awake, 8-24 HP per day while asleep
// Combined, healing is 2.5-7.5 HP per day while awake, 5-15 HP per day while asleep
SECTION( "bandages and disinfectant together" ) {
SECTION( "awake" ) {
CHECK( together_rate( "head", awake_rest ) == Approx( 4.0f * hp_per_day ) );
CHECK( together_rate( "arm_l", awake_rest ) == Approx( 8.0f * hp_per_day ) );
CHECK( together_rate( "arm_r", awake_rest ) == Approx( 8.0f * hp_per_day ) );
CHECK( together_rate( "leg_l", awake_rest ) == Approx( 8.0f * hp_per_day ) );
CHECK( together_rate( "leg_r", awake_rest ) == Approx( 8.0f * hp_per_day ) );
CHECK( together_rate( "torso", awake_rest ) == Approx( 12.0f * hp_per_day ) );
CHECK( together_rate( "head", awake_rest ) == Approx( 2.5f * hp_per_day ) );
CHECK( together_rate( "arm_l", awake_rest ) == Approx( 5.0f * hp_per_day ) );
CHECK( together_rate( "arm_r", awake_rest ) == Approx( 5.0f * hp_per_day ) );
CHECK( together_rate( "leg_l", awake_rest ) == Approx( 5.0f * hp_per_day ) );
CHECK( together_rate( "leg_r", awake_rest ) == Approx( 5.0f * hp_per_day ) );
CHECK( together_rate( "torso", awake_rest ) == Approx( 7.5f * hp_per_day ) );
}

SECTION( "asleep" ) {
CHECK( together_rate( "head", sleep_rest ) == Approx( 8.0f * hp_per_day ) );
CHECK( together_rate( "arm_l", sleep_rest ) == Approx( 16.0f * hp_per_day ) );
CHECK( together_rate( "arm_r", sleep_rest ) == Approx( 16.0f * hp_per_day ) );
CHECK( together_rate( "leg_l", sleep_rest ) == Approx( 16.0f * hp_per_day ) );
CHECK( together_rate( "leg_r", sleep_rest ) == Approx( 16.0f * hp_per_day ) );
CHECK( together_rate( "torso", sleep_rest ) == Approx( 24.0f * hp_per_day ) );
CHECK( together_rate( "head", sleep_rest ) == Approx( 5.0f * hp_per_day ) );
CHECK( together_rate( "arm_l", sleep_rest ) == Approx( 10.0f * hp_per_day ) );
CHECK( together_rate( "arm_r", sleep_rest ) == Approx( 10.0f * hp_per_day ) );
CHECK( together_rate( "leg_l", sleep_rest ) == Approx( 10.0f * hp_per_day ) );
CHECK( together_rate( "leg_r", sleep_rest ) == Approx( 10.0f * hp_per_day ) );
CHECK( together_rate( "torso", sleep_rest ) == Approx( 15.0f * hp_per_day ) );
}
}
}
Expand Down

0 comments on commit 10dbb76

Please sign in to comment.