summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util/levcomp.ypp
Commit message (Collapse)AuthorAgeFilesLines
* Remove stuffNicholas Feinberg2014-07-291-1/+1
| | | | | | | .cc, moving its contents into the new stepdown.cc and strings.cc. (The latter also got many donations from libutil.h.) Down with stuff! Up the new flesh!
* Add end.ccNicholas Feinberg2014-07-281-1/+1
|
* Add a new "ORDER:" map header for sorting game-mode maps.Neil Moore2013-09-051-1/+10
| | | | | | | | | | | The first step towards fixing #7383. Defaults to INT_MAX, so things that do not set it explicitly will be last. If two maps have the same ORDER:, they will be sorted by description/name as before. Also change the des cache index format to store ORDER (necessitating a minor version bump). Rather than leaving ORDER at its default value when loading an des cache index from earlier versions, we throw out the entire index so that it can be regenerated.
* Add a CLEAR directive for map filesPete Hurst2013-05-291-1/+11
| | | | | | | | | The syntax is as follows: CLEAR: xyz This will substitute the glyphs x, y and z for ' ' i.e. the space character, becoming not part of the map.
* Make yyerror() static.Adam Borowski2013-04-071-1/+1
|
* Cut another case of std::Adam Borowski2012-08-281-4/+4
| | | | | Not rebuiding the prebuilt copies, though; there's no point in extra churn just for this reason.
* Put AppHdr.h in yacc sources to the front, to make PCH happy.Adam Borowski2011-10-121-2/+2
|
* s/noreturn/NORETURN/ to unbreak Windows builds.Adam Borowski2011-01-071-1/+1
| | | | | It did resolve in __declspec(noreturn) which is used by the system headers as well...
* Follow the advice of gcc-4.6 -Wsuggest-attribute=noreturnAdam Borowski2011-01-071-1/+1
|
* Fix std::string being passed directly to %s format in level compiler.Darshan Shaligram2010-12-241-1/+1
|
* Fix doubles being passed to %d format strings in level compiler (Zaba).Darshan Shaligram2010-12-241-2/+2
|
* Allow maps to specify different CHANCE and WEIGHT for different depth ranges ↵Darshan Shaligram2010-12-241-36/+56
| | | | (Zaba).
* Fix a clang warning in the yaccage.Adam Borowski2010-07-301-0/+2
|
* If the PC dies in a vault, log the map name and description.Darshan Shaligram2010-06-281-1/+11
| | | | | Map descriptions are intended to be human-readable place name qualifiers, such as Pan (Cerebov's castle).
* Redo CHANCE handling for vaults.Darshan Shaligram2010-06-241-2/+2
| | | | | CHANCE is now an (almost) absolute chance of a vault being placed on a given level in its DEPTH range. CHANCE applies only to vaults picked by depth.
* Make dungeon builder reject vaults that have no DEPTH, PLACE or TAGS that ↵Darshan Shaligram2010-06-201-4/+2
| | | | | | can be used to place the vault, add default-depths to .des file to pass these checks. The preferred way to disable vaults is to give them a zero weight.
* Lua map epilogues (Keskitalo).Jude Brown2010-02-211-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | A new type of Lua associated with maps: an epilogue. This piece of Lua code is only run once, following the complete building of a dungeon level. It happens after most everything else has occurred in building a level, and therefore allows for messages and crawl.more() statements, without more messages (and so on) occurring before the level is drawn. Example: NAME: mini_test PLACE: D:2 TAGS: allow_dup WEIGHT: 1000 epilogue{{ crawl.mpr("This is a test!", "warning") crawl.more() }} MAP G ENDMAP This hopefully resolves the wishlist of being able to put more statements in Pandemonium Lord maps without these appearing before the screen is updated.
* Whitespace fixes.Adam Borowski2010-01-211-1/+1
|
* shoals_atoll support: FHEIGHT sets heights for map squares, tide_seed ↵Darshan Shaligram2010-01-201-1/+19
| | | | | | | | | | property requests that a marker be treated as a source for tide effects. Added support for setting heightmap heights using FHEIGHT: xyz = <height>. Any property marker can return a non-empty property value for "tide_seed" to use that marker's position as a seed point for the tide. Tide effects will otherwise propagate in only from the open sea at the four corners of Shoals maps, and can only affect squares connected by water to the four default tide seeds. Removed code that forces features to floor or shallow water when placing items in vaults.
* 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