summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/view.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-13 08:30:23 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-13 08:30:23 +0000
commitb2785dc1f36e4f1dae161a3207ac25e083ba68b1 (patch)
treedc3acd27d0c2890534899f01115247839b4147ca /crawl-ref/source/view.cc
parentf2903290696c79d076a099db8b0eba67793ddbb9 (diff)
downloadcrawl-ref-b2785dc1f36e4f1dae161a3207ac25e083ba68b1.tar.gz
crawl-ref-b2785dc1f36e4f1dae161a3207ac25e083ba68b1.zip
Cleaned up magic mapping: the test regarding whether you can magic map
is done inside magic_mapping(), which now returns a bool success value. Functionally: this means that the randart magic mapping power can no longer map the Abyss or labyrinths, ditto Map card. We can change this part back if we want. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1851 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r--crawl-ref/source/view.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index bd31e5be63..a1f462e987 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -2976,8 +2976,16 @@ void show_map( FixedVector<int, 2> &spec_place, bool travel_mode )
} // end show_map()
-void magic_mapping(int map_radius, int proportion)
+// Returns true if succeeded
+bool magic_mapping(int map_radius, int proportion, bool force)
{
+ if (!force &&
+ ((you.level_type == LEVEL_ABYSS) ||
+ (you.level_type == LEVEL_LABYRINTH && you.species != SP_MINOTAUR)))
+ {
+ return false;
+ }
+
int i, j, k, l, empty_count;
if (map_radius > 50 && map_radius != 1000)
@@ -3060,6 +3068,7 @@ void magic_mapping(int map_radius, int proportion)
}
}
}
+ return true;
} // end magic_mapping()
// realize that this is simply a repackaged version of