summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.h
Commit message (Collapse)AuthorAgeFilesLines
* Add a "patrolling" flag to monster creation in mapdef and dungeon.cc, j-p-e-g2008-05-261-35/+37
| | | | | | | | | | | | | | | | | and add it to Orb Guardians in Zot:5. At least in theory, they should now be returning to their starting points if you flee and stay away for long enough. "In theory" because the bad monster pathfinding prevents them from actually finding their way back. We've got the same problem with minotaurs in labyrinths, who've also got this flag set. Because of these restrictions it's almost impossible to test whether it would work without such problems. In any case, it's there for later. Also: spacing and commenting fixes in dungeon.cc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5253 c06c8d41-db1a-0410-9941-cceddc491573
* Cleaned up monster generation functions, separate monster zombie type from ↵dshaligram2008-05-051-6/+8
| | | | | | | | | monster number. May be buggy. Allow hydra zombies (they currently do not get the right number of heads). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4872 c06c8d41-db1a-0410-9941-cceddc491573
* This was originally going to be a small refactor of stash.cc beforepauldubois2008-03-231-8/+8
| | | | | | | | | | | | | | | | | getting into stash/item finding, but it ended up big. Removed the read/writeThing API in favor of the marshall/unmarshallThing API. It was slightly awkward in a couple spots where the format of writeThing and marshallThing differed slightly (strings, level_id, level_pos). Doesn't affect savegames. When it's is okay to break savegames (maybe just before releasing 0.4?) it would be nice to remove the few remaining redundancies listed above. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3828 c06c8d41-db1a-0410-9941-cceddc491573
* Batch of tiny changes for MSVC compiles.pauldubois2008-03-101-4/+7
| | | | | | | | | | | | | | | Most of these fall into the category: - don't use struct to refer to a class, and vice versa - msvc doesn't like unistd.h or dirent.h Doesn't fix all the struct/class problems; I think I'll silence those for now and move on because it's not all that important. Tested on OS X. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3571 c06c8d41-db1a-0410-9941-cceddc491573
* [Bug 1907221] Add "Modified for Crawl Reference" statement and author to aj-p-e-g2008-03-081-0/+3
| | | | | | | | huge number of files. Also correct file name comments. No coding changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3539 c06c8d41-db1a-0410-9941-cceddc491573
* New Zot levels, courtesy Lemuel (David).dshaligram2008-01-121-2/+3
| | | | | | | | | | Added more control when specifying draconians in maps (any yellow draconian, green draconian knight, any nonbase red draconian, any base draconian, etc.). Fixed crash when dragon or draconian breathes and the player is unarmed. Replaced magic number 250 in monster creation with enum constant MONS_PROGRAM_BUG. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3253 c06c8d41-db1a-0410-9941-cceddc491573
* mapdef/vault items can now have their race type and ego explicitly set.zelgadis2007-12-131-62/+66
| | | | | | | mapdef/vault monsters can now be given an explicit list of items. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3055 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed LFLAGS not working right when conditionalised (bobbens).dshaligram2007-11-021-0/+26
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2722 c06c8d41-db1a-0410-9941-cceddc491573
* dgn_place_map takes a coord_def to specify the centre of the map for ↵dshaligram2007-10-251-0/+2
| | | | | | minivaults and floating vaults. This placement can be activated using an asterisk (mapname*) when entering the name of the map in the &L command. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2559 c06c8d41-db1a-0410-9941-cceddc491573
* Allow overriding monster colours in map specs using col:<newcolour>.dshaligram2007-10-071-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2353 c06c8d41-db1a-0410-9941-cceddc491573
* Moved all of the bazaar specific logic/code to dat/bazaar (or turned thezelgadis2007-10-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | code into Lua utility functions which can be reused by things other than bazaars). Related changes: * Portal vault entrances now work if they have destinations ("dst" property) besides "bazaar" (though it still causes an assert if no matchng maps for the destination can be found). * The floor and rock colour for a level are generated once and then stored in the save file, rather than being constantly regenerated (which means that bazaar floor colours are now truly random, rather than being tied to the depth of the bazaar entrance). * The floor and rock colour for a portal vault (or for any level containing any vault) can be set with ROCKCOL and FLOORCOL (which currently only accepts a single colour, unlike COLOUR); there are also Lua functions for querying and setting the colours. * Each portal vault level_type_name can have an associated Lua callback which is called when level generation is complete; it can be used for things like stair fixup. I also moved the Halls of Zot rock/floor colour special casing to the dat/zot.des file, since it was easy once ROCKCOL and FLOORCOL had been implemented. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2314 c06c8d41-db1a-0410-9941-cceddc491573
* Bumped piety cost for brothers-in-arms and greater healing.dshaligram2007-09-271-6/+36
| | | | | | | Added COLOUR: directive to maps to allow custom colouring of features by glyph, and tweaked the strawberry fields variants to use it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2227 c06c8d41-db1a-0410-9941-cceddc491573
* This change moves the logic for when a level or branch prohibitszelgadis2007-09-191-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | teleport control from the C++ code into the vault .des files. This is done with the additions of two things: * Changeable, persistent per-level and per-branch flags which affect game play. * Dungeon events for the killing of monsters, picking up of objects and changing of features. The current level and branch flags are for teleport control prevention, making a level unmappable (like the Abyss or a Labyrinth), and preventing magic mapping from working (like the Abyss or a Labyrinth). Some related changes: * The new .des header KMASK allows for dungeon grid masks like no_monster_gen to be applied to specific symbols rather than the entire vault. * If the wizard mapping command (&{) is used in a place which is unmappable, it will ask if you wish to force the area to be mappable (so you can see what an entire Labyrinth or Abyss level looks like without having to hack the source). * A new wizard-mode level-map command, 'T', will teleport the player to wherever the cursor is pointing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2146 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-0/+23
| | | | | | | | | | | | | crawl_environment, player and monsters classes have been left in externs.h, which necessitates that all of the enums references by those classes stay in enums.h, since you can't forward declare an enum. However, it's a start. Also, portions of misc.{cc,h} have been split off into traps.{cc,h}, place.{cc,h} and terrain.{cc,h} git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2095 c06c8d41-db1a-0410-9941-cceddc491573
* Reworked Bazaars as a special case of portal vaults. The level-type is nowdshaligram2007-07-271-0/+2
| | | | | | | | | | | | | called portal vault. The dungeon builder bases its behaviour on the level_type_name, which must be set as the "dst" property on the portal leading to the bazaar/portal vault. Added WELCOME: directive to .des files to allow maps to specify a welcome message when the player enters the level (only relevant to encompass maps). Readjusted kenku flight speed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1941 c06c8d41-db1a-0410-9941-cceddc491573
* Replaced timed markers with Lua markers. Breaks save compatibility.dshaligram2007-07-261-0/+2
| | | | | | KFEAT: feature names are now as in the dungeon_feature_type enum. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1930 c06c8d41-db1a-0410-9941-cceddc491573
* Updated level-design.txt.dshaligram2007-07-211-4/+4
| | | | | | | | | | | Moved map markers to mapmark.cc. Added support for timer markers that remove a feature after a certain timeout. Need to hook up messaging to Lua. Added bazaars (need more bazaar layouts). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1899 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed inappropriate maps being selected for dungeon levels.dshaligram2007-07-081-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1803 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed level-compiler not warning of maps with the same name consistently.dshaligram2007-07-081-0/+19
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1799 c06c8d41-db1a-0410-9941-cceddc491573
* Extend rectangular vault support for regular vaults.dshaligram2007-07-071-0/+4
| | | | | | | | Vault collision checking is also non-rectangular now. Fixed Windows builds not reporting line numbers in .des file error messages. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1784 c06c8d41-db1a-0410-9941-cceddc491573
* Allow non-rectangular minivaults and branch entry vaults (use space padding).dshaligram2007-07-061-1/+1
| | | | | | | | | | They're still rectangular for collision detection with other vaults; that'll need more effort to fix. Space padding can also be used for regular vaults, but it'll be ignored at the moment (but soon...! :-)). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1778 c06c8d41-db1a-0410-9941-cceddc491573
* Fix level compiler to validate PLACE: declarations.dshaligram2007-07-061-1/+2
| | | | | | Places are saved as level_ids, not strings. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1776 c06c8d41-db1a-0410-9941-cceddc491573
* Allow maps to specify item quantities with the q:N syntax in item specs. dshaligram2007-07-041-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1745 c06c8d41-db1a-0410-9941-cceddc491573
* Moved hellmouths back to hells.des after discussions with David.dshaligram2007-07-011-0/+2
| | | | | | Restored a couple of other maps. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1707 c06c8d41-db1a-0410-9941-cceddc491573
* Added NSUBST.dshaligram2007-07-011-0/+26
| | | | | | | Should not highlight unvisited stairs in the Vestibule, since travel cache doesn't track visited-ness of Vestibule stairs. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1706 c06c8d41-db1a-0410-9941-cceddc491573
* [1742338] Fixed Hell portals not being revealed correctly when the horn isdshaligram2007-06-301-7/+38
| | | | | | sounded. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1701 c06c8d41-db1a-0410-9941-cceddc491573
* Updated level-design.txt with a basic overview of the Lua possibilities.dshaligram2007-06-281-2/+2
| | | | | | | Fixed some inconsistencies in the handling of Lua errors. Tweaked the lexer to allow spaces before Lua chunk prefixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1676 c06c8d41-db1a-0410-9941-cceddc491573
* Added glyphs_connected and friends for maps to test connectedness of pointsdshaligram2007-06-271-0/+36
| | | | | | | | after map transforms are applied. Fixed conflicts in bison grammar. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1669 c06c8d41-db1a-0410-9941-cceddc491573
* Added support for a validation hook for maps to check if they're A-Ok.dshaligram2007-06-261-2/+16
| | | | | | | | | Tweaked savefile format (breaks saves) to allow the game to perform emergency saves if level-generation fails (followers are lost, needs to be fixed). [1743698] Re-refixed SP_ELF stub (Eino). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1659 c06c8d41-db1a-0410-9941-cceddc491573
* .des files can use a global Lua prelude (before maps are defined) that runsdshaligram2007-06-251-3/+0
| | | | | | | at start of game, before any maps are loaded, and does not run in the context of any specific map. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1654 c06c8d41-db1a-0410-9941-cceddc491573
* Hackily rewrite Lua chunk errors to reflect line numbers from the originaldshaligram2007-06-241-2/+1
| | | | | | | .des file so that level-designers can find the lines that are causing the problem. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1641 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented .des file caching (speeds startup a fair bit): .des files aredshaligram2007-06-241-1/+20
| | | | | | | | | | parsed only once (unless they're modified again). Crawl also keeps only map stubs in memory (name, place, orient, tags) and loads the map body only when it is actually selected by the dungeon builder. This probably breaks the Windows build, will be fixed soonish. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1637 c06c8d41-db1a-0410-9941-cceddc491573
* Step 1 of .des file Lua-isation. The dungeon compiler converts .des files todshaligram2007-06-231-12/+65
| | | | | | | | | | Lua (Lua code can be embedded with {{ <lua code here> }} constructs) that is run to produce the final map. Some maps may be broken, this is untested, lots more work needs to be done. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1629 c06c8d41-db1a-0410-9941-cceddc491573
* Added new orc entries and vaults (Lemuel).dshaligram2007-05-281-4/+11
| | | | | | | | | | Added support to the map designer for specifying the monster-type for zombies, skeletons, simulacra and spectral things. Also allow specifying the number of heads for hydras ("12-headed hydra"). Fixed lexer rule bug (IDENTIFIER). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1490 c06c8d41-db1a-0410-9941-cceddc491573
* Updated level-design.txt.dshaligram2007-05-101-1/+5
| | | | | | | | | Added spacing for another minivault, updated depths. Tweaked KMONS: to allow alternate monsters to be placed if a requested unique is unavailable. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1445 c06c8d41-db1a-0410-9941-cceddc491573
* Added Lemuel's mines minivaults.dshaligram2007-05-091-4/+33
| | | | | | | Extended map DEPTH: attribute to support branch specifiers and negated depth specifiers. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1442 c06c8d41-db1a-0410-9941-cceddc491573
* Better handling for mimics in .des files, fixed guardian naga minivault.dshaligram2007-04-291-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1396 c06c8d41-db1a-0410-9941-cceddc491573
* Made item_def::base_type into object_class_type, instead of unsigned char.haranp2007-04-261-1/+2
| | | | | | | | | | | Flushed out a few bugs as a result, specifically: 1. Some monsters (e.g., orcs) can now get blowguns as they were intended to (look at the makeitem.cc change); 2. Acquirement will no longer attempt to give you the books of minor magic if you've found them (look at the effects.cc change.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1374 c06c8d41-db1a-0410-9941-cceddc491573
* Shield blocks are much harder vs invisible attackers.dshaligram2007-04-151-43/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1316 c06c8d41-db1a-0410-9941-cceddc491573
* Allow "any trap" and "any shop" (alternatives to "random trap" and "randomdshaligram2007-04-101-4/+5
| | | | | | | | | | shop") in des files. Allow using '8', '9' and '0' in monster specifications. Tossed out some unused functions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1281 c06c8d41-db1a-0410-9941-cceddc491573
* Updated levels (David).dshaligram2007-03-281-0/+6
| | | | | | | | | Give Tiamat wings and flight. Converted her second attack to a tail-slap (David). Allow ITEM: declarations to use * % and |. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1113 c06c8d41-db1a-0410-9941-cceddc491573
* Allow SHUFFLE: and SUBST: to be mixed freely; they will be applied in order ofdshaligram2007-03-271-6/+40
| | | | | | declaration (used to be all shuffles first, then all substs). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1106 c06c8d41-db1a-0410-9941-cceddc491573
* More branch entry vaults (Erik).dshaligram2007-03-231-2/+4
| | | | | | | | | | | | | | Changed behaviour when using KMONS and KITEM without a corresponding KFEAT. Previously this would force the dungeon feature of that square to plain floor. The new behaviour is to try to map the glyph to itself. For instance: KMONS: O = pandemonium demon will place a pandemonium demon on the rune, whereas previously it would place the pan demon on a floor square. Tossed out old waypoint hacks. Waypoints are now handled in the same way as travel to stash search places. This ought to fix the waypoint corruption issues. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1081 c06c8d41-db1a-0410-9941-cceddc491573
* Added KFEAT:, KITEM: and KMONS: map directives to allow placing specificdshaligram2007-03-121-4/+72
| | | | | | | monsters, terrain (named altars, traps, shops) and items all on the same square. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1028 c06c8d41-db1a-0410-9941-cceddc491573
* SYMBOL: is now obsolete in maps, replaced by SUBST:dshaligram2007-02-201-13/+36
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@956 c06c8d41-db1a-0410-9941-cceddc491573
* Updated entry vaults (David).dshaligram2007-02-191-2/+6
| | | | | | | Level compiler is stricter with MAP sections. Block SHUFFLE: now uses / as a separator to avoid confusion. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@955 c06c8d41-db1a-0410-9941-cceddc491573
* Updated .des files (David).dshaligram2007-02-131-7/+2
| | | | | | Tweaked SHUFFLE: so it doesn't strip symbols not included in the map. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@951 c06c8d41-db1a-0410-9941-cceddc491573
* Add support for block shuffling in maps (proposed by David).dshaligram2007-02-051-0/+1
| | | | | | | | | | | For instance: SHUFFLE: wW, 8$ will, if it swaps w and 8, also swap W and $. Block shuffles may have any number of comma-separated entries, provided each segment is the same length. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@923 c06c8d41-db1a-0410-9941-cceddc491573
* Allow maps to use SHUFFLE: directive to shuffle symbols in the map definitiondshaligram2007-01-291-3/+12
| | | | | | | | | | | | | | (David). For instance, SHUFFLE: def will shuffle its argument (to "efd", for instance) and replace each occurrence of the symbols in its argument with the corresponding symbol in the shuffled list (so all d will be replaced with e, all e with f, and all f with d in the example). Multiple SHUFFLE: lines can be used, and each shuffle will be applied independently. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@906 c06c8d41-db1a-0410-9941-cceddc491573
* Allow vaults to ask for a monster to be generated awake (generate_awake tag).dshaligram2007-01-291-13/+16
| | | | | | Add Enter as a synonym for . in targeting. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@905 c06c8d41-db1a-0410-9941-cceddc491573