summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-04 23:57:21 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-04 23:57:21 +0000
commit288e44e2590d8791f0841a70ef50108582990278 (patch)
tree558d104f241393407765b96b89e6ac69b726af50 /crawl-ref/source/player.cc
parent763ef75bd1f9c97c9f1ebee467bde287f156f483 (diff)
downloadcrawl-ref-288e44e2590d8791f0841a70ef50108582990278.tar.gz
crawl-ref-288e44e2590d8791f0841a70ef50108582990278.zip
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
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc18
1 files changed, 13 insertions, 5 deletions
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);