summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-09 22:40:12 +0000
committerpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-09 22:40:12 +0000
commit9a3546dd1876ad7ebd4f503fe74d6b502eb41c7f (patch)
treee9bbb373c86d11c9cb3c330edc1087ca05c840ee /crawl-ref/source/player.cc
parent2f9171efc49235f06e2b49ecee51f0ca46867a19 (diff)
downloadcrawl-ref-9a3546dd1876ad7ebd4f503fe74d6b502eb41c7f.tar.gz
crawl-ref-9a3546dd1876ad7ebd4f503fe74d6b502eb41c7f.zip
Apply 1895318, with some cleanup.
This patch implements dploog's suggestion of hysteresis on piety. gain/lose_piety() adjust you.piety_hysteresis first; you.piety is modified with the leftovers (if any) once the hysteresis reaches its limit. Players start out at the upper end of the hysteresis region, meaning there is no lag on piety increase, but a lag on piety decrease. Hysteresis value set by "#define PIETY_HYSTERESIS_LIMIT 1" Does not break old saves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3562 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 2e0d3968fd..850030f30f 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5208,6 +5208,7 @@ void player::init()
religion = GOD_NO_GOD;
piety = 0;
+ piety_hysteresis = 0;
gift_timeout = 0;