summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/debug.cc6
-rw-r--r--crawl-ref/source/dungeon.cc4
-rw-r--r--crawl-ref/source/enum.h24
-rw-r--r--crawl-ref/source/files.cc14
-rw-r--r--crawl-ref/source/terrain.cc8
-rw-r--r--crawl-ref/source/tutorial.cc86
6 files changed, 70 insertions, 72 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index e33ce47ca9..42aec99974 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -544,8 +544,8 @@ static dungeon_feature_type find_appropriate_stairs(bool down)
dungeon_feature_type stairs = your_branch().exit_stairs;
- if (stairs < DNGN_RETURN_FROM_ORCISH_MINES
- || stairs > DNGN_RETURN_RESERVED_4)
+ if (stairs < DNGN_RETURN_FROM_FIRST_BRANCH
+ || stairs > DNGN_RETURN_FROM_LAST_BRANCH)
{
mpr("This branch has no exit stairs defined.");
return DNGN_UNSEEN;
@@ -2069,7 +2069,7 @@ void debug_get_religion(void)
else
{
grd[you.x_pos][you.y_pos] =
- static_cast<dungeon_feature_type>( DNGN_ALTAR_ZIN + god - 1 );
+ static_cast<dungeon_feature_type>( DNGN_ALTAR_FIRST_GOD + god - 1 );
god_pitch(god);
}
} // end debug_add_skills()
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 343b4a2fe9..d412241c18 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -4181,7 +4181,7 @@ static int vault_grid( vault_placement &place,
(vgrid == 'A') ? DNGN_STONE_ARCH :
(vgrid == 'B') ?
static_cast<dungeon_feature_type>(
- DNGN_ALTAR_ZIN + altar_count) :// see below
+ DNGN_ALTAR_FIRST_GOD + altar_count) :// see below
(vgrid == 'C') ? pick_an_altar() : // f(x) elsewhere {dlb}
(vgrid == 'F') ? DNGN_GRANITE_STATUE :
(vgrid == 'I') ? DNGN_ORCISH_IDOL :
@@ -4677,7 +4677,7 @@ static dungeon_feature_type pick_an_altar()
do
{
altar_type =
- static_cast<dungeon_feature_type>(DNGN_ALTAR_ZIN +
+ static_cast<dungeon_feature_type>(DNGN_ALTAR_FIRST_GOD +
random2(NUM_GODS - 1));
}
while (altar_type == DNGN_ALTAR_NEMELEX_XOBEH
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 05ae52441e..4965e9cdf3 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -73,6 +73,8 @@ enum ability_type
ABIL_EVOKE_LEVITATE,
ABIL_EVOKE_STOP_LEVITATING,
ABIL_END_TRANSFORMATION, // 55
+
+ // Divine abilities
ABIL_ZIN_REPEL_UNDEAD = 110, // 110
ABIL_ZIN_HEALING,
ABIL_ZIN_PESTILENCE,
@@ -896,13 +898,15 @@ enum dungeon_feature_type
DNGN_STONE_STAIRS_DOWN_I,
DNGN_STONE_STAIRS_DOWN_II,
DNGN_STONE_STAIRS_DOWN_III,
- DNGN_ROCK_STAIRS_DOWN, // 85 - was this supposed to be a ladder? {dlb}
+ DNGN_ROCK_STAIRS_DOWN, // 85 - now escape hatch (Stonesoup 0.3)
+ // corresponding up stairs (same order as above)
DNGN_STONE_STAIRS_UP_I,
DNGN_STONE_STAIRS_UP_II,
DNGN_STONE_STAIRS_UP_III,
- DNGN_ROCK_STAIRS_UP, // 89 - was this supposed to be a ladder? {dlb}
+ DNGN_ROCK_STAIRS_UP, // 89 - now escape hatch (Stonesoup 0.3)
+ // Various gates
DNGN_ENTER_DIS = 92, // 92
DNGN_ENTER_GEHENNA,
DNGN_ENTER_COCYTUS,
@@ -917,7 +921,9 @@ enum dungeon_feature_type
DNGN_BUILDER_SPECIAL_WALL = 105, // 105; builder() only
DNGN_BUILDER_SPECIAL_FLOOR, // 106; builder() only
- DNGN_ENTER_ORCISH_MINES = 110, // 110
+ // Entrances to various branches
+ DNGN_ENTER_FIRST_BRANCH = 110, // 110
+ DNGN_ENTER_ORCISH_MINES = DNGN_ENTER_FIRST_BRANCH,
DNGN_ENTER_HIVE,
DNGN_ENTER_LAIR,
DNGN_ENTER_SLIME_PITS,
@@ -934,8 +940,12 @@ enum dungeon_feature_type
DNGN_ENTER_RESERVED_2,
DNGN_ENTER_RESERVED_3,
DNGN_ENTER_RESERVED_4, // 126
+ DNGN_ENTER_LAST_BRANCH = DNGN_ENTER_RESERVED_4,
- DNGN_RETURN_FROM_ORCISH_MINES = 130, // 130
+ // Exits from various branches
+ // Order must be the same as above
+ DNGN_RETURN_FROM_FIRST_BRANCH = 130, // 130
+ DNGN_RETURN_FROM_ORCISH_MINES = DNGN_RETURN_FROM_FIRST_BRANCH,
DNGN_RETURN_FROM_HIVE,
DNGN_RETURN_FROM_LAIR,
DNGN_RETURN_FROM_SLIME_PITS,
@@ -952,12 +962,15 @@ enum dungeon_feature_type
DNGN_RETURN_RESERVED_2,
DNGN_RETURN_RESERVED_3,
DNGN_RETURN_RESERVED_4, // 146
+ DNGN_RETURN_FROM_LAST_BRANCH = DNGN_RETURN_RESERVED_4,
// Portals to various places unknown.
DNGN_ENTER_PORTAL_VAULT = 160,
DNGN_EXIT_PORTAL_VAULT,
- DNGN_ALTAR_ZIN = 180, // 180
+ // Order of altars must match order of gods (god_type)
+ DNGN_ALTAR_FIRST_GOD = 180, // 180
+ DNGN_ALTAR_ZIN = DNGN_ALTAR_FIRST_GOD,
DNGN_ALTAR_SHINING_ONE,
DNGN_ALTAR_KIKUBAAQUDGHA,
DNGN_ALTAR_YREDELEMNUL,
@@ -971,6 +984,7 @@ enum dungeon_feature_type
DNGN_ALTAR_ELYVILON, // 191
DNGN_ALTAR_LUGONU,
DNGN_ALTAR_BEOGH,
+ DNGN_ALTAR_LAST_GOD = DNGN_ALTAR_BEOGH,
DNGN_BLUE_FOUNTAIN = 200, // 200
DNGN_DRY_FOUNTAIN_I,
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 951cd6794a..d3848d7c3f 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -701,19 +701,19 @@ static void place_player_on_stair(branch_type old_branch,
// look for coresponding down stair
stair_taken += (DNGN_STONE_STAIRS_DOWN_I - DNGN_STONE_STAIRS_UP_I);
}
- else if (stair_taken >= DNGN_RETURN_FROM_ORCISH_MINES
+ else if (stair_taken >= DNGN_RETURN_FROM_FIRST_BRANCH
&& stair_taken < 150) // 20 slots reserved
{
// find entry point to subdungeon when leaving
- stair_taken += (DNGN_ENTER_ORCISH_MINES
- - DNGN_RETURN_FROM_ORCISH_MINES);
+ stair_taken += (DNGN_ENTER_FIRST_BRANCH
+ - DNGN_RETURN_FROM_FIRST_BRANCH);
}
- else if (stair_taken >= DNGN_ENTER_ORCISH_MINES
- && stair_taken < DNGN_RETURN_FROM_ORCISH_MINES)
+ else if (stair_taken >= DNGN_ENTER_FIRST_BRANCH
+ && stair_taken < DNGN_RETURN_FROM_FIRST_BRANCH)
{
// find exit staircase from subdungeon when entering
- stair_taken += (DNGN_RETURN_FROM_ORCISH_MINES
- - DNGN_ENTER_ORCISH_MINES);
+ stair_taken += (DNGN_RETURN_FROM_FIRST_BRANCH
+ - DNGN_ENTER_FIRST_BRANCH);
}
else if (stair_taken >= DNGN_ENTER_DIS
&& stair_taken <= DNGN_TRANSIT_PANDEMONIUM)
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc
index 9423c44f8f..272768ba54 100644
--- a/crawl-ref/source/terrain.cc
+++ b/crawl-ref/source/terrain.cc
@@ -198,8 +198,8 @@ bool grid_destroys_items( dungeon_feature_type grid )
// returns 0 if grid is not an altar, else it returns the GOD_* type
god_type grid_altar_god( dungeon_feature_type grid )
{
- if (grid >= DNGN_ALTAR_ZIN && grid <= DNGN_ALTAR_BEOGH)
- return (static_cast<god_type>( grid - DNGN_ALTAR_ZIN + 1 ));
+ if (grid >= DNGN_ALTAR_FIRST_GOD && grid <= DNGN_ALTAR_LAST_GOD)
+ return (static_cast<god_type>( grid - DNGN_ALTAR_FIRST_GOD + 1 ));
return (GOD_NO_GOD);
}
@@ -211,12 +211,12 @@ dungeon_feature_type altar_for_god( god_type god )
if (god == GOD_NO_GOD || god >= NUM_GODS)
return (DNGN_FLOOR); // Yeah, lame. Tell me about it.
- return static_cast<dungeon_feature_type>(DNGN_ALTAR_ZIN + god - 1);
+ return static_cast<dungeon_feature_type>(DNGN_ALTAR_FIRST_GOD + god - 1);
}
bool grid_is_branch_stairs( dungeon_feature_type grid )
{
- return ((grid >= DNGN_ENTER_ORCISH_MINES && grid <= DNGN_ENTER_RESERVED_4)
+ return ((grid >= DNGN_ENTER_FIRST_BRANCH && grid <= DNGN_ENTER_LAST_BRANCH)
|| (grid >= DNGN_ENTER_DIS && grid <= DNGN_ENTER_TARTARUS));
}
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index 73ae84b49f..126c0c0652 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -1932,9 +1932,9 @@ void tutorial_describe_item(item_def &item)
bool tutorial_feat_interesting(dungeon_feature_type feat)
{
- if (feat >= DNGN_ALTAR_ZIN && feat <= DNGN_ALTAR_BEOGH)
+ if (feat >= DNGN_ALTAR_FIRST_GOD && feat <= DNGN_ALTAR_LAST_GOD)
return true;
- if (feat >= DNGN_ENTER_ORCISH_MINES && feat <= DNGN_ENTER_SHOALS)
+ if (feat >= DNGN_ENTER_FIRST_BRANCH && feat <= DNGN_ENTER_LAST_BRANCH)
return true;
switch (feat)
@@ -1966,6 +1966,11 @@ void tutorial_describe_feature(dungeon_feature_type feat)
{
case DNGN_ORCISH_IDOL:
case DNGN_GRANITE_STATUE:
+ ostr << "It's just a harmless statue - or is it?\n Even if not "
+ "a danger by themselves, statues often mark special "
+ "areas, dangerous ones or ones harbouring treasure.";
+ break;
+
case DNGN_TRAP_MAGICAL:
case DNGN_TRAP_MECHANICAL:
ostr << "These nasty constructions can do physical damage (with "
@@ -1981,6 +1986,7 @@ void tutorial_describe_feature(dungeon_feature_type feat)
}
Options.tutorial_events[TUT_SEEN_TRAP] = 0;
break;
+
case DNGN_STONE_STAIRS_DOWN_I:
case DNGN_STONE_STAIRS_DOWN_II:
case DNGN_STONE_STAIRS_DOWN_III:
@@ -1989,6 +1995,7 @@ void tutorial_describe_feature(dungeon_feature_type feat)
"press <w><<<magenta> while standing on the upstairs.";
Options.tutorial_events[TUT_SEEN_STAIRS] = 0;
break;
+
case DNGN_STONE_STAIRS_UP_I:
case DNGN_STONE_STAIRS_UP_II:
case DNGN_STONE_STAIRS_UP_III:
@@ -2016,25 +2023,13 @@ void tutorial_describe_feature(dungeon_feature_type feat)
Options.tutorial_events[TUT_SEEN_ESCAPE_HATCH] = 0;
break;
- case DNGN_ALTAR_ZIN:
- case DNGN_ALTAR_SHINING_ONE:
- case DNGN_ALTAR_KIKUBAAQUDGHA:
- case DNGN_ALTAR_YREDELEMNUL:
- case DNGN_ALTAR_XOM:
- case DNGN_ALTAR_VEHUMET:
- case DNGN_ALTAR_OKAWARU:
- case DNGN_ALTAR_MAKHLEB:
- case DNGN_ALTAR_SIF_MUNA:
- case DNGN_ALTAR_TROG:
- case DNGN_ALTAR_NEMELEX_XOBEH:
- case DNGN_ALTAR_ELYVILON:
- case DNGN_ALTAR_LUGONU:
- case DNGN_ALTAR_BEOGH:
- {
- god_type altar_god = grid_altar_god(feat);
-
- if (you.religion == GOD_NO_GOD)
+ default:
+ if (feat >= DNGN_ALTAR_FIRST_GOD && feat <= DNGN_ALTAR_LAST_GOD)
{
+ god_type altar_god = grid_altar_god(feat);
+
+ if (you.religion == GOD_NO_GOD)
+ {
ostr << "This is your chance to join a religion! In general, the "
"gods will help their followers, bestowing powers of all "
"sorts upon them, but many of them demand a life of "
@@ -2044,11 +2039,11 @@ void tutorial_describe_feature(dungeon_feature_type feat)
<< "<magenta> by pressing <w>p<magenta> while standing on "
"the altar. Before taking up the responding faith you'll "
"be asked for confirmation.";
- }
- else
- {
- if (you.religion == altar_god)
+ }
+ else
{
+ if (you.religion == altar_god)
+ {
ostr << "If "
<< god_name(you.religion)
<< " likes to have items or corpses sacrificed on altars, "
@@ -2057,9 +2052,9 @@ void tutorial_describe_feature(dungeon_feature_type feat)
"<w>^<magenta> allows you to check "
<< god_name(you.religion)
<< "'s likes and dislikes at any time.";
- }
- else
- {
+ }
+ else
+ {
ostr << god_name(you.religion)
<< " probably won't like it if you switch allegiance, "
"but having a look won't hurt: to get information on <w>";
@@ -2071,32 +2066,21 @@ void tutorial_describe_feature(dungeon_feature_type feat)
"\nTo see your current standing with "
<< god_name(you.religion)
<< " press <w>^<magenta>.";
+ }
}
+ Options.tutorial_events[TUT_SEEN_ALTAR] = 0;
+ break;
}
- Options.tutorial_events[TUT_SEEN_ALTAR] = 0;
- break;
- }
- case DNGN_ENTER_ORCISH_MINES:
- case DNGN_ENTER_HIVE:
- case DNGN_ENTER_LAIR:
- case DNGN_ENTER_SLIME_PITS:
- case DNGN_ENTER_VAULTS:
- case DNGN_ENTER_CRYPT:
- case DNGN_ENTER_HALL_OF_BLADES:
- case DNGN_ENTER_ZOT:
- case DNGN_ENTER_TEMPLE:
- case DNGN_ENTER_SNAKE_PIT:
- case DNGN_ENTER_ELVEN_HALLS:
- case DNGN_ENTER_TOMB:
- case DNGN_ENTER_SWAMP:
- case DNGN_ENTER_SHOALS:
- ostr << "An entryway into one of the many dungeon branches in Crawl. ";
- if (feat != DNGN_ENTER_TEMPLE)
- ostr << "Beware, sometimes these can be deadly!";
- break;
-
- default:
- return;
+ else if (feat >= DNGN_ENTER_FIRST_BRANCH && feat <= DNGN_ENTER_LAST_BRANCH)
+ {
+ ostr << "An entryway into one of the many dungeon branches in "
+ "Crawl. ";
+ if (feat != DNGN_ENTER_TEMPLE)
+ ostr << "Beware, sometimes these can be deadly!";
+ break;
+ }
+ else
+ return;
}
std::string broken = ostr.str();