diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-22 03:20:20 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-22 03:20:20 +0000 |
commit | 8fa57e13893ca0867458e4f22dd2b092088a22a2 (patch) | |
tree | aaf93a3996db36b6bbc9da4e6fdda9385de76054 /crawl-ref/source/religion.cc | |
parent | 3d7c4206e9e91b386958a49cf8a834dcdd736032 (diff) | |
download | crawl-ref-8fa57e13893ca0867458e4f22dd2b092088a22a2.tar.gz crawl-ref-8fa57e13893ca0867458e4f22dd2b092088a22a2.zip |
Adjust TSO's blessings again, making the permanence threshold of the
"extended stay" relative instead of hardcoded, so that it's easier to
reach.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4459 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index c7736be279..598268eab3 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -909,15 +909,21 @@ static bool _tso_blessing_extend_stay(monsters *mon) mon_enchant abj = mon->get_ench(ENCH_ABJ); + const int increase = 350 + random2(350); + const int threshold = (increase + you.piety) * 2; + // Extend the time an abjurable monster has before disappearing. - abj.duration += 300 + random2(300); + abj.duration += increase; // If the extended stay is long enough, make it permanent. Note // that we have to delete the enchantment without removing the // enchantment effect, in order to keep the monster from // disappearing. - if (abj.duration > 2999) + if (abj.duration >= threshold) + { mon->del_ench(ENCH_ABJ, true, false); + mpr("Permanent.", MSGCH_DIAGNOSTICS); + } else mon->update_ench(abj); @@ -1135,7 +1141,7 @@ bool bless_follower(monsters* follower, { // Extend a monster's stay if it's abjurable, optionally // making it friendly if it's charmed. If neither is - // possible, either deliberately fall through or get out. + // possible, deliberately fall through. bool more_time = _tso_blessing_extend_stay(mon); bool friendliness = false; @@ -1151,9 +1157,6 @@ bool bless_follower(monsters* follower, if (more_time || friendliness) break; - - if (coinflip()) - return false; } case GOD_BEOGH: |