summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-22 07:25:57 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-22 07:25:57 +0000
commitae558c387a4ede86cffe8e4654ea6e544863abc1 (patch)
tree188c43c51fbe8ba5bcdfe5677d542531b79c6a6e
parent96a447410eabfc50aadc628f4ce27c6cbc4b2353 (diff)
downloadcrawl-ref-ae558c387a4ede86cffe8e4654ea6e544863abc1.tar.gz
crawl-ref-ae558c387a4ede86cffe8e4654ea6e544863abc1.zip
A few small message changes and additions, mostly
concerning portals. Oh, and portals will now stop travel just like other interesting features. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2025 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/direct.cc2
-rw-r--r--crawl-ref/source/initfile.cc2
-rw-r--r--crawl-ref/source/misc.cc20
-rw-r--r--crawl-ref/source/misc.h1
-rw-r--r--crawl-ref/source/spells3.cc6
-rw-r--r--crawl-ref/source/travel.cc7
-rw-r--r--crawl-ref/source/travel.h3
7 files changed, 33 insertions, 8 deletions
diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc
index c436f44323..5ccf1ce023 100644
--- a/crawl-ref/source/direct.cc
+++ b/crawl-ref/source/direct.cc
@@ -1410,6 +1410,8 @@ std::string raw_feature_description(dungeon_feature_type grid,
return ("staircase to the Swamp");
case DNGN_ENTER_SHOALS:
return ("staircase to the Shoals");
+ case DNGN_ENTER_PORTAL_VAULT:
+ return ("gate leading to another dimension");
case DNGN_EXIT_PORTAL_VAULT:
return ("gate leading back to the Dungeon");
case DNGN_RETURN_FROM_ORCISH_MINES:
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index e084e3d546..6a48aea5d2 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -656,7 +656,7 @@ void game_options::reset_options()
stash_tracking = STM_ALL;
- explore_stop = ES_ITEM | ES_STAIR | ES_SHOP | ES_ALTAR
+ explore_stop = ES_ITEM | ES_STAIR | ES_PORTAL | ES_SHOP | ES_ALTAR
| ES_GREEDY_PICKUP;
// The prompt conditions will be combined into explore_stop after
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 5cf37f0ad6..57c56cfb55 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -203,6 +203,10 @@ bool grid_sealable_portal(dungeon_feature_type grid)
}
}
+bool grid_is_portal(dungeon_feature_type grid)
+{
+ return (grid == DNGN_ENTER_PORTAL_VAULT || grid == DNGN_EXIT_PORTAL_VAULT);
+}
command_type grid_stair_direction(dungeon_feature_type grid)
{
@@ -959,15 +963,25 @@ static void exit_stair_message(dungeon_feature_type stair, bool /* going_up */)
static void climb_message(dungeon_feature_type stair, bool going_up)
{
- if (grid_is_rock_stair(stair))
+ if (grid_is_portal(stair))
+ mpr("You pass through the gateway.");
+ else if (grid_is_rock_stair(stair))
{
if (going_up)
mpr("A mysterious force pulls you upwards.");
else
- mpr("You slide downwards.");
+ {
+ mprf("You %s downwards.", you.flies()? "fly" :
+ (player_is_levitating()? "float" :
+ "slide"));
+ }
}
else
- mpr(going_up? "You climb upwards." : "You climb downwards.");
+ {
+ mprf("You %s %swards.", you.flies()? "fly" :
+ (player_is_levitating()? "float" : "climb"),
+ going_up? "up": "down");
+ }
}
static void leaving_level_now()
diff --git a/crawl-ref/source/misc.h b/crawl-ref/source/misc.h
index 7654b12605..b31a248a71 100644
--- a/crawl-ref/source/misc.h
+++ b/crawl-ref/source/misc.h
@@ -150,6 +150,7 @@ bool grid_is_solid(const coord_def &c);
bool grid_is_trap(dungeon_feature_type grid);
command_type grid_stair_direction(dungeon_feature_type grid);
bool grid_sealable_portal(dungeon_feature_type grid);
+bool grid_is_portal(dungeon_feature_type grid);
bool grid_is_water(dungeon_feature_type grid);
bool grid_is_watery(dungeon_feature_type grid);
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index a274f6375f..8d31bab77b 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -853,11 +853,11 @@ void cast_poison_ammo(void)
return;
}
+ const char *old_desc = you.inv[ammo].name(DESC_CAP_YOUR).c_str();
if (set_item_ego_type( you.inv[ammo], OBJ_MISSILES, SPMSL_POISONED ))
{
- mprf("%s %s covered in a thin film of poison.",
- you.inv[ammo].name(DESC_CAP_YOUR).c_str(),
- (you.inv[ammo].quantity == 1) ? " is" : " are");
+ mprf("%s %s covered in a thin film of poison.", old_desc,
+ (you.inv[ammo].quantity == 1) ? "is" : "are");
you.wield_change = true;
}
else
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 951f0c5033..efce606277 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -716,6 +716,7 @@ bool prompt_stop_explore(int es_why)
#define ES_shop (Options.explore_stop & ES_SHOP)
#define ES_stair (Options.explore_stop & ES_STAIR)
#define ES_altar (Options.explore_stop & ES_ALTAR)
+#define ES_portal (Options.explore_stop & ES_PORTAL)
/*
* Adds interesting stuf on (x, y) to explore_discoveries.
@@ -3709,6 +3710,12 @@ void explore_discoveries::found_feature(const coord_def &pos,
add_stair(stair);
es_flags |= ES_STAIR;
}
+ else if (grid_is_portal(grid) && ES_portal)
+ {
+ const named_thing<int> portal(cleaned_feature_description(grid), 1);
+ add_stair(portal);
+ es_flags |= ES_PORTAL;
+ }
else if (is_altar(grid)
&& ES_altar
&& !player_in_branch(BRANCH_ECUMENICAL_TEMPLE))
diff --git a/crawl-ref/source/travel.h b/crawl-ref/source/travel.h
index 30455af20f..bd6b9d52e6 100644
--- a/crawl-ref/source/travel.h
+++ b/crawl-ref/source/travel.h
@@ -130,7 +130,8 @@ enum explore_stop_type
ES_GREEDY_PICKUP = 0x04,
ES_STAIR = 0x08,
ES_SHOP = 0x10,
- ES_ALTAR = 0x20
+ ES_ALTAR = 0x20,
+ ES_PORTAL = 0x40
};
////////////////////////////////////////////////////////////////////////////