summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-18 09:56:54 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-18 09:56:54 +0000
commit1c59fb1479a724c0969c54e0365856b1cff77c00 (patch)
treef1a28fcfd3aa8a44f7a15916b287272759239594 /crawl-ref/source/misc.cc
parent30335e8ff7bfd82cdc2dfea9721d3262bbc5d81d (diff)
downloadcrawl-ref-1c59fb1479a724c0969c54e0365856b1cff77c00.tar.gz
crawl-ref-1c59fb1479a724c0969c54e0365856b1cff77c00.zip
Don't treat electric eels as safe just because they're aquatic.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10711 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 26d5a59a00..d2c5762a4e 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -2704,20 +2704,22 @@ bool mons_is_safe(const monsters *mon, bool want_move,
|| you.skills[SK_STEALTH] > 27 && dist > 2
#endif
// Only seen through glass walls or within water?
+ // Assuming that there are no water-only/lava-only
+ // monsters capable of throwing or zapping wands.
|| (!see_grid_no_trans(mon->pos())
|| mons_class_habitat(mon->type) == HT_WATER
|| mons_class_habitat(mon->type) == HT_LAVA)
&& !_mons_has_path_to_player(mon)
&& !mons_has_los_attack(mon)
&& (!see_grid_no_trans(mon->pos())
- || !mons_has_ranged_attack(mon)));
+ || !mons_has_ranged_ability(mon)));
#ifdef CLUA_BINDINGS
if (consider_user_options)
{
bool moving = (!you.delay_queue.empty()
- && is_run_delay(you.delay_queue.front().type)
- && you.delay_queue.front().type != DELAY_REST
+ && is_run_delay(you.delay_queue.front().type)
+ && you.delay_queue.front().type != DELAY_REST
|| you.running < RMODE_NOT_RUNNING
|| want_move);