Constructor


Solid(filled: boolean?, x: number?, y: number?, width: number?, height: number?)

@param filled — Whether the solid should be drawn filled in (Defaults to false)

Arguments:

filled: boolean?

Whether the solid should be drawn filled in (Defaults to false)

x: number?
y: number?
width: number?
height: number?




Methods


Solid:doMoveAmount(amount: number, x_mult: number, y_mult: number)

(Used internally) Moves the solid and performs a collision check with the soul.

Arguments:

amount: number
x_mult: number
y_mult: number

Returns:

1: boolean




Solid:move(x: number, y: number, speed: number?)

@param x — The x value to move the object by

@param y — The y value to move the obejct by

@param speed — A multiplier to the x and y values (Defaults to 1)

@return collision — Whether the solid collided with the soul.

Arguments:

x: number

The x value to move the object by

y: number

The y value to move the obejct by

speed: number?

A multiplier to the x and y values (Defaults to 1)

Returns:

collision: boolean

Whether the solid collided with the soul.



Solid:moveTo(x: number, y: number)

@return collided — Whether the solid collided with the soul.

Arguments:

x: number
y: number

Returns:

collided: boolean

Whether the solid collided with the soul.



Solid:onSquished(soul: Soul)

(Override) Called whenever this solid squishes the soul.
By default, this function is responsible for dealing damage to the soul if the solid deals squish damage, and then destroying the soul

Arguments:

soul: Soul

The Soul is the object the player controls in battle.
The Soul global stores the default (red) soul. Custom soul types can be created by extending this class in a new global (using a file in scripts/objects/ or scripts/globals/). The soul being used in battle is determined by Encounter:createSoul, and can be altered after the first DEFENDING stage with Battle:swapSoul().




Fields


Solid.collider: Collider

The collider used for this solid's collision


Solid.color: table?

The color this solid will be drawn as (Defaults to {0, 0.75, 0}, the color of the arena border)


Solid.draw_collider: boolean

Whether the collider will be drawn filled in




Undocumented