Constructor






Methods


Encounter:addEnemy(enemy: any, x: any, y: any, : unknown)

Arguments:

enemy: any
x: any
y: any
: unknown

Returns:

1: EnemyBattler|nil


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

Arguments:

flag: any
amount: any

Returns:

1: unknown|nil


Encounter:beforeStateChange(old: any, new: any)

Arguments:

old: any
new: any




Encounter:createSoul(x: any, y: any, color: any)

Arguments:

x: any
y: any
color: any

Returns:

1: Soul


Encounter:draw(fade: any)

Arguments:

fade: any


Encounter:drawBackground(fade: any)

Arguments:

fade: any








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

Arguments:

flag: any
default: any

Returns:

1: unknown|nil




Encounter:getPartyPosition(index: any)

Arguments:

index: any

Returns:

1: unknown
2: unknown






Encounter:getVictoryMoney(money: any)

Arguments:

money: any


Encounter:getVictoryText(text: any, money: any, xp: any)

Arguments:

text: any
money: any
xp: any


Encounter:getVictoryXP(xp: any)

Arguments:

xp: any


Encounter:onActionSelect(battler: any, button: any)

Arguments:

battler: any
button: any












Encounter:onCharacterTurn(battler: any, undo: any)

Arguments:

battler: any
undo: any






Encounter:onMenuSelect(state: any, item: any, can_select: any)

Arguments:

state: any
item: any
can_select: any


Encounter:onReturnToWorld(events: any)

Arguments:

events: any


Encounter:onStateChange(old: any, new: any)

Arguments:

old: any
new: any








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

Arguments:

flag: any
value: any





Fields



Undocumented



Encounter.background: boolean

Whether the default grid background is drawn



Encounter.default_xactions: table|unknown|nil

Whether characters have the X-Action option in their spell menu



Encounter.defeated_enemies: nil

A copy of Battle.defeated_enemies, used to determine how an enemy has been defeated.



Encounter.hide_world: boolean

If enabled, hides the world even if the default background is disabled



Encounter.music: string

The music used for this encounter



Encounter.no_end_message: boolean

Should the battle skip the YOU WON! text?



Encounter.queued_enemy_spawns: table

Table used to spawn enemies when the battle exists, if this encounter is created before



Encounter.text: string

Text that will be displayed when the battle starts