summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player-stats.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-10-26 15:52:11 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-10-26 15:52:11 +0200
commit0527097542cc5e0ab13080f569acdb70c6dbe422 (patch)
treea4bf36e14f16e02c116b6ed0a9f5f33da5045a5a /crawl-ref/source/player-stats.cc
parent9b62ea2972827cb672ff2e0b77991f4f3b29d1df (diff)
downloadcrawl-ref-0527097542cc5e0ab13080f569acdb70c6dbe422.tar.gz
crawl-ref-0527097542cc5e0ab13080f569acdb70c6dbe422.zip
Make a note when a stat drops to <= 0.
Diffstat (limited to 'crawl-ref/source/player-stats.cc')
-rw-r--r--crawl-ref/source/player-stats.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/player-stats.cc b/crawl-ref/source/player-stats.cc
index 40d4dec72f..bb25251da4 100644
--- a/crawl-ref/source/player-stats.cc
+++ b/crawl-ref/source/player-stats.cc
@@ -13,6 +13,7 @@
#include "misc.h"
#include "mon-util.h"
#include "monster.h"
+#include "notes.h"
#include "ouch.h"
#include "player.h"
#include "religion.h"
@@ -640,6 +641,8 @@ static void _handle_stat_change(stat_type stat, const char* cause, bool see_sour
you.stat_zero[stat] = STAT_ZERO_START;
you.stat_zero_cause[stat] = cause;
mprf(MSGCH_WARN, "You have lost your %s.", stat_desc(stat, SD_NAME));
+ take_note(Note(NOTE_MESSAGE, 0, 0, make_stringf("Lost %s.",
+ stat_desc(stat, SD_NAME)).c_str()), true);
// 2 to 5 turns of paralysis (XXX: decremented right away?)
you.increase_duration(DUR_PARALYSIS, 2 + random2(3));
}