summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util/levcomp.ypp
Commit message (Collapse)AuthorAgeFilesLines
* Massively expand tile functionality in vault definitions.Jude Brown2009-12-091-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | This commit creates a new specifier for vaults: "TILE". Used much in the same way as COLOUR, it can apply any specific tile to a feature. Example syntax is specified in the syntax file, but copied here for clarity: TILE: x = wall_flesh Identical to FTILE and RTILE in syntax, but closer to COLOUR in functionality. Instead of replacing the floor or relevant rock tiles, this can be used to replace the tile used for any specific feature. This can be used in combination with FTILE and RTILE to change the appearance of features. It can only be used with previously specified tiles, however. Like COLOUR and FTILE, this should be used sparingly and to good effect. Please, feel free to update vaults to use this! We want to ensure that tiles players get the same experience as ASCII players do. This is only the first stage in a push for greater flexibiltiy through tiles, but hopefully it'll have a good impact.
* Revert "Convert dgn.set_border_fill_type to BORDER."Jude Brown2009-11-301-10/+0
| | | | | | | This reverts commit 941444076c26e5e5149c6368a4261d60842fe3ec. After consultation with Enne, this doesn't really fix the issue, and is therefore superfluous.
* Convert dgn.set_border_fill_type to BORDER.Jude Brown2009-11-301-0/+10
| | | | | | | | | | The Lua prelude of maps isn't executed early enough now. Using 'BORDER' sets map->border_fill_type as soon as the map is read, rather than after it is placed. This commit increases the value of MAP_CACHE_VERSION. Can be reverted if it causes issues or is unwanted.
* Subvaults.Enne Walker2009-11-281-1/+18
| | | | | | | | Vaults can now include other vaults as a part of their definition. These subvaults are currently included by tag only and replace glyphs in their parent vault. See documentation for more details. Vault:8 has been modified to use subvaults.
* KPROP: assign feature properties in Lua vaults: FPROP_BLOODY, etc.Jude Brown2009-10-211-1/+11
|
* Fix missing levcomp include properly.Robert Vollmert2009-10-211-2/+1
|
* Revert "Fix broken include."Robert Vollmert2009-10-211-1/+2
| | | | | | Messed up the submodule again, I'm afraid. This reverts commit 4c9ce77b6e7a7494e3e4ada71eb4155210af1455.
* Fix broken include.Robert Vollmert2009-10-211-2/+1
|
* Split dgn_lib out of luadgn.cc; rename luadgn to dlua.Robert Vollmert2009-10-191-1/+1
|
* Lua map improvements.Enne Walker2009-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | The previous dungeon layout.des functions all apply directly to the grid and so are unsuitable for use in vaults. This aims to correct that by providing lua functions that can manipulate maps (of glyphs). grd[x][y] in a .des file can now be used to get and set glyphs in the current map. This should allow for less cumbersome map variations than what you can do with just SUBST and SHUFFLE. To support that, map_def no longer batches up transforms--it applies them all immediately. This resulted in a good bit of refactoring. FTILE/RTILE map commands now support setting the tile for multiple features at once. There are also a small number of new lua functions that apply to maps (map_octa_room, map_smear, and map_extend). Ideally, these will eventually replace the existing builder funcs that work on grd.
* Adding FTILE/RTILE vault commands for setting per-glyph floor and rock ↵ennewalker2009-01-201-17/+52
| | | | | | | | | | | tiles. Most vaults with COLOUR tags now also use FTILE/RTILE. FLOORCOL, ROCKCOL, FLOORTILE, and ROCKTILE have been renamed to LFLOORCOL, LROCKCOL, LFLOORTILE, and LROCKTILE to emphasize the fact that they are a per-level setting (similar to LFLAGS) and to disambiguate them from COLOUR/FTILE/RTILE. This change also fixes green water not appearing green outside of the sewers and vaults (like the ice cave) not getting their default tiles set appropriately due to a recent change. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8615 c06c8d41-db1a-0410-9941-cceddc491573
* [2054793] Partial implementation of the request to have COLOUR tags affect ↵ennewalker2008-12-011-1/+21
| | | | | | | | | tile choice. Vaults can now override the default tileset (walls and floors) for an entire level. This has been pushed to vaults where it makes sense (sewers, ice caves, ziggurats, bazaars, Shoals:5, Zot). ROCKTILE and FLOORTILE can be used when authoring vaults to set these values, both of which take a single tile name as a string. These values are ignored in console builds. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7700 c06c8d41-db1a-0410-9941-cceddc491573
* Lua functions for FLOORCOL and ROCKCOL are now named floorcol() and ↵dshaligram2008-11-231-2/+2
| | | | | | rockcol() instead of floor_colour and rock_colour, to match the convention for other .des headers (dpeg). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7547 c06c8d41-db1a-0410-9941-cceddc491573
* Separate CHANCE and WEIGHT. CHANCE is a probability, WEIGHT is a raw number ↵dshaligram2008-11-191-4/+34
| | | | | | used as a generation weight (i.e. WEIGHT is what the old CHANCE used to be). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7501 c06c8d41-db1a-0410-9941-cceddc491573
* Lua marker code is now converted into an anonymous function in the same ↵dshaligram2008-11-181-24/+26
| | | | | | scope as the rest of the map Lua code so that locals defined in the map Lua are visible to the marker code. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7479 c06c8d41-db1a-0410-9941-cceddc491573
* Apply Horst von Brand's (first) patch 1887488: gcc-4.3 compile failures.j-p-e-g2008-04-141-43/+45
| | | | | | | I'm not sure what to do about the rest of that tracker item. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4233 c06c8d41-db1a-0410-9941-cceddc491573
* Moved all of the bazaar specific logic/code to dat/bazaar (or turned thezelgadis2007-10-041-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+20
| | | | | | | 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/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Reworked Bazaars as a special case of portal vaults. The level-type is nowdshaligram2007-07-271-1/+11
| | | | | | | | | | | | | 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-6/+21
| | | | | | 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
* Fixed level-compiler not warning of maps with the same name consistently.dshaligram2007-07-081-18/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1799 c06c8d41-db1a-0410-9941-cceddc491573
* Added NSUBST.dshaligram2007-07-011-1/+18
| | | | | | | 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
* Level updates collated by David.dshaligram2007-07-011-0/+7
| | | | | | | | Fixed DEPTH: not being read correctly, added more map validation. Increased attack speed of ice statues. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1704 c06c8d41-db1a-0410-9941-cceddc491573
* [1742338] Fixed Hell portals not being revealed correctly when the horn isdshaligram2007-06-301-3/+20
| | | | | | sounded. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1701 c06c8d41-db1a-0410-9941-cceddc491573
* Added glyphs_connected and friends for maps to test connectedness of pointsdshaligram2007-06-271-16/+11
| | | | | | | | 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/+26
| | | | | | | | | 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-0/+21
| | | | | | | 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
* Allow multiple MAP sections per map (maps can be conditionalised with Lua).dshaligram2007-06-241-2/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1643 c06c8d41-db1a-0410-9941-cceddc491573
* Hackily rewrite Lua chunk errors to reflect line numbers from the originaldshaligram2007-06-241-2/+5
| | | | | | | .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-2/+3
| | | | | | | | | | 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-207/+98
| | | | | | | | | | 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 Lemuel's mines minivaults.dshaligram2007-05-091-14/+77
| | | | | | | 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
* Use end() instead of exit() for level compiler errors.dshaligram2007-04-031-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1206 c06c8d41-db1a-0410-9941-cceddc491573
* Allow SUBST and SHUFFLE specs to be comma-separated.dshaligram2007-03-271-9/+21
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1109 c06c8d41-db1a-0410-9941-cceddc491573
* Enable more verbose error messages from the map parser.dshaligram2007-03-201-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1070 c06c8d41-db1a-0410-9941-cceddc491573
* Added KFEAT:, KITEM: and KMONS: map directives to allow placing specificdshaligram2007-03-121-1/+34
| | | | | | | 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
* Level compiler now croaks if two maps have the same name.dshaligram2007-02-201-0/+31
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@957 c06c8d41-db1a-0410-9941-cceddc491573
* SYMBOL: is now obsolete in maps, replaced by SUBST:dshaligram2007-02-201-5/+10
| | | | 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-1/+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
* Allow maps to use SHUFFLE: directive to shuffle symbols in the map definitiondshaligram2007-01-291-1/+8
| | | | | | | | | | | | | | (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
* New entry vaults and regular vaults (Lemuel). The regular vaults are probablydshaligram2007-01-181-4/+5
| | | | | | | | | intended to be portal vaults for Hell portals; we need to add support for portal vaults. Added support for monster slot randomisation for maps. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@865 c06c8d41-db1a-0410-9941-cceddc491573
* Tweaked startup initialisation so that Crawl can load maps before cursesdshaligram2006-12-121-1/+0
| | | | | | initialisation, but after item initialisation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@617 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed bug where Pandemonium demonlords did not get their rightful runesdshaligram2006-12-081-2/+30
| | | | | | | | | (Cerebov and company) - bug was introduced circa 0.1.3. [1610237] Vaults can request specific items using ITEM: declarations and the item selectors defghijk. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@596 c06c8d41-db1a-0410-9941-cceddc491573
* *Breaks save compatibility* - changed monster flags to long, added "god" ↵dshaligram2006-12-071-1/+35
| | | | | | | | | | | field for future fun. dungeon.cc cleanup and rework to support floating vaults. Updated levcomp to support the float orientation. coord_def now has a constructor. USE_RIVERS and USE_NEW_UNRANDS are no longer conditional. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@585 c06c8d41-db1a-0410-9941-cceddc491573
* Merged stone_soup r15:451 into trunk.dshaligram2006-11-221-0/+226
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@452 c06c8d41-db1a-0410-9941-cceddc491573