diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-09 17:41:11 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-09 17:41:11 +0000 |
commit | 0ec7cf7056fb1e230696a46f0f776f72bd49a6fe (patch) | |
tree | 6e5b484718ee4a9edfc8567864fffcfe3c74eedf /crawl-ref/source | |
parent | b26e4bf0ba4e7b2522dbff7330ebc2b74f380ab5 (diff) | |
download | crawl-ref-0ec7cf7056fb1e230696a46f0f776f72bd49a6fe.tar.gz crawl-ref-0ec7cf7056fb1e230696a46f0f776f72bd49a6fe.zip |
Superior minivault handling. Minivaults without floor padding are finally
supported (see mines4_lemuel for an example).
Set default depth to D:a-b in all .des files. Random vaults that want to live
in a non-main-dungeon branch must explicitly specify this in a DEPTH: line.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1823 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/dat/float.des | 2 | ||||
-rw-r--r-- | crawl-ref/source/dat/large.des | 2 | ||||
-rw-r--r-- | crawl-ref/source/dat/levdes.vim | 4 | ||||
-rw-r--r-- | crawl-ref/source/dat/mini.des | 2 | ||||
-rw-r--r-- | crawl-ref/source/dat/orc.des | 21 | ||||
-rw-r--r-- | crawl-ref/source/dungeon.cc | 15 |
6 files changed, 28 insertions, 18 deletions
diff --git a/crawl-ref/source/dat/float.des b/crawl-ref/source/dat/float.des index 6bf4a80172..ffb2fb5ce3 100644 --- a/crawl-ref/source/dat/float.des +++ b/crawl-ref/source/dat/float.des @@ -12,7 +12,7 @@ # Set the default depth for vaults. Be sure to adapt the DEPTH of particulary # easy or tough vaults. Also, exlucde unthemely branches with !Lair etc. -default-depth: 12-26 +default-depth: D:12-26 ############################################################################## # Dummy probability balancer vault for depths 1-11. diff --git a/crawl-ref/source/dat/large.des b/crawl-ref/source/dat/large.des index 96672304be..b6c5aa8a46 100644 --- a/crawl-ref/source/dat/large.des +++ b/crawl-ref/source/dat/large.des @@ -6,7 +6,7 @@ # vaults.des. ############################################################################### -default-depth: 12-26 +default-depth: D:12-26 # be careful to adapt these numbers for new vaults (using DEPTH) ############################################################################## diff --git a/crawl-ref/source/dat/levdes.vim b/crawl-ref/source/dat/levdes.vim index b643c9ee6b..f2c2206f9f 100644 --- a/crawl-ref/source/dat/levdes.vim +++ b/crawl-ref/source/dat/levdes.vim @@ -51,8 +51,8 @@ syn region desNsubst start=/^NSUBST:\s*/ end=/$/ contains=desNsubstDec,desSubstA syn region desShuffle start=/^SHUFFLE:\s*/ end=/$/ contains=desShuffleDec,desMapFrag keepend -syn keyword desDeclarator NAME: ORIENT: DEPTH: PLACE: MONS: FLAGS: default-depth: TAGS: CHANCE: ITEM: KFEAT: KMONS: KITEM: -syn keyword desOrientation encompass north south east west northeast northwest southeast southwest float no_hmirror no_vmirror no_rotate entry pan no_pool_fixup no_monster_gen generate_awake +syn keyword desDeclarator NAME: ORIENT: DEPTH: PLACE: MONS: FLAGS: default-depth: TAGS: CHANCE: WEIGHT: ITEM: KFEAT: KMONS: KITEM: +syn keyword desOrientation encompass north south east west northeast northwest southeast southwest float no_hmirror no_vmirror no_rotate entry pan no_pool_fixup no_monster_gen generate_awake mini_float no_item_gen syn match desComment "^\s*#.*$" diff --git a/crawl-ref/source/dat/mini.des b/crawl-ref/source/dat/mini.des index 3b03d95108..9ecc0f5d1a 100644 --- a/crawl-ref/source/dat/mini.des +++ b/crawl-ref/source/dat/mini.des @@ -33,7 +33,7 @@ # Default depth for minivaults. If your minivault is suitable for one of the # branches below, add it via DEPTH: Lair or similar. -default-depth: 8-27, !Orc, !Lair, !Swamp, !Shoal +default-depth: D:8-27 ############################################################################## # Minivault balancer diff --git a/crawl-ref/source/dat/orc.des b/crawl-ref/source/dat/orc.des index 85a289718f..843321f166 100644 --- a/crawl-ref/source/dat/orc.des +++ b/crawl-ref/source/dat/orc.des @@ -428,6 +428,7 @@ ENDMAP ################################### # mage tower -- either orc with assistants, or ogre with guards NAME: mines4_lemuel +TAGS: mini_float no_rotate SUBST: ? = += SUBST: d = $d SUBST: I = IG @@ -435,17 +436,15 @@ SHUFFLE: 112/334 MONS: orc sorcerer, orc/orc wizard, ogre-mage, ogre/nothing ITEM: any book MAP -............... -...xxxx?xxxx... -..xx2.....2xx.. -.xx.2xxxxx2.xx. -.x..xxd1dxx..x. -.x.Ix$$G$$xI.x. -.x..xx222xx..x. -.xx.2xx?xx2.xx. -..xx..2.2..xx.. -...xxxxxxxxx... -............... + xxxx?xxxx + xx2.....2xx +xx.2xxxxx2.xx +x..xxd1dxx..x +x.Ix$$G$$xI.x +x..xx222xx..x +xx.2xx?xx2.xx + xx..2.2..xx + xxxxxxxxx ENDMAP ################################### diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index cd0ae021a5..2106a55c36 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -161,6 +161,10 @@ static int box_room_doors( int bx1, int bx2, int by1, int by2, int new_doors); static void city_level(int level_number); static void diamond_rooms(int level_number); +static void pick_float_exits(vault_placement &place, + std::vector<coord_def> &targets); +static void connect_vault(const vault_placement &vp); + // ITEM & SHOP FUNCTIONS static void place_shops(int level_number); static object_class_type item_in_shop(unsigned char shop_type); @@ -2687,9 +2691,10 @@ static bool build_minivaults(int level_number, int force_vault, apply_place_masks(place); // these two are throwaways: - std::vector<coord_def> dummy; int num_runes = 0; + std::vector<coord_def> &target_connections = place.exits; + // paint the minivault onto the grid for (int vx = v1x; vx < v1x + place.width; vx++) { @@ -2701,11 +2706,17 @@ static bool build_minivaults(int level_number, int force_vault, altar_count = vault_grid( place, level_number, vx, vy, altar_count, acq_item_class, - feat, dummy, + feat, target_connections, num_runes ); } } + if (target_connections.empty() && place.map.has_tag("mini_float")) + pick_float_exits(place, target_connections); + + if (!target_connections.empty()) + connect_vault(place); + return (true); } // end build_minivaults() |