| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
tests, but can be parameterised.
Add a script to generate 150 level at a named place and report on all the monsters generated there.
|
|
|
|
| |
starting up.
|
| |
|
|
|
|
|
|
| |
entrances could be blocked by rock.
shoal-hut.lua test generates 1k Shoal:$ levels and verifies that the levels pass sanity tests.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cloud_struct now has members for colour, name, and tile; colour will be
used instead of the default colour of the cloud type, and will be used
to recolour the tile of the cloud (if it exists). Name will be used to
rebrand the cloud's description, and also alter the message generate
while standing in a cloud.
Finally, tile can be used to completely customise the tile used for the
cloud. The value is stored as a string in order to maintain save
compatibility across ASCII and tiles. A random tile (found using
tile_main_count) from that set will also be used, however, no duration
effects will be applied.
Recoloured cloud tiles using just the colour code should be possible,
though aren't yet fully tested.
This commit bumps TAG_MAJOR_VERSION: changing marshalling of the
FogMachine Lua code causes nasty crashes on reloading saved games.
Otherwise, I don't think I broke anything else. :-)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first (point_iterator) accepts a table of points (such as the ones
return by dgn.find_marker_positions_by_prop, or any other function which
returns points) and is filterable and stateful.
The second is a quick wrapper over dgn.find_marker_positions_by_prop.
Tweaked rectangle_iterator to supply an "rvi" (return value instead)
which will store the value of the filter instead of expecting the filter
to return a true or false value. Setting this to false will behave as
before; setting it to true allows us to have the filter alter the point
(mons_at, items_at, marker_at_pos, etc).
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Typo in the variable name ("y" instead of "_y") meant that the center
was always being included, even if it was specifically excluded.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provides wrappers for all of the feat_is_XXX functions from terrain.cc,
as well as a few other functions. Also provides a macro which can wrap a
function to take:
* a set of co-ordinates (parsed with grd(coord_def(x, y)))
* a string (parsed with dungeon_feature_by_name)
* an integer (cast into dungeon_feature_type, can be fetched from
dgn.grid(x, y))
All of the feat library functions can be used in this manner. For
example:
* feat.is_wall(x, y)
* feat.is_wall(dgn.grid(x, y))
* feat.is_wall(7)
* feat.is_wall("rock_wall")
|
|
|
|
|
|
|
|
|
|
| |
The code references the "portal" object (created in ziggurat_portal,
which is also passed to the onclimb initialiser) which is not actually
used for Wizard Mode portals.
Fixed this by a) checking whether or not there was a portal included in
the zig() "check to see if we're using &P", and also adding a parameter
to to ziggurat_portal which just returns the actual portal.
|
|
|
|
|
|
| |
Currently only holds "debug_wrath()". After pressing "&^T",
etner "debug_wrath()" to repeatedly throw divine wrath the player,
without the player dying; stops when any key is pressed.
|
| |
|
|
|
|
|
|
|
|
|
| |
Failed reactivation was causing error messages on travel to
off-level stashes, for example.
_loadlev_populate_stair_distances reactivates all markers, so
markers should probably handle reactivatiion gracefully.
Not sure this is the correct way to handle things, however.
|
|
|
|
|
|
| |
The first will return the first item whose name matches the search term
in the relevant stack, while the second will destroy each item in the
stack. Hopefully the precautions in stack_destroy will be enough.
|
| |
|
|
|
|
|
|
| |
LOS and adjacent iterators were only working if include_center was set
to true; setting it to false (or nil) results in no points being
returned.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently only includes:
rectangle_iterator: iterates points between two corners.
los_iterator: iterates over currently visible points in LOS.
adjacent_iterator: iterates over adjacent points to the center.
Most iterators accept a "filter" parameter that is a function which
should either return true if the point is acceptable for the iteration,
or false if it is not.
los_iterator is currently restricted to player LOS rather than actor or
monster LOS, but could be expanded at a later date.
All of the iterators seem to work as intended: hopefully I haven't made
too many mistakes with them.
|
|
|
|
|
| |
fill_grd_area now fills an area on the dungeon grd. Only Ziggurats use
this function.
|
| |
|
|
|
|
|
|
| |
Removing a marker while it's being activated leads to memory weirdness,
so instead while activating all markers see if each marker has the
"post_activate_remove" set, and afterwards remove those that do.
|
|
|
|
| |
A function to for setting lua persistent data from C/C++
|
|
|
|
|
|
| |
A marker class which will take the monster on top of it, set any number
entries in that monster's props CrawslHashTable member, and then
disappear.
|
| |
|
|
|
|
|
|
|
| |
monster_dies now uses the full name of the monster, rather than the name
of the monster's type.
Fixed error with using slave markers.
|
|
|
|
|
| |
"listen_to_slaves" shouldn't apply to global events, only
position-dependent events.
|
|
|
|
|
|
| |
item_pickup_change_flags (and the underlying DgnTriggerable) can take
the item name "auto", in which case it automatically picks the item
placed on top of the marker.
|
| |
|
|
|
|
|
|
| |
Master markers can now listen to events happening at slave markers by
setting the property "listen_to_slaves", and can only trigger at the
slave marker which had the event by also setting "only_at_slave".
|
|
|
|
|
| |
These have been replaced TriggerableFunctions, which provide much more
flexibility.
|
|
|
|
| |
Must be referred to by its full name.
|
|
|
|
| |
And make it use lmark.marshall_table and lmark.unmarshall_table instead.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Triggerable now handles listeners, and DgnTriggerer now handles turn and
entered_level events. For turn events, DgnTriggerer also handles
randomized, repeating countdowns.
Also added a TriggerableFunction class.
|
| |
|
| |
|
|
|
|
|
| |
The Triggerable class can now handle master/slave marker logic. See
dis_mu in hells.des for an example.
|
|
|
|
| |
chained_fog_machine now performs relevant lmark.synchronized_markers modification to fog machines. Provided documentation for this. Cleaned up volcano.des, removed some unused functions and fixed some line lengths, other minor corrections.
|
| |
|
|
|
|
|
| |
Start of triggerable/function_machine merger: use triggerable class
TriggerableMessage for messages instead of message_machine.
|
|
|
|
| |
DgnTriggerer now handles the dungeon event player_move and player_los.
|
|
|
|
|
| |
Use a method-dispatch type mechanism to deal with the different types of
dungeon events, rather than a long series of "elseif"s.
|
|
|
|
|
|
|
|
|
|
| |
New binding for coord.cc's distance functions (dgn.distance(x1, y1, x2, y2)), lua function "point_in_radius", accepts two dgn.point functions and a radius and returns true if point1 is in radius around point2.
Extensive tweaks to FogMachine warning messages: most now accept a "see function" as the final parameter, which should take two parameters: an x and a y. The function should return true if the player can "see" this point.
Finally, tweaks to Volcanoes: utilise see_function and dgn.point_in_radius to provide better warning for lake. Utilise greensnark's new slave/master system for chaining FogMachines together in Bunker and Village.
Signed-off-by: Darshan Shaligram <dshaligram@users.sourceforge.net>
|
| |
|