summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/view.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-11 11:59:07 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-11 11:59:07 +0000
commit907b837e7c0860984593413279c686d27a81a77e (patch)
tree17467a249c96a2ec459b54ab7034837abef320b7 /crawl-ref/source/view.cc
parentcc9ba6c05755e235c14daa555bbd037813f91a6e (diff)
downloadcrawl-ref-907b837e7c0860984593413279c686d27a81a77e.tar.gz
crawl-ref-907b837e7c0860984593413279c686d27a81a77e.zip
Take a note when a labyrinth entrance is first found (via either magic mapping
or seeing it) and when a portal vault is first found (via seeing it only, since magic mapping doesn't provide the description of the portal). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7809 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r--crawl-ref/source/view.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 99b9f8cdbb..e414eb9c80 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -43,6 +43,7 @@
#include "monstuff.h"
#include "mon-util.h"
#include "newgame.h"
+#include "notes.h"
#include "output.h"
#include "overmap.h"
#include "place.h"
@@ -255,6 +256,14 @@ void set_terrain_changed( int x, int y )
void set_terrain_mapped( int x, int y )
{
+ if (!(env.map[x][y].flags & (MAP_MAGIC_MAPPED_FLAG | MAP_SEEN_FLAG))
+ && grd[x][y] == DNGN_ENTER_LABYRINTH)
+ {
+ coord_def pos(x, y);
+ take_note(Note(NOTE_SEEN_FEAT, 0, 0,
+ feature_description(pos, false, DESC_NOCAP_A).c_str()));
+ }
+
env.map[x][y].flags &= (~MAP_CHANGED_FLAG);
env.map[x][y].flags |= MAP_MAGIC_MAPPED_FLAG;
#ifdef USE_TILE
@@ -264,6 +273,25 @@ void set_terrain_mapped( int x, int y )
void set_terrain_seen( int x, int y )
{
+ if (!(env.map[x][y].flags & (MAP_MAGIC_MAPPED_FLAG | MAP_SEEN_FLAG))
+ && grd[x][y] == DNGN_ENTER_LABYRINTH)
+ {
+ coord_def pos(x, y);
+ take_note(Note(NOTE_SEEN_FEAT, 0, 0,
+ feature_description(pos, false, DESC_NOCAP_A).c_str()));
+ }
+
+ // Magic mapping doesn't reveal the description of the portal vault
+ // entrance.
+ if (!(env.map[x][y].flags & MAP_SEEN_FLAG)
+ && grd[x][y] == DNGN_ENTER_PORTAL_VAULT
+ && you.level_type != LEVEL_PORTAL_VAULT)
+ {
+ coord_def pos(x, y);
+ take_note(Note(NOTE_SEEN_FEAT, 0, 0,
+ feature_description(pos, false, DESC_NOCAP_A).c_str()));
+ }
+
#ifdef USE_TILE
env.map[x][y].flags &= ~(MAP_DETECTED_ITEM);
env.map[x][y].flags &= ~(MAP_DETECTED_MONSTER);