--- targeting type strings -> modification function.
...
...
@@ -509,31 +574,39 @@ _M.types_def = {
dest.wall=src.halflength
end,
bolt=function(dest,src)dest.stop_block=trueend,
beam=function(dest,scr)dest.line=trueend,}
-- @param t Target table used to generate the
-- @param t.type The engine-defined type, populates other more complex variables (see below)
-- Hit: simple project in LOS<br/>
-- Beam: hits everything in LOS<br/>
-- Bolt: hits first thing in path<br/>
-- Ball: hits everything in a ball around the target<br/>
-- Cone: hits everything in a cone in the direction<br/>
-- @param t.radius The radius of the ball/cone AoE
-- @param t.cone_angle The angle for the cone AoE (default 55°)
-- @param t.grid_exclude = {[x1][y1]=true,...[x2][y2]=true...} Grids to exclude - for making holes in the AOE
beam=function(dest,scr)dest.line=trueend,
}
--- Interpret a targeting table, applying default fields needed by ActorProject and realDisplay
-- @param t = targeting table to be interpreted/updated, containing specific target parameters
-- @param t.type = string target geometric type, populates other default variables (see below), defined types:
-- hit: hit a single grid in LOS
-- beam: hit all grids along a LOS path
-- bolt: hit the first blocking grid along a LOS path
-- ball: hit all grids in a ball around the target
-- cone: hit all grids in a cone aimed at the target
-- @param t.range = maximum range from origin to target <default: 20>
-- @param t.min_range = minimum range from origin to target
-- @param t.cone_angle = angle for cone AoE <default: 55°>
-- @param t.radius = radius for ball/cone AoE
-- @param t.grid_exclude = {[x1][y1]=true,...[x2][y2]=true...} Grids to exclude - (makes holes in AoE)
-- @param t.act_exclude = {[uid] = true,...} exclude grids containing actor(s) with the matching uid(s)
-- @param t.selffire = boolean or % chance to project against grids with self
-- @param t.friendlyfire = boolean or % chance to project against grids with friendly Actors (based on Actor:reactionToward(target)>0)
-- @param t.no_restrict Boolean that removes all restrictions in the t.type defined block functions.
-- @param t.stop_block Boolean that stops the target on the first tile that has an entity that blocks move.
-- @param t.range The range the target can be from the origin.
-- @param t.pass_terrain Boolean that allows the target to pass through terrain to remembered tiles on the other side.
-- @param t.block_path(typ, lx, ly) Function called on each tile to determine if the targeting is blocked. Automatically set when using t.typ, but the user can provide their own if they know what they are doing. It should return three arguments: block, hit, hit_radius
-- @param t.block_radius(typ, lx, ly) Function called on each tile when projecting the radius to determine if the radius projection is blocked. Automatically set when using t.typ, but the user can provide their own if they know what they are doing.
-- @return[1] t The target table used by ActorProject
-- @return[2] `Projectile`
-- @return[3] `GameTargeting`
-- @return[4] etc
-- @param t.selffire = boolean or % chance to project against grids with self <default: true>
-- @param t.friendlyfire = boolean or % chance to project against grids with friendly Actors (based on Actor:reactionToward(target)>0) <default: true>
-- @param t.multiple = boolean t contains multiple indexed targeting tables (interpreted in place)
-- @param t.block_path = function(typ, lx, ly, for_highlights) (default set according to t.type):
-- Determines if/how a projection is blocked along a path
-- returns block (grid blocks), hit (grid hit), hit_radius (grid blocks, path around disallowed)
-- @param t.block_radius = function(typ, lx, ly, for_highlights) (default set according to t.type):
-- Determines if a radial projection from a point is blocked
--Parameters interpreted by the default blocking functions:
-- @param t.no_restrict = boolean all grids are treated as non-blocking
-- @param t.pass_terrain = boolean pass through all terrain (Grid.pass_projectile also checked)