From: <dsh...@us...> - 2007-02-13 11:48:45
|
Revision: 951 http://svn.sourceforge.net/crawl-ref/?rev=951&view=rev Author: dshaligram Date: 2007-02-13 03:48:40 -0800 (Tue, 13 Feb 2007) Log Message: ----------- Updated .des files (David). Tweaked SHUFFLE: so it doesn't strip symbols not included in the map. Modified Paths: -------------- trunk/crawl-ref/source/dat/splev.des trunk/crawl-ref/source/dat/vaults.des trunk/crawl-ref/source/mapdef.cc trunk/crawl-ref/source/mapdef.h Modified: trunk/crawl-ref/source/dat/splev.des =================================================================== --- trunk/crawl-ref/source/dat/splev.des 2007-02-12 07:40:59 UTC (rev 950) +++ trunk/crawl-ref/source/dat/splev.des 2007-02-13 11:48:40 UTC (rev 951) @@ -14,125 +14,166 @@ # . - DNGN_FLOOR # + - DNGN_CLOSED_DOOR # = - DNGN_SECRET_DOOR -# @ - entry point - must be on outside and on a particular side - see templates -# w - water -# l - lava -# >< - extra stairs - you can leave level by these but will never be placed on +# @ - entry point - must be on outside and, except in ORIENT:float layouts, +# must always be on a particular side or sides - see templates +# W - shallow water +# w - deep water - Entry vault makers, note that this may receive water +# creatures! +# l - lava - Entry vault makers, note that this may receive lava creatures! +# (Use the no_monster_gen tag to prevent both of these effects.) +# >< - extra stairs - you can leave level by these but will never be placed o # them from another level -# }{ - stairs 82/86 - You must be able to reach these from each other +# }{ - stairs 82/86 - You must be able to reach these from each other. The { +# upstair is also the stair on which the player will enter the dungeon for +# entry vaults. # )( - stairs 83/87 # ][ - stairs 84/88 # I - orcish idol (does nothing) # ^ - random trap # ~ - random trap suitable for the branch and depth the map is being used. # -# A - Vestibule gateway (opened by Horn). Can also be put on other levels for +# A - Vestibule gateway (opened by Horn). Can also be put on other levels for # colour, where it won't do anything. -# B - Altar. These are assigned specific types (eg of Zin etc) in dungeon.cc, +# B - Altar. These are assigned specific types (eg of Zin etc) in dungeon.cc, # in order. # C - Random Altar. -# F - Typically a Granite Statue, but may be Orange or Silver (1 in 100) +# F - Typically a Granite Statue, but may be Orange or Silver (1 in 100) # G - Granite statue (does nothing) # H - orange crystal statue (attacks mind) # S - Silver statue (summons demons). Avoid using (rare). # T - Water fountain # U - Magic fountain # V - Permanently dry fountain -# +# # # $ - gold # % - normal item # * - higher level item (good) # | - acquirement-level item (almost guaranteed excellent) -# O - place an appropriate rune here. In portal vaults, place the portal or -# branch stair here. +# O - place an appropriate rune here. For portal vaults, place the portal here. # P - maybe place a rune here (50%) # R - honeycomb (2/3) or royal jelly (1/3) # Z - the Orb of Zot # -# d-k - item array item. +# d-k - item array item. See section below on ITEM: arrays for more info. # # 0 - normal monster # 9 - +5 depth monster -# 8 - (+2) * 2 depth monster (aargh!). Can get golden dragons and titans +# 8 - (+2) * 2 depth monster (aargh!). Can get golden dragons and titans # this way. -# 1-7 - monster array monster -# used to allocate specific monsters for a vault. -# is filled with RANDOM_MONSTER if monster not specified +# 1-7 - monster array monster. See section below on MONS: arrays for more inf +# +# ORIENT: LINES: +# Some kind of orient: line is mandatory, unless you want the vault to be a +# minivault, which is usually not what you want. Valid orient: lines are: +# float: The dungeon builder will put your vault wherever it wants to. +# some_direction: The vault will lie along the mentioned side of the map: +# xxxxxxxxxx xxxxxxxxxxxxx +# xORIENT:Nx xORIENT:NW|.. +# x.VAULT..x x.VAULT...|.. +# x--------x x---------|.. +# xrest....x xrest........ +# x...of...x x.....of..... +# x...levelx x.......level +# ...which brings us to padding. With any some_direction orientation, you nee +# 6 layers of x-padding along any level-edge that the vault borders. For +# instance, if your map is ORIENT: north, you must have a 6 deep border of +# rock wall (or any other kind of wall) along the northern, eastern, and +# western edges of the map. +# encompass: the vault completely occupies the entire level. Padding is needed +# on all 4 sides. +# +# "ITEM:" LINES: +# These are used to help place specified items at specific places within a +# vault. They create an array with up to 8 positions. What's in the first +# position in the array will be used when the dungeon builder sees a "d" in the +# vault definition, the second will be used for "e"s, etc. Positions are +# comma-separated. Positions can contain multiple possibilities, one of which +# the builder will choose randomly. Separate such multiple possibilities usin +# a slash. Note that "nothing" (without the quotes) is a valid possibility. +# You can also give possibilities a "weight," which affects their chance of +# being picked. The default weight is 10. The chance to pick a possibility is +# [possibility's weight: / sum of all weight:s in that array position] +# Modifiers: "good_item" makes the builder try to make the item a good one. +# "any" by itself lets it plop down any object -- and you can combine "any" +# with "good_item." "any" plus an item class gives a random item of that clas +# (e.g. "any book"). # -# note that a lot of the vaults are in there mainly to add some interest to the -# scenery, and are not the lethal treasure-fests you find in Angband -# (not that there's anything wrong with that) -# +# Limitations: You can't affect stack quantity for stackable items, nor can you +# affect curse status nor item race, nor can you give specific egos, nor can +# give fixedarts. You also can't lay down corpses, skeletons, or chunks. +# +# "MONS:" LINES: +# These are used to help place specific monsters at specific places in a +# vault. They create an array with up to 7 positions. What's in the first +# position in the array will be used when the dungeon builder sees a "1" +# in the vault definition, the second for "2," etc. Note that if, for +# example, you place a 3 on the map, but your MONS: line has no third +# position, the 3 will be filled with RANDOM_MONSTER. +# +# "CHANCE:" LINES +# For entry vaults and any other vaults randomly picked from among a set, +# this type of line affects the likelihood of the given vault being picked in +# a given game. The default CHANCE: is 10. The likelihood of a vault getting +# picked is: +# [vault's CHANCE: / sum of all CHANCE:s of vaults of that type] +# !!! Note for entry vault builders: really high values like CHANCE:5000 +# almost guarantee that a vault will be picked, and thus are great +# for testing. !!! +# +# TAGS +# Tags go an a TAGS: line and are space-separated. Valid tags are: +# entry: this tag MUST be there for a vault to be pickable as an entry vault. +# no_monster_gen: this tag prevents 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 +# or lava. +# no_pool_fixup: prevents water squares next to land from being randomly conv +# from deep water (the default) to shallow. +# +# FLAGS +# Flags go on a FLAGS: line and are space-separated. Valid flags are: +# no_rotate: Normally, the dungeon builder can, at its whim, rotate your vault +# This flag tells it, "hey, don't do that to my vault!" +# no_hmirror: Like no_rotate, but for horizontal mirroring. +# no_vmirror: Like no_rotate, but for vertical mirroring. +# +# note that a lot of the vaults are in there mainly to add some +# interest to the scenery, and are not the lethal treasure-fests you +# find in Angband (not that there's anything wrong with that) +# # Guidelines for creating new vault maps: # -# If your map is not a minivault, make sure the side(s) that form the border -# have a rock wall padding at least 6 deep. For instance, if your map is -# ORIENT: north, you must have a 6 deep border of rock wall (or any other kind -# of wall) along the northern, eastern, and western edges of the map. If -# you're doing a fullscreen map (encompass), you must pad all around the map -# with 6 layers of wall. For ORIENT: encompass maps, you don't need to +# If your map is not a minivault or a floating vault, make sure the side(s) +# that form the border have a rock wall padding at least 6 deep. For instance, +# if your map is ORIENT: north, you must have a 6 deep border of rock wall (or +# any other kind of wall) along the northern, eastern, and western edges of the +# map. If you're doing a fullscreen map (encompass), you must pad all around +# the map with 6 layers of wall. For ORIENT: encompass maps, you don't need to # explicitly include the padding provided you make the map small enough that # the padding can be provided automatically. +# +# You do not have to place all of the stairs unless the level is full +# screen, in which case you must place all except the extra stairs (> +# and <). The <> stairs can be put anywhere and in any quantities but +# do not have to be there. Any of the other stairs which are not +# present in the vault will be randomly placed outside it. Also +# generally try to avoid rooms with no exit. # -# Basically you can just let your creativity run wild. You do not have -# to place all of the stairs unless the level is full screen, in which -# case you must place all except the extra stairs (> and <). The <> stairs -# can be put anywhere and in any quantities but do not have to be there. Any -# of the other stairs which are not present in the vault will be randomly -# placed outside it. Also generally try to avoid rooms with no exit. +# You can use the templates below to build vaults. The entry point +# '@' must be present (except full-screen vaults where it must not +# and orient:float maps, where it is optional - the builder will +# randomly convert '.' spaces on edges to entry points if needed) and +# be on an edge of the vault. # -# You can use the templates below to build vaults. The entry point '@' must be -# present (except full-screen vaults where it must not) and be on the same -# side of the vault as it is on the template, but can be anywhere along that -# side. -# -# I think that's all. Have fun! -# -# ps - remember to add one to the monster array value when placing monsters -# on each map (it is 1-7, not 0-6) {dlb} -# -# All vaults MUST have an ORIENT: attribute; if there's no ORIENT: attribute, -# the vault is considered to be a minivault, which is usually not what you -# want. -# # Minivaults are handled very differently from regular vaults and special # levels. They're placed *after* normal map generation, whereas normal vaults # are placed before generating the rest of the level. There's no way to # guarantee generation of a minivault on a particular level, whereas vaults # can be forced to appear using a PLACE: attribute. # -# Floating vaults: -# If you want to do vault-like things in a map that should be positioned like -# a minivault, use ORIENT: float. This allows the vault to be placed in the -# middle of a level, unlike normal vaults that must be anchored to at least -# two edges of the map. Floating maps also do not need explicit entry points - -# the dungeon builder will choose random entry points if you don't specify -# any. +# I think that's all. Have fun! # -# Special levels are selected either by PLACE: (for most special levels) or -# TAGS: (for the Pandemonium demon lords). If you want to define alternate -# levels, duplicate the selector and use different names. For instance, to -# define an alternate Vestibule level, you could use something like this: -# -# NAME: vestibule_of_hell_alternate -# PLACE: Hell -# -# To define an alternate level for Cerebov, you could do: -# -# NAME: cerebov_alternate -# TAGS: cerebov -# -# You can also use CHANCE: to control the weight a level is assigned. For -# instance, if you want to make cerebov_alternate five times more likely than -# the standard cerebov level, you'd do: -# -# NAME: cerebov_alternate -# TAGS: cerebov -# CHANCE: 50 -# -# (The default weight is 10 if CHANCE: is omitted.) -# -############################################################################## +############################################################################### NAME: vestibule_of_hell PLACE: Hell @@ -2338,36 +2379,31 @@ ############################################################################## # Freedom of Choice (Orc entry) -NAME: david_orc_choice +NAME: david_orc_1_choice TAGS: orc_entry -MONS: hobgoblin, orc sorcerer, orc warrior, orc +MONS: orc, orc sorcerer / orc priest / orc warrior, orc warrior / orc ITEM: scroll of blinking / scroll of recharging / scroll of fear ITEM: scroll of teleport / scroll of remove curse / scroll of identify ORIENT: float - MAP xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx.........xxxxxxxx xxxxx.......O.......xxxxx -xxxx.................xxxx xxxx....x.......x....xxxx +xxxx...xxx.....xxx...xxxx +xxx...xxxxx...xxxxx...xxx xxx....xxx.....xxx....xxx -xxx...xxxxx...xxxxx...xxx -xx.....xxx.....xxx.....xx -xx.....xxx.....xxx.....xx -x.......x..I.I..x...I...x -x.......x.......x.......x +xx.....xxx.I.I.xxx..I..xx +xx......x.......x......xx x..x.x..x..x=x..x..x+x..x x.xx.xx.x.xx=xx.x.xx~xx.x -x.x.%.x.x.x.d.x.x.x.4.x.x -x.x.1.x.x.x.2.x.x.x.4.x.x -x.x.%.x.x.x.3.x.x.x.e.x.x +x.x.%.x.x.x2.2x.x.x.3.x.x +x.x.1.x.x.xdddx.x.x.e.x.x +x.x.%.x.x.x2.2x.x.x.3.x.x x.xx.xx.x.xx=xx.x.xx~xx.x x..x.x..x..x=x..x..x+x..x -x.......x.......x.......x -x.......x..I.I..x...I...x -xx.....xxx.....xxx.....xx -xx.....+.+.....+.+.....xx +x.......+.......+.......x +xx.....xxx.I.I.xxx..I..xx xxx...xxxxx...xxxxx...xxx xxx.@.xxxxxxxxxxxxx.@.xxx ENDMAP @@ -2375,12 +2411,10 @@ ############################################################################## # Generic Orc entry -NAME: david_orc_1 +NAME: david_orc_2 TAGS: orc_entry -MONS: orc +MONS: weight:50 orc / orc warrior ORIENT: float -FLAGS: no_rotate - MAP xxxx..@..xxxx x.....I.....x @@ -2394,14 +2428,34 @@ ENDMAP ############################################################################## +# Orcish monsters near stair + +NAME: david_orc_3 +TAGS: orc_entry +MONS: weight:80 nothing / weight:50 orc / orc priest / orc wizard / orc warrior +MONS: nothing / orc warrior / orc sorcerer / orc priest +ORIENT: float +MAP +1.....@....11 +1............ +............. +......21..... +@.....O.....@ +.....12...... +............. +............. +11..@......11 +ENDMAP + +############################################################################## +# Vaults entries +############################################################################## # Generic Vaults entry NAME: david_vaults_1 TAGS: vault_entry MONS: human ORIENT: float -FLAGS: no_rotate - MAP xxxxx.@.xxxxx x...+...x...x @@ -2415,14 +2469,14 @@ ENDMAP ############################################################################## +# Lair entries +############################################################################## # Generic Lair entry NAME: david_lair_1 TAGS: lair_entry MONS: giant lizard, giant snail, yak, plant ORIENT: float -FLAGS: no_rotate - MAP xxxx..@..xxxx xx.........xx @@ -2442,8 +2496,6 @@ TAGS: lair_entry MONS: plant, firedrake ORIENT: float -FLAGS: no_rotate - MAP xxxxxxxxxxxxx xx111111111xx @@ -2454,4 +2506,28 @@ x1..11......x xx.........xx xxxx..@..xxxx +ENDMAP + +############################################################################## +# Lair monsters near stair + +NAME: david_lair_3 +TAGS: lair_entry +MONS: weight:50 nothing / weight:30 giant slug / weight:30 giant snail +MONS: weight:100 nothing / weight:40 yak / sheep / death yak +MONS: weight:100 nothing / weight:20 giant iguana / weight:20 giant lizard / gila monster / komodo dragon +MONS: green rat / grey rat / orange rat / quokka / rat +MONS: weight:90 nothing / weight:30 giant frog / blink frog / giant brown frog / spiny frog +SHUFFLE: 12345 +ORIENT: float +MAP +111...@...... +111.......... +11........2.. +............. +@.....O.....@ +...2......... +........2.... +............. +....@........ ENDMAP \ No newline at end of file Modified: trunk/crawl-ref/source/dat/vaults.des =================================================================== --- trunk/crawl-ref/source/dat/vaults.des 2007-02-12 07:40:59 UTC (rev 950) +++ trunk/crawl-ref/source/dat/vaults.des 2007-02-13 11:48:40 UTC (rev 951) @@ -16,8 +16,7 @@ # @ - entry point - must be on outside and, except in ORIENT:float layouts, # must always be on a particular side or sides - see templates # W - shallow water -# w - deep water - Entry vault makers, note that this may receive water -# creatures! +# w - deep water - Entry vault makers: this may receive water creatures! # l - lava - Entry vault makers, note that this may receive lava creatures! # (Use the no_monster_gen tag to prevent both of these effects.) # >< - extra stairs - you can leave level by these but will never be placed o @@ -31,8 +30,7 @@ # ^ - random trap # ~ - random trap suitable for the branch and depth the map is being used. # -# A - Vestibule gateway (opened by Horn). Can also be put on other levels for -# colour, where it won't do anything. +# A - Vestibule gateway (opened by Horn). # B - Altar. These are assigned specific types (eg of Zin etc) in dungeon.cc, # in order. # C - Random Altar. @@ -43,7 +41,7 @@ # T - Water fountain # U - Magic fountain # V - Permanently dry fountain -# # +# # $ - gold # % - normal item # * - higher level item (good) @@ -59,13 +57,20 @@ # 9 - +5 depth monster # 8 - (+2) * 2 depth monster (aargh!). Can get golden dragons and titans # this way. -# 1-7 - monster array monster. See section below on MONS: arrays for more inf +# 1-7 - monster array monster. See section below on MONS: arrays for more +# information +# +# A vault always has its body between MAP and ENDMAP commands. Furthermore, +# several other additional commands are possible (some of them mandatory). # -# ORIENT: LINES: -# Some kind of orient: line is mandatory, unless you want the vault to be a -# minivault, which is usually not what you want. Valid orient: lines are: -# float: The dungeon builder will put your vault wherever it wants to. -# some_direction: The vault will lie along the mentioned side of the map: +# NAME +# Each vault/level/map must have a unique name. Underscores and digits are ok. +# +# ORIENT: (north | northwest | ... | float | encompass) +# Some kind of ORIENT: line is mandatory, unless you want the vault to be a +# minivault, which is usually not what you want. Valid values are: +# "float": The dungeon builder will put your vault wherever it wants to. +# "some_direction": The vault will lie along the mentioned side of the map: # xxxxxxxxxx xxxxxxxxxxxxx # xORIENT:Nx xORIENT:NW|.. # x.VAULT..x x.VAULT...|.. @@ -73,43 +78,48 @@ # xrest....x xrest........ # x...of...x x.....of..... # x...levelx x.......level -# ...which brings us to padding. With any some_direction orientation, you nee +# ...which brings us to padding. With any some_direction orientation, you need # 6 layers of x-padding along any level-edge that the vault borders. For # instance, if your map is ORIENT: north, you must have a 6 deep border of # rock wall (or any other kind of wall) along the northern, eastern, and # western edges of the map. -# encompass: the vault completely occupies the entire level. Padding is needed -# on all 4 sides. +# "encompass": the vault completely occupies the entire level. Padding is +# needed on all 4 sides. # -# "ITEM:" LINES: +# ITEM # These are used to help place specified items at specific places within a -# vault. They create an array with up to 8 positions. What's in the first -# position in the array will be used when the dungeon builder sees a "d" in the -# vault definition, the second will be used for "e"s, etc. Positions are -# comma-separated. Positions can contain multiple possibilities, one of which -# the builder will choose randomly. Separate such multiple possibilities usin -# a slash. Note that "nothing" (without the quotes) is a valid possibility. +# vault. They create an array with up to 8 positions. What's in the first +# position in the array will be used when the dungeon builder sees a "d" in +# the vault definition, the second will be used for "e"s, etc. Positions are +# comma-separated; several ITEM lines are possible as well. +# Positions can contain multiple possibilities, one of which the builder will +# choose randomly. Separate such multiple possibilities using a slash. Note +# that "nothing" (without the quotes) is a valid possibility. The random +# choice is done for each individual occurence of the letter. # You can also give possibilities a "weight," which affects their chance of # being picked. The default weight is 10. The chance to pick a possibility is # [possibility's weight: / sum of all weight:s in that array position] -# Modifiers: "good_item" makes the builder try to make the item a good one. -# "any" by itself lets it plop down any object -- and you can combine "any" -# with "good_item." "any" plus an item class gives a random item of that clas -# (e.g. "any book"). +# Modifiers: +# "good_item" makes the builder try to make the item a good one. +# "any" by itself gives random choice; you can combine "any" with "good_item." +# "any book", "any misc" etc. gives a random item of that class. # # Limitations: You can't affect stack quantity for stackable items, nor can you # affect curse status nor item race, nor can you give specific egos, nor can # give fixedarts. You also can't lay down corpses, skeletons, or chunks. # -# "MONS:" LINES: +# MONS # These are used to help place specific monsters at specific places in a # vault. They create an array with up to 7 positions. What's in the first # position in the array will be used when the dungeon builder sees a "1" # in the vault definition, the second for "2," etc. Note that if, for # example, you place a 3 on the map, but your MONS: line has no third # position, the 3 will be filled with RANDOM_MONSTER. +# Individual monsters may be prefixed with the "generate_awake" (without +# the quotes). Use this sparingly. +# Note that 8, 9, 0 also place monsters (see the table above). # -# "CHANCE:" LINES +# CHANCE # For entry vaults and any other vaults randomly picked from among a set, # this type of line affects the likelihood of the given vault being picked in # a given game. The default CHANCE: is 10. The likelihood of a vault getting @@ -121,54 +131,66 @@ # # TAGS # Tags go an a TAGS: line and are space-separated. Valid tags are: -# entry: this tag MUST be there for a vault to be pickable as an entry vault. -# no_monster_gen: this tag prevents 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 -# or lava. -# no_pool_fixup: prevents water squares next to land from being randomly conv -# from deep water (the default) to shallow. +# "entry": this tag MUST be there for a vault to be pickable as an entry vault. +# "no_monster_gen": this tag prevents 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 +# or lava. +# "no_pool_fixup": prevents water squares next to land from being randomly +# converted from deep water (the default) to shallow. +# "branch_entry" eg. "orc_entry", "lair_entry" etc. If chosen, these maps +# will contain the stairs for that branch. Use "O" to place +# the stairs. Branch entries should go to splev.des. # # FLAGS # Flags go on a FLAGS: line and are space-separated. Valid flags are: -# no_rotate: Normally, the dungeon builder can, at its whim, rotate your vault -# This flag tells it, "hey, don't do that to my vault!" -# no_hmirror: Like no_rotate, but for horizontal mirroring. -# no_vmirror: Like no_rotate, but for vertical mirroring. +# "no_rotate": Normally, the dungeon builder can, at its whim, rotate your +# vault. This flag tells it, "hey, don't do that to my vault!" +# "no_hmirror": Like no_rotate, but for horizontal mirroring. +# "no_vmirror": Like no_rotate, but for vertical mirroring. # -# note that a lot of the vaults are in there mainly to add some +# SHUFFLE +# This allows to randomly permute glyphs on the map. There are two ways: +# SHUFFLE: 123w (i.e. list of glyphs, NOT comma-separated) +# could, for example, swap all occurences of "1" with "2", +# as well as swapping all "3" with "w" (or any other of the 23 +# possibilities). +# SHUFFLE: 12,3w (i.e. list of comma-separated blocks of same size) +# will either do nothing or swap all "1" with "3" and then also +# swap "2" with "w" everywhere. +# Several SHUFFLE lines are possible. +# +# Note that a lot of the vaults are in there mainly to add some # interest to the scenery, and are not the lethal treasure-fests you # find in Angband (not that there's anything wrong with that) # # Guidelines for creating new vault maps: # # If your map is not a minivault or a floating vault, make sure the side(s) -# that form the border have a rock wall padding at least 6 deep. For instance, -# if your map is ORIENT: north, you must have a 6 deep border of rock wall (or -# any other kind of wall) along the northern, eastern, and western edges of the -# map. If you're doing a fullscreen map (encompass), you must pad all around -# the map with 6 layers of wall. For ORIENT: encompass maps, you don't need to -# explicitly include the padding provided you make the map small enough that -# the padding can be provided automatically. +# forming the border have a rock wall padding at least 6 deep. For instance, +# if your map is ORIENT: north, you must have a 6 deep border of rock wall +# (or any other kind of wall) along the northern, eastern, and western edges +# of the map. If you're doing a fullscreen map (encompass), you must pad all +# around the map with 6 layers of wall. For ORIENT: encompass maps, you +# don't need to explicitly include the padding provided you make the map +# small enough that the padding can be provided automatically. # -# You do not have to place all of the stairs unless the level is full -# screen, in which case you must place all except the extra stairs (> -# and <). The <> stairs can be put anywhere and in any quantities but -# do not have to be there. Any of the other stairs which are not -# present in the vault will be randomly placed outside it. Also -# generally try to avoid rooms with no exit. +# You do not have to place all of the stairs unless the level is full screen, +# in which case you must place all except the extra stairs (> and <). The <> +# stairs can be put anywhere and in any quantities but do not have to be +# there. Any of the other stairs which are not present in the vault will be +# randomly placed outside it. Also generally try to avoid rooms with no exit. # -# You can use the templates below to build vaults. The entry point -# '@' must be present (except full-screen vaults where it must not -# and orient:float maps, where it is optional - the builder will -# randomly convert '.' spaces on edges to entry points if needed) and -# be on an edge of the vault. +# You can use the templates below to build vaults. The entry point '@' must +# be present (except full-screen vaults where it must not and orient:float +# maps, where it is optional - the builder will randomly convert '.' spaces +# on edges to entry points if needed) and be on an edge of the vault. # # Minivaults are handled very differently from regular vaults and special -# levels. They're placed *after* normal map generation, whereas normal vaults -# are placed before generating the rest of the level. There's no way to -# guarantee generation of a minivault on a particular level, whereas vaults -# can be forced to appear using a PLACE: attribute. +# levels. They're placed *after* normal map generation, whereas normal +# vaults are placed before generating the rest of the level. There's no way +# to guarantee generation of a minivault on a particular level, whereas +# vaults can be forced to appear using a PLACE: attribute. # # I think that's all. Have fun! # Modified: trunk/crawl-ref/source/mapdef.cc =================================================================== --- trunk/crawl-ref/source/mapdef.cc 2007-02-12 07:40:59 UTC (rev 950) +++ trunk/crawl-ref/source/mapdef.cc 2007-02-13 11:48:40 UTC (rev 951) @@ -229,35 +229,11 @@ resolve(lines[i], fillins); } -void map_lines::calc_symbol_frequencies(symbol_frequency_t &f) +std::string map_lines::clean(std::string s) { - for (int i = 0, size = lines.size(); i < size; ++i) - { - const std::string &s = lines[i]; - for (int j = 0, len = s.length(); j < len; ++j) - f[ s[j] ]++; - } + return replace_all_of(s, " \t", ""); } -std::string map_lines::remove_unreferenced(const symbol_frequency_t &freq, - std::string s) -{ - if (s.find(',') == std::string::npos) - { - for (int i = static_cast<int>(s.length()) - 1; i >= 0; --i) - { - if (!freq[ s[i] ]) - s.erase( i, 1 ); - } - } - else - { - s = replace_all_of(s, " \t", ""); - } - - return (s); -} - std::string map_lines::block_shuffle(const std::string &s) { std::vector<std::string> segs = split_string(",", s); @@ -301,10 +277,9 @@ return (result); } -void map_lines::resolve_shuffle(const symbol_frequency_t &freq, - const std::string &shufflage) +void map_lines::resolve_shuffle(const std::string &shufflage) { - std::string toshuffle = remove_unreferenced(freq, shufflage); + std::string toshuffle = clean(shufflage); std::string shuffled = shuffle(toshuffle); if (toshuffle.empty() || shuffled.empty()) @@ -326,11 +301,8 @@ void map_lines::resolve_shuffles(const std::vector<std::string> &shuffles) { - symbol_frequency_t freq(0); - calc_symbol_frequencies(freq); - for (int i = 0, size = shuffles.size(); i < size; ++i) - resolve_shuffle( freq, shuffles[i] ); + resolve_shuffle( shuffles[i] ); } void map_lines::normalise(char fillch) Modified: trunk/crawl-ref/source/mapdef.h =================================================================== --- trunk/crawl-ref/source/mapdef.h 2007-02-12 07:40:59 UTC (rev 950) +++ trunk/crawl-ref/source/mapdef.h 2007-02-13 11:48:40 UTC (rev 951) @@ -72,15 +72,10 @@ const std::vector<std::string> &get_lines() const; private: - typedef FixedVector<short, 128> symbol_frequency_t; - - void resolve_shuffle(const symbol_frequency_t &, - const std::string &shuffle); + void resolve_shuffle(const std::string &shuffle); void resolve(std::string &s, const std::string &fill); void check_borders(); - void calc_symbol_frequencies(symbol_frequency_t &f); - std::string remove_unreferenced(const symbol_frequency_t &freq, - std::string s); + std::string clean(std::string s); std::string shuffle(std::string s); std::string block_shuffle(const std::string &s); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |