From ebc2cb26f221bbce6a2cf5cbd3ce250af75e914f Mon Sep 17 00:00:00 2001 From: haranp Date: Sat, 11 Oct 2008 13:38:28 +0000 Subject: After discussion with dpeg, added a Scroll of Antimagic, taking probability (equal to ?oHolyWord) from the ?oPaper. Effects apply to all creatures within LOS, including you, with no magic resistance check: - Remove all magical enchantments (e.g. Haste, but not Poison) - Cut magic resistance in half for 40 turns. (This does not affect magic-immunes.) Balance testing, etc., needed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7211 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/misc.cc | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'crawl-ref/source/misc.cc') diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index c55e4573b2..b411f205c7 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -2388,25 +2388,22 @@ std::vector get_nearby_monsters(bool want_move, std::vector mons; - // Sweep every square within range. + // Sweep every visible square within range. for ( radius_iterator ri(you.pos(), range); ri; ++ri ) { const unsigned short targ_monst = env.mgrid(*ri); if (targ_monst != NON_MONSTER) { - if (see_grid(*ri)) + monsters *mon = &menv[targ_monst]; + if (mon->alive() + && (!require_visible || player_monster_visible(mon)) + && !mons_is_submerged(mon) + && (!mons_is_mimic(mon->type) || mons_is_known_mimic(mon)) + && (!dangerous_only || !mons_is_safe(mon, want_move))) { - monsters *mon = &menv[targ_monst]; - if (mon->alive() - && (!require_visible || player_monster_visible(mon)) - && !mons_is_submerged(mon) - && (!mons_is_mimic(mon->type) || mons_is_known_mimic(mon)) - && (!dangerous_only || !mons_is_safe(mon, want_move))) - { - mons.push_back(mon); - if (just_check) // stop once you find one - return mons; - } + mons.push_back(mon); + if (just_check) // stop once you find one + return mons; } } } -- cgit v1.2.3-54-g00ecf