From 28beea6b951314f59ca6018dedc0d0cb87f0eac2 Mon Sep 17 00:00:00 2001 From: Chris Campbell Date: Wed, 9 Jul 2014 11:57:30 +0100 Subject: Fix magical shields being unable to block most ranged attacks (#8772) They checked that the player either had a shield equipped or had the bone plates mutation, so TSO's divine shield, Qazlal shielding and Condensation shield could all never block ranged attacks (except for those from ranged weapons, since those now follow the same codepath as melee attacks!). --- crawl-ref/source/mon-project.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/mon-project.cc') diff --git a/crawl-ref/source/mon-project.cc b/crawl-ref/source/mon-project.cc index 6d4e4bb3a4..fad0a806df 100644 --- a/crawl-ref/source/mon-project.cc +++ b/crawl-ref/source/mon-project.cc @@ -199,7 +199,7 @@ static void _fuzz_direction(const actor *caster, monster& mon, int pow) // Alas, too much differs to reuse beam shield blocks :( static bool _iood_shielded(monster& mon, actor &victim) { - if (!victim.shield() || victim.incapacitated()) + if (!victim.shielded() || victim.incapacitated()) return false; const int to_hit = 15 + (mons_is_projectile(mon.type) ? @@ -507,7 +507,7 @@ move_again: if (victim && _iood_shielded(mon, *victim)) { item_def *shield = victim->shield(); - if (!shield_reflects(*shield)) + if (!shield || !shield_reflects(*shield)) { if (victim->is_player()) mprf("You block %s.", mon.name(DESC_THE, true).c_str()); -- cgit v1.2.3-54-g00ecf