diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2012-04-12 15:10:51 +0200 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2012-04-12 15:10:51 +0200 |
commit | 1f127eee599e4cf62508108452907e38bcbbfbf8 (patch) | |
tree | 8014b8f43551775a4f2e6e87af98105769e5aee7 /crawl-ref/source/exclude.cc | |
parent | f3dadc0d4c0fc492838e417da3a580d4655996da (diff) | |
download | crawl-ref-1f127eee599e4cf62508108452907e38bcbbfbf8.tar.gz crawl-ref-1f127eee599e4cf62508108452907e38bcbbfbf8.zip |
Set auto exclusion for detected mimics.
Diffstat (limited to 'crawl-ref/source/exclude.cc')
-rw-r--r-- | crawl-ref/source/exclude.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc index 7833e942f3..49768637ab 100644 --- a/crawl-ref/source/exclude.cc +++ b/crawl-ref/source/exclude.cc @@ -33,8 +33,9 @@ static bool _mon_needs_auto_exclude(const monster* mon, bool sleepy = false) if (mons_is_stationary(mon)) return (!sleepy); - // Auto exclusion only makes sense if the monster is still asleep. - return (mon->asleep()); + // Auto exclusion only makes sense if the monster is still asleep or if it + // is lurking (discovered mimics). + return (mon->asleep() || mons_is_lurking(mon)); } // Check whether a given monster is listed in the auto_exclude option. @@ -84,6 +85,8 @@ void set_auto_exclude(const monster* mon) int rad = _get_full_exclusion_radius(); if (mon->type == MONS_HYPERACTIVE_BALLISTOMYCETE) rad = 2; + else if (mons_is_mimic(mon->type)) + rad = 1; set_exclude(mon->pos(), rad, true); // FIXME: If this happens for several monsters in the same turn // (as is possible for some vaults), this could be really |