From a57b15c2728ba2ffeffbfe05f86a80cba055d3de Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Tue, 20 Feb 2024 16:37:50 -0600 Subject: [PATCH 1/9] feat(interface): make empty-handed unarmed damage bonus more visible --- data/json/skills.json | 2 +- src/character.cpp | 54 +++++++++++++++++++++++++++++++++++++++ src/character.h | 2 ++ src/character_display.cpp | 4 +++ src/player.cpp | 4 ++- 5 files changed, 64 insertions(+), 2 deletions(-) diff --git a/data/json/skills.json b/data/json/skills.json index f5d27e437ec6..8aabc2d44376 100644 --- a/data/json/skills.json +++ b/data/json/skills.json @@ -269,7 +269,7 @@ "type": "skill", "id": "unarmed", "name": { "str": "unarmed combat" }, - "description": "Your skill in hand-to-hand fighting. For the unskilled, it's a good way to get hurt, but those with enough practice can perform special blows and techniques to quickly dispatch enemies.", + "description": "Your skill in hand-to-hand fighting, with unarmed weapons or empty-handed. Skill increases attack accuracy and unlocks techniques in many martial arts, while also providing a bonus to bare-handed damage.", "tags": [ "combat_skill", "weapon_skill" ], "companion_combat_rank_factor": 1, "companion_survival_rank_factor": 1, diff --git a/src/character.cpp b/src/character.cpp index dd76d44b40f5..23bd5da9df92 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -215,6 +215,7 @@ static const skill_id skill_dodge( "dodge" ); static const skill_id skill_gun( "gun" ); static const skill_id skill_swimming( "swimming" ); static const skill_id skill_throw( "throw" ); +static const skill_id skill_unarmed( "unarmed" ); static const species_id HUMAN( "HUMAN" ); static const species_id ROBOT( "ROBOT" ); @@ -350,9 +351,11 @@ static const std::string flag_PLOWABLE( "PLOWABLE" ); static const mtype_id mon_player_blob( "mon_player_blob" ); static const mtype_id mon_shadow_snake( "mon_shadow_snake" ); +static const trait_flag_str_id trait_flag_NEED_ACTIVE_TO_MELEE( "NEED_ACTIVE_TO_MELEE" ); static const trait_flag_str_id trait_flag_PRED2( "PRED2" ); static const trait_flag_str_id trait_flag_PRED3( "PRED3" ); static const trait_flag_str_id trait_flag_PRED4( "PRED4" ); +static const trait_flag_str_id trait_flag_UNARMED_BONUS( "UNARMED_BONUS" ); static const trait_flag_str_id flag_NO_THIRST( "NO_THIRST" ); static const trait_flag_str_id flag_NO_RADIATION( "NO_RADIATION" ); @@ -11224,6 +11227,57 @@ float Character::stability_roll() const return get_melee() + get_str() + ( get_per() / 3.0f ) + ( get_dex() / 4.0f ); } +int Character::display_empty_handed_base_damage() const +{ + int empty_hand_base_damage = get_skill_level( skill_unarmed ) * 2; + const bool left_empty = !natural_attack_restricted_on( bodypart_id( "hand_l" ) ); + const bool right_empty = !natural_attack_restricted_on( bodypart_id( "hand_r" ) ); + + if( !left_empty && !right_empty ) { + // Mutation and bionic bonuses don't matter so just print unarmed bonus + return empty_hand_base_damage; + } else { + + // Mutation and bionic bonuses double if both hands are free + int per_hand = 0; + if( has_bionic( bionic_id( "bio_razors" ) ) ) { + per_hand += 4; + } + for( const trait_id &mut : get_mutations() ) { + if( mut->flags.count( trait_flag_NEED_ACTIVE_TO_MELEE ) > 0 && + !has_active_mutation( mut ) ) { + continue; + } + // Fixed bonuses are nice and simple + per_hand += mut->bash_dmg_bonus + mut->cut_dmg_bonus + mut->pierce_dmg_bonus; + + // Random bonuses are more fiddly, since we want baseline numbers let's just report the minimum + const std::pair rand_bash = mut->rand_bash_bonus; + const std::pair rand_cut = mut->rand_cut_bonus; + per_hand += rand_bash.first + rand_cut.first; + + // Extra skill bonus is also fairly simple, but each type of fixed bonus can trigger it separately + if( mut->flags.count( trait_flag_UNARMED_BONUS ) > 0 ) { + if( mut->bash_dmg_bonus > 0 ) { + per_hand += std::min( get_skill_level( skill_unarmed ) / 2, 4 ); + } + if( mut->cut_dmg_bonus > 0 ) { + per_hand += std::min( get_skill_level( skill_unarmed ) / 2, 4 ); + } + if( mut->pierce_dmg_bonus > 0 ) { + per_hand += std::min( get_skill_level( skill_unarmed ) / 2, 4 ); + } + } + } + empty_hand_base_damage += per_hand; // First hand + if( left_empty && right_empty ) { + // Second hand + empty_hand_base_damage += per_hand; + } + return empty_hand_base_damage; + } +} + bool Character::uncanny_dodge() { return character_funcs::try_uncanny_dodge( *this ); diff --git a/src/character.h b/src/character.h index 5876c41f0e4b..ae6ece27c5db 100644 --- a/src/character.h +++ b/src/character.h @@ -657,6 +657,8 @@ class Character : public Creature, public location_visitable int attack_cost( const item &weap ) const; /** Gets melee accuracy component from weapon+skills */ float get_hit_weapon( const item &weap ) const; + /** Gets the minimum combined bare-handed damage from skill, bionics, and mutations for display functions */ + int display_empty_handed_base_damage() const; // If average == true, adds expected values of random rolls instead of rolling. /** Adds all 3 types of physical damage to instance */ diff --git a/src/character_display.cpp b/src/character_display.cpp index 1daa346ae8e6..2ccaa476b044 100644 --- a/src/character_display.cpp +++ b/src/character_display.cpp @@ -723,6 +723,10 @@ static void draw_skills_tab( const catacurses::window &w_skills, if( aSkill->ident() == skill_id( "dodge" ) ) { mvwprintz( w_skills, point( 14, y_pos ), cstatus, "%4.1f/%-2d(%2d%%)", you.get_dodge(), level_num, exercise < 0 ? 0 : exercise ); + } + if( aSkill->ident() == skill_id( "unarmed" ) ) { + mvwprintz( w_skills, point( 15, y_pos ), cstatus, "%3d/%-2d(%2d%%)", + you.display_empty_handed_base_damage(), level_num, exercise < 0 ? 0 : exercise ); } else { mvwprintz( w_skills, point( 19, y_pos ), cstatus, "%-2d(%2d%%)", level_num, diff --git a/src/player.cpp b/src/player.cpp index 414fe83ab35c..6d26ced5c8c2 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -222,9 +222,11 @@ bool character_martial_arts::pick_style( const avatar &you ) // Style selecti "\n" "STR: %d, DEX: %d, " "PER: %d, INT: %d\n" + "Base empty-handed damage: %3d\n" + "Effective dodge rating: %4.1f\n" "Press [%s] for more info.\n" ), you.get_str(), you.get_dex(), you.get_per(), you.get_int(), - ctxt.get_desc( "SHOW_DESCRIPTION" ) ); + you.display_empty_handed_base_damage(), you.get_dodge(), ctxt.get_desc( "SHOW_DESCRIPTION" ) ); ma_style_callback callback( static_cast( STYLE_OFFSET ), selectable_styles ); kmenu.callback = &callback; kmenu.input_category = "MELEE_STYLE_PICKER"; From 0bac7c06ae06f3c73d6541bbc4f2b9576029bbb6 Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Tue, 20 Feb 2024 20:41:03 -0600 Subject: [PATCH 2/9] commit progress for now --- src/character.cpp | 54 --------------------------------------- src/character.h | 2 -- src/character_display.cpp | 53 +++++++++++++++++++++++++++++++++++++- src/character_display.h | 4 +++ src/player.cpp | 3 ++- 5 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index 23bd5da9df92..dd76d44b40f5 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -215,7 +215,6 @@ static const skill_id skill_dodge( "dodge" ); static const skill_id skill_gun( "gun" ); static const skill_id skill_swimming( "swimming" ); static const skill_id skill_throw( "throw" ); -static const skill_id skill_unarmed( "unarmed" ); static const species_id HUMAN( "HUMAN" ); static const species_id ROBOT( "ROBOT" ); @@ -351,11 +350,9 @@ static const std::string flag_PLOWABLE( "PLOWABLE" ); static const mtype_id mon_player_blob( "mon_player_blob" ); static const mtype_id mon_shadow_snake( "mon_shadow_snake" ); -static const trait_flag_str_id trait_flag_NEED_ACTIVE_TO_MELEE( "NEED_ACTIVE_TO_MELEE" ); static const trait_flag_str_id trait_flag_PRED2( "PRED2" ); static const trait_flag_str_id trait_flag_PRED3( "PRED3" ); static const trait_flag_str_id trait_flag_PRED4( "PRED4" ); -static const trait_flag_str_id trait_flag_UNARMED_BONUS( "UNARMED_BONUS" ); static const trait_flag_str_id flag_NO_THIRST( "NO_THIRST" ); static const trait_flag_str_id flag_NO_RADIATION( "NO_RADIATION" ); @@ -11227,57 +11224,6 @@ float Character::stability_roll() const return get_melee() + get_str() + ( get_per() / 3.0f ) + ( get_dex() / 4.0f ); } -int Character::display_empty_handed_base_damage() const -{ - int empty_hand_base_damage = get_skill_level( skill_unarmed ) * 2; - const bool left_empty = !natural_attack_restricted_on( bodypart_id( "hand_l" ) ); - const bool right_empty = !natural_attack_restricted_on( bodypart_id( "hand_r" ) ); - - if( !left_empty && !right_empty ) { - // Mutation and bionic bonuses don't matter so just print unarmed bonus - return empty_hand_base_damage; - } else { - - // Mutation and bionic bonuses double if both hands are free - int per_hand = 0; - if( has_bionic( bionic_id( "bio_razors" ) ) ) { - per_hand += 4; - } - for( const trait_id &mut : get_mutations() ) { - if( mut->flags.count( trait_flag_NEED_ACTIVE_TO_MELEE ) > 0 && - !has_active_mutation( mut ) ) { - continue; - } - // Fixed bonuses are nice and simple - per_hand += mut->bash_dmg_bonus + mut->cut_dmg_bonus + mut->pierce_dmg_bonus; - - // Random bonuses are more fiddly, since we want baseline numbers let's just report the minimum - const std::pair rand_bash = mut->rand_bash_bonus; - const std::pair rand_cut = mut->rand_cut_bonus; - per_hand += rand_bash.first + rand_cut.first; - - // Extra skill bonus is also fairly simple, but each type of fixed bonus can trigger it separately - if( mut->flags.count( trait_flag_UNARMED_BONUS ) > 0 ) { - if( mut->bash_dmg_bonus > 0 ) { - per_hand += std::min( get_skill_level( skill_unarmed ) / 2, 4 ); - } - if( mut->cut_dmg_bonus > 0 ) { - per_hand += std::min( get_skill_level( skill_unarmed ) / 2, 4 ); - } - if( mut->pierce_dmg_bonus > 0 ) { - per_hand += std::min( get_skill_level( skill_unarmed ) / 2, 4 ); - } - } - } - empty_hand_base_damage += per_hand; // First hand - if( left_empty && right_empty ) { - // Second hand - empty_hand_base_damage += per_hand; - } - return empty_hand_base_damage; - } -} - bool Character::uncanny_dodge() { return character_funcs::try_uncanny_dodge( *this ); diff --git a/src/character.h b/src/character.h index ae6ece27c5db..5876c41f0e4b 100644 --- a/src/character.h +++ b/src/character.h @@ -657,8 +657,6 @@ class Character : public Creature, public location_visitable int attack_cost( const item &weap ) const; /** Gets melee accuracy component from weapon+skills */ float get_hit_weapon( const item &weap ) const; - /** Gets the minimum combined bare-handed damage from skill, bionics, and mutations for display functions */ - int display_empty_handed_base_damage() const; // If average == true, adds expected values of random rolls instead of rolling. /** Adds all 3 types of physical damage to instance */ diff --git a/src/character_display.cpp b/src/character_display.cpp index 2ccaa476b044..cc2864615732 100644 --- a/src/character_display.cpp +++ b/src/character_display.cpp @@ -642,6 +642,57 @@ struct HeaderSkill { } }; +int display_empty_handed_base_damage( Character &you ) const +{ + int empty_hand_base_damage = you.get_skill_level( skill_unarmed ) * 2; + const bool left_empty = !you.natural_attack_restricted_on( bodypart_id( "hand_l" ) ); + const bool right_empty = !you.natural_attack_restricted_on( bodypart_id( "hand_r" ) ); + + if( !left_empty && !right_empty ) { + // Mutation and bionic bonuses don't matter so just print unarmed bonus + return empty_hand_base_damage; + } else { + + // Mutation and bionic bonuses double if both hands are free + int per_hand = 0; + if( you.has_bionic( bionic_id( "bio_razors" ) ) ) { + per_hand += 4; + } + for( const trait_id &mut : you.get_mutations() ) { + if( mut->flags.count( trait_flag_NEED_ACTIVE_TO_MELEE ) > 0 && + !has_active_mutation( mut ) ) { + continue; + } + // Fixed bonuses are nice and simple + per_hand += mut->bash_dmg_bonus + mut->cut_dmg_bonus + mut->pierce_dmg_bonus; + + // Random bonuses are more fiddly, since we want baseline numbers let's just report the minimum + const std::pair rand_bash = mut->rand_bash_bonus; + const std::pair rand_cut = mut->rand_cut_bonus; + per_hand += rand_bash.first + rand_cut.first; + + // Extra skill bonus is also fairly simple, but each type of fixed bonus can trigger it separately + if( mut->flags.count( trait_flag_UNARMED_BONUS ) > 0 ) { + if( mut->bash_dmg_bonus > 0 ) { + per_hand += std::min( get_skill_level( skill_unarmed ) / 2, 4 ); + } + if( mut->cut_dmg_bonus > 0 ) { + per_hand += std::min( get_skill_level( skill_unarmed ) / 2, 4 ); + } + if( mut->pierce_dmg_bonus > 0 ) { + per_hand += std::min( get_skill_level( skill_unarmed ) / 2, 4 ); + } + } + } + empty_hand_base_damage += per_hand; // First hand + if( left_empty && right_empty ) { + // Second hand + empty_hand_base_damage += per_hand; + } + return empty_hand_base_damage; + } +} + static void draw_skills_tab( const catacurses::window &w_skills, Character &you, unsigned int line, const player_display_tab curtab, std::vector &skillslist, @@ -726,7 +777,7 @@ static void draw_skills_tab( const catacurses::window &w_skills, } if( aSkill->ident() == skill_id( "unarmed" ) ) { mvwprintz( w_skills, point( 15, y_pos ), cstatus, "%3d/%-2d(%2d%%)", - you.display_empty_handed_base_damage(), level_num, exercise < 0 ? 0 : exercise ); + display_empty_handed_base_damage( you ), level_num, exercise < 0 ? 0 : exercise ); } else { mvwprintz( w_skills, point( 19, y_pos ), cstatus, "%-2d(%2d%%)", level_num, diff --git a/src/character_display.h b/src/character_display.h index 021a7063d676..2b8928c97428 100644 --- a/src/character_display.h +++ b/src/character_display.h @@ -35,6 +35,10 @@ void disp_info( Character &ch ); */ void upgrade_stat_prompt( avatar &you, const character_stat &stat ); +/** Gets the minimum combined bare-handed damage from skill, bionics, and mutations for display functions */ +int display_empty_handed_base_damage( Character &you ) const; + } // namespace character_display + #endif // CATA_SRC_CHARACTER_DISPLAY_H diff --git a/src/player.cpp b/src/player.cpp index 6d26ced5c8c2..d075649e94c5 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -18,6 +18,7 @@ #include "bionics.h" #include "cata_utility.h" #include "catacharset.h" +#include "character_display.h" #include "character_functions.h" #include "character_effects.h" #include "character_martial_arts.h" @@ -226,7 +227,7 @@ bool character_martial_arts::pick_style( const avatar &you ) // Style selecti "Effective dodge rating: %4.1f\n" "Press [%s] for more info.\n" ), you.get_str(), you.get_dex(), you.get_per(), you.get_int(), - you.display_empty_handed_base_damage(), you.get_dodge(), ctxt.get_desc( "SHOW_DESCRIPTION" ) ); + character_display::display_empty_handed_base_damage( you ), you.get_dodge(), ctxt.get_desc( "SHOW_DESCRIPTION" ) ); ma_style_callback callback( static_cast( STYLE_OFFSET ), selectable_styles ); kmenu.callback = &callback; kmenu.input_category = "MELEE_STYLE_PICKER"; From 30f390777494881910767e6f4d507c72bcad7620 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 02:41:50 +0000 Subject: [PATCH 3/9] style(autofix.ci): automated formatting --- src/player.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/player.cpp b/src/player.cpp index d075649e94c5..12b14cb9fa7a 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -227,7 +227,8 @@ bool character_martial_arts::pick_style( const avatar &you ) // Style selecti "Effective dodge rating: %4.1f\n" "Press [%s] for more info.\n" ), you.get_str(), you.get_dex(), you.get_per(), you.get_int(), - character_display::display_empty_handed_base_damage( you ), you.get_dodge(), ctxt.get_desc( "SHOW_DESCRIPTION" ) ); + character_display::display_empty_handed_base_damage( you ), you.get_dodge(), + ctxt.get_desc( "SHOW_DESCRIPTION" ) ); ma_style_callback callback( static_cast( STYLE_OFFSET ), selectable_styles ); kmenu.callback = &callback; kmenu.input_category = "MELEE_STYLE_PICKER"; From 414e3b09ecd8d6b2dd18c0b90abd5b054e3ec66d Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Tue, 20 Feb 2024 20:58:04 -0600 Subject: [PATCH 4/9] Update src/character_display.h Co-authored-by: scarf --- src/character_display.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/character_display.h b/src/character_display.h index 2b8928c97428..53c1ad6359db 100644 --- a/src/character_display.h +++ b/src/character_display.h @@ -36,7 +36,7 @@ void disp_info( Character &ch ); void upgrade_stat_prompt( avatar &you, const character_stat &stat ); /** Gets the minimum combined bare-handed damage from skill, bionics, and mutations for display functions */ -int display_empty_handed_base_damage( Character &you ) const; +int display_empty_handed_base_damage( Character &you ); } // namespace character_display From 1c2919197163068436b96ecc36c585326a733f53 Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Tue, 20 Feb 2024 21:21:34 -0600 Subject: [PATCH 5/9] Update character_display.cpp --- src/character_display.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/character_display.cpp b/src/character_display.cpp index cc2864615732..f86a6d8f5bd6 100644 --- a/src/character_display.cpp +++ b/src/character_display.cpp @@ -36,6 +36,7 @@ #include "weather.h" static const skill_id skill_swimming( "swimming" ); +static const skill_id skill_unarmed( "unarmed" ); static const std::string title_STATS = translate_marker( "STATS" ); static const std::string title_ENCUMB = translate_marker( "ENCUMBRANCE AND WARMTH" ); @@ -45,6 +46,9 @@ static const std::string title_SKILLS = translate_marker( "SKILLS" ); static const std::string title_BIONICS = translate_marker( "BIONICS" ); static const std::string title_TRAITS = translate_marker( "TRAITS" ); +static const trait_flag_str_id trait_flag_NEED_ACTIVE_TO_MELEE( "NEED_ACTIVE_TO_MELEE" ); +static const trait_flag_str_id trait_flag_UNARMED_BONUS( "UNARMED_BONUS" ); + // use this instead of having to type out 26 spaces like before static const std::string header_spaces( 26, ' ' ); @@ -642,7 +646,7 @@ struct HeaderSkill { } }; -int display_empty_handed_base_damage( Character &you ) const +int display_empty_handed_base_damage( Character &you ) { int empty_hand_base_damage = you.get_skill_level( skill_unarmed ) * 2; const bool left_empty = !you.natural_attack_restricted_on( bodypart_id( "hand_l" ) ); @@ -660,7 +664,7 @@ int display_empty_handed_base_damage( Character &you ) const } for( const trait_id &mut : you.get_mutations() ) { if( mut->flags.count( trait_flag_NEED_ACTIVE_TO_MELEE ) > 0 && - !has_active_mutation( mut ) ) { + !you.has_active_mutation( mut ) ) { continue; } // Fixed bonuses are nice and simple @@ -674,13 +678,13 @@ int display_empty_handed_base_damage( Character &you ) const // Extra skill bonus is also fairly simple, but each type of fixed bonus can trigger it separately if( mut->flags.count( trait_flag_UNARMED_BONUS ) > 0 ) { if( mut->bash_dmg_bonus > 0 ) { - per_hand += std::min( get_skill_level( skill_unarmed ) / 2, 4 ); + per_hand += std::min( you.get_skill_level( skill_unarmed ) / 2, 4 ); } if( mut->cut_dmg_bonus > 0 ) { - per_hand += std::min( get_skill_level( skill_unarmed ) / 2, 4 ); + per_hand += std::min( you.get_skill_level( skill_unarmed ) / 2, 4 ); } if( mut->pierce_dmg_bonus > 0 ) { - per_hand += std::min( get_skill_level( skill_unarmed ) / 2, 4 ); + per_hand += std::min( you.get_skill_level( skill_unarmed ) / 2, 4 ); } } } From a8bcb3ecd59a03fa47f4599e5404ef6da520afe0 Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Tue, 20 Feb 2024 21:35:52 -0600 Subject: [PATCH 6/9] Apply suggestions from code review Co-authored-by: scarf --- src/character_display.cpp | 2 +- src/character_display.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/character_display.cpp b/src/character_display.cpp index f86a6d8f5bd6..200db61fde27 100644 --- a/src/character_display.cpp +++ b/src/character_display.cpp @@ -646,7 +646,7 @@ struct HeaderSkill { } }; -int display_empty_handed_base_damage( Character &you ) +int display_empty_handed_base_damage( const Character &you ) { int empty_hand_base_damage = you.get_skill_level( skill_unarmed ) * 2; const bool left_empty = !you.natural_attack_restricted_on( bodypart_id( "hand_l" ) ); diff --git a/src/character_display.h b/src/character_display.h index 53c1ad6359db..3d45dadb7335 100644 --- a/src/character_display.h +++ b/src/character_display.h @@ -36,7 +36,7 @@ void disp_info( Character &ch ); void upgrade_stat_prompt( avatar &you, const character_stat &stat ); /** Gets the minimum combined bare-handed damage from skill, bionics, and mutations for display functions */ -int display_empty_handed_base_damage( Character &you ); +int display_empty_handed_base_damage( const Character &you ); } // namespace character_display From 19da502a8e4c338a2cca6cc9302b6e807f3ab6dc Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Tue, 20 Feb 2024 22:00:59 -0600 Subject: [PATCH 7/9] Update src/character_display.cpp Co-authored-by: scarf --- src/character_display.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/character_display.cpp b/src/character_display.cpp index 200db61fde27..c9caf55c5a0b 100644 --- a/src/character_display.cpp +++ b/src/character_display.cpp @@ -646,7 +646,7 @@ struct HeaderSkill { } }; -int display_empty_handed_base_damage( const Character &you ) +int character_display::display_empty_handed_base_damage( const Character &you ) { int empty_hand_base_damage = you.get_skill_level( skill_unarmed ) * 2; const bool left_empty = !you.natural_attack_restricted_on( bodypart_id( "hand_l" ) ); From 919376a3d885a8d52fe24b08d3ab8d5d76d12952 Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Tue, 20 Feb 2024 22:14:35 -0600 Subject: [PATCH 8/9] And fix --- src/character_display.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/character_display.cpp b/src/character_display.cpp index c9caf55c5a0b..694bab91d5f6 100644 --- a/src/character_display.cpp +++ b/src/character_display.cpp @@ -781,7 +781,7 @@ static void draw_skills_tab( const catacurses::window &w_skills, } if( aSkill->ident() == skill_id( "unarmed" ) ) { mvwprintz( w_skills, point( 15, y_pos ), cstatus, "%3d/%-2d(%2d%%)", - display_empty_handed_base_damage( you ), level_num, exercise < 0 ? 0 : exercise ); + character_display::display_empty_handed_base_damage( you ), level_num, exercise < 0 ? 0 : exercise ); } else { mvwprintz( w_skills, point( 19, y_pos ), cstatus, "%-2d(%2d%%)", level_num, From 2b55eaa593563d9de5ba2128fe7c4b843edebadd Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 04:15:30 +0000 Subject: [PATCH 9/9] style(autofix.ci): automated formatting --- src/character_display.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/character_display.cpp b/src/character_display.cpp index 694bab91d5f6..e0cf450ddbc4 100644 --- a/src/character_display.cpp +++ b/src/character_display.cpp @@ -781,7 +781,8 @@ static void draw_skills_tab( const catacurses::window &w_skills, } if( aSkill->ident() == skill_id( "unarmed" ) ) { mvwprintz( w_skills, point( 15, y_pos ), cstatus, "%3d/%-2d(%2d%%)", - character_display::display_empty_handed_base_damage( you ), level_num, exercise < 0 ? 0 : exercise ); + character_display::display_empty_handed_base_damage( you ), level_num, + exercise < 0 ? 0 : exercise ); } else { mvwprintz( w_skills, point( 19, y_pos ), cstatus, "%-2d(%2d%%)", level_num,