diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-02-01 22:29:28 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-02-01 22:29:28 +0000 |
commit | 8190b0f9eafb99e6e8d8d510bcf3264dcc5ff71d (patch) | |
tree | 48bfe1f5c648ef2208878eca0ae0c068885b6f91 /crawl-ref/source/religion.cc | |
parent | 633cc4c9ff8c079b83fa27f531c320342cf26873 (diff) | |
download | crawl-ref-8190b0f9eafb99e6e8d8d510bcf3264dcc5ff71d.tar.gz crawl-ref-8190b0f9eafb99e6e8d8d510bcf3264dcc5ff71d.zip |
A few tweaks of Zin invocations, thanks to David Ramsey.
Donating money will now also affect penance (along with special
messages). I just used gain_piety(1) for this - the downside is
that now it also respects the slower piety growth of the actual
piety gain only happening in 66% (piety > 100) or 33%
(piety > 150) of piety leaking in (and out of the pool!)
Zin will provide sustenance even under penance, and Recite
trains Invocations now.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3383 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index ea25b302fc..6195816558 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -744,8 +744,8 @@ static void do_god_gift(bool prayed_for) // Consider a gift if we don't have a timeout and weren't // already praying when we prayed. - if (!player_under_penance() - && (!you.gift_timeout || you.religion == GOD_ZIN)) + if (!player_under_penance() && !you.gift_timeout + || you.religion == GOD_ZIN) { bool success = false; @@ -3334,7 +3334,22 @@ void offer_items() } int estimated_piety = you.piety + donation_value; - std::string result = god_name(GOD_ZIN) + " will soon be "; + + 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]) + { + if (estimated_piety >= you.penance[GOD_ZIN]) + mpr("You feel that soon you will be absolved of all your sins."); + else + mpr("You feel that soon your burden of sins will be lighter."); + return; + } + + std::string result = "You feel that " + god_name(GOD_ZIN) + + " will soon be "; result += (estimated_piety > 130) ? "exalted by your worship" : @@ -3351,10 +3366,6 @@ void offer_items() result += "."; mpr(result.c_str()); - - you.duration[DUR_PIETY_POOL] += donation_value; - if (you.duration[DUR_PIETY_POOL] > 500) - you.duration[DUR_PIETY_POOL] = 500; return; // doesn't accept anything else for sacrifice } |