include/battle/battle_action.h
A battle's battle objects and sprites, each unit's command and action, and the spoils.
Included by battle_effect_internal.h, battle_actor.h, battle_camera.h and battle_state.h.
Structures
| Name | Description | |
|---|---|---|
struct | BATTLE_OBJECT | A unit's place on the battlefield: its actor, resources and animations, its anchor spot and scale, and the statuses it shows. |
struct | BATTLE_ACTION | A unit's chosen action for the turn: its command, the command's parameter, its target and range, and its priority in the action order. |
struct | BATTLE_SPOILS | A battle's spoils so far: coins, experience, enemies defeated and up to four items. |
Macros
| Name | Description | |
|---|---|---|
#define | DJINN_COMMAND (element, index) (((element) << 8) | (index)) | COMMAND_DJINN's parameter: the Djinni's element in bits 11 to 8, its number within the element below. |
#define | DJINN_COMMAND_ELEMENT (parameter) (((parameter) >> 8) & 15) | |
#define | DJINN_COMMAND_INDEX (parameter) ((parameter) & 255) |
Enumerations
| Name | Description | |
|---|---|---|
enum | BATTLE_COMMAND { COMMAND_ATTACK, COMMAND_PSYNERGY, COMMAND_ITEM, COMMAND_DEFE … } | BATTLE_ACTION.command and BATTLE_ACTION_RUN's copy of it: what a unit does when it acts. |
Description
A battle's battle objects and sprites, each unit's command and action, and the spoils.
Macros in detail
DJINN_COMMAND
#define DJINN_COMMAND(element, index) (((element) << 8) | (index))
COMMAND_DJINN's parameter: the Djinni's element in bits 11 to 8, its number
within the element below.
Referenced by mnBattleDjinnMenuRun().
Definition at line 65 of file battle_action.h.
DJINN_COMMAND_ELEMENT
#define DJINN_COMMAND_ELEMENT(parameter) (((parameter) >> 8) & 15)
Referenced by btActionOrderSort(), btActionRunBuild(), mnBattleCollectPartyCommands() and mnBattleDjinnMenuShowChangePreview().
Definition at line 66 of file battle_action.h.
DJINN_COMMAND_INDEX
#define DJINN_COMMAND_INDEX(parameter) ((parameter) & 255)
Referenced by btActionOrderSort(), btActionRunBuild(), mnBattleCollectPartyCommands(), mnBattleDjinnMenuRun() and mnBattleDjinnMenuShowChangePreview().
Definition at line 67 of file battle_action.h.
Enumerations in detail
BATTLE_COMMAND
enum BATTLE_COMMAND
BATTLE_ACTION.command and BATTLE_ACTION_RUN's copy of it: what a unit does
when it acts.
| Enumerator | Value | Description |
|---|---|---|
COMMAND_ATTACK | 0 | |
COMMAND_PSYNERGY | 1 | |
COMMAND_ITEM | 2 | |
COMMAND_DEFEND | 3 | |
COMMAND_ENEMY_ABILITY | 4 | |
COMMAND_DJINN | 5 | |
COMMAND_SUMMON | 6 | |
COMMAND_TOTAL_DEFENSE | 7 | An enemy's Total Defense (ABILITY_EFFECT_TOTAL_DEFENSE) |
COMMAND_NONE | 8 | nothing this turn |
COMMAND_FLEE | 99 |
Definition at line 48 of file battle_action.h.