Skip to Content
The Alchemy Project

src/battle/battle_tables.c

The battle's small tables: where a formation's places fall, the party's weapon sprites, the camera's command matrix, how an ability weakens with distance, and the enemies' action weights.

Variables

NameDescription
const Uint32BattleTablesUnusedWordUnused: a word no code names, at the head of the tables; The Lost Age's is 17.
const Sint8BattleFormationCenteredOffsets []A fixed formation's places by order, as offsets from the middle place: 0, -1, 1, -2, 2 and so on out to 4.
const Uint16BattleUnitWeaponAnimationsIsaac []Isaac's battle sprite for each kind of weapon he holds.
const Uint16BattleUnitWeaponAnimationsGaret []Garet's battle sprite for each kind of weapon he holds.
const Uint16BattleUnitWeaponAnimationsIvan []Ivan's battle sprite for each kind of weapon he holds.
const Uint16BattleUnitWeaponAnimationsMia []Mia's battle sprite for each kind of weapon she holds.
const Uint16BattleUnitWeaponAnimationsJenna []Jenna's battle sprite for each kind of weapon she holds.
const Sint8BattlePlacementSpots []The party's four places, (x, z) in pixels from the battlefield's centre, then a column of six at x -80 that nothing reads; the enemies are laid out by btPlacementLayoutEnemies instead.
const FIXEDBattleCameraCommandMatrix []A shear: x gains -0.8 of y.
const Uint8RangeFalloffEffectChance []Percentages by a target's distance from the aimed one, 0 to 5 (range_falloff.h).
const Sint32RangeFalloffPpLoss []PP loss (ABILITY_FORMULA_PP_DAMAGE), Crazy Voice's and Psy Drain's: 100, 50, 30, then 10.
const Sint32RangeFalloffHealHp []HP healing (ABILITY_FORMULA_HEAL_HP): 100 down to 20 by 20, then 10.
const Sint32RangeFalloffPpDamage []PP damage of the never-reached ability kind -1: 100, 50, 30, then 10.
const Sint32RangeFalloffPsynergyDamage []Psynergy damage (ABILITY_FORMULA_DAMAGE): 100 down to 20 by 20, then 10.
const Sint32RangeFalloffSummonDamage []Summon damage (ABILITY_FORMULA_SUMMON): 100, 70, 40, 30, 20, then 10.
const Sint32RangeFalloffEnemyDamage []An enemy's unleashed damage (ABILITY_FORMULA_ENEMY_DAMAGE): 100, 50, 30, then 10.
const Sint32RangeFalloffHealPp []PP healing (ABILITY_FORMULA_HEAL_PP): 100 down to 20 by 20, then 10.
const Sint32RangeFalloffEffectDamage []The damage of an effect ability whose effect lands (ABILITY_FORMULA_EFFECT): 100, 50, 30, then 10.

Description

The battle's small tables: where a formation's places fall, the party's weapon sprites, the camera's command matrix, how an ability weakens with distance, and the enemies' action weights.

Variables in detail

BattleTablesUnusedWord

const Uint32 BattleTablesUnusedWord

Unused: a word no code names, at the head of the tables; The Lost Age's is 17.

Definition at line 12 of file battle_tables.c.

BattleFormationCenteredOffsets

const Sint8 BattleFormationCenteredOffsets[]

A fixed formation's places by order, as offsets from the middle place: 0, -1, 1, -2, 2 and so on out to 4.

Referenced by btUnitCollect().

Definition at line 14 of file battle_tables.c.

BattleUnitWeaponAnimationsIsaac

const Uint16 BattleUnitWeaponAnimationsIsaac[]

Isaac's battle sprite for each kind of weapon he holds.

Referenced by btUnitGetWeaponSprite().

Definition at line 18 of file battle_tables.c.

BattleUnitWeaponAnimationsGaret

const Uint16 BattleUnitWeaponAnimationsGaret[]

Garet's battle sprite for each kind of weapon he holds.

Referenced by btUnitGetWeaponSprite().

Definition at line 28 of file battle_tables.c.

BattleUnitWeaponAnimationsIvan

const Uint16 BattleUnitWeaponAnimationsIvan[]

Ivan's battle sprite for each kind of weapon he holds.

Referenced by btUnitGetWeaponSprite().

Definition at line 38 of file battle_tables.c.

BattleUnitWeaponAnimationsMia

const Uint16 BattleUnitWeaponAnimationsMia[]

Mia's battle sprite for each kind of weapon she holds.

Referenced by btUnitGetWeaponSprite().

Definition at line 48 of file battle_tables.c.

BattleUnitWeaponAnimationsJenna

const Uint16 BattleUnitWeaponAnimationsJenna[]

Jenna's battle sprite for each kind of weapon she holds.

Referenced by btUnitGetWeaponSprite().

Definition at line 58 of file battle_tables.c.

BattlePlacementSpots

const Sint8 BattlePlacementSpots[]

The party's four places, (x, z) in pixels from the battlefield's centre, then a column of six at x -80 that nothing reads; the enemies are laid out by btPlacementLayoutEnemies instead.

Referenced by btPlacementGetStepPair() and btUnitRefreshPlacement().

Definition at line 70 of file battle_tables.c.

BattleCameraCommandMatrix

const FIXED BattleCameraCommandMatrix[]

A shear: x gains -0.8 of y. No code reads the three words after the matrix.

Referenced by btCameraApplyTransform().

Definition at line 87 of file battle_tables.c.

RangeFalloffEffectChance

const Uint8 RangeFalloffEffectChance[]

Percentages by a target's distance from the aimed one, 0 to 5 (range_falloff.h).

Referenced by btAbilityApplyToTarget().

Definition at line 98 of file battle_tables.c.

RangeFalloffPpLoss

const Sint32 RangeFalloffPpLoss[]

PP loss (ABILITY_FORMULA_PP_DAMAGE), Crazy Voice's and Psy Drain's: 100, 50, 30, then 10.

References Sint32.

Referenced by btAbilityApplyToTarget().

Definition at line 99 of file battle_tables.c.

RangeFalloffHealHp

const Sint32 RangeFalloffHealHp[]

HP healing (ABILITY_FORMULA_HEAL_HP): 100 down to 20 by 20, then 10.

References Sint32.

Referenced by btAbilityApplyToTarget().

Definition at line 100 of file battle_tables.c.

RangeFalloffPpDamage

const Sint32 RangeFalloffPpDamage[]

PP damage of the never-reached ability kind -1: 100, 50, 30, then 10.

References Sint32.

Referenced by btAbilityApplyToTarget().

Definition at line 101 of file battle_tables.c.

RangeFalloffPsynergyDamage

const Sint32 RangeFalloffPsynergyDamage[]

Psynergy damage (ABILITY_FORMULA_DAMAGE): 100 down to 20 by 20, then 10.

References Sint32.

Referenced by btAbilityApplyToTarget().

Definition at line 102 of file battle_tables.c.

RangeFalloffSummonDamage

const Sint32 RangeFalloffSummonDamage[]

Summon damage (ABILITY_FORMULA_SUMMON): 100, 70, 40, 30, 20, then 10.

References Sint32.

Referenced by btAbilityApplyToTarget().

Definition at line 103 of file battle_tables.c.

RangeFalloffEnemyDamage

const Sint32 RangeFalloffEnemyDamage[]

An enemy's unleashed damage (ABILITY_FORMULA_ENEMY_DAMAGE): 100, 50, 30, then 10.

References Sint32.

Referenced by btAbilityApplyToTarget().

Definition at line 104 of file battle_tables.c.

RangeFalloffHealPp

const Sint32 RangeFalloffHealPp[]

PP healing (ABILITY_FORMULA_HEAL_PP): 100 down to 20 by 20, then 10.

References Sint32.

Referenced by btAbilityApplyToTarget().

Definition at line 105 of file battle_tables.c.

RangeFalloffEffectDamage

const Sint32 RangeFalloffEffectDamage[]

The damage of an effect ability whose effect lands (ABILITY_FORMULA_EFFECT): 100, 50, 30, then 10.

References Sint32.

Referenced by btAbilityApplyToTarget().

Definition at line 106 of file battle_tables.c.