From ee273b62d39f3fd55b9aad600265514f26c5cd0d Mon Sep 17 00:00:00 2001 From: dshaligram Date: Wed, 26 Sep 2007 12:36:31 +0000 Subject: All vaults are now "uniq" (one-use-per-game) by default. Vaults that want to be reused must be tagged "allow_dup". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2213 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/docs/level-design.txt | 17 ++++++++++------- crawl-ref/source/dat/float.des | 9 +++------ crawl-ref/source/dat/large.des | 22 +++------------------- crawl-ref/source/dat/mini.des | 10 +++------- crawl-ref/source/dungeon.cc | 2 +- 5 files changed, 20 insertions(+), 40 deletions(-) diff --git a/crawl-ref/docs/level-design.txt b/crawl-ref/docs/level-design.txt index adde72ece9..6717d74991 100644 --- a/crawl-ref/docs/level-design.txt +++ b/crawl-ref/docs/level-design.txt @@ -347,10 +347,14 @@ PLACE: Used to specify certain special levels. Existing special levels are: PLACE can be used with random vaults and minivaults for testing them. -TAGS: generate_awake, no_item_gen, no_monster_gen, no_pool_fixup, orc_entry, - mini_float, uniq, uniq_BAR +TAGS: allow_dup, generate_awake, mini_float, no_item_gen, no_monster_gen, + no_pool_fixup, orc_entry, uniq_BAR Tags go an a TAGS: line and are space-separated. Valid tags are: + * "allow_dup": Vaults are normally used only once per game. If you + have a vault that can be used more than once, use + allow_dup to tell the dungeon builder that the vault + can be reused. * "dummy": this tag indicates that the vault is a stub; if the dungeon builder picks a dummy vault, it pretends no vault was selected. Dummies are used to reduce the probability @@ -361,6 +365,10 @@ TAGS: generate_awake, no_item_gen, no_monster_gen, no_pool_fixup, orc_entry, vault will be generated awake. * "no_item_gen": Prevents random item generation in the vault. Items explicitly placed by the vault are not affected. + * "mini_float": applicable only to minivaults, requests that + the dungeon builder pick random exits from the minivault and + connect it to the rest of the level, similar to the exit + behaviour for floating vaults. * "no_monster_gen": Prevents random monster generation at the time of the vault's creation. Highly advised for entry vaults with a player-hostile geography, MUST-HAVE for those with water/lava. @@ -373,13 +381,8 @@ TAGS: generate_awake, no_item_gen, no_monster_gen, no_pool_fixup, orc_entry, few entries, a dummy entry is advisable to make sure the player doesn't get bored of the same few entries recycled ad nauseam. - * "mini_float": applicable only to minivaults, requests that - the dungeon builder pick random exits from the minivault and - connect it to the rest of the level, similar to the exit - behaviour for floating vaults. * "mnoleg" or the name of some other pandemonium lord. This makes the map eligible for said pan lord's lair. - * "uniq": specifies that this vault should be used only once in a game. * "uniq_BAR": (uniq_ with any suffix) specifies that only one vault with this tag can be used in a game. diff --git a/crawl-ref/source/dat/float.des b/crawl-ref/source/dat/float.des index 175ef6ee52..1b866f3b9f 100644 --- a/crawl-ref/source/dat/float.des +++ b/crawl-ref/source/dat/float.des @@ -37,7 +37,7 @@ ENDMAP # NAME: erik_1 ORIENT: float -TAGS: no_monster_gen uniq +TAGS: no_monster_gen DEPTH: D:7-11, Lair # SHUFFLE: rR/sS/uU/vV/wW/yY/zZ, uU/nN @@ -80,7 +80,6 @@ ENDMAP # NAME: erik_ogre DEPTH: D:6-10 -TAGS: uniq ORIENT: float SHUFFLE: 1X / 1X / 2l / 3Y SUBST: X=x, Y:x. @@ -137,7 +136,7 @@ ENDMAP # NAME: shooting_gallery_Lemuel ORIENT: float -TAGS: no_pool_fixup no_monster_gen uniq +TAGS: no_pool_fixup no_monster_gen ITEM: potion of levitation q:2 : if you.absdepth() <= 16 then MONS: orc wizard/centaur/jackal/killer bee larva/giant lizard/kobold/giant mite/grey rat/green rat/orange rat @@ -169,7 +168,6 @@ ENDMAP NAME: MiniTomb ORIENT: float DEPTH: D:15-26 -TAGS: uniq MONS: large zombie/nothing, mummy, guardian mummy, greater mummy, large zombie MONS: mummy / nothing SHUFFLE: 2F, cbv @@ -222,7 +220,7 @@ ENDMAP NAME: troll_bridge DEPTH: D:7-15 ORIENT: float -TAGS: no_pool_fixup uniq +TAGS: no_pool_fixup MONS: troll w:50 / rock troll / iron troll w:5 MAP xxxxx...........................xxxxxx @@ -277,7 +275,6 @@ ENDMAP # NAME: vampire ORIENT: float -TAGS: uniq DEPTH: D:12-27, Vault, Crypt MONS: rat/grey rat/w:6 green rat/w:3 orange rat/w:20 giant bat MONS: flying skull, human zombie diff --git a/crawl-ref/source/dat/large.des b/crawl-ref/source/dat/large.des index 9e624433f6..ca3d208822 100644 --- a/crawl-ref/source/dat/large.des +++ b/crawl-ref/source/dat/large.des @@ -56,7 +56,6 @@ ENDMAP NAME: statuecave_lemuel ORIENT: northeast DEPTH: D:7-27, Lair, Crypt -TAGS: uniq MONS: ice statue/orange crystal statue SHUFFLE: 1|/!* SUBST: *:*$, ?:x., !:., '=w. @@ -92,7 +91,6 @@ ENDMAP NAME: dragon1_lemuel ORIENT: northeast DEPTH: D:9-20, Lair -TAGS: uniq MONS: dragon, ice dragon ITEM: potion of levitation / scroll of teleportation SUBST: ! : ?x @@ -138,7 +136,6 @@ ENDMAP NAME: Giant_Chief DEPTH: D:11-22, Orc:2-4 ORIENT: north -TAGS: uniq MONS: stone giant, frost giant, fire giant MONS: hill giant, cyclops MONS: w:50 ogre / w:5 ogre-mage / two-headed ogre @@ -200,7 +197,6 @@ ENDMAP NAME: River_Lethe ORIENT: encompass DEPTH: D:16-26 -TAGS: uniq SUBST: + = += SUBST: . = .:100 !:1 6:4 SUBST: ; = .:200 !:1 1:3 @@ -305,7 +301,6 @@ ENDMAP NAME: vault_1 ORIENT: north DEPTH: D:16-26 -TAGS: uniq MONS: shapeshifter, shapeshifter, glowing shapeshifter MONS: silver statue, nothing SUBST: E=E. @@ -364,7 +359,6 @@ ENDMAP NAME: cell_vault ORIENT: northwest DEPTH: D:16-26 -TAGS: uniq SHUFFLE: 890 KITEM: 8 = | / nothing w:50 KITEM: 9 = * / nothing w:50 @@ -412,7 +406,6 @@ ENDMAP # A little maze vault # NAME: little_maze_vault -TAGS: uniq DEPTH: D:16-26 ORIENT: northeast MAP @@ -458,7 +451,6 @@ ENDMAP # thingy vault. # NAME: thingy_vault -TAGS: uniq DEPTH: D:12-26 ORIENT: southwest FLAGS: no_rotate @@ -505,7 +497,6 @@ ENDMAP NAME: hourglass_vault ORIENT: southeast DEPTH: D:12-26 -TAGS: uniq FLAGS: no_rotate MAP xxxxxxxxxxxxxx@xxxxxxxxxxxxxxxxxxxxxxxxx @@ -550,7 +541,6 @@ ENDMAP NAME: Angbandy_vault ORIENT: northeast DEPTH: D:16-26 -TAGS: uniq MAP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @@ -594,7 +584,6 @@ ENDMAP # four-leaf vault # NAME: four-leaf_vault -TAGS: uniq DEPTH: D:12-26 ORIENT: northwest MAP @@ -640,7 +629,6 @@ ENDMAP # Cross-vault # NAME: cross_vault -TAGS: uniq DEPTH: D:12-26 ORIENT: northwest MAP @@ -686,7 +674,6 @@ ENDMAP # Another thingy vault # NAME: thingy_vault_2 -TAGS: uniq DEPTH: D:14-26 ORIENT: southeast SUBST: ' = ^ .:50 @@ -733,7 +720,6 @@ ENDMAP # NAME: impenetrable_vault DEPTH: D:16-26 -TAGS: uniq ORIENT: southeast MAP ..............@................xxxxxxxxx @@ -826,7 +812,6 @@ ENDMAP NAME: mludivico_vault ORIENT: southwest DEPTH: D:18-27 -TAGS: uniq MONS: hell hound, necromancer, wizard, orange demon, rotting devil MONS: hell knight, great orb of eyes MAP @@ -871,7 +856,6 @@ ENDMAP NAME: fort_yaktaur ORIENT: southeast DEPTH: D:14-26 -TAGS: uniq MONS: yaktaur, death yak, minotaur, random MONS: yak, gnoll, random MAP @@ -918,7 +902,7 @@ ENDMAP NAME: box_level_dp DEPTH: D:20-26 ORIENT: encompass -TAGS: no_pool_fixup uniq +TAGS: no_pool_fixup SHUFFLE: zZ NSUBST: A = 1:= / *:b NSUBST: B = 1:= / *:b @@ -1031,7 +1015,7 @@ NAME: erik_rubicon_a DEPTH: D:10-16 ORIENT: south FLAGS: no_rotate -TAGS: no_pool_fixup uniq +TAGS: no_pool_fixup uniq_rubicon CHANCE: 6 ITEM: ring of levitation / potion of levitation / nothing, potion of levitation ITEM: nothing, nothing, nothing @@ -1066,8 +1050,8 @@ ENDMAP NAME: erik_rubicon_b DEPTH: D:10-16 ORIENT: south -TAGS: uniq FLAGS: no_rotate +TAGS: uniq_rubicon CHANCE: 4 ITEM: ring of levitation / potion of levitation / nothing, potion of levitation ITEM: nothing, nothing, nothing, nothing diff --git a/crawl-ref/source/dat/mini.des b/crawl-ref/source/dat/mini.des index e279e39416..240df45c53 100644 --- a/crawl-ref/source/dat/mini.des +++ b/crawl-ref/source/dat/mini.des @@ -73,7 +73,6 @@ ENDMAP # No loot but the elves' gear, but at the depth this appears that may be good # NAME: elves_outpost_lemuel -TAGS: uniq DEPTH: D:8-20, Orc:* MONS: deep elf soldier/w:4 deep elf fighter MONS: w:20 deep elf mage/deep elf conjurer/deep elf summoner @@ -97,7 +96,7 @@ ENDMAP # Centaur isle (Lemuel) # NAME: centaur_isle -TAGS: no_monster_gen no_pool_fixup no_rotate uniq +TAGS: no_monster_gen no_pool_fixup no_rotate SUBST: ? = *$ DEPTH: D:6-12 MONS: centaur @@ -125,7 +124,7 @@ ENDMAP # NAME: ice2_lemuel DEPTH: D:12-27, Lair, Swamp, Coc -TAGS: no_pool_fixup no_monster_gen uniq +TAGS: no_pool_fixup no_monster_gen SUBST: T = TU SUBST: W = w:20 W .:5 MONS: ice statue @@ -211,7 +210,6 @@ ENDMAP # Should work without explicit floor margin (dp) NAME: hive_lemuel DEPTH: D:9-27,Hive:*,Lair:*,Swamp:* -TAGS: uniq MONS: killer bee, yellow wasp, red wasp, spiny worm, killer bee zombie SUBST: ? : .w SUBST: 1 = 1 a:2 @@ -259,7 +257,6 @@ ENDMAP # My mission is to annoy. -LP # NAME: jelly_drop -TAGS: uniq MONS: jelly KFEAT: a = teleport trap DEPTH: D:8-27, Vault:*, Slime:*, Lair:* @@ -335,7 +332,7 @@ ENDMAP NAME: aerie DEPTH: 12-26 MONS: insubstantial wisp, ball lightning, vapour, air elemental -TAGS: no_monster_gen uniq +TAGS: no_monster_gen SUBST: .:..w SUBST: 1 = 1 w:3, 2= 2 w:3, 3 = 3 w:3, 4 = 4 |:3 MAP @@ -367,7 +364,6 @@ ENDMAP # Greed's colour NAME: david_greed -TAGS: uniq CHANCE: 4 DEPTH: 10-26, !Orc, !Lair, !Swamp, !Shoal ITEM: nothing / any good_item diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 040fa54c7c..95a033309c 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -371,7 +371,7 @@ bool unset_level_flags(unsigned long flags, bool silent) static void dgn_register_vault(const map_def &map) { - if (map.has_tag("uniq")) + if (!map.has_tag("allow_dup")) you.uniq_map_names.insert(map.name); std::vector tags = split_string(" ", map.tags); -- cgit v1.2.3-54-g00ecf