summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/map_knowledge.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-10-10 19:49:41 +0200
committerAdam Borowski <kilobyte@angband.pl>2010-10-10 20:02:16 +0200
commit9a9705ea8311b468f7e5e206c823c2845f75d6a5 (patch)
tree74163d1176bb7626cce194f6ddab1e409016cce7 /crawl-ref/source/map_knowledge.cc
parent751e42844da070c4a79e402733276396a060e99a (diff)
downloadcrawl-ref-9a9705ea8311b468f7e5e206c823c2845f75d6a5.tar.gz
crawl-ref-9a9705ea8311b468f7e5e206c823c2845f75d6a5.zip
Ashenzari: passive mapping.
Diffstat (limited to 'crawl-ref/source/map_knowledge.cc')
-rw-r--r--crawl-ref/source/map_knowledge.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/crawl-ref/source/map_knowledge.cc b/crawl-ref/source/map_knowledge.cc
index f12bf39329..66ead7d692 100644
--- a/crawl-ref/source/map_knowledge.cc
+++ b/crawl-ref/source/map_knowledge.cc
@@ -95,9 +95,19 @@ static void _automap_from( int x, int y, int mutated )
true, true, coord_def(x,y));
}
-void reautomap_level( )
+static int _map_quality()
{
int passive = player_mutation_level(MUT_PASSIVE_MAPPING);
+ // the explanation of this 51 vs max_piety of 200 is left as
+ // an exercise to the reader
+ if (you.religion == GOD_ASHENZARI && !player_under_penance())
+ passive = std::max(passive, you.piety / 51);
+ return passive;
+}
+
+void reautomap_level( )
+{
+ int passive = _map_quality();
for (int x = X_BOUND_1; x <= X_BOUND_2; ++x)
for (int y = Y_BOUND_1; y <= Y_BOUND_2; ++y)
@@ -115,7 +125,7 @@ void set_terrain_seen( int x, int y )
// map knowledge gets wiped each turn.
if (!(cell->flags & MAP_SEEN_FLAG) && player_in_mappable_area())
{
- _automap_from(x, y, player_mutation_level(MUT_PASSIVE_MAPPING));
+ _automap_from(x, y, _map_quality());
const bool boring = !is_notable_terrain(feat)
// A portal deeper into the Zigguart is boring.