include/battle/battle_action.h
What 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.
Included by battle_internal.h, battle_effect_internal.h, window_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 sprite object, resources and animations, its anchor spot and scale, and the conditions it shows. |
struct | BATTLE_ACTION_RECORD | A unit's chosen action for the turn: its command, the command's parameter, its target and range, and its priority in the turn order. |
struct | BATTLE_SPOILS | A battle's spoils so far: coins, experience, enemies defeated and up to four items. |
struct | BATTLE_ACTION | A unit's chosen action as the party's command menus write it: the BATTLE_ACTION_RECORD, read with its fields unsigned. |
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) | |
#define | PLACE_PARTY 0x100 | The list place codes the target pickers return (btFindUnitPlace): a place in the party's list or the enemies', or'd with the side's tag; PLACE_PARTY alone is the party's first place, the default target. |
#define | PLACE_ENEMY 0x180 |
Enumerations
| Name | Description | |
|---|---|---|
enum | BATTLE_COMMAND { COMMAND_ATTACK, COMMAND_PSYNERGY, COMMAND_ITEM, COMMAND_DEFE … } | BATTLE_ACTION_RECORD.command and BATTLE_PLAN's copy of it: what a unit does on its turn. |
Description
What 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.
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 73 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 74 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 75 of file battle_action.h.
PLACE_PARTY
#define PLACE_PARTY 0x100
The list place codes the target pickers return (btFindUnitPlace): a place in
the party's list or the enemies', or'd with the side's tag; PLACE_PARTY alone
is the party's first place, the default target.
Referenced by btAIChooseRandomTarget(), btAIChooseTarget(), btFindUnitPlace(), mnBattleCollectPartyCommands() and mnBattleTargetRunSelection().
Definition at line 80 of file battle_action.h.
PLACE_ENEMY
#define PLACE_ENEMY 0x180
Referenced by btAIChooseRandomTarget(), btAIChooseTarget(), btFindUnitPlace(), mnBattlePartySplitChoosers() and mnBattleTargetRunSelection().
Definition at line 81 of file battle_action.h.
Enumerations in detail
BATTLE_COMMAND
enum BATTLE_COMMAND
BATTLE_ACTION_RECORD.command and BATTLE_PLAN's copy of it: what a unit does
on its turn.
| Enumerator | Value | Description |
|---|---|---|
COMMAND_ATTACK | 0 | |
COMMAND_PSYNERGY | 1 | |
COMMAND_ITEM | 2 | |
COMMAND_DEFEND | 3 | |
COMMAND_ABILITY | 4 | An enemy's ability. |
COMMAND_DJINN | 5 | |
COMMAND_SUMMON | 6 | |
COMMAND_TOTAL_DEFENSE | 7 | An enemy's ABILITY_EFFECT_TOTAL_DEFENSE. |
COMMAND_NONE | 8 | Nothing this turn. |
COMMAND_DJINN_COUNTER | 9 | The ABILITY_DJINN_COUNTER a unit strikes back with, outside the turn order (btRun queues it for BATTLE_STATE.pendingUnit). |
COMMAND_DAEDALUS | 10 | Daedalus's strike again at a turn's end, |
COMMAND_FLEE | 99 | queued by btRun while summons of Daedalus are owed (btStagingPlanDaedalus). |
Definition at line 50 of file battle_action.h.