summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player-stats.h
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2010-04-03 02:00:46 +0200
committerRobert Vollmert <rvollmert@gmx.net>2010-04-03 02:12:23 +0200
commitfc0b40fd5b43850b9998e3497ae4f9c823cf8109 (patch)
treedf83d16ac51548e8e8117d05b027ee30e17bb00e /crawl-ref/source/player-stats.h
parent56764605f0227b972a5471ccfaab32bdfa93fc3d (diff)
downloadcrawl-ref-fc0b40fd5b43850b9998e3497ae4f9c823cf8109.tar.gz
crawl-ref-fc0b40fd5b43850b9998e3497ae4f9c823cf8109.zip
Remove stat insta-death.
This is more proof-of-concept than necessarily a final implementation, but I think with appropriate effects, the approach can work. There is a new field player::stat_zero, counting the number of turns a stat has been at zero. It counts up while the stat is <= 0, and counts down while it is > 0. When a stat reaches <= 0, the corresponding counter is initialized to 10, so "stat death" has some lasting effect even if you undo it immediately. When the counter reaches 100, you die of stat loss as before. As a preliminary zero stat effect, any stat with stat_zero[stat] > 0 has a slowing effect (double base delay). This should be enough to discourage running around with zero stats for the moment. Stats can now become negative, but the negative numbers are only used for printing to the stats area. All other code gets a non-negative number. There may be code that doesn't handle a stat at zero well currently.
Diffstat (limited to 'crawl-ref/source/player-stats.h')
-rw-r--r--crawl-ref/source/player-stats.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/player-stats.h b/crawl-ref/source/player-stats.h
index 138b3c9caf..6ae91d1b1c 100644
--- a/crawl-ref/source/player-stats.h
+++ b/crawl-ref/source/player-stats.h
@@ -3,6 +3,7 @@
enum stat_desc_type
{
+ SD_NAME,
SD_LOSS,
SD_DECREASE,
SD_INCREASE,
@@ -38,4 +39,6 @@ bool lose_stat(stat_type which_stat, unsigned char stat_loss,
bool restore_stat(stat_type which_stat, unsigned char stat_gain,
bool suppress_msg, bool recovery = false);
+void update_stat_zero();
+
#endif