Constructor


EnemyBattler(actor: any, use_overlay: any)

Arguments:

actor: any
use_overlay: any




Methods


EnemyBattler:addFlag(flag: any, amount: any)

Arguments:

flag: any
amount: any

Returns:

1: unknown|nil


EnemyBattler:addMercy(amount: any)

Arguments:

amount: any






EnemyBattler:checkHealth(on_defeat: any, amount: any, battler: any)

Arguments:

on_defeat: any
amount: any
battler: any


EnemyBattler:defeat(reason: any, violent: any)

Arguments:

reason: any
violent: any


EnemyBattler:forceDefeat(amount: any, battler: any)

Arguments:

amount: any
battler: any




EnemyBattler:getAct(name: any)

Arguments:

name: any

Returns:

1: table


EnemyBattler:getAttackDamage(damage: any, battler: any, points: any)

Arguments:

damage: any
battler: any
points: any

Returns:

1: unknown


EnemyBattler:getAttackTension(points: any)

Arguments:

points: any

Returns:

1: unknown








EnemyBattler:getFlag(flag: any, default: any)

Arguments:

flag: any
default: any

Returns:

1: unknown|nil






EnemyBattler:getSpareText(battler: any, success: any)

Arguments:

battler: any
success: any

Returns:

1: table|unknown




EnemyBattler:getXAction(battler: any)

Arguments:

battler: any

Returns:

1: string


EnemyBattler:heal(amount: any)

Arguments:

amount: any


EnemyBattler:hurt(amount: any, battler: any, on_defeat: any, color: any)

Arguments:

amount: any
battler: any
on_defeat: any
color: any


EnemyBattler:isXActionShort(battler: any)

Arguments:

battler: any

Returns:

1: boolean


EnemyBattler:mercyFlash(color: any)

Arguments:

color: any


EnemyBattler:onAct(battler: any, name: any)

Arguments:

battler: any
name: any

Returns:

1: string|table


EnemyBattler:onActStart(battler: any, name: any)

Arguments:

battler: any
name: any


EnemyBattler:onCheck(battler: any)

Arguments:

battler: any


EnemyBattler:onDefeat(damage: any, battler: any)

Arguments:

damage: any
battler: any


EnemyBattler:onDefeatFatal(damage: any, battler: any)

Arguments:

damage: any
battler: any


EnemyBattler:onDefeatRun(damage: any, battler: any)

Arguments:

damage: any
battler: any


EnemyBattler:onDodge(battler: any)

Arguments:

battler: any


EnemyBattler:onHurt(damage: any, battler: any)

Arguments:

damage: any
battler: any




EnemyBattler:onMercy(battler: any)

Arguments:

battler: any

Returns:

1: boolean












EnemyBattler:registerAct(name: any, description: any, party: any, tp: any, highlight: any, icons: any)

Arguments:

name: any
description: any
party: any
tp: any
highlight: any
icons: any

Returns:

1: table


EnemyBattler:registerActFor(char: any, name: any, description: any, party: any, tp: any, highlight: any, icons: any)

Arguments:

char: any
name: any
description: any
party: any
tp: any
highlight: any
icons: any


EnemyBattler:registerShortAct(name: any, description: any, party: any, tp: any, highlight: any, icons: any)

Arguments:

name: any
description: any
party: any
tp: any
highlight: any
icons: any

Returns:

1: table


EnemyBattler:registerShortActFor(char: any, name: any, description: any, party: any, tp: any, highlight: any, icons: any)

Arguments:

char: any
name: any
description: any
party: any
tp: any
highlight: any
icons: any




EnemyBattler:setActor(actor: any, use_overlay: any)

Arguments:

actor: any
use_overlay: any


EnemyBattler:setFlag(flag: any, value: any)

Arguments:

flag: any
value: any


EnemyBattler:setSprite(sprite: any, speed: any, loop: any, after: any)

Arguments:

sprite: any
speed: any
loop: any
after: any


EnemyBattler:setTired(bool: any)

Arguments:

bool: any


EnemyBattler:spare(pacify: any)

Arguments:

pacify: any







Fields



Undocumented







EnemyBattler.auto_spare: boolean

Whether this enemy is automatically spared at full mercy



EnemyBattler.can_freeze: boolean

Whether this enemy can be frozen





















EnemyBattler.dialogue_bubble: nil

Speech bubble style - defaults to "round" or "cyber", depending on chapter This is set to nil in battler.lua as well, but it's here for completion's sake.



EnemyBattler.dialogue_offset: table

The offset for the speech bubble, also set in battler.lua





EnemyBattler.disable_mercy: boolean

Whether mercy is disabled for this enemy, like snowgrave Spamton NEO. This only affects the visual mercy bar.







EnemyBattler.exit_on_defeat: boolean

Whether the enemy runs/slides away when defeated/spared



EnemyBattler.experience: integer

currently useless, maybe in later chapters?













































EnemyBattler.recruit: integer

How many times an enemy needs to be spared to recruit. Set 0 for unrecruitable enemies.



EnemyBattler.selectable: boolean

Whether this enemy can be selected or not









EnemyBattler.sprite: Sprite

A simple object that renders a texture.
This texture must be placed inside assets/sprites/.