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