diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-17 09:16:56 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-17 09:16:56 +0000 |
commit | c2864252f1c893a9ce7422e9b1fbe43073d6dac9 (patch) | |
tree | 78e8159399c849cb039e3aad597c3a4f47331eb7 /crawl-ref/source/acr.cc | |
parent | 85b49e81682b73aaaf9c2a6706ed108b87d8611f (diff) | |
download | crawl-ref-c2864252f1c893a9ce7422e9b1fbe43073d6dac9.tar.gz crawl-ref-c2864252f1c893a9ce7422e9b1fbe43073d6dac9.zip |
Adjust Zin's donation routines to only take half your money at once, to
preserve the piety pool when it would cause an overflow, and to increase
the maximum value such that donations won't be lost in a normal game.
I'm not sure what upper limit to set, especially considering that this
is supposed to support DOS and possibly 16-bit values, so, seeing as
durations are signed ints, I've set it to 32767, which you can only get
all at once with a donation of a little less than 500000 gold.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8501 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r-- | crawl-ref/source/acr.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 46c5be41f6..35d4856076 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -2966,9 +2966,10 @@ static void _decrement_durations() // (killing monsters, offering items, ...) might be confusing for characters // of other religions. // For now, though, keep information about what happened hidden. - if (you.duration[DUR_PIETY_POOL] > 0 && one_chance_in(5)) + if (you.piety < MAX_PIETY && you.duration[DUR_PIETY_POOL] > 0 + && one_chance_in(5)) { - you.duration[DUR_PIETY_POOL]--; // Decrease even if piety at maximum. + you.duration[DUR_PIETY_POOL]--; gain_piety(1); #if DEBUG_DIAGNOSTICS || DEBUG_SACRIFICE || DEBUG_PIETY |