kts.PitKill – kill non-flying actor, without leaving a corpse
kts.PitKill()
If the current actor (as determined by cxt.actor
) is a walking (as opposed to flying) creature, it is instantly killed. No corpse is left behind. If the creature was a knight, then any item(s) carried are dropped one square behind the knight's current position. Invulnerability does not prevent the death from occurring.
Calling this when cxt.actor
is a flying creature, or nil, does nothing.
None.
As the name suggests, this function is intended to be called when a creature walks into a pit.
This is used as the on_walk_over
function for the "open pit" tile in the standard Knights data files: see tiles.lua.