diff options
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 733759432c..fb6b425834 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -2506,9 +2506,7 @@ void gain_exp( unsigned int exp_gained, unsigned int* actual_gain, const unsigned long old_exp = you.experience; const int old_avail = you.exp_available; -#if DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "gain_exp: %d", exp_gained ); -#endif + dprf("gain_exp: %d", exp_gained ); if (you.experience + exp_gained > (unsigned int)MAX_EXP_TOTAL) you.experience = MAX_EXP_TOTAL; @@ -3810,9 +3808,7 @@ void display_char_status() // character evaluates their ability to sneak around: mprf("You feel %s.", stealth_desc(check_stealth()).c_str()); -#if DEBUG_DIAGNOSTICS - mprf("stealth: %d", check_stealth()); -#endif + dprf("stealth: %d", check_stealth()); } bool player_item_conserve(bool calc_unid) @@ -5977,7 +5973,7 @@ bool player::can_go_berserk() const return (can_go_berserk(false)); } -bool player::can_go_berserk(bool verbose) const +bool player::can_go_berserk(bool verbose, bool no_clarity) const { if (berserk()) { @@ -6013,6 +6009,25 @@ bool player::can_go_berserk(bool verbose) const return (false); } + if (!no_clarity && player_mental_clarity(true)) + { + if (verbose) + { + mpr("You're too calm and focused to rage."); + item_def *amu; + if (!player_mental_clarity(false) && wearing_amulet(AMU_CLARITY) + && (amu = &you.inv[you.equip[EQ_AMULET]]) && !item_type_known(*amu)) + { + set_ident_type(amu->base_type, amu->sub_type, ID_KNOWN_TYPE); + set_ident_flags(*amu, ISFLAG_KNOW_PROPERTIES); + mprf("You are wearing: %s", + amu->name(DESC_INVENTORY_EQUIP).c_str()); + } + } + + return (false); + } + return (true); } @@ -6898,7 +6913,8 @@ bool player::visible_to(const actor *looker) const bool player::backlit(bool check_haloed) const { return (get_contamination_level() > 0 || duration[DUR_CORONA] - || (check_haloed ? haloed() : false)); + || (check_haloed ? haloed() : false) + || duration[DUR_LIQUID_FLAMES]); } // This is the imperative version. |