Skip to Content
The Alchemy Project

include/battle

Guide: Battle Engine

Files

FileDescription
ability_staging.hHow each ability is staged in battle: the staging and effect tables (ability_staging.c) and the values of BATTLE_PLAN.staging and battleEffect.
battle.hThe battle engine's functions as other files call them: the battle module's own, file by file, then the battle effects, the field engine's functions the battle and its effects borrow, and the stub calls into the main image.
battle_action.hWhat a battle keeps for each unit (its battle object on the field, its command and action for the turn) and the spoils it has won so far.
battle_action_run.hBATTLE_PLAN: one action of a turn laid out target by target, from the moment it is chosen to the damage it deals, and the effect that stages it.
battle_actor.hThe motion object: a battle unit's actor as the battle moves it, and the sprites it draws.
battle_camera.hThe battle camera, the battle background's modes and scanline state, and the presentation state an action's staging hands its battle effect.
battle_effect_params.hThe command a battle effect is run with: its kind, its user and its targets.
battle_effect_state.hThe Lost Age's copy of the battle effect state.
battle_random.hThe battle's own random numbers, which a link battle keeps in step on both consoles.
battle_side.hThe two sides of a battle, their unit lists, and the Djinn each side has on standby or recovering.
battle_sprites.hEach enemy's battle sprite and how it attacks and falls, and the summons.
battle_state.hThe battle's own state: its units and their places, the turn's actions, the spoils, the background's palette and the playback of an action's events.
battle_unit.hUNIT, a party member's or an enemy's stats and statuses in battle, with the elements, abilities and actions it uses.
blitter.hThe canvas blitters battle effects draw with: their clip and mirroring flags, blend modes and rectangle-drawing function pointer.
debug_parameter_set.hThe debug parameter sets.
first_strike.hWho strikes first as a battle opens.
formations.hThe enemy formations.
playback_queue.hThe battle event queue: the names, numbers, messages, hits and defeats an action queues for its playback to show in order.
range_falloff.hHow an ability weakens with each place a target stands from the aimed one, and the damage and recovery formulas that use it.
stubs.hThe stub calls into the battle module, as the other modules' code calls them.
weapon_kind.hThe kinds of weapon a party member's attack shows, and how BattleUnitWeaponKinds packs one with its item.

On this page