summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.h
Commit message (Collapse)AuthorAgeFilesLines
* Convert fprop instances in mapdef.* to unsigned long. (greensnark)Jude Brown2010-01-171-3/+3
| | | | | | fprop lists, and fprop_spec, now use unsigned long instead of int. This matches env.pgrid, and means that there won't be size issues in future when we end up with more feature properties.
* headers: fix inconsistent struct/class forward declarationsSteven Noonan2009-12-291-1/+1
| | | | | | | Some classes were erroneously referred to as 'struct' in forward declarations, and vice versa. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Allow vaults to specify door tiles sets.Jude Brown2009-12-191-3/+5
| | | | | | | | | In this instance, you need at least two tiles (closed, open), and up to nine (detected, closed, gateway left open, middle open, right open, closed, left closed, middle closed, right closed), and these should always include the "no_random" option. This also doesn't properly deal with detected doors.
* Minor tweaks to TILE: specifier.Jude Brown2009-12-101-1/+3
|
* Massively expand tile functionality in vault definitions.Jude Brown2009-12-091-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Allow vaults to create specifically themed randart books.Jude Brown2009-12-081-1/+4
| | | | | It is basically a simple wrapper onto spl-book.cc's make_book_theme_randart. More documentation can be found in syntax.txt.
* New monster spec tags for marking monsters summoned.Jude Brown2009-12-051-2/+6
| | | | | | | | | | dur:1-6, marks the abjuration duration of a monster. sum:<str>, any of "clone", "animate", "chaos", "miscast", "zot", "wrath" or "aid", or the relevant spell we're mimicking; nas:<str> equivalent to the non-actor summoner. Not setting the non-actor summoner will mean that kills by these pseudo- summons are unmarked as such.
* Reduce dependency on travel.hMatthew Cline2009-11-291-1/+1
| | | | | | | | Removed inclusion of travel.h from most .h files to reduce the number of .cc files dependant on it. This involved moving the level_pos declaration to externs.h, moving the flood_find template to it's own header file, and moving two typedefs from travel.h to travel_defs.h because typedefs can't be forward declared (argh).
* Subvaults.Enne Walker2009-11-281-24/+107
| | | | | | | | 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.
* New tags for monster specs: "hd" and "hp". (kilobyte)Jude Brown2009-11-271-2/+4
| | | | | | Both values override the default class values. Placing "rat hd:20" will generate a rat with a hit dice of 20, while placing "rat hp:20" will set its hp to 20.
* Flatten header dependencies a bit.Robert Vollmert2009-11-171-2/+1
| | | | | | This removes a couple of unnecessary includes from header files. I may have missed adding some tiles includes.
* Allow portal vaults to specify fill and border glyph.Jude Brown2009-11-141-0/+2
| | | | | | | | | | | | | Also move dungeon_feature_by_name into terrain.cc, as it does not make sense it being in l_dgngrd.cc. The Lua function "set_border_fill_type(feature)" will replace the default DNGN_ROCK_WALL fill of a portal vault with the specified feature. This could be abused, and should probably only be limited to floor, water and sea, different types of walls, trees and lava; there are no sanity checks for endless traps, statues, stairs, etc. Finally, apply this to the island Trove, giving endless water effect.
* mapdef: extra validation for temple mapsMatthew Cline2009-11-121-0/+1
|
* Extract Matrix class from fixary.h.Robert Vollmert2009-11-111-1/+1
| | | | It didn't really have anything to do with FixedArray.
* Split map knowledge and FPROPs.Robert Vollmert2009-11-081-0/+1
| | | | | | | | map_cell no longer has the field "properties", which has been replaced by the unsigned long array env.pgrid. env.map has been renamed to env.map_knowledge. It should really be moved into player.
* Allow vaults to override monster spells with spells:<xyz>Darshan Shaligram2009-11-041-1/+8
| | | | | | | | | | Vaults can now override monster spell sets, or give non-casting monsters spells, and mark monsters as wizard or priest types. The M_ACTUAL_SPELLS, M_SPELLCASTER and M_PRIEST monster class flags are converted into MF_* flags at monster creation/polymorph time, and only the per-monster flags are checked when determining wizard/priestliness. See caveats in level_design.txt.
* Allow forcing randarts in vaults.Adam Borowski2009-11-041-0/+1
|
* Rename map_feature() from mapdef.h to map_feature_at.Robert Vollmert2009-11-041-2/+2
| | | | | This was causing conflicts with enum map_feature (not sure why this didn't show up earlier).
* Lua builder funcs act on map_lines, not grd.Enne Walker2009-11-021-0/+11
| | | | | | | This lets regular vaults use the same Lua functions that layout vaults do. Convert functions in l_dgnbld that acted on grd. Update layout vaults to use these new functions. Also, remove l_dgn_bf, as all of its functionality is now in l_dgnbld.
* Add minor cosmetic fixes.David Lawrence Ramsey2009-10-311-1/+1
|
* Can specify size in slime creature monster specMatthew Cline2009-10-311-0/+1
| | | | | You can now use monster specs like "titanic slime creature". The initial HP given to them in _place_monster_aux() might need tweaking.
* Splitting up stuff.cc.Robert Vollmert2009-10-301-0/+1
| | | | New: colour.cc, coord.cc, coordit.cc, random.cc, rng.cc.
* Whitespace.Enne Walker2009-10-291-1/+1
|
* Allow assignment to multiple glyphs at once.Enne Walker2009-10-291-21/+33
| | | | | | All glyph assignment declarations in maps (e.g. COLOUR, KPROP, FTILE) can now assign multiple glyphs simultaneously. This should make some vault definitions less cumbersome. See the doc for more details.
* (MONS_PROGRAM_BUG || -1) --> MONS_NO_MONSTERMatthew Cline2009-10-271-1/+1
| | | | | | | | | Change MONS_PROGRAM_BUG to MONS_NO_MONSTER when "no monster" is what was meant. Now all instances of MONS_PROGRAM_BUG should indicated some sort of failure or error. Also, fixed some places which were still using -1 instead of MONS_NO_MONSTER.
* KPROP: assign feature properties in Lua vaults: FPROP_BLOODY, etc.Jude Brown2009-10-211-1/+27
|
* Split dgn_lib out of luadgn.cc; rename luadgn to dlua.Robert Vollmert2009-10-191-1/+1
|
* Naming monsters via MONS: rat name:Yves (Jude & Vsevolod).David Ploog2009-10-191-1/+2
|
* Lua map improvements.Enne Walker2009-10-181-84/+24
| | | | | | | | | | | | | | | | | | | | 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.
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Move 'FixAry.h' -> 'fixary.h', 'FixVec.h' -> 'fixvec.h' for file naming ↵Steven Noonan2009-09-291-1/+1
| | | | | | consistency Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Allow vaults to request use of the acquirement code with "acquire ↵dshaligram2009-09-211-2/+6
| | | | | | <item_class>" or "acquire:<god> <item_class>" in item specs (due). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10765 c06c8d41-db1a-0410-9941-cceddc491573
* Commit patch by castamir:j-p-e-g2009-01-221-2/+4
| | | | | | | * allow placement of fixedarts and damaged/cursed items in vaults git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8699 c06c8d41-db1a-0410-9941-cceddc491573
* Adding FTILE/RTILE vault commands for setting per-glyph floor and rock ↵ennewalker2009-01-201-6/+66
| | | | | | | | | | | 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
* Add arena mode, activated on the command-line by 'crawl -arena "monster v ↵dshaligram2008-12-311-3/+6
| | | | | | monster"' (eg: crawl -arena "Sigmund v Jessica") to let monsters fight each other undisturbed by the player. Good to examine monster AI and monster behaviour when the player is AWOL. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8059 c06c8d41-db1a-0410-9941-cceddc491573
* Let e.set_random_mon_list() work, as well as dgn.set_random_mon_list()zelgadis2008-12-251-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7969 c06c8d41-db1a-0410-9941-cceddc491573
* Breaks savefile compatibility.zelgadis2008-12-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow Shadow Creatures spell (along with anything that uses create_monster(), mons_place(), place_monster() or pick_random_monster()) to work in portal vaults; only fixed ziggurats to use it. Must be done by manually calling dgn.set_random_mon_list(); can't automatically set it from MONS since the actual frequency of the monster specified that way is controlled by the number of 1/2/3/etc symbols that are in the map combined with symbol shufflings and substitutions. Can add an RMONS keyword to handle it if needed. Limitations: can only use level id or monster type + base type. Monster number (specific number of hydra heads), colour, items, band, and patrolling are all discarded/ignored. This can be improved if it's too limiting. New per-level env.properties CrawlHashTable stores the information. env.properties can be used to store new per-level data without breaking savefile compatibility (though changing the handling of old data in env.properties can still break compatibility). Random monster spawn rate is now controlled by the per-level env.spawn_random_rate (though the default rates are all the same as before), in case any weird portal vaults want to turn on random monster spawning. Could also be used to alter the random spawn rate for places like Vault:8 Prevented Shadow Creatues from working in the Temple. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7816 c06c8d41-db1a-0410-9941-cceddc491573
* [2054793] Partial implementation of the request to have COLOUR tags affect ↵ennewalker2008-12-011-0/+1
| | | | | | | | | 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
* Fix all manuals generated by vaults becoming manuals of Fighting (dpeg).dshaligram2008-11-281-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7678 c06c8d41-db1a-0410-9941-cceddc491573
* Start of moving special room definitions (monster lairs and monster pits)zelgadis2008-11-261-0/+2
| | | | | | | | | | | | | | | | | to lua. As of now all special rooms are filled with rats. Introduces two new members to map_def, weight_depth_mult and weight_depth_div, which change a map's weight based on the absolute dungeon depth (not yet accesible via lua or vault definitions). This needs to be done in C++ rather than in lua since a map's lua isn't re-invoked every time a random map is chosen, but only when the map is placed. NOTE: When I first made this change crawl started crashing until I manually forced the recompilation of util/levcomp.lex.o and util/levcomp.tab.o; if crawl starts crashing after this change, try doing that. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7629 c06c8d41-db1a-0410-9941-cceddc491573
* Place external loot chamber for ziggurat levels with jellies.dshaligram2008-11-251-0/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7625 c06c8d41-db1a-0410-9941-cceddc491573
* Enable vault generation for non-LEVEL_DUNGEON levels, make ziggurat eligible ↵dshaligram2008-11-251-0/+1
| | | | | | for random gen in main dungeon and Pan; still needs entry portal timing/charging fixes, and ziggurat builder is still incomplete. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7601 c06c8d41-db1a-0410-9941-cceddc491573
* Removed redundant buffer used to go from map_def to env.grid and all the ↵dshaligram2008-11-231-0/+1
| | | | | | tedious code used to mess with this pointless buffer. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7560 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up legacy cruft involved in placing vaults.dshaligram2008-11-231-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7557 c06c8d41-db1a-0410-9941-cceddc491573
* More steps toward ziggurats.dshaligram2008-11-231-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7553 c06c8d41-db1a-0410-9941-cceddc491573
* Allow place:X in MONS specifications to place random monsters suitable for ↵dshaligram2008-11-231-3/+5
| | | | | | place X. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7550 c06c8d41-db1a-0410-9941-cceddc491573
* Allow .des files to place manuals with names as "manual of Fighting" or ↵dshaligram2008-11-231-2/+3
| | | | | | "random manual" (dpeg). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7549 c06c8d41-db1a-0410-9941-cceddc491573
* Separate CHANCE and WEIGHT. CHANCE is a probability, WEIGHT is a raw number ↵dshaligram2008-11-191-0/+6
| | | | | | 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-2/+22
| | | | | | 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
* 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