From 22a9bad294c44f6dd86faea04e1b00ea7c6e31d6 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 7 Jun 2009 20:29:21 +0000 Subject: Backport trunk r9914 to 0.5. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@9915 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/directn.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index e24ddacbb8..073565e368 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -1924,6 +1924,11 @@ bool in_los(const coord_def& pos) static bool _mons_is_valid_target(const monsters *mon, int mode, int range) { + // Monster types that you can't gain experience from don't count as + // monsters. + if (mons_class_flag(mon->type, M_NO_EXP_GAIN)) + return (false); + // Unknown mimics don't count as monsters, either. if (mons_is_mimic(mon->type) && !(mon->flags & MF_KNOWN_MIMIC)) @@ -1934,10 +1939,10 @@ static bool _mons_is_valid_target(const monsters *mon, int mode, int range) // Don't usually target unseen monsters... if (!player_monster_visible(mon)) { - // ... unless it creates a "disturbance in the water". + // ...unless it creates a "disturbance in the water". // Since you can't see the monster, assume it's not a friend. - // Also don't target submerged monsters if there are other targets - // in sight. (This might be too restrictive.) + // Also, don't target submerged monsters if there are other + // targets in sight. (This might be too restrictive.) return (mode != TARG_FRIEND && _mon_submerged_in_water(mon) && i_feel_safe(false, false, true, range)); -- cgit v1.2.3-54-g00ecf