diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-18 19:57:48 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-18 19:57:48 +0000 |
commit | ff00ffd9da330a94bd282bcc127157672e589a9a (patch) | |
tree | 1e24a45b62d2112279b7043594c9c4638bbe54d1 /crawl-ref/source/religion.cc | |
parent | cb1d25a9a8371edb63bc1721b616df12c4e790c2 (diff) | |
download | crawl-ref-ff00ffd9da330a94bd282bcc127157672e589a9a.tar.gz crawl-ref-ff00ffd9da330a94bd282bcc127157672e589a9a.zip |
Add miscellaneous minor fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7476 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 432f04656b..2549754bf5 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -2440,7 +2440,7 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known, switch (you.religion) { case GOD_ELYVILON: // healer god cares more about this - if (you.penance[GOD_ELYVILON]) + if (player_under_penance()) penance = 1; // if already under penance smaller bonus else penance = level; @@ -5715,7 +5715,7 @@ void offer_items() // donate gold to gain piety distributed over time if (you.religion == GOD_ZIN) { - if (!you.gold) + if (you.gold == 0) { mpr("You don't have anything to sacrifice."); return; @@ -5724,7 +5724,8 @@ void offer_items() if (!yesno("Do you wish to part with all of your money?", true, 'n')) return; - const int donation_value = (int) (you.gold/200 * log((double)you.gold)); + const int donation_value = + (int)(you.gold / MAX_PIETY * log((double)you.gold)); #if DEBUG_DIAGNOSTICS || DEBUG_SACRIFICE || DEBUG_PIETY mprf(MSGCH_DIAGNOSTICS, "A donation of $%d amounts to an " "increase of piety by %d.", you.gold, donation_value); @@ -5741,13 +5742,13 @@ void offer_items() return; } - const int estimated_piety = you.piety + donation_value; - you.duration[DUR_PIETY_POOL] += donation_value; if (you.duration[DUR_PIETY_POOL] > 500) you.duration[DUR_PIETY_POOL] = 500; - if (you.penance[GOD_ZIN]) + const int estimated_piety = you.piety + you.duration[DUR_PIETY_POOL]; + + if (player_under_penance()) { if (estimated_piety >= you.penance[GOD_ZIN]) mpr("You feel that you will soon be absolved of all your sins."); |