From 288e44e2590d8791f0841a70ef50108582990278 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Tue, 4 Sep 2007 23:57:21 +0000 Subject: Another one with a multitude of (smallish) changes. - Fixed 1788033, 1787436, 1782862. - Modified basename, so it's a bit more useful and it's seeing use when not switching back during butcher. - Mummy Wanderers won't get a potion. - NOTE_XP_LEVEL_CHANGE notes "real" hp/mp. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2055 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/player.cc | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index b6b43e2d62..42b1138904 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -3008,16 +3008,24 @@ void level_change(bool skip_ability_increase) if (you.magic_points < 0) you.magic_points = 0; + if (Options.use_notes) + { + // calculate "real" values for note-taking, i.e. ignore Berserk, + // transformations or equipped items + calc_hp(true); + calc_mp(true); + + char buf[200]; + sprintf(buf, "HP: %d/%d MP: %d/%d", + you.hp, you.hp_max, you.magic_points, you.max_magic_points); + take_note(Note(NOTE_XP_LEVEL_CHANGE, you.experience_level, 0, buf)); + } + // recalculate for game calc_hp(); calc_mp(); if (you.experience_level > you.max_level) you.max_level = you.experience_level; - - char buf[200]; - sprintf(buf, "HP: %d/%d MP: %d/%d", - you.hp, you.hp_max, you.magic_points, you.max_magic_points); - take_note(Note(NOTE_XP_LEVEL_CHANGE, you.experience_level, 0, buf)); xom_is_stimulated(16); -- cgit v1.2.3-54-g00ecf