Module necro.game.system.Action

Functions

getAngle (act)
getMovementOffset (direction)
isAllowed (act)
isDiagonalDirection (act)
isDirection (act)
isOrthogonalDirection (act)
isResultSuccessful (result)
isSystemAction (act)
move (dx, dy)
rotate (x, y, rotation)
rotateDirection (direction1, direction2)

Tables

Direction
Result
Rotation
Special
System


Functions

getAngle (act)

Parameters:

  • act
getMovementOffset (direction)

Parameters:

  • direction
isAllowed (act)

Parameters:

  • act
isDiagonalDirection (act)

Parameters:

  • act
isDirection (act)

Parameters:

  • act
isOrthogonalDirection (act)

Parameters:

  • act
isResultSuccessful (result)

Parameters:

  • result
isSystemAction (act)

Parameters:

  • act
move (dx, dy)

Parameters:

  • dx
  • dy
rotate (x, y, rotation)

Parameters:

  • x
  • y
  • rotation
rotateDirection (direction1, direction2)

Parameters:

  • direction1
  • direction2

Tables

Direction

Fields:

  • NONE 0
  • RIGHT 1
  • UP_RIGHT 2
  • UP 3
  • UP_LEFT 4
  • LEFT 5
  • DOWN_LEFT 6
  • DOWN 7
  • DOWN_RIGHT 8
Result

Fields:

  • INVALID -2 - Invalid action (e.g. trying to use non-existent item or spell)
  • FAIL -1 - Movement failure (bumping into an undiggable wall or entity)
  • IDLE 0 - No action taken
  • MOVE 1 - A movement was performed successfully
  • ATTACK 2 - An entity was attacked successfully
  • DIG 3 - A wall was dug successfully
  • SPELL 4 - A spell was cast successfully
  • ITEM 5 - An active item was used successfully
  • UNSINK 6 - Emerging from a liquid tile
  • INHIBIT 7 - Movement was prevented due to a status effect (e.g. frozen)
  • INTERACT 8 - An entity was interacted with successfully
  • DELAY 9 - No action is possible because of beat delay
  • CUSTOM 10 - A custom action was performed without returning a specific action result
Rotation

Fields:

  • IDENTITY 1
  • CCW_45 2
  • CCW_90 3
  • CCW_135 4
  • MIRROR 5
  • CW_135 6
  • CW_90 7
  • CW_45 8
Special

Fields:

  • IDLE 0
  • ITEM_1 9
  • ITEM_2 10
  • BOMB 11
  • THROW 12
  • SPELL_1 13
  • SPELL_2 14
  • LobbyFadeout 15
  • LobbyChangeCharacter 16
System

Fields:

  • SPECTATE -1 - Changes the player entity to be intangible, enabling spectator mode. Automatically performed on disconnect.
  • UNSPECTATE -2 - Changes the player entity to be tangible, disabling spectator mode.
  • SPAWN_PLAYER_CHARACTER -3 - Spawns a character entity and associates it with the player, if no character has been spawned by the player yet. Action parameter [string]: the character entity type to spawn
  • MISSED_BEAT -4 - Drops the player's groove chain, but does not permit enemies to move.
  • TRAP -5 - Deprecated; use action.System.DELAY instead.
  • SONG_ENDED -6 - Fire the songEnd event for the player.
  • DELAY -7 - Represents an action-less turn, allowing for the execution of deferred logic after a real-time delay.
  • ASCEND -8 - Returns a descended player entity back to the level.
  • PICKUP_LIMIT -9 - Sets the pickup limit for a player
generated by LDoc 1.4.6