From 907b837e7c0860984593413279c686d27a81a77e Mon Sep 17 00:00:00 2001 From: zelgadis Date: Thu, 11 Dec 2008 11:59:07 +0000 Subject: 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 --- crawl-ref/source/view.cc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'crawl-ref/source/view.cc') 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); -- cgit v1.2.3-54-g00ecf