src/battle
Guide: Battle Engine
Files
| File | Description |
|---|---|
ability_staging.c | How each ability is staged in battle: the outcome staging btActionRunBuild gives it and the effect it plays, by ability id. |
action_weights.c | The enemies' action weights. |
battle.c | The battle object: a battle from its opening transition to its spoils. |
battle_ability.c | An ability applied to one target, btAbilityApplyToTarget: damage, healing and its added effect. |
battle_action.c | An action announced and built for its targets, btActionRunBuild. |
battle_auto_battle.c | Auto battle, the battle test menu's mode (FLAG_AUTO_BATTLE, set by btDebugBattleRunMenu): no command menu opens, every unit attacks in action order, and each action is played by the simpler routines here instead of battle_staging.c's. |
battle_background.c | The battle background, its palette and modes, the camera's zoom and the units' highlights. |
battle_debug.c | Debug: the parameter sets, the message viewer and the battle test menu. |
battle_element_glow.c | A unit's elemental glow: the star field and the other glows. |
battle_enemy_ai.c | An enemy's choice of action, btAIChooseAction. |
battle_formation.c | Enemy formations: the enemies chosen, levelled and lettered. |
battle_internal.h | What every part of the battle object shares: its includes, in their original order, and the names two or more parts use. |
battle_link.c | Link battles: the parties and Djinn exchanged, and the turn handshake. |
battle_motion.c | The units' movements: returning, running, leaping and knocked back, and their positions on the screen. |
battle_objects.c | Each tick's sprite priorities, the status icons, the poses and the sprites of the battle objects. |
battle_placement.c | Battle objects made and placed on the battlefield. |
battle_playback.c | Playback over ticks, btPlaybackRun. |
battle_playback_queue.c | Battle playback: a downed unit's reset, waiting for the player, and the playback queue, filled by btPlaybackPush and played at once by btPlaybackRunAll. |
battle_run.c | A whole battle, btRun, and the lists of the units in it. |
battle_setup.c | The battle camera each tick, the opening announcement, the unit lists, and the party's battle state and Djinn as a battle starts and ends. |
battle_spoils.c | The spoils: coins, experience, items and level ups. |
battle_sprite.c | Reading a unit's row of BattleSprites by its id (UNIT.id): an enemy's sprite, palette, size, attack and defeat sound. |
battle_sprite_slots.c | Battle sprites: enemy sprite slots and the party's weapon sprites. |
battle_sprites.c | The battle sprite rows, by unit id: the eight characters', then the enemies'. |
battle_staging.c | An action played: its targets, and how an attack, a cast, an item, a summon or a flight is staged. |
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. |
battle_targeting.c | The targets an enemy's or a confused unit's ability picks. |
battle_transition.c | The opening transition: the curtain, or the Venus Lighthouse storm. |
battle_turn.c | A turn's actions: the party's commands, the enemies' or the link opponent's, and their action order. |
battle_turn_end.c | The end of an action and of a turn: counters, Djinn recovery, poison and the Grim Reaper. |
battle_unit_tables.c | What every battle unit starts with: its actor script, and the kind of weapon each item is. |
debug_parameter_sets.c | The debug parameter sets: runs of party members, each run ended by DEBUG_PARAMETER_SET_END, that btDebugParamSetLoad gives the party. |
element_glow_tables.c | Where the element glow's sparks and rings sit on their sprite sheet. |
formations.c | The 380 enemy formations, by formation id, and the enemies a monster battle never draws. |
highlight_tables.c | The highlighted units' lightening. |
knockback_tables.c | How far, how fast and how high each knockback sends a unit, by variant (BATTLE_KNOCKBACK). |
turn_end_tables.c | The order the two sides take their turn-end effects in, and two tables after it that no code names. |
unused_portrait_pairs.c | Unused: two tables pairing a speaker with a portrait, which no code names. |