Module necro.game.system.Move

Functions

absolute (entity, x, y, moveType)
direction (entity, direction, distance, moveType)
getMoveType (entity)
relative (entity, dx, dy, moveType)

Tables

Flag
Type


Functions

absolute (entity, x, y, moveType)

Parameters:

  • entity
  • x
  • y
  • moveType
direction (entity, direction, distance, moveType)

Parameters:

  • entity
  • direction
  • distance
  • moveType
getMoveType (entity)

Parameters:

  • entity
relative (entity, dx, dy, moveType)

Parameters:

  • entity
  • dx
  • dy
  • moveType

Tables

Flag

Fields:

  • NONE 0 - No special flags (movement is always successful, no gameplay effects, no visual effects)
  • TWEEN 1 - Plays a movement animation (tween) from the source tile to the target tile if the move was successful
  • TWEEN_BOUNCE_FAIL 2 - If the movement fails due to an obstruction, the entity plays a bounce animation
  • TWEEN_BOUNCE_ATTACK 4 - If the movement results in an attack, the entity plays a bounce animation
  • TWEEN_SLIDE 8 - If a movement animation is played, the entity will visually slide along the ground instead of hopping
  • COLLIDE_DESTINATION 16 - The destination tile is checked for vacancy before moving
  • COLLIDE_INTERMEDIATE 32 - Intermediate tiles are checked for vacancy before moving
  • ALLOW_PARTIAL_MOVE 64 - If intermediate tiles fail a collision check, the entity moves just before the obstruction, instead of failing
  • INHIBIT_SUNKEN 128 - If the entity is currently submerged in liquid, the movement is inhibited
  • INHIBIT_FROZEN 256 - If the entity is currently frozen, the movement is inhibited
  • INHIBIT_HEAVY 512 - If the entity is heavy, the movement is inhibited
  • HANDLE_ATTACK 1024 - If the movement failed due to collision with a hostile entity, the moveResult event is invoked
  • TRACK_PREVIOUS_POSITION 2048 - Set the entity's previous positon to the origin of the move
  • FORCED_MOVE 4096 - The entity is forced to move by another entity
  • VOCALIZE 8192 - Play the entity’s voiceWind if it isn’t heavy
  • TWEEN_QUARTIC 16384 - If a movement animation is played, the entity will visually slide along the ground very fast
  • TWEEN_HOP_FAIL 32768 - If a bounce animation would play on fail, play a hop in place animation instead
  • TWEEN_MULTI_HOP 65536 - Play a hop animation with an intermediate step (for bounce traps)
  • TELEFRAG 131072 - Deal lethal damage to entities at the destination
  • CONTINUOUS 262144 - Not a teleport
Type

Fields:

  • NONE 0 - The entity's position is changed to the target tile without an explicit movement or teleportation
  • NORMAL 265719 - The entity is moving normally from its current position to the target tile
  • FLYING 265685 - The entity is flying from its current position to the target tile
  • UNCHECKED 264583 - The entity moves normally, but does not respect collisions at the target tile
  • KNOCKBACK 270327 - The entity is forced to move onto the target tile
  • SLIDE 265727 - The entity is sliding to the target tile (this affects the movement animation)
  • TELEPORT 272 - The entity teleports to the target tile, disabling any visual effects and bypassing most pre-move checks
generated by LDoc 1.4.6