diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-30 22:47:52 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-30 22:47:52 +0000 |
commit | d42f9c618e7bab994fa9cf5c243d6905e5eb29b0 (patch) | |
tree | 39bbdea00a16cff51e097b3a5a6f5b9607c0ea8d /crawl-ref/source/religion.cc | |
parent | fee3247c619f8ffd2d77c0d0a1c1bc7f24014f1b (diff) | |
download | crawl-ref-d42f9c618e7bab994fa9cf5c243d6905e5eb29b0.tar.gz crawl-ref-d42f9c618e7bab994fa9cf5c243d6905e5eb29b0.zip |
Adjust TSO's blessings of permanent friendliness and extended abjuration
time.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3960 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 7a5286e53c..00e75b4fc9 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -911,7 +911,12 @@ static bool tso_blessing_extend_stay(monsters *mon) mon_enchant abj = mon->get_ench(ENCH_ABJ); - abj.duration = abj.duration * 3 / 2; + // Extend the time an abjurable monster has before disappearing. + abj.duration += 100 + random2(300); + + // If the extended stay is long enough, make it permanent. + if (abj.duration > 370) + mon->del_ench(ENCH_ABJ, true); mon->update_ench(abj); @@ -1124,19 +1129,29 @@ bool bless_follower(monsters* follower, switch (god) { case GOD_SHINING_ONE: - // ...extend its stay if it's a temporary summon, or - // make it friendly if it's charmed. If neither is + { + // ...make it friendly if it's charmed, optionally + // extending its stay if it's abjurable. If neither is // possible, deliberately fall through. - if (coinflip() && tso_blessing_extend_stay(mon)) + bool friendliness = tso_blessing_friendliness(mon); + bool more_time = false; + + if (!friendliness || coinflip()) { - result = "more time in this world"; - break; + if (tso_blessing_extend_stay(mon)) + more_time = true; } - else if (tso_blessing_friendliness(mon)) - { + + if (friendliness && more_time) + result = "friendliness and more time in this world"; + else if (friendliness) result = "friendliness"; + else if (more_time) + result = "more time in this world"; + + if (friendliness || more_time) break; - } + } case GOD_BEOGH: { |