Skip to main content

EntityRef

Wraps an entity instance

Properties

id

EntityRef.id: string

Get the entity id type

Only some entity types have a special identifier. It is mostly for internal usage.

val

EntityRef.val: string

Get/Set the value store identifier

behavior_tree

EntityRef.behavior_tree: string

Get/Set the behavior tree by identifier

behavior_tree_delta

EntityRef.behavior_tree_delta: number

Get/Set the delta time between behavior tree steps

instrument

EntityRef.instrument: string

Get/Set the entity instrument.

Instruments

Value Color Description
Kick Red The explosion instrument
Snare Yellow The shooting instrument
Extra1 - Usage specific
Extra2 - Usage specific

persistence_key

EntityRef.persistence_key: string

Get the persistence key of the entity

persistence_store

EntityRef.persistence_store: string

Get/Set the persistence store of the entity This can be used to store information of an entity permanently

positional_hash

EntityRef.positional_hash: number

Get the positional hash of the entity

hovered

EntityRef.hovered: bool

Get the hovered state of the entity An entity can be hovered with the mouse cursor

skin

EntityRef.skin: string

Get/Set the skin of the entity by identifier

animation

EntityRef.animation: string

Get/Set the animation of the entity by path

image

EntityRef.image: string

Get/Set the image of the entity by path This loads an animation with a single frame.

char

EntityRef.char: string

Get/Set the alternate display single character A relict of the time when the game was a more classic roguelike

color_fg

EntityRef.color_fg: table

Get/Set the foreground color The table must contain r, g, b numeric [0, 255] integers

color_bg

EntityRef.color_bg: table

Get/Set the background color The table must contain r, g, b numeric [0, 255] integers

draw_order

EntityRef.draw_order: string

Get/Set the draw order by quick setting identifier The getter may not work reliably with other settings

Draw Orders

Name
normal
foreground
background
overlay

dead

EntityRef.dead: bool

Get/Set the death state

stuck

EntityRef.stuck: bool

Get/Set the stuck state

health_abs

EntityRef.health_abs: number

Get/Set the absolute health number

health_rel

EntityRef.health_rel: number

Get/Set the relative health number

health_max

EntityRef.health_max: number

Get/Set the maximum health number

pos

EntityRef.pos: table

Get/Set the entity position as named table

Entity.player.pos = {x=79, y=29} -- works
x = Entity.player.pos.x -- works
Entity.player.pos.x = x -- no effect
Entity.player.x = x -- works

x

EntityRef.x: number

Get/Set the horizontal coordinate

y

EntityRef.y: number

Get/Set the vertical coordinate

speed

EntityRef.speed: table

Get/Set the entity speed as named table

Works the same as pos.

speed_x

EntityRef.speed_x: number

Get/Set the horizontal entity speed

speed_y

EntityRef.speed_y: number

Get/Set the vertical entity speed

velocity

EntityRef.velocity: table

Get/Set the entity velocity as named table

Works the same as pos.

velocity_x

EntityRef.velocity_x: number

Get/Set the horizontal entity velocity

velocity_y

EntityRef.velocity_y: number

Get/Set the vertical entity velocity

dir

EntityRef.dir: number

Get/Set the entity direction in range [0; 1]

collision

EntityRef.collision: bool

Get/Set the collision flag

collision_disable

EntityRef.collision_disable: bool

Get/Set the collision_disable flag

movement_collision

EntityRef.movement_collision: bool

Get/Set the movement_collision flag

static_collision

EntityRef.static_collision: bool

Get/Set the static_collision flag

player_collision

EntityRef.player_collision: bool

Get/Set the player_collision flag

bullet_collision

EntityRef.bullet_collision: bool

Get/Set the bullet_collision flag

bullet_cancel

EntityRef.bullet_cancel: bool

Get/Set the bullet cancel flag

Entities with this flag remove all bullets on death

animation_oneshot

EntityRef.animation_oneshot: bool

Get/Set the animation_oneshot flag

animation_sync

EntityRef.animation_sync: bool

Get/Set the animation_sync flag

animation_loop

EntityRef.animation_loop: bool

Get/Set the animation_loop flag

animation_mirror

EntityRef.animation_mirror: bool

Get/Set the animation_mirror flag

animation_mirror_ver

EntityRef.animation_mirror_ver: bool

Get/Set the animation_mirror_ver flag

animation_live

EntityRef.animation_live: bool

Get/Set the animation_live flag

dissolve_kill

EntityRef.dissolve_kill: bool

Get/Set the dissolve_kill flag

pushable

EntityRef.pushable: bool

Get/Set the pushable flag

flying

EntityRef.flying: bool

Get/Set the flying flag

gravity_force

EntityRef.gravity_force: bool

Get/Set the gravity_force flag

invisible

EntityRef.invisible: bool

Get/Set the invisible flag

invincible

EntityRef.invincible: bool

Get/Set the invincible flag

background

EntityRef.background: bool

Get/Set the background flag

foreground

EntityRef.foreground: bool

Get/Set the foreground flag

overlay

EntityRef.overlay: bool

Get/Set the overlay flag

top

EntityRef.top: bool

Get/Set the top flag

effect_text

EntityRef.effect_text: bool

Get/Set the effect_text flag

effect_immune

EntityRef.effect_immune: bool

Get/Set the effect_immune flag

effect_visible

EntityRef.effect_visible: bool

Get/Set the effect_visible flag

laser_sensitive

EntityRef.laser_sensitive: bool

Get/Set the laser_sensitive flag

boss_bar

EntityRef.boss_bar: bool

Get/Set the boss_bar flag

boss_damage

EntityRef.boss_damage: bool

Get/Set the boss_damage flag

boss_damage_disable

EntityRef.boss_damage_disable: bool

Get/Set the boss_damage_disable flag

target_disable

EntityRef.target_disable: bool

Get/Set the target_disable flag

damage_text

EntityRef.damage_text: bool

Get/Set the damage_text flag

health_bar

EntityRef.health_bar: bool

Get/Set the health_bar flag

health_bar_force

EntityRef.health_bar_force: bool

Get/Set the health_bar_force flag

continue_clear

EntityRef.continue_clear: bool

Get/Set the continue_clear flag

transcending

EntityRef.transcending: bool

Get/Set the transcending flag

enemy

EntityRef.enemy: bool

Get/Set the enemy flag

buddy

EntityRef.buddy: bool

Get/Set the buddy flag

aggro

EntityRef.aggro: bool

Get/Set the aggro flag

boss

EntityRef.boss: bool

Get/Set the boss flag

sight

EntityRef.sight: bool

Get/Set the sight flag

order

EntityRef.order: bool

Get/Set the order flag

aura_intensity

Player
EntityRef.aura_intensity: number

Get/Set the player aura intensity

life_mode

Player
EntityRef.life_mode: string

Get/Set the player life mode

Life Modes

Name Description
health Normal mode with health
reset Reset the room on hit

kick_follow

Player
EntityRef.kick_follow: bool

Get/Set the kick follow flag for the player

energy

Player
EntityRef.energy: number

energy_use

Player
EntityRef.energy_use: number

flashlight_force

Player
EntityRef.flashlight_force: bool

Get/Set the flashlight force flag

When set to true, the flashlight will be on permanently, even when the player is currently not allowed to move.

flashlight_intensity

Player
EntityRef.flashlight_intensity: number

Get/Set the flashlight intensity

flashlight_color

Player
EntityRef.flashlight_color: table

Get the current flashlight color

flashlight_color_normal

Player
EntityRef.flashlight_color_normal: table

Get the normal flashlight color

flashlight_color_aim

Player
EntityRef.flashlight_color_aim: table

Get the aim flashlight color

move_lock

Player
EntityRef.move_lock: bool

Get/Set the movement lock flag

Functions

val_get_num

EntityRef:val_get_num(
pathstring--

path to value (e.g. "movement/damage")

) → number

Retrieve a number from the value store

val_get_str

EntityRef:val_get_str(
pathstring--

path to value (e.g. "movement/damage")

) → string

Retrieve a string from the value store

val_get_bool

EntityRef:val_get_bool(
pathstring--

path to value (e.g. "movement/damage")

) → bool

Retrieve a bool from the value store

val_set_num

EntityRef:val_set_num(
pathstring,--

path to value (e.g. "movement/damage")

valuenumber--

numeric value

) → ()

Override a number in the value store

val_set_str

EntityRef:val_set_str(
pathstring,--

path to value (e.g. "movement/damage")

valuestring--

string value

) → ()

Override a string in the value store

val_set_bool

EntityRef:val_set_bool(
pathstring,--

path to value (e.g. "movement/damage")

valuebool--

boolean value

) → ()

Override a bool in the value store

instrument_compatible

EntityRef:instrument_compatible(
instrumentstring--

the instrument to check for (e.g. "Kick")

) → ()

Check if the given instrument is compatible with the entity instrument The neutral instrument is compatible with all other instruments.

instrument_match

EntityRef:instrument_match(
instrumentstring--

the instrument to check for (e.g. "Kick")

) → ()

Check if the given instrument matches with the entity instrument The neutral instrument matches no instruments. Only non-neutral instruments match when equal.

item_drop

EntityRef:item_drop(
itemstring,--

item identifier string (e.g. "Shuriken")

optionstable | nil--

settings

) → ()

Drops an item next to the entity

sound

EntityRef:sound(
optionstable--

settings

) → ()

Play a sound effect at the entity position

Options

Name Type Default Description
path string - sound file path
vol number 1 sound volume
pan number 0 pan value in range [-1, 1]
loops number - amount of additional loops

effect_push

EntityRef:effect_push(
effectstring,--

effect identifier string (e.g. "Fire")

strengthnumber | nil--

effect strength (default 1.0)

) → ()

Adds an effect to the entity

effect_check

EntityRef:effect_check(
effectstring--

effect identifier string (e.g. "Fire")

) → bool--

true if affected

Checks if the entity is currently affected

effect_consume

EntityRef:effect_consume(
effectstring--

effect identifier string (e.g. "Fire")

) → bool--

true if removed

Removes an effect from the entity

effect_resistant_get

EntityRef:effect_resistant_get(
effectstring--

effect identifier string (e.g. "Fire")

) → bool--

true if resistant

Check if entity is resistant against the given effect

effect_resistant_set

EntityRef:effect_resistant_set(
effectstring--

effect identifier string (e.g. "Fire")

) → ()

Add resistance for given effect to entity

effect_weak_get

EntityRef:effect_weak_get(
effectstring--

effect identifier string (e.g. "Fire")

) → bool--

true if weak

Check if entity is weak against the given effect

effect_weak_set

EntityRef:effect_weak_set(
effectstring--

effect identifier string (e.g. "Fire")

) → ()

Add weakness for given effect to entity

animation_wait

EntityRef:animation_wait() → ()

Waits until the entity animation is complete

dissolve

EntityRef:dissolve() → ()

Dissolves an entity resulting in a particle effect

kill

EntityRef:kill() → ()

Kill the entity

purge

EntityRef:purge() → ()

Purges an entity by removing without dissolving nor death

damage_abs

EntityRef:damage_abs(
valuenumber--

absolute damage value

) → ()

Applies damage by absolute value to the entity

damage_rel

EntityRef:damage_rel(
valuenumber--

relative damage value

) → ()

Applies damage by relative value to the entity

heal

EntityRef:heal() → ()

Heals the entity to maximum health

heal_abs

EntityRef:heal_abs(
valuenumber--

absolute health value

) → ()

Apply heal by absolute value to the entity

heal_rel

EntityRef:heal_rel(
valuenumber--

relative health value

) → ()

Apply heal by relative value to the entity

set

EntityRef:set(
xnumber,--

horizontal coordinate

ynumber--

vertical coordinate

) → ()

Sets the entity position to the specified coordinates

at

EntityRef:at(
xnumber,--

horizontal coordinate

ynumber--

vertical coordinate

) → bool--

true if coordinates match

Check if the entity center is at the specified coordinates

inside

EntityRef:inside(
areatable--

area data

) → bool--

true if center inside area

Check if the entity center is inside the given area

center

EntityRef:center() → ()

Moves the entity into the center of the room

speed_set

EntityRef:speed_set(
xnumber,--

horizontal component

ynumber--

vertical component

) → ()

Sets the speed to the specified components

velocity_set

EntityRef:velocity_set(
xnumber,--

horizontal component

ynumber--

vertical component

) → ()

Sets the velocity to the specified components

dir_reset

EntityRef:dir_reset() → ()

Reset the entity direction

find_buddy

EntityRef:find_buddy(
optionstable--

settings

) → EntityRef--

entity different to own

Find a buddy entity in range

Buddies are entities with the buddy flag set. However, for enemies, only other enemies are buddies. The player is a buddy as well.

Options

Name Type Default Description
dx number 0 Preferred horizontal direction
dy number 0 Preferred vertical direction

find_target

EntityRef:find_target(
optionstable--

settings

) → EntityRef--

entity different to own

Find a target entity in range

Targets are entities with the enemy flag set. However, for enemies, only buddies are targets. The player is a buddy as well.

Options

Name Type Default Description
dx number 0 Preferred horizontal direction
dy number 0 Preferred vertical direction

push

EntityRef:push(
dxnumber,--

horizontal push amount

dynumber--

vertical push amount

) → ()

Pushes the entity into a given direction

move

EntityRef:move(
xnumber,--

horizontal coordinate

ynumber,--

vertical coordinate

speednumber,--

step delay (s) is 1.0 / speed

optionstable--

settings

) → ()

Moves the entity to a specified position

Options

Name Type Default Description
damage number 0 collision damage
range_min number 0 minimum range for movement
range_max number 0 maximum range for movement
range_aggro number 0 range for aggressive flag
path bool true path-finding enabled
path_step bool false path-finding special mode
target_once bool false target-once special mode

move_wait

EntityRef:move_wait() → ()

Waits for the entity movement to complete

stop

EntityRef:stop() → ()

Stops the entity movement

follow

EntityRef:follow(
targetEntityRef,--

entity to follow

speednumber,--

step delay (s) is 1.0 / speed

optionstable--

settings

) → ()

Follows an entity

Options

Name Type Default Description
damage number 0 collision damage
range_min number 0 minimum range for movement
range_max number 0 maximum range for movement
range_aggro number 0 range for aggressive flag
path bool true path-finding enabled
path_step bool false path-finding special mode
target_once bool false target-once special mode

distance_pos

EntityRef:distance_pos(
xnumber,--

horizontal coordinate

ynumber--

vertical coordinate

) → number--

distance to position

Calculate distance to a specified position

distance_rect

EntityRef:distance_rect(
x1number,--

minimum horizontal coordinate

y1number,--

minimum vertical coordinate

x2number,--

maximum horizontal coordinate

y2number--

maximum vertical coordinate

) → number--

distance to rectangle

Calculate distance to a specified rectangle

distance_entity

EntityRef:distance_entity(
targetEntityRef--

target entity

) → number--

distance to entity

Calculate distance to a specified entity

hitbox_pos

EntityRef:hitbox_pos(
xnumber,--

horizontal coordinate

ynumber--

vertical coordinate

) → number--

distance from hitbox to position

Calculate distance from hitbox to position

hitbox_rect

EntityRef:hitbox_rect(
x1number,--

minimum horizontal coordinate

y1number,--

minimum vertical coordinate

x2number,--

maximum horizontal coordinate

y2number--

maximum vertical coordinate

) → number--

distance from hitbox to rectangle

Calculate distance from hitbox to rectangle

histbox_entity

EntityRef:histbox_entity(
targetEntityRef--

target entity

) → number--

distance from hitbox to entity

Calculate distance from hitbox to entity

flag_get

EntityRef:flag_get(
flagstring--

flag name (e.g. "invisible")

) → bool--

state of flag

Gets a flag by identifier name

flag_set

EntityRef:flag_set(
flagstring,--

flag name (e.g. "invisible")

valuebool--

new flag value

) → ()

Sets a flag by identifier name

energy_consume

Player
EntityRef:energy_consume(
optionstable--

settings

) → ()

Consumes energy with optional draining features

Options

Name Type Default Description
drain bool true Use remaining energy on fail
drain_use bool false Use drained energy
drain_gen bool false Generates drain on consumption

skin_push

Player
EntityRef:skin_push(
idstring--

skin identifier

) → ()

Pushes a skin onto the stack This does nothing if the skin is already on the stack.

skin_pop

Player
EntityRef:skin_pop(
idstring--

skin identifier

) → bool--

true if skin was on stack

Removes a skin from the stack

skin_check

Player
EntityRef:skin_check(
idstring--

skin identifier

) → bool--

true if skin is on stack

Checks if a skin is on the stack

skin_reset

Player
EntityRef:skin_reset() → ()

Clears the skin stack

Show raw api
{
    "functions": [
        {
            "name": "val_get_num",
            "desc": "Retrieve a number from the value store",
            "params": [
                {
                    "name": "path",
                    "desc": "path to value (e.g. \"movement/damage\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 30,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "val_get_str",
            "desc": "Retrieve a string from the value store",
            "params": [
                {
                    "name": "path",
                    "desc": "path to value (e.g. \"movement/damage\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 40,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "val_get_bool",
            "desc": "Retrieve a bool from the value store",
            "params": [
                {
                    "name": "path",
                    "desc": "path to value (e.g. \"movement/damage\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "bool"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 50,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "val_set_num",
            "desc": "Override a number in the value store",
            "params": [
                {
                    "name": "path",
                    "desc": "path to value (e.g. \"movement/damage\")",
                    "lua_type": "string"
                },
                {
                    "name": "value",
                    "desc": "numeric value",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 60,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "val_set_str",
            "desc": "Override a string in the value store",
            "params": [
                {
                    "name": "path",
                    "desc": "path to value (e.g. \"movement/damage\")",
                    "lua_type": "string"
                },
                {
                    "name": "value",
                    "desc": "string value",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 69,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "val_set_bool",
            "desc": "Override a bool in the value store",
            "params": [
                {
                    "name": "path",
                    "desc": "path to value (e.g. \"movement/damage\")",
                    "lua_type": "string"
                },
                {
                    "name": "value",
                    "desc": "boolean value",
                    "lua_type": "bool"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 78,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "instrument_compatible",
            "desc": "Check if the given instrument is compatible with the entity instrument\nThe neutral instrument is compatible with all other instruments.",
            "params": [
                {
                    "name": "instrument",
                    "desc": "the instrument to check for (e.g. \"Kick\")",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 116,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "instrument_match",
            "desc": "Check if the given instrument matches with the entity instrument\nThe neutral instrument matches no instruments.\nOnly non-neutral instruments match when equal.",
            "params": [
                {
                    "name": "instrument",
                    "desc": "the instrument to check for (e.g. \"Kick\")",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 126,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "item_drop",
            "desc": "Drops an item next to the entity",
            "params": [
                {
                    "name": "item",
                    "desc": "item identifier string (e.g. \"Shuriken\")",
                    "lua_type": "string"
                },
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table | nil"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 165,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "sound",
            "desc": "Play a sound effect at the entity position\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| path            | string      |       - | sound file path                |\n| vol             | number      |       1 | sound volume                   |\n| pan             | number      |       0 | pan value in range [-1, 1]     |\n| loops           | number      |       - | amount of additional loops     |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 181,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_push",
            "desc": "Adds an effect to the entity",
            "params": [
                {
                    "name": "effect",
                    "desc": "effect identifier string (e.g. \"Fire\")",
                    "lua_type": "string"
                },
                {
                    "name": "strength",
                    "desc": "effect strength (default 1.0)",
                    "lua_type": "number | nil"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 190,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_check",
            "desc": "Checks if the entity is currently affected",
            "params": [
                {
                    "name": "effect",
                    "desc": "effect identifier string (e.g. \"Fire\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "true if affected",
                    "lua_type": "bool"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 199,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_consume",
            "desc": "Removes an effect from the entity",
            "params": [
                {
                    "name": "effect",
                    "desc": "effect identifier string (e.g. \"Fire\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "true if removed",
                    "lua_type": "bool"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 209,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_resistant_get",
            "desc": "Check if entity is resistant against the given effect",
            "params": [
                {
                    "name": "effect",
                    "desc": "effect identifier string (e.g. \"Fire\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "true if resistant",
                    "lua_type": "bool"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 219,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_resistant_set",
            "desc": "Add resistance for given effect to entity",
            "params": [
                {
                    "name": "effect",
                    "desc": "effect identifier string (e.g. \"Fire\")",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 228,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_weak_get",
            "desc": "Check if entity is weak against the given effect",
            "params": [
                {
                    "name": "effect",
                    "desc": "effect identifier string (e.g. \"Fire\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "true if weak",
                    "lua_type": "bool"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 237,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_weak_set",
            "desc": "Add weakness for given effect to entity",
            "params": [
                {
                    "name": "effect",
                    "desc": "effect identifier string (e.g. \"Fire\")",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 246,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation_wait",
            "desc": "Waits until the entity animation is complete",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 267,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "dissolve",
            "desc": "Dissolves an entity resulting in a particle effect",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 321,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "kill",
            "desc": "Kill the entity",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 327,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "purge",
            "desc": "Purges an entity by removing without dissolving nor death",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 333,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "damage_abs",
            "desc": "Applies damage by absolute value to the entity",
            "params": [
                {
                    "name": "value",
                    "desc": "absolute damage value",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 375,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "damage_rel",
            "desc": "Applies damage by relative value to the entity",
            "params": [
                {
                    "name": "value",
                    "desc": "relative damage value",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 383,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "heal",
            "desc": "Heals the entity to maximum health",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 390,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "heal_abs",
            "desc": "Apply heal by absolute value to the entity",
            "params": [
                {
                    "name": "value",
                    "desc": "absolute health value",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 397,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "heal_rel",
            "desc": "Apply heal by relative value to the entity",
            "params": [
                {
                    "name": "value",
                    "desc": "relative health value",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 405,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "set",
            "desc": "Sets the entity position to the specified coordinates",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical coordinate",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 428,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "at",
            "desc": "Check if the entity center is at the specified coordinates",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical coordinate",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "true if coordinates match",
                    "lua_type": "bool"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 452,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "inside",
            "desc": "Check if the entity center is inside the given area",
            "params": [
                {
                    "name": "area",
                    "desc": "area data",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "true if center inside area",
                    "lua_type": "bool"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 462,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "center",
            "desc": "Moves the entity into the center of the room",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 470,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "speed_set",
            "desc": "Sets the speed to the specified components",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal component",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical component",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 487,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "velocity_set",
            "desc": "Sets the velocity to the specified components",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal component",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical component",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 520,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "dir_reset",
            "desc": "Reset the entity direction",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 548,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "find_buddy",
            "desc": "Find a buddy entity in range\n\nBuddies are entities with the buddy flag set.\nHowever, for enemies, only other enemies are buddies.\nThe player is a buddy as well.\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| dx              | number      |       0 | Preferred horizontal direction |\n| dy              | number      |       0 | Preferred vertical direction   |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "entity different to own",
                    "lua_type": "EntityRef"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 566,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "find_target",
            "desc": "Find a target entity in range\n\nTargets are entities with the enemy flag set.\nHowever, for enemies, only buddies are targets.\nThe player is a buddy as well.\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| dx              | number      |       0 | Preferred horizontal direction |\n| dy              | number      |       0 | Preferred vertical direction   |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "entity different to own",
                    "lua_type": "EntityRef"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 586,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "push",
            "desc": "Pushes the entity into a given direction",
            "params": [
                {
                    "name": "dx",
                    "desc": "horizontal push amount",
                    "lua_type": "number"
                },
                {
                    "name": "dy",
                    "desc": "vertical push amount",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 596,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "move",
            "desc": "Moves the entity to a specified position\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| damage          | number      |       0 | collision damage               |\n| range_min       | number      |       0 | minimum range for movement     |\n| range_max       | number      |       0 | maximum range for movement     |\n| range_aggro     | number      |       0 | range for aggressive flag      |\n| path            | bool        |    true | path-finding enabled           |\n| path_step       | bool        |   false | path-finding special mode      |\n| target_once     | bool        |   false | target-once special mode       |",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "speed",
                    "desc": "step delay (s) is 1.0 / speed",
                    "lua_type": "number"
                },
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 618,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "move_wait",
            "desc": "Waits for the entity movement to complete",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 625,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "stop",
            "desc": "Stops the entity movement",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 631,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "follow",
            "desc": "Follows an entity\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| damage          | number      |       0 | collision damage               |\n| range_min       | number      |       0 | minimum range for movement     |\n| range_max       | number      |       0 | maximum range for movement     |\n| range_aggro     | number      |       0 | range for aggressive flag      |\n| path            | bool        |    true | path-finding enabled           |\n| path_step       | bool        |   false | path-finding special mode      |\n| target_once     | bool        |   false | target-once special mode       |",
            "params": [
                {
                    "name": "target",
                    "desc": "entity to follow",
                    "lua_type": "EntityRef"
                },
                {
                    "name": "speed",
                    "desc": "step delay (s) is 1.0 / speed",
                    "lua_type": "number"
                },
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 651,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "distance_pos",
            "desc": "Calculate distance to a specified position",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical coordinate",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "distance to position",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 661,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "distance_rect",
            "desc": "Calculate distance to a specified rectangle",
            "params": [
                {
                    "name": "x1",
                    "desc": "minimum horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y1",
                    "desc": "minimum vertical coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "x2",
                    "desc": "maximum horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y2",
                    "desc": "maximum vertical coordinate",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "distance to rectangle",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 674,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "distance_entity",
            "desc": "Calculate distance to a specified entity",
            "params": [
                {
                    "name": "target",
                    "desc": "target entity",
                    "lua_type": "EntityRef"
                }
            ],
            "returns": [
                {
                    "desc": "distance to entity",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 684,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "hitbox_pos",
            "desc": "Calculate distance from hitbox to position",
            "params": [
                {
                    "name": "x",
                    "desc": "horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y",
                    "desc": "vertical coordinate",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "distance from hitbox to position",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 695,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "hitbox_rect",
            "desc": "Calculate distance from hitbox to rectangle",
            "params": [
                {
                    "name": "x1",
                    "desc": "minimum horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y1",
                    "desc": "minimum vertical coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "x2",
                    "desc": "maximum horizontal coordinate",
                    "lua_type": "number"
                },
                {
                    "name": "y2",
                    "desc": "maximum vertical coordinate",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "distance from hitbox to rectangle",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 708,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "histbox_entity",
            "desc": "Calculate distance from hitbox to entity",
            "params": [
                {
                    "name": "target",
                    "desc": "target entity",
                    "lua_type": "EntityRef"
                }
            ],
            "returns": [
                {
                    "desc": "distance from hitbox to entity",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 718,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flag_get",
            "desc": "Gets a flag by identifier name",
            "params": [
                {
                    "name": "flag",
                    "desc": "flag name (e.g. \"invisible\")",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "state of flag",
                    "lua_type": "bool"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 728,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flag_set",
            "desc": "Sets a flag by identifier name",
            "params": [
                {
                    "name": "flag",
                    "desc": "flag name (e.g. \"invisible\")",
                    "lua_type": "string"
                },
                {
                    "name": "value",
                    "desc": "new flag value",
                    "lua_type": "bool"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 738,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "energy_consume",
            "desc": "Consumes energy with optional draining features\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| drain           | bool        |    true | Use remaining energy on fail   |\n| drain_use       | bool        |   false | Use drained energy             |\n| drain_gen       | bool        |   false | Generates drain on consumption |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [],
            "function_type": "method",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1093,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "skin_push",
            "desc": "Pushes a skin onto the stack\nThis does nothing if the skin is already on the stack.",
            "params": [
                {
                    "name": "id",
                    "desc": "skin identifier",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1146,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "skin_pop",
            "desc": "Removes a skin from the stack",
            "params": [
                {
                    "name": "id",
                    "desc": "skin identifier",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "true if skin was on stack",
                    "lua_type": "bool"
                }
            ],
            "function_type": "method",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1156,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "skin_check",
            "desc": "Checks if a skin is on the stack",
            "params": [
                {
                    "name": "id",
                    "desc": "skin identifier",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "true if skin is on stack",
                    "lua_type": "bool"
                }
            ],
            "function_type": "method",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1167,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "skin_reset",
            "desc": "Clears the skin stack",
            "params": [],
            "returns": [],
            "function_type": "method",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1176,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "id",
            "desc": "Get the entity id type\n\nOnly some entity types have a special identifier.\nIt is mostly for internal usage.",
            "lua_type": "string",
            "source": {
                "line": 16,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "val",
            "desc": "Get/Set the value store identifier",
            "lua_type": "string",
            "source": {
                "line": 23,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "behavior_tree",
            "desc": "Get/Set the behavior tree by identifier",
            "lua_type": "string",
            "source": {
                "line": 87,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "behavior_tree_delta",
            "desc": "Get/Set the delta time between behavior tree steps",
            "lua_type": "number",
            "source": {
                "line": 94,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "instrument",
            "desc": "Get/Set the entity instrument.\n\n### Instruments\n| Value  | Color  | Description              |\n|--------|--------|--------------------------|\n| Kick   | Red    | The explosion instrument |\n| Snare  | Yellow | The shooting instrument  |\n| Extra1 | -      | Usage specific           |\n| Extra2 | -      | Usage specific           |",
            "lua_type": "string",
            "source": {
                "line": 109,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "persistence_key",
            "desc": "Get the persistence key of the entity",
            "lua_type": "string",
            "source": {
                "line": 135,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "persistence_store",
            "desc": "Get/Set the persistence store of the entity\nThis can be used to store information of an entity permanently",
            "lua_type": "string",
            "source": {
                "line": 143,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "positional_hash",
            "desc": "Get the positional hash of the entity",
            "lua_type": "number",
            "source": {
                "line": 150,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "hovered",
            "desc": "Get the hovered state of the entity\nAn entity can be hovered with the mouse cursor",
            "lua_type": "bool",
            "source": {
                "line": 158,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "skin",
            "desc": "Get/Set the skin of the entity by identifier",
            "lua_type": "string",
            "source": {
                "line": 255,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation",
            "desc": "Get/Set the animation of the entity by path",
            "lua_type": "string",
            "source": {
                "line": 262,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "image",
            "desc": "Get/Set the image of the entity by path\nThis loads an animation with a single frame.",
            "lua_type": "string",
            "source": {
                "line": 276,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "char",
            "desc": "Get/Set the alternate display single character\nA relict of the time when the game was a more classic roguelike",
            "lua_type": "string",
            "source": {
                "line": 284,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "color_fg",
            "desc": "Get/Set the foreground color\nThe table must contain r, g, b numeric [0, 255] integers",
            "lua_type": "table",
            "source": {
                "line": 292,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "color_bg",
            "desc": "Get/Set the background color\nThe table must contain r, g, b numeric [0, 255] integers",
            "lua_type": "table",
            "source": {
                "line": 300,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "draw_order",
            "desc": "Get/Set the draw order by quick setting identifier\nThe getter may not work reliably with other settings\n\n### Draw Orders\n| Name      |\n|-----------|\n|normal     |\n|foreground |\n|background |\n|overlay    |",
            "lua_type": "string",
            "source": {
                "line": 316,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "dead",
            "desc": "Get/Set the death state",
            "lua_type": "bool",
            "source": {
                "line": 341,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "stuck",
            "desc": "Get/Set the stuck state",
            "lua_type": "bool",
            "source": {
                "line": 348,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "health_abs",
            "desc": "Get/Set the absolute health number",
            "lua_type": "number",
            "source": {
                "line": 355,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "health_rel",
            "desc": "Get/Set the relative health number",
            "lua_type": "number",
            "source": {
                "line": 362,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "health_max",
            "desc": "Get/Set the maximum health number",
            "lua_type": "number",
            "source": {
                "line": 369,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "pos",
            "desc": "Get/Set the entity position as named table\n\n```lua\nEntity.player.pos = {x=79, y=29} -- works\nx = Entity.player.pos.x -- works\nEntity.player.pos.x = x -- no effect\nEntity.player.x = x -- works\n```",
            "lua_type": "table",
            "source": {
                "line": 421,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "x",
            "desc": "Get/Set the horizontal coordinate",
            "lua_type": "number",
            "source": {
                "line": 437,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "y",
            "desc": "Get/Set the vertical coordinate",
            "lua_type": "number",
            "source": {
                "line": 444,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "speed",
            "desc": "Get/Set the entity speed as named table\n\nWorks the same as `pos`.",
            "lua_type": "table",
            "source": {
                "line": 480,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "speed_x",
            "desc": "Get/Set the horizontal entity speed",
            "lua_type": "number",
            "source": {
                "line": 497,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "speed_y",
            "desc": "Get/Set the vertical entity speed",
            "lua_type": "number",
            "source": {
                "line": 504,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "velocity",
            "desc": "Get/Set the entity velocity as named table\n\nWorks the same as `pos`.",
            "lua_type": "table",
            "source": {
                "line": 513,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "velocity_x",
            "desc": "Get/Set the horizontal entity velocity",
            "lua_type": "number",
            "source": {
                "line": 529,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "velocity_y",
            "desc": "Get/Set the vertical entity velocity",
            "lua_type": "number",
            "source": {
                "line": 536,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "dir",
            "desc": "Get/Set the entity direction in range [0; 1]",
            "lua_type": "number",
            "source": {
                "line": 543,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "collision",
            "desc": "Get/Set the collision flag",
            "lua_type": "bool",
            "source": {
                "line": 747,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "collision_disable",
            "desc": "Get/Set the collision_disable flag",
            "lua_type": "bool",
            "source": {
                "line": 754,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "movement_collision",
            "desc": "Get/Set the movement_collision flag",
            "lua_type": "bool",
            "source": {
                "line": 761,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "static_collision",
            "desc": "Get/Set the static_collision flag",
            "lua_type": "bool",
            "source": {
                "line": 768,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "player_collision",
            "desc": "Get/Set the player_collision flag",
            "lua_type": "bool",
            "source": {
                "line": 775,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "bullet_collision",
            "desc": "Get/Set the bullet_collision flag",
            "lua_type": "bool",
            "source": {
                "line": 782,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "bullet_cancel",
            "desc": "Get/Set the bullet cancel flag\n\nEntities with this flag remove all bullets on death",
            "lua_type": "bool",
            "source": {
                "line": 791,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation_oneshot",
            "desc": "Get/Set the animation_oneshot flag",
            "lua_type": "bool",
            "source": {
                "line": 798,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation_sync",
            "desc": "Get/Set the animation_sync flag",
            "lua_type": "bool",
            "source": {
                "line": 805,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation_loop",
            "desc": "Get/Set the animation_loop flag",
            "lua_type": "bool",
            "source": {
                "line": 812,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation_mirror",
            "desc": "Get/Set the animation_mirror flag",
            "lua_type": "bool",
            "source": {
                "line": 819,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation_mirror_ver",
            "desc": "Get/Set the animation_mirror_ver flag",
            "lua_type": "bool",
            "source": {
                "line": 826,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "animation_live",
            "desc": "Get/Set the animation_live flag",
            "lua_type": "bool",
            "source": {
                "line": 833,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "dissolve_kill",
            "desc": "Get/Set the dissolve_kill flag",
            "lua_type": "bool",
            "source": {
                "line": 840,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "pushable",
            "desc": "Get/Set the pushable flag",
            "lua_type": "bool",
            "source": {
                "line": 847,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flying",
            "desc": "Get/Set the flying flag",
            "lua_type": "bool",
            "source": {
                "line": 854,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "gravity_force",
            "desc": "Get/Set the gravity_force flag",
            "lua_type": "bool",
            "source": {
                "line": 861,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "invisible",
            "desc": "Get/Set the invisible flag",
            "lua_type": "bool",
            "source": {
                "line": 868,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "invincible",
            "desc": "Get/Set the invincible flag",
            "lua_type": "bool",
            "source": {
                "line": 875,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "background",
            "desc": "Get/Set the background flag",
            "lua_type": "bool",
            "source": {
                "line": 882,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "foreground",
            "desc": "Get/Set the foreground flag",
            "lua_type": "bool",
            "source": {
                "line": 889,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "overlay",
            "desc": "Get/Set the overlay flag",
            "lua_type": "bool",
            "source": {
                "line": 896,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "top",
            "desc": "Get/Set the top flag",
            "lua_type": "bool",
            "source": {
                "line": 903,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_text",
            "desc": "Get/Set the effect_text flag",
            "lua_type": "bool",
            "source": {
                "line": 910,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_immune",
            "desc": "Get/Set the effect_immune flag",
            "lua_type": "bool",
            "source": {
                "line": 917,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "effect_visible",
            "desc": "Get/Set the effect_visible flag",
            "lua_type": "bool",
            "source": {
                "line": 924,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "laser_sensitive",
            "desc": "Get/Set the laser_sensitive flag",
            "lua_type": "bool",
            "source": {
                "line": 931,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "boss_bar",
            "desc": "Get/Set the boss_bar flag",
            "lua_type": "bool",
            "source": {
                "line": 938,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "boss_damage",
            "desc": "Get/Set the boss_damage flag",
            "lua_type": "bool",
            "source": {
                "line": 945,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "boss_damage_disable",
            "desc": "Get/Set the boss_damage_disable flag",
            "lua_type": "bool",
            "source": {
                "line": 952,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "target_disable",
            "desc": "Get/Set the target_disable flag",
            "lua_type": "bool",
            "source": {
                "line": 959,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "damage_text",
            "desc": "Get/Set the damage_text flag",
            "lua_type": "bool",
            "source": {
                "line": 966,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "health_bar",
            "desc": "Get/Set the health_bar flag",
            "lua_type": "bool",
            "source": {
                "line": 973,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "health_bar_force",
            "desc": "Get/Set the health_bar_force flag",
            "lua_type": "bool",
            "source": {
                "line": 980,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "continue_clear",
            "desc": "Get/Set the continue_clear flag",
            "lua_type": "bool",
            "source": {
                "line": 987,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "transcending",
            "desc": "Get/Set the transcending flag",
            "lua_type": "bool",
            "source": {
                "line": 994,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "enemy",
            "desc": "Get/Set the enemy flag",
            "lua_type": "bool",
            "source": {
                "line": 1001,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "buddy",
            "desc": "Get/Set the buddy flag",
            "lua_type": "bool",
            "source": {
                "line": 1008,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "aggro",
            "desc": "Get/Set the aggro flag",
            "lua_type": "bool",
            "source": {
                "line": 1015,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "boss",
            "desc": "Get/Set the boss flag",
            "lua_type": "bool",
            "source": {
                "line": 1022,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "sight",
            "desc": "Get/Set the sight flag",
            "lua_type": "bool",
            "source": {
                "line": 1029,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "order",
            "desc": "Get/Set the order flag",
            "lua_type": "bool",
            "source": {
                "line": 1036,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "aura_intensity",
            "desc": "Get/Set the player aura intensity",
            "lua_type": "number",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1043,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "life_mode",
            "desc": "Get/Set the player life mode\n\n### Life Modes\n| Name    | Description             |\n|---------|-------------------------|\n| health  | Normal mode with health |\n| reset   | Reset the room on hit   |",
            "lua_type": "string",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1057,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "kick_follow",
            "desc": "Get/Set the kick follow flag for the player",
            "lua_type": "bool",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1065,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "energy",
            "desc": "",
            "lua_type": "number",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1072,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "energy_use",
            "desc": "",
            "lua_type": "number",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1079,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flashlight_force",
            "desc": "Get/Set the flashlight force flag\n\nWhen set to true, the flashlight will be on permanently,\neven when the player is currently not allowed to move.",
            "lua_type": "bool",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1106,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flashlight_intensity",
            "desc": "Get/Set the flashlight intensity",
            "lua_type": "number",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1114,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flashlight_color",
            "desc": "Get the current flashlight color",
            "lua_type": "table",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1122,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flashlight_color_normal",
            "desc": "Get the normal flashlight color",
            "lua_type": "table",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1130,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "flashlight_color_aim",
            "desc": "Get the aim flashlight color",
            "lua_type": "table",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1138,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        },
        {
            "name": "move_lock",
            "desc": "Get/Set the movement lock flag",
            "lua_type": "bool",
            "tags": [
                "Player"
            ],
            "source": {
                "line": 1185,
                "path": "../../res/data/script/lib/system/entity_ref.lua"
            }
        }
    ],
    "types": [],
    "name": "EntityRef",
    "desc": "Wraps an entity instance",
    "source": {
        "line": 5,
        "path": "../../res/data/script/lib/system/entity_ref.lua"
    }
}