diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-07 20:29:21 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-07 20:29:21 +0000 |
commit | 22a9bad294c44f6dd86faea04e1b00ea7c6e31d6 (patch) | |
tree | 1d0855ef6026af7d12f616313c6dea406e599866 /crawl-ref/source/directn.cc | |
parent | 8fb8e5461559bf1810903692d60cdd9b480e8341 (diff) | |
download | crawl-ref-22a9bad294c44f6dd86faea04e1b00ea7c6e31d6.tar.gz crawl-ref-22a9bad294c44f6dd86faea04e1b00ea7c6e31d6.zip |
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
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r-- | crawl-ref/source/directn.cc | 11 |
1 files 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)); |