summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dat/clua/util.lua
Commit message (Collapse)AuthorAgeFilesLines
* Some new Lua wrappers for dungeon building and ranges.Jude Brown2010-01-121-1/+9
| | | | | | | | | | | Introduces util.range(start, stop), returning an array consisting of the numeric values between start and stop inclusive. Also introduces "is_valid_coord" Lua wrapper, which does the same work as _valid_coord but does not generate an error message for invalid coordinates, "find_in_area" (a straight translation of the function in dungeon.cc), and "is_passable_coord" which checks the glyph at that location against traversable_glyphs.
* Add -script option to Crawl to run a Lua script. Scripts are similar to ↵Darshan Shaligram2010-01-091-2/+12
| | | | | | tests, but can be parameterised. Add a script to generate 150 level at a named place and report on all the monsters generated there.
* Fix util.append (due).Darshan Shaligram2009-12-251-11/+5
|
* lmark.synchronized_markers(): apply one marker's effects to multiple points ↵Darshan Shaligram2009-10-311-0/+8
| | | | | | | | | | | | | | | simultaneously. synchronized_markers() takes a marker, and a list of method names to override, and returns a set of markers that fire simultaneously, to allow, say, fog machines that fire at random intervals, but always fire in unison. lm_mslav.lua has details. volcano.des has an example volcano entry vault that uses this. Allow fetching a list of Lua markers/marker positions by property value. Renamed dgn.find_marker_prop -> dgn.find_marker_position_by_prop. s/helper/listener/ for fog machine listeners.
* Observerable/observer-ish pattern for Lua markersMatthew Cline2009-10-221-0/+20
| | | | | | | | | | A new framework for Lua markers, similar to the observable/observer design pattern, which decouples the thing being activated from the thing watching for the activating condition. This makes it easier to create new types of Lua markers which are triggered by dungeon events, and easier to add new triggering conditions to already existing marker types. Currently only ChangeFlags (clua/lm_flags.lua) and MonsterOnTrigger (clua/lm_monst.lua) use it.
* Add milestones for progress in ziggurats (##crawl, dpeg).dshaligram2009-07-131-0/+9
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10210 c06c8d41-db1a-0410-9941-cceddc491573
* Make it easier for ziggurat monster specs to weight monsters by zigguratdshaligram2009-03-271-1/+2
| | | | | | | | depth. Fix ziggurat spec weights being ignored. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9559 c06c8d41-db1a-0410-9941-cceddc491573
* Make table_to_string() more robust, so it won't raise an error if it encounterszelgadis2009-01-291-6/+21
| | | | | | | anything weird. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8844 c06c8d41-db1a-0410-9941-cceddc491573
* Add the field CLASS to the metatable of each class, containing the name of thezelgadis2009-01-281-1/+7
| | | | | | | class, so that table_to_string() can describe the class of each object. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8840 c06c8d41-db1a-0410-9941-cceddc491573
* On a crash, do consistency checking on the level's markers, dump the level'szelgadis2009-01-281-1/+25
| | | | | | | markers, and dump the persistant Lua data. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8839 c06c8d41-db1a-0410-9941-cceddc491573
* Expand portal entity prop in disappearance messages.dshaligram2008-12-031-0/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7732 c06c8d41-db1a-0410-9941-cceddc491573
* Include distance hints for timed portals (dpeg).dshaligram2008-12-011-3/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7710 c06c8d41-db1a-0410-9941-cceddc491573
* Fix .des timer messaging to be easier to customise, applied timer to sewer ↵dshaligram2008-12-011-11/+40
| | | | | | | | | | portals. Fix typo in monspeak.txt (slinkies). Fixed hippogriff plural. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7709 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed slow ziggurat level build, fixed ziggurat dismissals of simulacra ↵dshaligram2008-11-281-0/+24
| | | | | | resulting in messages. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7679 c06c8d41-db1a-0410-9941-cceddc491573
* Make it easier to conditionalise ziggurat monster sets by depth, and allow ↵dshaligram2008-11-281-0/+38
| | | | | | weighting monster sets. Removed the completely random monster set. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7675 c06c8d41-db1a-0410-9941-cceddc491573
* ziggurat ellipse builder (dpeg), needs work.dshaligram2008-11-271-0/+30
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7657 c06c8d41-db1a-0410-9941-cceddc491573
* Attempt to place ziggurat loot vault inside the ziggurat. If the vault ↵dshaligram2008-11-261-1/+10
| | | | | | doesn't fit, we fall back to generating the loot in the open. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7639 c06c8d41-db1a-0410-9941-cceddc491573
* Set depth limits for ziggurat monster sets (pan lords and dracs) so that ↵dshaligram2008-11-251-2/+23
| | | | | | shallow ziggurat levels don't use those sets. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7618 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up TimedMarker to inherit from OneWayStair. Breaks saves.dshaligram2008-11-251-0/+9
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7608 c06c8d41-db1a-0410-9941-cceddc491573
* Add pillars to ziggurat, more utility functions for Lua to handle maps.dshaligram2008-11-241-0/+18
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7591 c06c8d41-db1a-0410-9941-cceddc491573
* More steps toward ziggurats.dshaligram2008-11-231-0/+67
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7553 c06c8d41-db1a-0410-9941-cceddc491573