summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-08 12:49:16 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-08 12:49:16 +0000
commit26ca34c231c1b14f5a3a75c10db02a0b8095e5f3 (patch)
tree794d9d02f58374f34365bb2fae143781143c9947 /crawl-ref/source/spells2.cc
parent41afca0d89a94f9c2a6329b8a81410ddffba0bca (diff)
downloadcrawl-ref-26ca34c231c1b14f5a3a75c10db02a0b8095e5f3.tar.gz
crawl-ref-26ca34c231c1b14f5a3a75c10db02a0b8095e5f3.zip
Added telepathy as a Dowsing effect. Presumably breaks saves.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4130 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index d4fecd45be..8ecb929176 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -195,20 +195,22 @@ static bool mark_detected_creature(int gridx, int gridy, const monsters *mon,
return found_good;
}
-unsigned char detect_creatures( int pow )
+int detect_creatures( int pow, bool telepathic )
{
int fuzz_radius = 0, fuzz_chance = 0;
- fuzz_detect_creatures(pow, &fuzz_radius, &fuzz_chance);
+ if ( !telepathic )
+ fuzz_detect_creatures(pow, &fuzz_radius, &fuzz_chance);
if (pow > 50)
pow = 50;
- unsigned char creatures_found = 0;
- const int map_radius = 8 + random2(8) + pow;
+ int creatures_found = 0;
+ const int map_radius = 8 + random2(8) + pow;
// Clear the map so detect creatures is more useful and the detection
// fuzz is harder to analyse by averaging.
- clear_map(false);
+ if ( !telepathic )
+ clear_map(false);
for (int i = you.x_pos - map_radius; i < you.x_pos + map_radius; i++)
{
@@ -219,7 +221,7 @@ unsigned char detect_creatures( int pow )
if (mgrd[i][j] != NON_MONSTER)
{
- struct monsters *mon = &menv[ mgrd[i][j] ];
+ monsters *mon = &menv[ mgrd[i][j] ];
if (mark_detected_creature(i, j, mon, fuzz_chance,
fuzz_radius))
{