diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-10 11:23:32 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-10 11:23:32 +0000 |
commit | df0686dc843b95138a388d2d1edeb16a96e6ca80 (patch) | |
tree | 8967fbacdcae1d9c5e4fcf4284ddc12d2f21feb8 /crawl-ref/source/religion.cc | |
parent | 1edb944f9eb349a498c395d8b30959d5be4c4df1 (diff) | |
download | crawl-ref-df0686dc843b95138a388d2d1edeb16a96e6ca80.tar.gz crawl-ref-df0686dc843b95138a388d2d1edeb16a96e6ca80.zip |
Good gods' passive piety gain now fixes penance and gift timeouts even if piety
>= 150 (Erik).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1010 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index f8b7bd12ac..a8a0aff55f 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -1621,9 +1621,9 @@ void gain_piety(char pgn) } else { - // Sif Muna has a gentler taper off because training because + // Sif Muna has a gentler taper off because training becomes // naturally slower as the player gains in spell skills. - if ((you.piety > 220) || + if ((you.piety > 199) || (you.piety > 150 && one_chance_in(5))) return; } @@ -2585,6 +2585,12 @@ void offer_corpse(int corpse) did_god_conduct(DID_DEDICATED_BUTCHERY, 10); } // end offer_corpse() +// Returns true if the player can use the good gods' passive piety gain. +static bool need_free_piety() +{ + return (you.piety < 150 || you.gift_timeout || you.penance[you.religion]); +} + //jmf: moved stuff from items::handle_time() void handle_god_time(void) { @@ -2645,12 +2651,12 @@ void handle_god_time(void) case GOD_ZIN: // These gods like long-standing worshippers case GOD_ELYVILON: - if (you.piety < 150 && one_chance_in(20)) + if (need_free_piety() && one_chance_in(20)) gain_piety(1); break; case GOD_SHINING_ONE: - if (you.piety < 150 && one_chance_in(15)) + if (need_free_piety() && one_chance_in(15)) gain_piety(1); break; |