Skip to content

Commit

Permalink
workaround for "inaccurate" healing quality
Browse files Browse the repository at this point in the history
  • Loading branch information
sonphantrung authored Aug 21, 2024
1 parent a0579c0 commit 061c149
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/character_body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1199,17 +1199,17 @@ bodypart_id Character::body_window( const std::string &menu_header,
bool bitten = has_effect( effect_bite, bp.id() );
bool infected = has_effect( effect_infected, bp.id() );
bool bandaged = has_effect( effect_bandaged, bp.id() );
const int b_power = get_effect_int( effect_bandaged, bp );
const int d_power = get_effect_int( effect_disinfected, bp );
int new_b_power = static_cast<int>( std::floor( bandage_power ) );
const int b_power = get_effect_int( effect_bandaged, bp ) + 1;
const int d_power = get_effect_int( effect_disinfected, bp ) + 1;
int new_b_power = static_cast<int>( std::floor( bandage_power ) + 1 );
if( bandaged ) {
const effect &eff = get_effect( effect_bandaged, bp );
if( new_b_power > eff.get_max_intensity() ) {
new_b_power = eff.get_max_intensity();
}

}
int new_d_power = static_cast<int>( std::floor( disinfectant_power ) );
int new_d_power = static_cast<int>( std::floor( disinfectant_power ) + 1 );

const auto &aligned_name = std::string( max_bp_name_len - utf8_width( e.name ), ' ' ) + e.name;
std::string hp_str;
Expand Down
8 changes: 4 additions & 4 deletions src/iuse_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3719,19 +3719,19 @@ void heal_actor::info( const item &, std::vector<iteminfo> &dump ) const

if( bandages_power > 0 ) {
dump.emplace_back( "HEAL", _( "Base bandaging quality: " ),
texitify_base_healing_power( static_cast<int>( bandages_power ) ) );
texitify_base_healing_power( static_cast<int>( bandages_power ) + 1 ) );
if( g != nullptr ) {
dump.emplace_back( "HEAL", _( "Actual bandaging quality: " ),
texitify_healing_power( get_bandaged_level( player_character ) ) );
texitify_healing_power( get_bandaged_level( player_character ) + 1 ) );
}
}

if( disinfectant_power > 0 ) {
dump.emplace_back( "HEAL", _( "Base disinfecting quality: " ),
texitify_base_healing_power( static_cast<int>( disinfectant_power ) ) );
texitify_base_healing_power( static_cast<int>( disinfectant_power ) + 1 ) );
if( g != nullptr ) {
dump.emplace_back( "HEAL", _( "Actual disinfecting quality: " ),
texitify_healing_power( get_disinfected_level( player_character ) ) );
texitify_healing_power( get_disinfected_level( player_character ) + 1 ) );
}
}
if( bleed > 0 ) {
Expand Down

0 comments on commit 061c149

Please sign in to comment.