diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-12 14:19:56 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-12 14:19:56 +0000 |
commit | 2269f51342b63e5b8670da098b71998d4b4dd901 (patch) | |
tree | 2cb1bc0cc8a57e75bbc858e59cf0c9d705785142 /crawl-ref/source/overmap.cc | |
parent | 0e5f00f8997011546d2010e975bcce3ccd78be91 (diff) | |
download | crawl-ref-2269f51342b63e5b8670da098b71998d4b4dd901.tar.gz crawl-ref-2269f51342b63e5b8670da098b71998d4b4dd901.zip |
Added a new Island branch, based on dpeg's ideas.
In any given game, either the Islands or the Swamp will be generated (50%
chance of each) as Lair subbranches.
The Islands have a ranged-attackers theme and are 5 levels deep.
THIS IMPLEMENTATION IS INCOMPLETE, so beware! The following things need
to be added:
1. A level-5 vault to contain the islands rune (the rune is coded, but
it doesn't show up yet - so for now, if you get the Islands, you'll be
stuck with one less rune.) A unique Cyclops, Polyphemus, to guard it might
be a nice idea. Perhaps we should block controlled teleport until he's
dead, too.
2. Making the island structure depth-dependent (i.e., more islands on
deeper levels.)
3. Shallow water fractalisation.
4. Probably more stuff I forgot.
I also put in various minor fixes.
Breaks savefiles, possibly highscores too. I'll put in a savefile version
bump later.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1289 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/overmap.cc')
-rw-r--r-- | crawl-ref/source/overmap.cc | 68 |
1 files changed, 8 insertions, 60 deletions
diff --git a/crawl-ref/source/overmap.cc b/crawl-ref/source/overmap.cc index 0dfa0c47fe..117e8d96d6 100644 --- a/crawl-ref/source/overmap.cc +++ b/crawl-ref/source/overmap.cc @@ -425,68 +425,16 @@ void seen_staircase( unsigned char which_staircase, const coord_def& pos ) // - stairs returning to dungeon - predictable // - entrances to the hells - always in vestibule - branch_type which_branch = BRANCH_MAIN_DUNGEON; - - switch ( which_staircase ) + int i; + for ( i = 0; i < NUM_BRANCHES; ++i ) { - case DNGN_ENTER_ORCISH_MINES: - which_branch = BRANCH_ORCISH_MINES; - break; - case DNGN_ENTER_HIVE: - which_branch = BRANCH_HIVE; - break; - case DNGN_ENTER_LAIR: - which_branch = BRANCH_LAIR; - break; - case DNGN_ENTER_SLIME_PITS: - which_branch = BRANCH_SLIME_PITS; - break; - case DNGN_ENTER_VAULTS: - which_branch = BRANCH_VAULTS; - break; - case DNGN_ENTER_CRYPT: - which_branch = BRANCH_CRYPT; - break; - case DNGN_ENTER_HALL_OF_BLADES: - which_branch = BRANCH_HALL_OF_BLADES; - break; - case DNGN_ENTER_ZOT: - which_branch = BRANCH_HALL_OF_ZOT; - break; - case DNGN_ENTER_TEMPLE: - which_branch = BRANCH_ECUMENICAL_TEMPLE; - break; - case DNGN_ENTER_SNAKE_PIT: - which_branch = BRANCH_SNAKE_PIT; - break; - case DNGN_ENTER_ELVEN_HALLS: - which_branch = BRANCH_ELVEN_HALLS; - break; - case DNGN_ENTER_TOMB: - which_branch = BRANCH_TOMB; - break; - case DNGN_ENTER_SWAMP: - which_branch = BRANCH_SWAMP; - break; - case DNGN_ENTER_DIS: - which_branch = BRANCH_DIS; - break; - case DNGN_ENTER_GEHENNA: - which_branch = BRANCH_GEHENNA; - break; - case DNGN_ENTER_COCYTUS: - which_branch = BRANCH_COCYTUS; - break; - case DNGN_ENTER_TARTARUS: - which_branch = BRANCH_TARTARUS; - break; - default: - break; + if ( branches[i].entry_stairs == which_staircase ) + { + stair_level[branches[i].id] = level_id::current(); + break; + } } - - ASSERT(which_branch != BRANCH_MAIN_DUNGEON); - - stair_level[which_branch] = level_id::current(); + ASSERT( i != NUM_BRANCHES ); } // if player has seen an altar; record it |