NOTE: This commit is buggy; the final Hell vaults contain buggy runes now. Will fix later; this is a benchmark, since hopefully everything else works.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@682 c06c8d41-db1a-0410-9941-cceddc491573
5UVDIVD4NSXA52U4QMQIVST3GSZJ2A2YZK3RUEXKPM43YVQ7LI5AC
RGWUYJO74FDGTH22CYSHBKFDGJ4S76WTLIULKPXA4QT5ZCNOB4LQC
Y66ZAXN24E3HLIBOSW4OXUTQ4X4PRGNJII4KVDQH4GQJVA6GO3NAC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
MSQI3TH6T62JAXQGLL52QZCWAMC372TGB6ZNNRDGUGMJKBNNV2VAC
T4IH76FA5TWHFOZUJFHLQXQJENJHWTUZZP4EGNA7D4GTZY7D4ZKAC
5ASC3STDYCNLZFEBN6UTMUCGDETHBR2OCBZCF5VIAZ5RRWLOTDYQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
GACH6PWPGGUBEE7PFEPQMOZKSR7HTQGL2WLGF2AQPJD3FCCSKZNQC
GF6AK3IHZK6UE3LI2TXU3H7EF4XM4R4SBAKZYWFTS7J74UQCPEOQC
ZP2KE7A2LE7Z2S7AC45WE4CXDSEVDTWIMV2EM4IBUKXYJIDU6R7QC
MQ62OAMLGJVRW2QIL4PAZRAU6PC52ZVGY2FCOBIY6IWGQIHMU5CAC
UL7XFKMUX3WIU4O2LZANK4ECJ654UZPDBFGNXUEYZYOLKBYBCG6AC
// Mappings of which branches spring from which other branches, essential to
// walk backwards up the tree.
static int branch_backout[][2] =
{
{ BRANCH_SWAMP, BRANCH_LAIR },
{ BRANCH_SLIME_PITS, BRANCH_LAIR },
{ BRANCH_SNAKE_PIT, BRANCH_LAIR },
{ BRANCH_HALL_OF_BLADES, BRANCH_VAULTS },
{ BRANCH_CRYPT, BRANCH_VAULTS },
{ BRANCH_TOMB, BRANCH_CRYPT },
{ BRANCH_ELVEN_HALLS, BRANCH_ORCISH_MINES },
{ BRANCH_ORCISH_MINES, BRANCH_MAIN_DUNGEON },
{ BRANCH_HIVE, BRANCH_MAIN_DUNGEON },
{ BRANCH_LAIR, BRANCH_MAIN_DUNGEON },
{ BRANCH_VAULTS, BRANCH_MAIN_DUNGEON },
{ BRANCH_HALL_OF_ZOT, BRANCH_MAIN_DUNGEON },
{ BRANCH_ECUMENICAL_TEMPLE, BRANCH_MAIN_DUNGEON },
};
for (unsigned i = 0;
i < sizeof(branch_backout) / sizeof(branch_backout[0]);
i++)
{
if (branch_backout[i][0] == br)
return branch_backout[i][1];
}
return 0;
return branches[br].parent_branch;
static struct
{
const char *branch_name, *full_name;
char hotkey;
} branches [] =
{
{ "Dungeon", "the Main Dungeon", 'D' },
{ "Dis", "Dis", 'I' },
{ "Gehenna", "Gehenna", 'N' },
{ "Hell", "Hell", 'U' },
{ "Cocytus", "Cocytus", 'X' },
{ "Tartarus", "Tartarus", 'Y' },
{ "Inferno", "", 'R' },
{ "The Pit", "", '0' },
{ "------------", "", '-' },
{ "------------", "", '-' },
{ "Orcish Mines", "the Orcish Mines", 'O' },
{ "Hive", "the Hive", 'H' },
{ "Lair", "the Lair", 'L' },
{ "Slime Pits", "the Slime Pits", 'M' },
{ "Vaults", "the Vaults", 'V' },
{ "Crypt", "the Crypt", 'C' },
{ "Hall of Blades", "the Hall of Blades", 'B' },
{ "Zot", "the Realm of Zot", 'Z' },
{ "Temple", "the Ecumenical Temple", 'T' },
{ "Snake Pit", "the Snake Pit", 'P' },
{ "Elven Halls", "the Elven Halls", 'E' },
{ "Tomb", "the Tomb", 'G' },
{ "Swamp", "the Swamp", 'S' }
};
static struct
{
const char *abbr;
unsigned char branch;
} branch_abbrvs[] =
{
{ "D", BRANCH_MAIN_DUNGEON },
{ "Dis", BRANCH_DIS },
{ "Geh", BRANCH_GEHENNA },
{ "Hell", BRANCH_VESTIBULE_OF_HELL },
{ "Coc", BRANCH_COCYTUS },
{ "Tar", BRANCH_TARTARUS },
{ "inf", BRANCH_INFERNO },
{ "pit", BRANCH_THE_PIT },
{ "Orc", BRANCH_ORCISH_MINES },
{ "Hive", BRANCH_HIVE },
{ "Lair", BRANCH_LAIR },
{ "Slime", BRANCH_SLIME_PITS },
{ "Vault", BRANCH_VAULTS },
{ "Crypt", BRANCH_CRYPT },
{ "Blades", BRANCH_HALL_OF_BLADES },
{ "Zot", BRANCH_HALL_OF_ZOT },
{ "Temple", BRANCH_ECUMENICAL_TEMPLE },
{ "Snake", BRANCH_SNAKE_PIT },
{ "Elf", BRANCH_ELVEN_HALLS },
{ "Tomb", BRANCH_TOMB },
{ "Swamp", BRANCH_SWAMP },
};
const char *branch = NULL;
for (unsigned i = 0; i < sizeof(branch_abbrvs) / sizeof(branch_abbrvs[0]);
++i)
{
if (branch_abbrvs[i].branch == target.id.branch)
{
branch = branch_abbrvs[i].abbr;
break;
}
}
const int branch_id = target.id.branch;
const char *branch = branches[branch_id].abbrevname;
// If the overmap knows the stairs to this branch, we know the branch.
return ( stair_level.find(static_cast<branch_type>(branch)) != stair_level.end() );
// Doing this to check for the reachability of a branch is slow enough to
// be noticeable.
// Ask interlevel travel if it knows how to go there. If it knows how to
// get (partway) there, return true.
// The Vestibule is special: there are no stairs to it, just
// a portal
if (branch == BRANCH_VESTIBULE_OF_HELL)
{
// XXX There must be a better way to do this...
std::vector<stash_search_result> tmp;
get_matching_features(text_pattern("gateway to Hell"), tmp);
return !tmp.empty();
}
// level_pos pos;
// pos.id.branch = branch;
// pos.id.depth = 1;
// return find_transtravel_square(pos, false) != 0;
// If the overmap knows the stairs to this branch, we know the branch.
return ( stair_level.find(static_cast<branch_type>(branch)) !=
stair_level.end() );
// Lifted from overmap.cc. XXX: Move this to a better place?
const unsigned char list_order[] =
{
BRANCH_MAIN_DUNGEON,
BRANCH_ECUMENICAL_TEMPLE,
BRANCH_ORCISH_MINES, BRANCH_ELVEN_HALLS,
BRANCH_LAIR, BRANCH_SWAMP, BRANCH_SLIME_PITS, BRANCH_SNAKE_PIT,
BRANCH_HIVE,
BRANCH_VAULTS, BRANCH_HALL_OF_BLADES, BRANCH_CRYPT, BRANCH_TOMB,
BRANCH_VESTIBULE_OF_HELL,
BRANCH_DIS, BRANCH_GEHENNA, BRANCH_COCYTUS, BRANCH_TARTARUS,
BRANCH_HALL_OF_ZOT
};
std::vector<branch_type> result;
std::vector<unsigned char> result;
for (unsigned i = 0; i < sizeof list_order / sizeof(*list_order); ++i)
{
if (is_known_branch(list_order[i]))
result.push_back(list_order[i]);
}
for (int i = 0; i < NUM_BRANCHES; ++i)
if (is_known_branch(branches[i].id))
result.push_back(branches[i].id);
case DNGN_ENTER_GEHENNA:
id.branch = BRANCH_GEHENNA;
id.depth = 1;
break;
case DNGN_ENTER_COCYTUS:
id.branch = BRANCH_COCYTUS;
id.depth = 1;
break;
case DNGN_ENTER_TARTARUS:
id.branch = BRANCH_TARTARUS;
id.depth = 1;
break;
case DNGN_ENTER_ORCISH_MINES:
id.branch = BRANCH_ORCISH_MINES;
id.depth = 1;
break;
case DNGN_ENTER_HIVE:
id.branch = BRANCH_HIVE;
id.depth = 1;
break;
case DNGN_ENTER_LAIR:
id.branch = BRANCH_LAIR;
id.depth = 1;
break;
case DNGN_ENTER_SLIME_PITS:
id.branch = BRANCH_SLIME_PITS;
id.depth = 1;
break;
case DNGN_ENTER_VAULTS:
id.branch = BRANCH_VAULTS;
id.depth = 1;
break;
case DNGN_ENTER_CRYPT:
id.branch = BRANCH_CRYPT;
id.depth = 1;
break;
case DNGN_ENTER_HALL_OF_BLADES:
id.branch = BRANCH_HALL_OF_BLADES;
id.depth = 1;
break;
case DNGN_ENTER_ZOT:
id.branch = BRANCH_HALL_OF_ZOT;
id.depth = 1;
break;
case DNGN_ENTER_TEMPLE:
id.branch = BRANCH_ECUMENICAL_TEMPLE;
id.depth = 1;
break;
case DNGN_ENTER_SNAKE_PIT:
id.branch = BRANCH_SNAKE_PIT;
id.depth = 1;
break;
case DNGN_ENTER_ELVEN_HALLS:
id.branch = BRANCH_ELVEN_HALLS;
id.depth = 1;
break;
case DNGN_ENTER_TOMB:
id.branch = BRANCH_TOMB;
id.depth = 1;
break;
case DNGN_ENTER_SWAMP:
id.branch = BRANCH_SWAMP;
id.depth = 1;
break;
case DNGN_RETURN_FROM_ORCISH_MINES: case DNGN_RETURN_FROM_HIVE:
case DNGN_RETURN_FROM_LAIR: case DNGN_RETURN_FROM_SLIME_PITS:
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: case DNGN_RETURN_FROM_TOMB:
case DNGN_RETURN_FROM_SWAMP:
find_parent_branch(id.branch, id.depth, &id.branch, &id.depth);
if (!id.depth)
{
id.branch = find_parent_branch(you.where_are_you);
id.depth = -1;
}
break;
// better put this somewhere central
const branch_type list_order[] =
{
BRANCH_MAIN_DUNGEON,
BRANCH_ECUMENICAL_TEMPLE,
BRANCH_ORCISH_MINES, BRANCH_ELVEN_HALLS,
BRANCH_LAIR, BRANCH_SWAMP, BRANCH_SLIME_PITS, BRANCH_SNAKE_PIT,
BRANCH_HIVE,
BRANCH_VAULTS, BRANCH_HALL_OF_BLADES, BRANCH_CRYPT, BRANCH_TOMB,
BRANCH_VESTIBULE_OF_HELL,
BRANCH_DIS, BRANCH_GEHENNA, BRANCH_COCYTUS, BRANCH_TARTARUS,
BRANCH_HALL_OF_ZOT
};
if ( branch > BRANCH_CAVERNS ) // last branch
return -1;
switch ( branch ) {
case BRANCH_MAIN_DUNGEON:
return 27;
case BRANCH_DIS:
case BRANCH_GEHENNA:
case BRANCH_COCYTUS:
case BRANCH_TARTARUS:
return 7;
case BRANCH_VESTIBULE_OF_HELL:
return 1;
case BRANCH_INFERNO:
case BRANCH_THE_PIT:
return -1;
default:
return branch_depth( branch - 10 );
}
if ( branch >= NUM_BRANCHES )
return -1;
return branches[branch].depth;
}
// Determine starting depths of branches
static void initialise_branch_depths()
{
branches[BRANCH_ECUMENICAL_TEMPLE].startdepth = 3 + random2(4);
branches[BRANCH_ORCISH_MINES].startdepth = 5 + random2(6);
branches[BRANCH_ELVEN_HALLS].startdepth = coinflip() ? 4 : 3;
branches[BRANCH_LAIR].startdepth = 7 + random2(6);
branches[BRANCH_HIVE].startdepth = 10 + random2(6);
branches[BRANCH_SLIME_PITS].startdepth = 3 + random2(4);
branches[BRANCH_SWAMP].startdepth = 2 + random2(6);
branches[BRANCH_SNAKE_PIT].startdepth = coinflip() ? 7 : 6;
branches[BRANCH_VAULTS].startdepth = 13 + random2(6);
branches[BRANCH_CRYPT].startdepth = 2 + random2(3);
branches[BRANCH_HALL_OF_BLADES].startdepth = 4;
branches[BRANCH_TOMB].startdepth = coinflip() ? 3 : 2;
// places staircases to the branch levels:
for (i = 0; i < 30; i++)
{
you.branch_stairs[i] = 100;
}
you.branch_stairs[STAIRS_ECUMENICAL_TEMPLE] = 3 + random2(4); // avg: 4.5
you.branch_stairs[STAIRS_ORCISH_MINES] = 5 + random2(6); // avg: 7.5
you.branch_stairs[STAIRS_ELVEN_HALLS] =
you.branch_stairs[STAIRS_ORCISH_MINES] + (coinflip() ? 4 : 3); // 11.0
you.branch_stairs[STAIRS_LAIR] = 7 + random2(6); // avg: 9.5
you.branch_stairs[STAIRS_HIVE] = 10 + random2(6); // avg: 12.5
you.branch_stairs[STAIRS_SLIME_PITS] =
you.branch_stairs[STAIRS_LAIR] + 3 + random2(4); // avg: 14.0
you.branch_stairs[STAIRS_SWAMP] =
you.branch_stairs[STAIRS_LAIR] + 2 + random2(6); // avg: 14.0
you.branch_stairs[STAIRS_SNAKE_PIT] =
you.branch_stairs[STAIRS_LAIR] + (coinflip() ? 7 : 6); // avg: 16.0
you.branch_stairs[STAIRS_VAULTS] = 13 + random2(6); // avg: 15.5
you.branch_stairs[STAIRS_CRYPT] =
you.branch_stairs[STAIRS_VAULTS] + 2 + random2(3); // avg: 18.5
initialise_branch_depths();
// [ds] Why in the name of all that's holy are these in mon-pick.cc?
int branch_depth(int branch);
int branch_stair(int branch);
int mons_cocytus_level(int mcls);
int mons_cocytus_rare(int mcls);
int mons_crypt_level(int mcls);
int mons_crypt_rare(int mcls);
int mons_dis_level(int mcls);
int mons_dis_rare(int mcls);
int mons_gehenna_level(int mcls);
int mons_gehenna_rare(int mcls);
int mons_hallblade_level(int mcls);
int mons_hallblade_rare(int mcls);
int mons_hallelf_level(int mcls);
int mons_hallelf_rare(int mcls);
int mons_hallzot_level(int mcls);
int mons_hallzot_rare(int mcls);
int mons_hive_level(int mcls);
int mons_hive_rare(int mcls);
int mons_lair_level(int mcls);
int mons_lair_rare(int mcls);
int mons_mineorc_level(int mcls);
int mons_mineorc_rare(int mcls);
int mons_pitslime_level(int mcls);
int mons_pitslime_rare(int mcls);
int mons_pitsnake_level(int mcls);
int mons_pitsnake_rare(int mcls);
int mons_standard_level(int mcls);
int mons_standard_rare(int mcls);
int mons_swamp_level(int mcls);
int mons_swamp_rare(int mcls);
int mons_tartarus_level(int mcls);
int mons_tartarus_rare(int mcls);
int mons_tomb_level(int mcls);
int mons_tomb_rare(int mcls);
int mons_caverns_level(int mcls);
int mons_caverns_rare(int mcls);
static int mons_cocytus_level(int mcls);
static int mons_cocytus_rare(int mcls);
static int mons_crypt_level(int mcls);
static int mons_crypt_rare(int mcls);
static int mons_dis_level(int mcls);
static int mons_dis_rare(int mcls);
static int mons_gehenna_level(int mcls);
static int mons_gehenna_rare(int mcls);
static int mons_hallblade_level(int mcls);
static int mons_hallblade_rare(int mcls);
static int mons_hallelf_level(int mcls);
static int mons_hallelf_rare(int mcls);
static int mons_hallzot_level(int mcls);
static int mons_hallzot_rare(int mcls);
static int mons_hive_level(int mcls);
static int mons_hive_rare(int mcls);
static int mons_lair_level(int mcls);
static int mons_lair_rare(int mcls);
static int mons_mineorc_level(int mcls);
static int mons_mineorc_rare(int mcls);
static int mons_pitslime_level(int mcls);
static int mons_pitslime_rare(int mcls);
static int mons_pitsnake_level(int mcls);
static int mons_pitsnake_rare(int mcls);
static int mons_standard_level(int mcls);
static int mons_standard_rare(int mcls);
static int mons_swamp_level(int mcls);
static int mons_swamp_rare(int mcls);
static int mons_tartarus_level(int mcls);
static int mons_tartarus_rare(int mcls);
static int mons_tomb_level(int mcls);
static int mons_tomb_rare(int mcls);
static int mons_caverns_level(int mcls);
static int mons_caverns_rare(int mcls);
/* ******************* BEGIN EXTERNAL FUNCTIONS ******************* */
int branch_depth(int branch)
{
switch (branch)
{
case STAIRS_LAIR:
return 10;
case STAIRS_VAULTS:
return 8;
case STAIRS_ELVEN_HALLS:
return 7;
case STAIRS_SLIME_PITS:
return 6;
case STAIRS_CRYPT:
case STAIRS_HALL_OF_ZOT:
case STAIRS_SNAKE_PIT:
case STAIRS_SWAMP:
return 5;
case STAIRS_HIVE:
case STAIRS_ORCISH_MINES:
return 4;
case STAIRS_TOMB:
return 3;
case STAIRS_ECUMENICAL_TEMPLE:
case STAIRS_HALL_OF_BLADES:
return 1;
default:
return 0;
}
} // end branch_depth()
#include "branch.h"
#include "misc.h"
int branch_stair(int branch)
{
switch (branch)
{
case BRANCH_ORCISH_MINES: return STAIRS_ORCISH_MINES;
case BRANCH_HIVE: return STAIRS_HIVE;
case BRANCH_LAIR: return STAIRS_LAIR;
case BRANCH_SLIME_PITS: return STAIRS_SLIME_PITS;
case BRANCH_VAULTS: return STAIRS_VAULTS;
case BRANCH_CRYPT: return STAIRS_CRYPT;
case BRANCH_HALL_OF_BLADES: return STAIRS_HALL_OF_BLADES;
case BRANCH_HALL_OF_ZOT: return STAIRS_HALL_OF_ZOT;
case BRANCH_ECUMENICAL_TEMPLE: return STAIRS_ECUMENICAL_TEMPLE;
case BRANCH_SNAKE_PIT: return STAIRS_SNAKE_PIT;
case BRANCH_ELVEN_HALLS: return STAIRS_ELVEN_HALLS;
case BRANCH_TOMB: return STAIRS_TOMB;
case BRANCH_SWAMP: return STAIRS_SWAMP;
default:
return -1;
}
}
{
fnc_level =
((you.where_are_you == BRANCH_DIS) ? mons_dis_level :
(you.where_are_you == BRANCH_GEHENNA) ? mons_gehenna_level :
(you.where_are_you == BRANCH_COCYTUS) ? mons_cocytus_level :
(you.where_are_you == BRANCH_TARTARUS) ? mons_tartarus_level :
(you.where_are_you == BRANCH_ORCISH_MINES) ? mons_mineorc_level :
(you.where_are_you == BRANCH_HIVE) ? mons_hive_level :
(you.where_are_you == BRANCH_LAIR) ? mons_lair_level :
(you.where_are_you == BRANCH_SLIME_PITS) ? mons_pitslime_level :
(you.where_are_you == BRANCH_CRYPT) ? mons_crypt_level :
(you.where_are_you == BRANCH_HALL_OF_BLADES)?mons_hallblade_level :
(you.where_are_you == BRANCH_HALL_OF_ZOT) ? mons_hallzot_level :
(you.where_are_you == BRANCH_SNAKE_PIT) ? mons_pitsnake_level :
(you.where_are_you == BRANCH_ELVEN_HALLS) ? mons_hallelf_level :
(you.where_are_you == BRANCH_TOMB) ? mons_tomb_level :
(you.where_are_you == BRANCH_SWAMP) ? mons_swamp_level :
(you.where_are_you == BRANCH_VAULTS) ? mons_standard_level :
(you.where_are_you == BRANCH_CAVERNS) ? mons_caverns_level
: mons_standard_level);
monster_level = branches[you.where_are_you].mons_level_function(mcls);
{
fnc_rarity =
((you.where_are_you == BRANCH_DIS) ? mons_dis_rare :
(you.where_are_you == BRANCH_GEHENNA) ? mons_gehenna_rare :
(you.where_are_you == BRANCH_COCYTUS) ? mons_cocytus_rare :
(you.where_are_you == BRANCH_TARTARUS) ? mons_tartarus_rare :
(you.where_are_you == BRANCH_ORCISH_MINES) ? mons_mineorc_rare :
(you.where_are_you == BRANCH_HIVE) ? mons_hive_rare :
(you.where_are_you == BRANCH_LAIR) ? mons_lair_rare :
(you.where_are_you == BRANCH_SLIME_PITS) ? mons_pitslime_rare :
(you.where_are_you == BRANCH_CRYPT) ? mons_crypt_rare :
(you.where_are_you == BRANCH_HALL_OF_BLADES)?mons_hallblade_rare :
(you.where_are_you == BRANCH_HALL_OF_ZOT) ? mons_hallzot_rare :
(you.where_are_you == BRANCH_SNAKE_PIT) ? mons_pitsnake_rare :
(you.where_are_you == BRANCH_ELVEN_HALLS) ? mons_hallelf_rare :
(you.where_are_you == BRANCH_TOMB) ? mons_tomb_rare :
(you.where_are_you == BRANCH_SWAMP) ? mons_swamp_rare :
(you.where_are_you == BRANCH_VAULTS) ? mons_standard_rare :
(you.where_are_you == BRANCH_CAVERNS) ? mons_caverns_rare
: mons_standard_rare);
monster_rarity = fnc_rarity(mcls);
}
return branches[you.where_are_you].mons_rarity_function(mcls);
}
case DNGN_RETURN_FROM_ORCISH_MINES:
case DNGN_RETURN_FROM_HIVE:
case DNGN_RETURN_FROM_LAIR:
case DNGN_RETURN_FROM_VAULTS:
case DNGN_RETURN_FROM_TEMPLE:
case DNGN_RETURN_FROM_ZOT:
mpr("Welcome back to the Dungeon!");
you.where_are_you = BRANCH_MAIN_DUNGEON;
break;
case DNGN_RETURN_FROM_SLIME_PITS:
case DNGN_RETURN_FROM_SNAKE_PIT:
case DNGN_RETURN_FROM_SWAMP:
mpr("Welcome back to the Lair of Beasts!");
you.where_are_you = BRANCH_LAIR;
break;
case DNGN_RETURN_FROM_CRYPT:
case DNGN_RETURN_FROM_HALL_OF_BLADES:
mpr("Welcome back to the Vaults!");
you.where_are_you = BRANCH_VAULTS;
break;
case DNGN_RETURN_FROM_TOMB:
mpr("Welcome back to the Crypt!");
you.where_are_you = BRANCH_CRYPT;
break;
case DNGN_RETURN_FROM_ELVEN_HALLS:
mpr("Welcome back to the Orcish Mines!");
you.where_are_you = BRANCH_ORCISH_MINES;
break;
if ( branches[i].exit_stairs == stair_find )
{
mprf("Welcome back to %s!",
branches[branches[i].parent_branch].longname);
you.where_are_you = branches[i].parent_branch;
break;
}
if ((stair_find >= DNGN_ENTER_DIS
&& stair_find <= DNGN_ENTER_TARTARUS)
|| (stair_find >= DNGN_ENTER_ORCISH_MINES
&& stair_find < DNGN_RETURN_FROM_ORCISH_MINES))
// welcome message
// try to find a branch stair
for ( i = 0; i < NUM_BRANCHES; ++i )
// no idea why such a huge switch and not 100-grd[][]
// planning ahead for reorganizing grd[][] values - 13jan2000 {dlb}
strcpy( info, "Welcome to " );
switch (stair_find)
if ( branches[i].entry_stairs == stair_find )
case DNGN_ENTER_DIS:
strcat(info, "the Iron City of Dis!");
you.where_are_you = BRANCH_DIS;
you.your_level = 26;
break;
case DNGN_ENTER_GEHENNA:
strcat(info, "Gehenna!");
you.where_are_you = BRANCH_GEHENNA;
you.your_level = 26;
break;
case DNGN_ENTER_COCYTUS:
strcat(info, "Cocytus!");
you.where_are_you = BRANCH_COCYTUS;
you.your_level = 26;
break;
case DNGN_ENTER_TARTARUS:
strcat(info, "Tartarus!");
you.where_are_you = BRANCH_TARTARUS;
you.your_level = 26;
break;
case DNGN_ENTER_ORCISH_MINES:
strcat(info, "the Orcish Mines!");
you.where_are_you = BRANCH_ORCISH_MINES;
break;
case DNGN_ENTER_HIVE:
strcpy(info, "You hear a buzzing sound coming from all directions.");
you.where_are_you = BRANCH_HIVE;
break;
case DNGN_ENTER_LAIR:
strcat(info, "the Lair of Beasts!");
you.where_are_you = BRANCH_LAIR;
break;
case DNGN_ENTER_SLIME_PITS:
strcat(info, "the Pits of Slime!");
you.where_are_you = BRANCH_SLIME_PITS;
break;
case DNGN_ENTER_VAULTS:
strcat(info, "the Vaults!");
you.where_are_you = BRANCH_VAULTS;
break;
case DNGN_ENTER_CRYPT:
strcat(info, "the Crypt!");
you.where_are_you = BRANCH_CRYPT;
break;
case DNGN_ENTER_HALL_OF_BLADES:
strcat(info, "the Hall of Blades!");
you.where_are_you = BRANCH_HALL_OF_BLADES;
break;
case DNGN_ENTER_ZOT:
strcat(info, "the Hall of Zot!");
you.where_are_you = BRANCH_HALL_OF_ZOT;
break;
case DNGN_ENTER_TEMPLE:
strcat(info, "the Ecumenical Temple!");
you.where_are_you = BRANCH_ECUMENICAL_TEMPLE;
break;
case DNGN_ENTER_SNAKE_PIT:
strcat(info, "the Snake Pit!");
you.where_are_you = BRANCH_SNAKE_PIT;
if ( branches[i].entry_message )
mpr(branches[i].entry_message);
else
mprf("Welcome to %s!", branches[i].longname);
you.where_are_you = branches[i].id;
case DNGN_ENTER_ELVEN_HALLS:
strcat(info, "the Elven Halls!");
you.where_are_you = BRANCH_ELVEN_HALLS;
break;
case DNGN_ENTER_TOMB:
strcat(info, "the Tomb!");
you.where_are_you = BRANCH_TOMB;
break;
case DNGN_ENTER_SWAMP:
strcat(info, "the Swamp!");
you.where_are_you = BRANCH_SWAMP;
break;
// maybe last part better expresssed as <= PIT {dlb}
if (player_in_hell() || player_in_branch( BRANCH_VESTIBULE_OF_HELL ))
curr_subdungeon_level = you.your_level - 26;
/* Remember, must add this to the death_string in ouch */
if (you.where_are_you >= BRANCH_ORCISH_MINES
&& you.where_are_you <= BRANCH_SWAMP)
{
curr_subdungeon_level = you.your_level
- you.branch_stairs[you.where_are_you - 10];
}
env.floor_colour = (mcolour[env.mons_alloc[9]] == BLACK)
? LIGHTGREY : mcolour[env.mons_alloc[9]];
env.rock_colour = (mcolour[env.mons_alloc[8]] == BLACK)
? LIGHTGREY : mcolour[env.mons_alloc[8]];
env.floor_colour = fix_colour(mcolour[env.mons_alloc[9]]);
env.rock_colour = fix_colour(mcolour[env.mons_alloc[8]]);
env.floor_colour = (mcolour[env.mons_alloc[9]] == BLACK)
? LIGHTGREY : mcolour[env.mons_alloc[9]];
env.rock_colour = (mcolour[env.mons_alloc[8]] == BLACK)
? LIGHTGREY : mcolour[env.mons_alloc[8]];
env.floor_colour = fix_colour(mcolour[env.mons_alloc[9]]);
env.rock_colour = fix_colour(mcolour[env.mons_alloc[8]]);
if (!player_in_branch( BRANCH_VESTIBULE_OF_HELL ))
cprintf( "%d", curr_subdungeon_level );
const int youbranch = you.where_are_you;
if ( branches[youbranch].depth == 1 )
cprintf( "- %s", branches[youbranch].longname );
else
cprintf( "%d of %s", curr_subdungeon_level,
branches[youbranch].longname );
env.floor_colour = branches[youbranch].floor_colour;
env.rock_colour = branches[youbranch].rock_colour;
case BRANCH_MAIN_DUNGEON:
cprintf(" of the Dungeon ");
break;
case BRANCH_DIS:
env.floor_colour = CYAN;
env.rock_colour = CYAN;
cprintf(" of Dis ");
break;
case BRANCH_GEHENNA:
env.floor_colour = DARKGREY;
env.rock_colour = RED;
cprintf(" of Gehenna ");
break;
case BRANCH_VESTIBULE_OF_HELL:
env.floor_colour = LIGHTGREY;
env.rock_colour = LIGHTGREY;
cprintf("- the Vestibule of Hell ");
break;
case BRANCH_COCYTUS:
env.floor_colour = LIGHTBLUE;
env.rock_colour = LIGHTCYAN;
cprintf(" of Cocytus ");
break;
case BRANCH_TARTARUS:
env.floor_colour = DARKGREY;
env.rock_colour = DARKGREY;
cprintf(" of Tartarus ");
break;
case BRANCH_INFERNO:
env.floor_colour = LIGHTRED;
env.rock_colour = RED;
cprintf(" of the Inferno ");
break;
case BRANCH_THE_PIT:
env.floor_colour = RED;
env.rock_colour = DARKGREY;
cprintf(" of the Pit ");
break;
case BRANCH_ORCISH_MINES:
env.floor_colour = BROWN;
env.rock_colour = BROWN;
cprintf(" of the Orcish Mines ");
break;
case BRANCH_HIVE:
env.floor_colour = YELLOW;
env.rock_colour = BROWN;
cprintf(" of the Hive ");
break;
case BRANCH_LAIR:
env.floor_colour = GREEN;
env.rock_colour = BROWN;
cprintf(" of the Lair ");
break;
case BRANCH_SLIME_PITS:
env.floor_colour = GREEN;
env.rock_colour = LIGHTGREEN;
cprintf(" of the Slime Pits ");
break;
case BRANCH_VAULTS:
env.floor_colour = LIGHTGREY;
env.rock_colour = BROWN;
cprintf(" of the Vaults ");
break;
case BRANCH_CRYPT:
env.floor_colour = LIGHTGREY;
env.rock_colour = LIGHTGREY;
cprintf(" of the Crypt ");
break;
case BRANCH_HALL_OF_BLADES:
env.floor_colour = LIGHTGREY;
env.rock_colour = LIGHTGREY;
cprintf(" of the Hall of Blades ");
break;
case BRANCH_HALL_OF_ZOT:
if (you.your_level - you.branch_stairs[7] <= 1)
{
env.floor_colour = LIGHTGREY;
env.rock_colour = LIGHTGREY;
}
const char floorcolours_zot[] = { LIGHTGREY, LIGHTGREY, BLUE,
LIGHTBLUE, MAGENTA };
const char rockcolours_zot[] = { LIGHTGREY, BLUE, LIGHTBLUE,
MAGENTA, LIGHTMAGENTA };
if ( curr_subdungeon_level > 5 || curr_subdungeon_level < 1 )
mpr("Odd colouring!");
switch (you.your_level - you.branch_stairs[7])
{
case 2:
env.rock_colour = LIGHTGREY;
env.floor_colour = BLUE;
break;
case 3:
env.rock_colour = BLUE;
env.floor_colour = LIGHTBLUE;
break;
case 4:
env.rock_colour = LIGHTBLUE;
env.floor_colour = MAGENTA;
break;
case 5:
env.rock_colour = MAGENTA;
env.floor_colour = LIGHTMAGENTA;
break;
}
env.floor_colour = floorcolours_zot[curr_subdungeon_level-1];
env.rock_colour = rockcolours_zot[curr_subdungeon_level-1];
cprintf(" of the Realm of Zot ");
break;
case BRANCH_ECUMENICAL_TEMPLE:
env.floor_colour = LIGHTGREY;
env.rock_colour = LIGHTGREY;
cprintf(" of the Temple ");
break;
case BRANCH_SNAKE_PIT:
env.floor_colour = LIGHTGREEN;
env.rock_colour = YELLOW;
cprintf(" of the Snake Pit ");
break;
case BRANCH_ELVEN_HALLS:
env.floor_colour = DARKGREY;
env.rock_colour = LIGHTGREY;
cprintf(" of the Elven Halls ");
break;
case BRANCH_TOMB:
env.floor_colour = YELLOW;
env.rock_colour = LIGHTGREY;
cprintf(" of the Tomb ");
break;
case BRANCH_SWAMP:
env.floor_colour = BROWN;
env.rock_colour = BROWN;
cprintf(" of the Swamp ");
break;
std::string branch_name( int branch, bool terse )
{
const char* names[][2] = {
{ "The Dungeon", "D" },
{ "The Iron City of Dis", "Dis" },
{ "Gehenna", "Geh" },
{ "The Vestibule of Hell", "Hell" },
{ "Cocytus", "Coc" },
{ "Tartarus", "Tar" },
{ "Inferno", "Inf" },
{ "The Pit", "Pit" },
{ "", "" },
{ "", "" },
{ "The Orcish Mines", "Orc" },
{ "The Hive", "Hive" },
{ "The Lair", "Lair" },
{ "The Slime Pits", "Slime" },
{ "The Vaults", "Vault" },
{ "The Crypt", "Crypt" },
{ "The Hall of Blades", "Blade" },
{ "The Hall of Zot", "Zot" },
{ "The Ecumenical Temple", "Temple" },
{ "The Snake Pit", "Snake" },
{ "The Elven Halls", "Elf" },
{ "The Tomb", "Tomb" },
{ "The Swamp", "Swamp" },
{ "The Caverns", "Cav" }
};
return names[branch][terse];
}
else if (lev) {
snprintf( buf, sizeof buf, "%s:%d",
result.c_str(), lev );
}
else {
snprintf( buf, sizeof buf, "%s:$",
result.c_str() );
}
else if (lev)
snprintf( buf, sizeof buf, "%s:%d", result.c_str(), lev );
else
snprintf( buf, sizeof buf, "%s:$", result.c_str() );
int realdepth = subdepth - 1;
if (branch >= BRANCH_ORCISH_MINES && branch <= BRANCH_SWAMP)
realdepth = subdepth + you.branch_stairs[branch - 10];
if (branch >= BRANCH_DIS && branch <= BRANCH_THE_PIT)
realdepth = subdepth + 26;
return realdepth;
if (branch >= BRANCH_VESTIBULE_OF_HELL && branch <= BRANCH_THE_PIT)
return subdepth + 27;
else
{
--subdepth;
while ( branch != BRANCH_MAIN_DUNGEON )
{
subdepth += branches[branch].startdepth;
branch = branches[branch].parent_branch;
}
}
return subdepth;
if (branch >= BRANCH_DIS && branch <= BRANCH_THE_PIT)
curr_subdungeon_level = depth - 26;
if (branch >= BRANCH_ORCISH_MINES && branch <= BRANCH_SWAMP)
curr_subdungeon_level = depth
- you.branch_stairs[branch - 10];
return curr_subdungeon_level;
int player_branch_depth()
{
return subdungeon_depth(you.where_are_you, you.your_level);
dlvl = you.your_level + 1;
switch (you.where_are_you)
{
case BRANCH_ORCISH_MINES:
case BRANCH_HIVE:
case BRANCH_LAIR:
case BRANCH_SLIME_PITS:
case BRANCH_VAULTS:
case BRANCH_CRYPT:
case BRANCH_HALL_OF_BLADES:
case BRANCH_HALL_OF_ZOT:
case BRANCH_ECUMENICAL_TEMPLE:
case BRANCH_SNAKE_PIT:
case BRANCH_ELVEN_HALLS:
case BRANCH_TOMB:
case BRANCH_SWAMP:
dlvl = you.your_level - you.branch_stairs[you.where_are_you - 10];
break;
case BRANCH_DIS:
case BRANCH_GEHENNA:
case BRANCH_VESTIBULE_OF_HELL:
case BRANCH_COCYTUS:
case BRANCH_TARTARUS:
case BRANCH_INFERNO:
case BRANCH_THE_PIT:
dlvl = you.your_level - 26;
break;
}
dlvl = player_branch_depth();
BRANCH_MAIN_DUNGEON, // 0
BRANCH_DIS,
BRANCH_GEHENNA,
BRANCH_VESTIBULE_OF_HELL,
BRANCH_COCYTUS,
BRANCH_TARTARUS, // 5
BRANCH_INFERNO, // unimplemented
BRANCH_THE_PIT, // 7 // unimplemented
BRANCH_ORCISH_MINES = 10, // 10
BRANCH_HIVE,
BRANCH_MAIN_DUNGEON, // 0
BRANCH_ECUMENICAL_TEMPLE,
BRANCH_ORCISH_MINES,
BRANCH_ELVEN_HALLS,
enum branch_stair_type // you.branch_stairs[] - 10 less than BRANCHES {dlb}
{
STAIRS_ORCISH_MINES, // 0
STAIRS_HIVE,
STAIRS_LAIR,
STAIRS_SLIME_PITS,
STAIRS_VAULTS,
STAIRS_CRYPT, // 5
STAIRS_HALL_OF_BLADES,
STAIRS_HALL_OF_ZOT,
STAIRS_ECUMENICAL_TEMPLE,
STAIRS_SNAKE_PIT,
STAIRS_ELVEN_HALLS, // 10
STAIRS_TOMB,
STAIRS_SWAMP,
STAIRS_CAVERNS
};
int altar_chances[][2] = {
// These are percentages
{ BRANCH_MAIN_DUNGEON, 8 },
{ BRANCH_DIS, 0 },
{ BRANCH_GEHENNA, 0 },
{ BRANCH_VESTIBULE_OF_HELL, 0 },
{ BRANCH_COCYTUS, 0 },
{ BRANCH_TARTARUS, 0 },
{ BRANCH_INFERNO, 0 },
{ BRANCH_THE_PIT, 0 },
{ BRANCH_ORCISH_MINES, 20 },
{ BRANCH_HIVE, 0 },
{ BRANCH_LAIR, 5 },
{ BRANCH_SLIME_PITS, 5 },
{ BRANCH_VAULTS, 5 },
{ BRANCH_CRYPT, 5 },
{ BRANCH_HALL_OF_BLADES, 0 },
{ BRANCH_HALL_OF_ZOT, 1 },
{ BRANCH_ECUMENICAL_TEMPLE, 0 },
{ BRANCH_SNAKE_PIT, 10 },
{ BRANCH_ELVEN_HALLS, 8 },
{ BRANCH_TOMB, 0 },
{ BRANCH_SWAMP, 0 },
{ BRANCH_CAVERNS, 0 },
{ -1, -1 }
};
if (you.branch_stairs[i] == 0)
break;
if (level_number == you.branch_stairs[i] + 1
&& level_type == LEVEL_DUNGEON
&& you.where_are_you == BRANCH_ORCISH_MINES + i)
{
for (x = 1; x < GXM; x++)
{
for (y = 1; y < GYM; y++)
{
if (grd[x][y] >= DNGN_STONE_STAIRS_UP_I
&& grd[x][y] <= DNGN_ROCK_STAIRS_UP)
{
grd[x][y] = DNGN_RETURN_FROM_ORCISH_MINES + i;
}
}
}
}
for (x = 1; x < GXM; x++)
for (y = 1; y < GYM; y++)
if (grd[x][y] >= DNGN_STONE_STAIRS_UP_I
&& grd[x][y] <= DNGN_ROCK_STAIRS_UP)
grd[x][y] = branches[(int)you.where_are_you].exit_stairs;
if (level_number == you.branch_stairs[i] + branch_depth(i)
&& level_type == LEVEL_DUNGEON
&& you.where_are_you == BRANCH_ORCISH_MINES + i)
{
for (x = 1; x < GXM; x++)
{
for (y = 1; y < GYM; y++)
{
if (grd[x][y] >= DNGN_STONE_STAIRS_DOWN_I
&& grd[x][y] <= DNGN_ROCK_STAIRS_DOWN)
{
grd[x][y] = DNGN_ROCK_STAIRS_UP;
}
}
}
}
for (x = 1; x < GXM; x++)
for (y = 1; y < GYM; y++)
if (grd[x][y] >= DNGN_STONE_STAIRS_DOWN_I
&& grd[x][y] <= DNGN_ROCK_STAIRS_DOWN)
grd[x][y] = DNGN_ROCK_STAIRS_UP;
stair = 0;
entrance = 100;
if (you.branch_stairs[branch] == 100) // set in newgame
break;
if (you.branch_stairs[branch] != dlevel)
continue;
// decide if this branch leaves from this level
switch(branch)
if ( branches[i].entry_stairs != NUM_FEATURES &&
player_in_branch(branches[i].parent_branch) &&
player_branch_depth() == branches[i].startdepth )
case STAIRS_ORCISH_MINES:
case STAIRS_HIVE:
case STAIRS_LAIR:
case STAIRS_VAULTS:
case STAIRS_ECUMENICAL_TEMPLE:
entrance = BRANCH_MAIN_DUNGEON;
break;
case STAIRS_SLIME_PITS:
case STAIRS_SWAMP:
case STAIRS_SNAKE_PIT:
entrance = BRANCH_LAIR;
break;
case STAIRS_ELVEN_HALLS:
entrance = BRANCH_ORCISH_MINES;
break;
case STAIRS_CRYPT:
case STAIRS_HALL_OF_BLADES:
entrance = BRANCH_VAULTS;
break;
case STAIRS_TOMB:
entrance = BRANCH_CRYPT;
break;
default:
entrance = 100;
break;
}
if (you.where_are_you != entrance)
continue;
stair = branch + DNGN_ENTER_ORCISH_MINES;
place_specific_stair(stair);
// place a stair
/*
* File: branch.h
* Summary: Dungeon branch classes
* Written by: Haran Pilpel
*
* Modified for Crawl Reference by $Author: haranp $ on $Date: 2006-11-29 13:12:52 -0500 (Wed, 29 Nov 2006) $
*
*/
#ifndef BRANCH_H
#define BRANCH_H
#include "enum.h"
struct Branch
{
branch_type id;
branch_type parent_branch;
int depth;
int startdepth; // which level of the parent branch,
// 1 for first level
dungeon_feature_type entry_stairs;
dungeon_feature_type exit_stairs;
const char* shortname; // "Slime Pits"
const char* longname; // "The Pits of Slime"
const char* abbrevname; // "Slime"
const char* entry_message;
char floor_colour; // Zot needs special handling
char rock_colour;
int (*mons_rarity_function)(int);
int (*mons_level_function)(int);
void (*level_builder_function)(int);
int altar_chance; // in percent
int travel_shortcut; // which key to press for travel
};
extern Branch branches[];
#endif
/*
* Modified for Crawl Reference by $Author: haranp $ on $Date: 2006-12-10 22:28:21 +0200 (Sun, 10 Dec 2006) $
*/
#include "AppHdr.h"
#include "branch.h"
#include "mon-pick.h"
Branch branches[] = {
{ BRANCH_MAIN_DUNGEON, BRANCH_MAIN_DUNGEON, 27, -1,
NUM_FEATURES, NUM_FEATURES, // sentinel values
"Dungeon", "the Dungeon", "D",
NULL,
LIGHTGREY, BROWN,
mons_standard_rare, mons_standard_level, NULL,
8, 'D'
},
{ BRANCH_ECUMENICAL_TEMPLE, BRANCH_MAIN_DUNGEON, 1, 5,
DNGN_ENTER_TEMPLE, DNGN_RETURN_FROM_TEMPLE,
"Temple", "the Ecumenical Temple", "Temple",
NULL,
LIGHTGREY, LIGHTGREY, mons_standard_rare, mons_standard_level, NULL,
0, 'T' },
{ BRANCH_ORCISH_MINES, BRANCH_MAIN_DUNGEON, 4, 6,
DNGN_ENTER_ORCISH_MINES, DNGN_RETURN_FROM_ORCISH_MINES,
"Orcish Mines", "the Orcish Mines", "Orc",
NULL,
BROWN, BROWN,
mons_mineorc_rare, mons_mineorc_level, NULL,
20, 'O' },
{ BRANCH_ELVEN_HALLS, BRANCH_ORCISH_MINES, 7, 4,
DNGN_ENTER_ELVEN_HALLS, DNGN_RETURN_FROM_ELVEN_HALLS,
"Elven Halls", "the Elven Halls", "Elf",
NULL,
DARKGREY, LIGHTGREY, mons_hallelf_rare, mons_hallelf_level, NULL,
8, 'E' },
{ BRANCH_LAIR, BRANCH_MAIN_DUNGEON, 10, 8,
DNGN_ENTER_LAIR, DNGN_RETURN_FROM_LAIR,
"Lair", "the Lair of Beasts", "Lair",
NULL,
GREEN, BROWN, mons_lair_rare, mons_lair_level, NULL,
5, 'L' },
{ BRANCH_SWAMP, BRANCH_LAIR, 5, 3,
DNGN_ENTER_SWAMP, DNGN_RETURN_FROM_SWAMP,
"Swamp", "the Swamp", "Swamp",
NULL,
BROWN, BROWN, mons_swamp_rare, mons_swamp_level, NULL,
0, 'S' },
{ BRANCH_SLIME_PITS, BRANCH_LAIR, 6, 4,
DNGN_ENTER_SLIME_PITS, DNGN_RETURN_FROM_SLIME_PITS,
"Slime Pits", "the Pits of Slime", "Slime",
NULL,
GREEN, LIGHTGREEN, mons_pitslime_rare, mons_pitslime_level, NULL,
5, 'M' },
{ BRANCH_SNAKE_PIT, BRANCH_LAIR, 5, 7,
DNGN_ENTER_SNAKE_PIT, DNGN_RETURN_FROM_SNAKE_PIT,
"Snake Pit", "the Snake Pit", "Snake",
NULL,
LIGHTGREEN, YELLOW, mons_pitsnake_rare, mons_pitsnake_level, NULL,
10, 'P' },
{ BRANCH_HIVE, BRANCH_MAIN_DUNGEON, 4, 15,
DNGN_ENTER_HIVE, DNGN_RETURN_FROM_HIVE,
"Hive", "the Hive", "Hive",
"You hear a buzzing sound coming from all directions.",
YELLOW, BROWN, mons_hive_rare, mons_hive_level, NULL,
0, 'H' },
{ BRANCH_VAULTS, BRANCH_MAIN_DUNGEON, 8, 17,
DNGN_ENTER_VAULTS, DNGN_RETURN_FROM_VAULTS,
"Vaults", "the Vaults", "Vault",
NULL,
LIGHTGREY, BROWN, mons_standard_rare, mons_standard_level, NULL,
5, 'V' },
{ BRANCH_HALL_OF_BLADES, BRANCH_VAULTS, 1, 4,
DNGN_ENTER_HALL_OF_BLADES, DNGN_RETURN_FROM_HALL_OF_BLADES,
"Hall of Blades", "the Hall of Blades", "Blade",
NULL,
LIGHTGREY, LIGHTGREY, mons_hallblade_rare, mons_hallblade_level, NULL,
0, 'B' },
{ BRANCH_CRYPT, BRANCH_VAULTS, 5, 3,
DNGN_ENTER_CRYPT, DNGN_RETURN_FROM_CRYPT,
"Crypt", "the Crypt", "Crypt",
NULL,
LIGHTGREY, LIGHTGREY, mons_crypt_rare, mons_crypt_level, NULL,
5, 'C' },
{ BRANCH_TOMB, BRANCH_CRYPT, 3, 5,
DNGN_ENTER_TOMB, DNGN_RETURN_FROM_TOMB,
"Tomb", "the Tomb of the Ancients", "Tomb",
NULL,
YELLOW, LIGHTGREY, mons_tomb_rare, mons_tomb_level, NULL,
0, 'G' },
{ BRANCH_VESTIBULE_OF_HELL, BRANCH_MAIN_DUNGEON, 1, -1,
DNGN_ENTER_HELL, NUM_FEATURES, // sentinel
"Hell", "The Vestibule of Hell", "Hell",
NULL,
LIGHTGREY, LIGHTGREY,
mons_standard_rare, mons_standard_level, NULL,
0, 'U'
},
{ BRANCH_DIS, BRANCH_VESTIBULE_OF_HELL, 7, -1,
DNGN_ENTER_DIS, NUM_FEATURES, // sentinel
"Dis", "the Iron City of Dis", "Dis",
NULL,
CYAN, CYAN,
mons_dis_rare, mons_dis_level, NULL,
0, 'I'
},
{ BRANCH_GEHENNA, BRANCH_VESTIBULE_OF_HELL, 7, -1,
DNGN_ENTER_GEHENNA, NUM_FEATURES, // sentinel
"Gehenna", "Gehenna", "Geh",
NULL,
DARKGREY, RED,
mons_gehenna_rare, mons_gehenna_level, NULL,
0, 'N'
},
{ BRANCH_COCYTUS, BRANCH_VESTIBULE_OF_HELL, 7, -1,
DNGN_ENTER_COCYTUS, NUM_FEATURES, // sentinel
"Cocytus", "Cocytus", "Coc",
NULL,
LIGHTBLUE, LIGHTCYAN,
mons_cocytus_rare, mons_cocytus_level, NULL,
0, 'X'
},
{ BRANCH_TARTARUS, BRANCH_VESTIBULE_OF_HELL, 7, -1,
DNGN_ENTER_TARTARUS, NUM_FEATURES, // sentinel
"Tartarus", "Tartarus", "Tar",
NULL,
DARKGREY, DARKGREY,
mons_tartarus_rare, mons_tartarus_level, NULL,
0, 'Y'
},
{ BRANCH_INFERNO, BRANCH_MAIN_DUNGEON, -1, -1,
NUM_FEATURES, NUM_FEATURES,
NULL, NULL, NULL,
NULL,
BLACK, BLACK,
NULL, NULL, NULL,
0, 'R'
},
{ BRANCH_THE_PIT, BRANCH_MAIN_DUNGEON, -1, -1,
NUM_FEATURES, NUM_FEATURES,
NULL, NULL, NULL,
NULL,
BLACK, BLACK,
NULL, NULL, NULL,
0, '0'
},
{ BRANCH_HALL_OF_ZOT, BRANCH_MAIN_DUNGEON, 5, 27,
DNGN_ENTER_ZOT, DNGN_RETURN_FROM_ZOT,
"Zot", "the Realm of Zot", "Zot",
NULL,
BLACK, BLACK, mons_hallzot_rare, mons_hallzot_level, NULL,
1, 'Z' },
{ BRANCH_CAVERNS, BRANCH_MAIN_DUNGEON, -1, -1,
NUM_FEATURES, NUM_FEATURES,
NULL, NULL, NULL,
NULL,
BLACK, BLACK,
NULL, NULL, NULL,
0, 0
}
};
for (i = 0; i < 20; i++)
{
if (you.branch_stairs[i] == 0)
continue;
snprintf( info, INFO_SIZE, "Branch %2d is on level %2d",
i, you.branch_stairs[i] + 1 );
mpr(info);
}
for (i = 0; i < NUM_BRANCHES; i++)
if (branches[i].startdepth != - 1)
mprf(MSGCH_DIAGNOSTICS, "Branch %d (%s) is on level %d of %s",
i, branches[i].longname, branches[i].startdepth,
branches[branches[i].parent_branch].abbrevname);