summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-28 14:05:26 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-28 14:05:26 +0000
commit4bddff39d6767838f019f79d069591020223389c (patch)
treeb8869ace0b3417b93b7d5afc0c3cac6af05b9fd9 /crawl-ref/source/spells2.cc
parent4626c89fde4187298219d76253415b58347b199c (diff)
downloadcrawl-ref-4bddff39d6767838f019f79d069591020223389c.tar.gz
crawl-ref-4bddff39d6767838f019f79d069591020223389c.zip
* Another magic mapping fix in cooperation with zebez. Thanks! :)
* Don't make Detect creatures "detect" monsters you can currently see. * Replace rock stair tiles with Eino's escape hatch tiles. * Update change log once again. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10447 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 20ef704622..49b2d0fbf3 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -197,9 +197,12 @@ int detect_creatures(int pow, bool telepathic)
{
if (monsters *mon = monster_at(*ri))
{
- creatures_found++;
-
- _mark_detected_creature(*ri, mon, fuzz_chance, fuzz_radius);
+ // If you can see the monster, don't "detect" it elsewhere.
+ if (!mons_near(mon) || !player_monster_visible(mon))
+ {
+ creatures_found++;
+ _mark_detected_creature(*ri, mon, fuzz_chance, fuzz_radius);
+ }
// Assuming that highly intelligent spellcasters can
// detect scrying. -- bwr