summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-27 17:26:00 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-27 17:26:00 +0000
commit9b909453a2e070df3ac33277d0a7f07deb6e9132 (patch)
tree531e033aec96fd1e97e797659a3d8790daad5eae /crawl-ref/source/misc.cc
parente3698852a27d5565ba1381bd600776f5080ab9c9 (diff)
downloadcrawl-ref-9b909453a2e070df3ac33277d0a7f07deb6e9132.tar.gz
crawl-ref-9b909453a2e070df3ac33277d0a7f07deb6e9132.zip
Reworked Bazaars as a special case of portal vaults. The level-type is now
called portal vault. The dungeon builder bases its behaviour on the level_type_name, which must be set as the "dst" property on the portal leading to the bazaar/portal vault. Added WELCOME: directive to .des files to allow maps to specify a welcome message when the player enters the level (only relevant to encompass maps). Readjusted kenku flight speed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1941 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc31
1 files changed, 17 insertions, 14 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index f94624ff39..328f46617d 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -198,7 +198,7 @@ bool grid_sealable_portal(dungeon_feature_type grid)
case DNGN_ENTER_ABYSS:
case DNGN_ENTER_PANDEMONIUM:
case DNGN_ENTER_LABYRINTH:
- case DNGN_ENTER_BAZAAR:
+ case DNGN_ENTER_PORTAL_VAULT:
return (true);
default:
return (false);
@@ -233,10 +233,10 @@ command_type grid_stair_direction(dungeon_feature_type grid)
case DNGN_RETURN_RESERVED_4:
case DNGN_ENTER_SHOP:
case DNGN_EXIT_HELL:
- case DNGN_EXIT_BAZAAR:
+ case DNGN_EXIT_PORTAL_VAULT:
return (CMD_GO_UPSTAIRS);
- case DNGN_ENTER_BAZAAR:
+ case DNGN_ENTER_PORTAL_VAULT:
case DNGN_ENTER_HELL:
case DNGN_ENTER_LABYRINTH:
case DNGN_STONE_STAIRS_DOWN_I:
@@ -380,7 +380,7 @@ const char *grid_item_destruction_message( dungeon_feature_type grid )
// Returns true if exits from this type of level involve going upstairs.
bool level_type_exits_up(level_area_type type)
{
- return (type == LEVEL_LABYRINTH || type == LEVEL_BAZAAR);
+ return (type == LEVEL_LABYRINTH || type == LEVEL_PORTAL_VAULT);
}
bool level_type_exits_down(level_area_type type)
@@ -788,8 +788,15 @@ static void climb_message(dungeon_feature_type stair, bool going_up)
static void leaving_level_now()
{
+ // Note the name ahead of time because the events may cause
+ // markers to be discarded.
+ const std::string newtype =
+ env_property_at(you.pos(), MAT_ANY, "dst");
+
dungeon_events.fire_position_event(DET_PLAYER_CLIMBS, you.pos());
dungeon_events.fire_event(DET_LEAVING_LEVEL);
+
+ you.level_type_name = newtype;
}
void up_stairs(void)
@@ -1167,9 +1174,9 @@ void down_stairs( int old_level, dungeon_feature_type force_stair )
{
you.level_type = LEVEL_PANDEMONIUM;
}
- else if (stair_find == DNGN_ENTER_BAZAAR)
+ else if (stair_find == DNGN_ENTER_PORTAL_VAULT)
{
- you.level_type = LEVEL_BAZAAR;
+ you.level_type = LEVEL_PORTAL_VAULT;
}
// When going downstairs into a special level, delete any previous
@@ -1238,10 +1245,6 @@ void down_stairs( int old_level, dungeon_feature_type force_stair )
}
break;
- case LEVEL_BAZAAR:
- mpr("You enter an inter-dimensional bazaar!");
- break;
-
default:
climb_message(stair_find, false);
break;
@@ -1379,8 +1382,8 @@ std::string level_description_string()
if (you.level_type == LEVEL_LABYRINTH)
return "- a Labyrinth";
- if (you.level_type == LEVEL_BAZAAR)
- return "- a Bazaar";
+ if (you.level_type == LEVEL_PORTAL_VAULT)
+ return "- a Portal Chamber";
// level_type == LEVEL_DUNGEON
char buf[200];
@@ -2250,8 +2253,8 @@ std::string place_name( unsigned short place, bool long_name,
return ( long_name ? "Pandemonium" : "Pan" );
case LEVEL_LABYRINTH:
return ( long_name ? "a Labyrinth" : "Lab" );
- case LEVEL_BAZAAR:
- return ( long_name ? "a Bazaar" : "Bzr" );
+ case LEVEL_PORTAL_VAULT:
+ return ( long_name ? "a Portal Chamber" : "Port" );
default:
return ( long_name ? "Buggy Badlands" : "Bug" );
}