diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-11 13:38:28 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-11 13:38:28 +0000 |
commit | ebc2cb26f221bbce6a2cf5cbd3ce250af75e914f (patch) | |
tree | 8d64cd38054d2b584c5ad8849ee42b936475783f /crawl-ref/source/misc.cc | |
parent | 89adf4610b5206a5f42187ee90cd01e54583f5d9 (diff) | |
download | crawl-ref-ebc2cb26f221bbce6a2cf5cbd3ce250af75e914f.tar.gz crawl-ref-ebc2cb26f221bbce6a2cf5cbd3ce250af75e914f.zip |
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
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 23 |
1 files changed, 10 insertions, 13 deletions
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<monsters*> get_nearby_monsters(bool want_move, std::vector<monsters*> 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; } } } |