summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-25 14:25:13 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-25 14:25:13 +0000
commitb4b1187fa18c00dba288189dcc75d3bbb5ebf8a7 (patch)
tree6c011f1512211a03498a4ce5db585d947891700b
parent6604f9f6004e6e8d32e988a2e26b490432208095 (diff)
downloadcrawl-ref-b4b1187fa18c00dba288189dcc75d3bbb5ebf8a7.tar.gz
crawl-ref-b4b1187fa18c00dba288189dcc75d3bbb5ebf8a7.zip
Apply zebez' patch to differentiate gates some more from stairs.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10403 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/directn.cc2
-rw-r--r--crawl-ref/source/files.cc4
-rw-r--r--crawl-ref/source/hiscores.cc8
-rw-r--r--crawl-ref/source/misc.cc31
-rw-r--r--crawl-ref/source/ouch.cc3
-rw-r--r--crawl-ref/source/ouch.h1
-rw-r--r--crawl-ref/source/rltiles/dc-dngn.txt2
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/gateways/dngn_return_hell.pngbin0 -> 751 bytes
-rw-r--r--crawl-ref/source/rltiles/dc-dngn/gateways/dngn_return_zot.pngbin0 -> 871 bytes
-rw-r--r--crawl-ref/source/terrain.cc19
-rw-r--r--crawl-ref/source/tilepick.cc5
-rw-r--r--crawl-ref/source/travel.cc15
12 files changed, 75 insertions, 15 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index 84662df593..092e6b14b0 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -2642,6 +2642,8 @@ static std::string _base_feature_desc(dungeon_feature_type grid,
case DNGN_STONE_STAIRS_UP_I:
case DNGN_STONE_STAIRS_UP_II:
case DNGN_STONE_STAIRS_UP_III:
+ if (player_in_hell())
+ return ("gateway back to the Vestibule of Hell");
return ("stone staircase leading up");
case DNGN_ENTER_HELL:
return ("gateway to Hell");
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 1b22578dd1..5ab9bb330f 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1462,8 +1462,8 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode,
if (coinflip()
&& slide_feature_over(you.pos(), coord_def(-1, -1), false))
{
- mprf("%s slides away from you right after you %s through "
- "it!", stair_str.c_str(), verb.c_str());
+ mprf("%s slides away from you right after you %s it!",
+ stair_str.c_str(), verb.c_str());
}
if (coinflip())
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index ca79a18e72..5207bf3109 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -427,7 +427,8 @@ static const char *kill_method_names[] =
"wild_magic", "xom", "statue", "rotting", "targeting", "spore",
"tso_smiting", "petrification", "unknown", "something",
"falling_down_stairs", "acid", "curare", "melting", "bleeding",
- "beogh_smiting", "divine_wrath", "bounce", "reflect", "self_aimed"
+ "beogh_smiting", "divine_wrath", "bounce", "reflect", "self_aimed",
+ "falling_through_gate"
};
const char *kill_method_name(kill_method_type kmt)
@@ -1736,6 +1737,11 @@ std::string scorefile_entry::death_description(death_desc_verbosity verbosity)
needs_damage = true;
break;
+ case KILLED_BY_FALLING_THROUGH_GATE:
+ desc += terse? "fell through a gate" : "Fell down through a gate";
+ needs_damage = true;
+ break;
+
case KILLED_BY_ACID:
desc += terse? "acid" : "Splashed by acid";
needs_damage = true;
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 939912e6c4..78eb8cfc89 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -1309,11 +1309,19 @@ static void climb_message(dungeon_feature_type stair, bool going_up,
(player_is_airborne() ? "float" : "slide"));
}
}
+ else if (is_gate(stair))
+ {
+ mprf("You %s %s through the gate.",
+ you.flight_mode() == FL_FLY ? "fly" :
+ (player_is_airborne() ? "float" : "go"),
+ going_up ? "up" : "down");
+ }
else
{
- mprf("You %s %swards.", you.flight_mode() == FL_FLY ? "fly" :
- (player_is_airborne() ? "float" : "climb"),
- going_up ? "up" : "down");
+ mprf("You %s %swards.",
+ you.flight_mode() == FL_FLY ? "fly" :
+ (player_is_airborne() ? "float" : "climb"),
+ going_up ? "up" : "down");
}
}
@@ -1755,12 +1763,16 @@ void up_stairs(dungeon_feature_type force_stair,
fall_where = "through the gate";
mprf("In your confused state, you trip and fall back %s.", fall_where);
- ouch(1, NON_MONSTER, KILLED_BY_FALLING_DOWN_STAIRS);
+ if (!grid_is_staircase(stair_find))
+ ouch(1, NON_MONSTER, KILLED_BY_FALLING_THROUGH_GATE);
+ else
+ ouch(1, NON_MONSTER, KILLED_BY_FALLING_DOWN_STAIRS);
you.turn_is_over = true;
return;
}
- if (you.burden_state == BS_OVERLOADED && !grid_is_escape_hatch(stair_find))
+ if (you.burden_state == BS_OVERLOADED && !grid_is_escape_hatch(stair_find)
+ && !is_gate(stair_find))
{
mpr("You are carrying too much to climb upwards.");
you.turn_is_over = true;
@@ -1842,9 +1854,9 @@ void up_stairs(dungeon_feature_type force_stair,
const dungeon_feature_type stair_taken = stair_find;
- if (you.flight_mode() == FL_LEVITATE)
+ if (you.flight_mode() == FL_LEVITATE && !is_gate(stair_find))
mpr("You float upwards... And bob straight up to the ceiling!");
- else if (you.flight_mode() == FL_FLY)
+ else if (you.flight_mode() == FL_FLY && !is_gate(stair_find))
mpr("You fly upwards.");
else
climb_message(stair_find, true, old_level_type);
@@ -2279,7 +2291,10 @@ void down_stairs( int old_level, dungeon_feature_type force_stair,
mprf("In your confused state, you trip and fall %s.", fall_where);
// Note that this only does damage; it doesn't cancel the level
// transition.
- ouch(1, NON_MONSTER, KILLED_BY_FALLING_DOWN_STAIRS);
+ if (!grid_is_staircase(stair_find))
+ ouch(1, NON_MONSTER, KILLED_BY_FALLING_THROUGH_GATE);
+ else
+ ouch(1, NON_MONSTER, KILLED_BY_FALLING_DOWN_STAIRS);
}
dungeon_feature_type stair_taken = stair_find;
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index ddd810801d..b16fb08a45 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -749,7 +749,8 @@ static void _xom_checks_damage(kill_method_type death_type,
xom_is_stimulated(amusement);
return;
}
- else if (death_type == KILLED_BY_FALLING_DOWN_STAIRS)
+ else if (death_type == KILLED_BY_FALLING_DOWN_STAIRS
+ || death_type == KILLED_BY_FALLING_THROUGH_GATE)
{
// Xom thinks falling down the stairs is hilarious.
xom_is_stimulated(255);
diff --git a/crawl-ref/source/ouch.h b/crawl-ref/source/ouch.h
index 2dca2bdda4..94406cc1fa 100644
--- a/crawl-ref/source/ouch.h
+++ b/crawl-ref/source/ouch.h
@@ -56,6 +56,7 @@ enum kill_method_type
KILLED_BY_BOUNCE, // 35
KILLED_BY_REFLECTION,
KILLED_BY_SELF_AIMED,
+ KILLED_BY_FALLING_THROUGH_GATE,
NUM_KILLBY
};
diff --git a/crawl-ref/source/rltiles/dc-dngn.txt b/crawl-ref/source/rltiles/dc-dngn.txt
index 66aebfa1ca..67c9c86eb7 100644
--- a/crawl-ref/source/rltiles/dc-dngn.txt
+++ b/crawl-ref/source/rltiles/dc-dngn.txt
@@ -416,10 +416,12 @@ dngn_enter_hell DNGN_ENTER_HELL
dngn_enter_zot_closed DNGN_ENTER_ZOT_CLOSED
dngn_enter_zot_open DNGN_ENTER_ZOT_OPEN
%rim 0
+dngn_return_zot DNGN_RETURN_ZOT
dngn_enter_dis DNGN_ENTER_DIS
dngn_enter_gehenna DNGN_ENTER_GEHENNA
dngn_enter_cocytus DNGN_ENTER_COCYTUS
dngn_enter_tartarus DNGN_ENTER_TARTARUS
+dngn_return_hell DNGN_RETURN_HELL
dngn_enter_abyss DNGN_ENTER_ABYSS
dngn_exit DNGN_EXIT_ABYSS
diff --git a/crawl-ref/source/rltiles/dc-dngn/gateways/dngn_return_hell.png b/crawl-ref/source/rltiles/dc-dngn/gateways/dngn_return_hell.png
new file mode 100644
index 0000000000..8871020dfe
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/gateways/dngn_return_hell.png
Binary files differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/gateways/dngn_return_zot.png b/crawl-ref/source/rltiles/dc-dngn/gateways/dngn_return_zot.png
new file mode 100644
index 0000000000..34cb4033f3
--- /dev/null
+++ b/crawl-ref/source/rltiles/dc-dngn/gateways/dngn_return_zot.png
Binary files differ
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc
index 53cc4b97f3..4c470000eb 100644
--- a/crawl-ref/source/terrain.cc
+++ b/crawl-ref/source/terrain.cc
@@ -68,15 +68,30 @@ bool grid_is_stone_stair(dungeon_feature_type grid)
bool grid_is_staircase(dungeon_feature_type grid)
{
if (grid_is_stone_stair(grid))
+ {
+ // Make up staircases in hell appear as gates.
+ if (player_in_hell())
+ {
+ switch (grid)
+ {
+ case DNGN_STONE_STAIRS_UP_I:
+ case DNGN_STONE_STAIRS_UP_II:
+ case DNGN_STONE_STAIRS_UP_III:
+ return (false);
+ default:
+ return (true);
+ }
+ }
return (true);
+ }
// All branch entries/exits are staircases, except for Zot.
if (grid == DNGN_ENTER_ZOT || grid == DNGN_RETURN_FROM_ZOT)
return (false);
return (grid >= DNGN_ENTER_FIRST_BRANCH && grid <= DNGN_ENTER_LAST_BRANCH
- || grid >= DNGN_RETURN_FROM_FIRST_BRANCH
- && grid <= DNGN_RETURN_FROM_LAST_BRANCH);
+ || grid >= DNGN_RETURN_FROM_FIRST_BRANCH
+ && grid <= DNGN_RETURN_FROM_LAST_BRANCH);
}
bool grid_is_escape_hatch(dungeon_feature_type grid)
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index 20b113957f..c32f7c6b5d 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -2416,6 +2416,8 @@ int tileidx_feature(int object, int gx, int gy)
case DNGN_STONE_STAIRS_UP_I:
case DNGN_STONE_STAIRS_UP_II:
case DNGN_STONE_STAIRS_UP_III:
+ if (player_in_hell())
+ return TILE_DNGN_RETURN_HELL;
return TILE_DNGN_STONE_STAIRS_UP;
case DNGN_ESCAPE_HATCH_UP:
return TILE_DNGN_ESCAPE_HATCH_UP;
@@ -2466,7 +2468,6 @@ int tileidx_feature(int object, int gx, int gy)
case DNGN_RETURN_FROM_VAULTS:
case DNGN_RETURN_FROM_CRYPT:
case DNGN_RETURN_FROM_HALL_OF_BLADES:
- case DNGN_RETURN_FROM_ZOT:
case DNGN_RETURN_FROM_TEMPLE:
case DNGN_RETURN_FROM_SNAKE_PIT:
case DNGN_RETURN_FROM_ELVEN_HALLS:
@@ -2474,6 +2475,8 @@ int tileidx_feature(int object, int gx, int gy)
case DNGN_RETURN_FROM_SWAMP:
case DNGN_RETURN_FROM_SHOALS:
return TILE_DNGN_RETURN;
+ case DNGN_RETURN_FROM_ZOT:
+ return TILE_DNGN_RETURN_ZOT;
case DNGN_ENTER_PORTAL_VAULT:
case DNGN_EXIT_PORTAL_VAULT:
return TILE_DNGN_PORTAL;
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 2b169fba98..3b900193f5 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -810,6 +810,20 @@ bool is_escape_hatch(dungeon_feature_type gridc)
// Returns true if the given dungeon feature can be considered a gate.
bool is_gate(dungeon_feature_type gridc)
{
+ // Make up staircases in hell appear as gates.
+ if (player_in_hell())
+ {
+ switch (gridc)
+ {
+ case DNGN_STONE_STAIRS_UP_I:
+ case DNGN_STONE_STAIRS_UP_II:
+ case DNGN_STONE_STAIRS_UP_III:
+ return (true);
+ default:
+ break;
+ }
+ }
+
switch (gridc)
{
case DNGN_ENTER_ABYSS:
@@ -823,6 +837,7 @@ bool is_gate(dungeon_feature_type gridc)
case DNGN_ENTER_ZOT:
case DNGN_RETURN_FROM_ZOT:
case DNGN_ENTER_HELL:
+ case DNGN_EXIT_HELL:
case DNGN_ENTER_DIS:
case DNGN_ENTER_GEHENNA:
case DNGN_ENTER_COCYTUS: