From 7fc4246704b35d5327dc6116d460f994d0f0c3b0 Mon Sep 17 00:00:00 2001 From: dolorous Date: Fri, 11 Apr 2008 05:16:15 +0000 Subject: Add more blessing adjustments, which should make TSO's "friendliness" and "extended stay" blessings a bit more common. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4187 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/religion.cc | 96 ++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 49 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index c13d20f902..e5523f698a 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -1151,63 +1151,61 @@ bool bless_follower(monsters* follower, } } - // Either remove harmful ailments from a monster... - if (coinflip() && blessing_balms(mon)) - { - result = "divine balms"; - goto blessing_done; - } - else + switch (god) { - switch (god) + case GOD_SHINING_ONE: { - case GOD_SHINING_ONE: + // Make a monster friendly if it's charmed, optionally + // extending its stay if it's abjurable. If neither is + // possible, deliberately fall through. + bool friendliness = tso_blessing_friendliness(mon); + bool more_time = false; + + if (!friendliness || coinflip()) + more_time = tso_blessing_extend_stay(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: + { + // Remove harmful ailments from a monster, or give it full + // healing, optionally giving it one extra hit point, if + // possible. + if (coinflip() && blessing_balms(mon)) { - // ...make it friendly if it's charmed, optionally - // extending its stay if it's abjurable. If neither is - // possible, deliberately fall through. - bool friendliness = tso_blessing_friendliness(mon); - bool more_time = false; - - if (!friendliness || coinflip()) - more_time = tso_blessing_extend_stay(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; + result = "divine balms"; + goto blessing_done; } - case GOD_BEOGH: - { - // ...or give it full healing, optionally giving it one - // extra hit point. - bool healing = blessing_healing(mon, false); - bool vigour = false; - - if (!healing || coinflip()) - vigour = blessing_healing(mon, true); - - if (healing && vigour) - result = "healing and extra vigour"; - else if (healing) - result = "healing"; - else if (vigour) - result = "extra vigour"; - else - return false; + bool healing = blessing_healing(mon, false); + bool vigour = false; - break; - } + if (!healing || coinflip()) + vigour = blessing_healing(mon, true); - default: - break; + if (healing && vigour) + result = "healing and extra vigour"; + else if (healing) + result = "healing"; + else if (vigour) + result = "extra vigour"; + else + return false; + + break; } + + default: + break; } blessing_done: -- cgit v1.2.3-54-g00ecf