Hurting and killing: damage with its knockback, armour and pain; death and what a monster drops; instant-hit shots and the aim that picks their target; missiles; and blasts that hurt everything in sight of them.
Summary
Functions
Aim from thing shooter_id along angle up to range: {slope, target_id} toward the
first shootable thing whose middle the line can reach, or {0.0, nil}.
The slope and angle a player's shot takes along angle: the nearest target within a few degrees.
A BFG ball bursting at thing ball_id: forty rays fan out across a quarter turn from
the player who fired it, each hurting the first thing it finds and leaving a flash on it.
Thing target_id takes damage from inflictor_id, caused by source_id.
Thing id dies, killed by source.
An instant-hit shot from shooter_id along angle at slope, range long: the first
wall it meets gets a puff, the first thing in its path damage and blood.
A missile of type from source_id at dest_id.
A missile of type fired by player thing source_id, aimed up or down at whatever is ahead.
A puff of smoke where a shot struck.
A blast at thing spot_id hurting everything in sight of it within damage units.
Whether thing a can see thing b.
Functions
Aim from thing shooter_id along angle up to range: {slope, target_id} toward the
first shootable thing whose middle the line can reach, or {0.0, nil}.
@spec auto_aim(ElixirDoom.World.t(), term(), number()) :: {float(), float()}
The slope and angle a player's shot takes along angle: the nearest target within a few degrees.
@spec bfg_spray(ElixirDoom.World.t(), term()) :: ElixirDoom.World.t()
A BFG ball bursting at thing ball_id: forty rays fan out across a quarter turn from
the player who fired it, each hurting the first thing it finds and leaving a flash on it.
@spec damage(ElixirDoom.World.t(), term(), term() | nil, term() | nil, number()) :: ElixirDoom.World.t()
Thing target_id takes damage from inflictor_id, caused by source_id.
@spec kill(ElixirDoom.World.t(), term(), map() | nil) :: ElixirDoom.World.t()
Thing id dies, killed by source.
@spec line_attack( ElixirDoom.World.t(), term(), number(), number(), number(), number() ) :: ElixirDoom.World.t()
An instant-hit shot from shooter_id along angle at slope, range long: the first
wall it meets gets a puff, the first thing in its path damage and blood.
@spec missile(ElixirDoom.World.t(), term(), term(), atom()) :: ElixirDoom.World.t()
A missile of type from source_id at dest_id.
@spec player_missile(ElixirDoom.World.t(), term(), atom()) :: ElixirDoom.World.t()
A missile of type fired by player thing source_id, aimed up or down at whatever is ahead.
@spec puff(ElixirDoom.World.t(), {number(), number(), number()}) :: ElixirDoom.World.t()
A puff of smoke where a shot struck.
@spec radius_attack(ElixirDoom.World.t(), term(), term() | nil, number()) :: ElixirDoom.World.t()
A blast at thing spot_id hurting everything in sight of it within damage units.
@spec sees?(ElixirDoom.World.t(), map(), map()) :: boolean()
Whether thing a can see thing b.