From 9b1cdaf406c3cefd731676c4c67043b6f1158e09 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 16 Jul 2009 22:23:42 +0000 Subject: Fix 2819298: sling bullets not counting towards _ammo_count for slings Fix 2822293: colour "slot restricted" darkgrey on % screen Fix 2822279: polymorph other taking MR into account Fix 2821651: berserking monsters respecting 't' orders git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10247 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/beam.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index dd420adaad..6e7eb9c717 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3531,7 +3531,7 @@ bool bolt::misses_player() void bolt::affect_player_enchantment() { - if ((has_saving_throw() || flavour == BEAM_POLYMORPH) + if (has_saving_throw() && flavour != BEAM_POLYMORPH && you_resist_magic(ench_power)) { // You resisted it. @@ -4640,8 +4640,6 @@ bool bolt::has_saving_throw() const if (aimed_at_feet) return (false); - bool rc = true; - switch (flavour) { case BEAM_HASTE: @@ -4650,12 +4648,10 @@ bool bolt::has_saving_throw() const case BEAM_DISPEL_UNDEAD: case BEAM_ENSLAVE_SOUL: // has a different saving throw case BEAM_ENSLAVE_DEMON: // ditto - rc = false; - break; + return (false); default: - break; + return (true); } - return rc; } bool _ench_flavour_affects_monster(beam_type flavour, const monsters* mon) -- cgit v1.2.3-54-g00ecf