diff options
-rw-r--r-- | crawl-ref/source/beam.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/ouch.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 26 | ||||
-rw-r--r-- | crawl-ref/source/religion.h | 2 |
4 files changed, 16 insertions, 27 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index c77948cf80..7045e08851 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -1777,13 +1777,14 @@ int mons_adjust_flavoured( monsters *monster, bolt &pbolt, break; case BEAM_HOLY: // flame of cleansing - if (mons_is_unholy(monster)) - hurted = (hurted * 3) / 2; - else if (mons_is_holy(monster) - || is_good_god(you.religion) && is_follower(monster)) + if (mons_is_holy(monster) + || (is_good_god(you.religion) + && (is_follower(monster) || mons_neutral(monster)))) { hurted = 0; } + else if (mons_is_unholy(monster)) + hurted = (hurted * 3) / 2; else if (!mons_is_evil(monster)) hurted /= 2; diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index fa15841a3a..46f7e76462 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -241,10 +241,10 @@ int check_your_resists(int hurted, beam_type flavour) break; case BEAM_HOLY: - if (you.is_undead || you.species != SP_DEMONSPAWN) - hurted = (hurted * 3) / 2; - else if (is_good_god(you.religion)) + if (is_good_god(you.religion)) hurted = 0; + else if (you.is_undead || you.species != SP_DEMONSPAWN) + hurted = (hurted * 3) / 2; else if (!is_evil_god(you.religion)) hurted /= 2; diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 1ff77bcc29..fbb588ddfd 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -773,7 +773,7 @@ static void _give_nemelex_gift() } } -bool is_tso_follower(const monsters* mon) +bool is_good_follower(const monsters* mon) { return (mon->alive() && !mons_is_evil_or_unholy(mon) && mons_friendly(mon)); @@ -788,24 +788,12 @@ bool is_orcish_follower(const monsters* mon) bool is_follower(const monsters* mon) { - bool result = false; - - switch (you.religion) - { - case GOD_SHINING_ONE: - result = is_tso_follower(mon); - break; - - case GOD_BEOGH: - result = is_orcish_follower(mon); - break; - - default: - result = (mon->alive() && mons_friendly(mon)); - break; - } - - return result; + if (is_good_god(you.religion)) + return is_good_follower(mon); + else if (you.religion == GOD_BEOGH) + return is_orcish_follower(mon); + else + return (mon->alive() && mons_friendly(mon)); } static bool _blessing_wpn(monsters *mon) diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h index 62fb239a85..29cf763615 100644 --- a/crawl-ref/source/religion.h +++ b/crawl-ref/source/religion.h @@ -75,7 +75,7 @@ bool ely_destroy_weapons(); bool trog_burn_books(); bool tso_stab_safe_monster(const actor *act); -bool is_tso_follower(const monsters* mon); +bool is_good_follower(const monsters* mon); bool is_orcish_follower(const monsters* mon); bool is_follower(const monsters* mon); bool bless_follower(monsters* follower = NULL, |