Lua API

Animation module

Functions for rendering the built-in animations.

Usage

local Animation = ELONA.require("core.Animation")

Functions

play_failure_to_cast (caster_pos) Play failure to cast animation.
play_bright_aura (target_pos, kind) Play bright aura animation.
play_breath (attacker_pos, target_pos, element_name) Play breath animation.
play_ball_atomic_bomb (pos, range) Play ball atomic bomb animation.
play_ball_magic (caster_pos, range, element) Play ball magic animation.
play_bolt (attacker_pos, target_pos, element_name, distance) Play bolt animation.
play_throwing_object (thrower_pos, target_pos, item_chip, item_color) Play throwing object animation.
play_swarm (target_pos) Play swarm animation.
play_ranged_attack (attacker_pos, target_pos, kind, fired_item_subcategory, fired_item_image, fired_item_color) Play ranged attack animation.
play_melee_attack (target_pos, debris, attack_skill, damage_percent, is_critical) Play melee attack animation.
play_gene_engineering (pos) Play gene engineering animation.
play_miracle () Play miracle animation.
play_meteor () Play meteor animation.
play_ragnarok () Play The Ragnarok animation.
play_breaking (pos) Play breaking animation.

Functions

# play_failure_to_cast (caster_pos)

Play failure to cast animation.

Parameters:
# play_bright_aura (target_pos, kind)

Play bright aura animation.

Parameters:
  • target_pos : (LuaPosition) The target's position.
  • kind : (number) The kind of the aura
# play_breath (attacker_pos, target_pos, element_name)

Play breath animation.

Parameters:
# play_ball_atomic_bomb (pos, range)

Play ball atomic bomb animation.

Parameters:
  • pos : (LuaPosition) The position at which the explosion happens
  • range : (number) The range of the explosion
# play_ball_magic (caster_pos, range, element)

Play ball magic animation.

Parameters:
  • caster_pos : (LuaPosition) The caster's position.
  • range : (number) The range of the ball
  • element : (number) The element of the ball
# play_bolt (attacker_pos, target_pos, element_name, distance)

Play bolt animation.

Parameters:
  • attacker_pos : (LuaPosition) The attacker's position.
  • target_pos : (LuaPosition) The target's position.
  • element_name : (Enums.Element) The element of the bolt
  • distance : (number) The distance between attacker_pos and the tile which the animation lasts to
# play_throwing_object (thrower_pos, target_pos, item_chip, item_color)

Play throwing object animation.

Parameters:
  • thrower_pos : (LuaPosition) The thrower's position.
  • target_pos : (LuaPosition) The target's position.
  • item_chip : (number) The item chip of the thrown object
  • item_color : (number) The item color of the thrown object
# play_swarm (target_pos)

Play swarm animation.

Parameters:
# play_ranged_attack (attacker_pos, target_pos, kind, fired_item_subcategory, fired_item_image, fired_item_color)

Play ranged attack animation.

Parameters:
  • attacker_pos : (LuaPosition) The attacker's position.
  • target_pos : (LuaPosition) The target's position.
  • kind : (number) The kind of the ranged attack
  • fired_item_subcategory : (number) The fired item subcategory
  • fired_item_image : (number) The fired item image
  • fired_item_color : (number) The fired item color
# play_melee_attack (target_pos, debris, attack_skill, damage_percent, is_critical)

Play melee attack animation.

Parameters:
  • target_pos : (LuaPosition) The target's position.
  • debris : (boolean) Whether the victim breaks into debris like chess pieces.
  • attack_skill : (number) The attack skill
  • damage_percent : (number) The damage percentage
  • is_critical : (boolean) True if the attack is critical.
# play_gene_engineering (pos)

Play gene engineering animation.

Parameters:
# play_miracle ()

Play miracle animation.

# play_meteor ()

Play meteor animation.

# play_ragnarok ()

Play The Ragnarok animation.

# play_breaking (pos)

Play breaking animation.

Parameters: