include/battle/battle_side.h
Which units are in a battle, and the Djinn recovery list.
Included by battle_internal.h, turn_end_tables.c, battle_effect_internal.h, game_internal.h, battle_arena.c, screens_internal.h and window_internal.h.
Structures
| Name | Description | |
|---|---|---|
struct | BATTLE_SIDE_ORDER | The order the two sides take their turn-end effects in. |
struct | DJINN_RECOVERY_ENTRY | A Djinni on standby or recovering: its element and index, the unit it belongs to, and the turns until it is set again. |
struct | DJINN_RECOVERY_LIST | One side's Djinn recovery list: up to 64 entries and their count. |
struct | DJINN_RECOVERY_TABLE | One side's Djinn recovery table, as gmDjinnGetRecoveryTable returns it: the party's MainRoutineStateWork.holdings, the enemies' over battle unit OPPONENT_RECOVERY_UNIT. |
Macros
| Name | Description | |
|---|---|---|
#define | PLACE_PARTY (1 << 8) | The list place codes the target pickers return (battle_targeting.c, mnBattleTargetRunSelection, btFindUnitPlace): a place in the party's list or the enemies', or'd with the side's tag. |
#define | PLACE_ENEMY (PLACE_PARTY | PLACE_ENEMY_SIDE) | |
#define | PLACE_ENEMY_SIDE (1 << 7) | A place code's side bit, set for the enemies' list, and its place in the list (btGetUnitAtPlace). |
#define | PLACE_INDEX_MASK ((1 << 4) - 1) | |
#define | DJINN_RECOVERY_PARTY 0 | The Djinn recovery list's two tables (gmDjinnGetRecoveryTableStub): the party's and the link opponent's. |
#define | DJINN_RECOVERY_OPPONENT 1 | |
#define | OPPONENT_RECOVERY_UNIT (FIRST_ENEMY_UNIT + 3) | The enemy unit whose record holds the link opponent's Djinn recovery table: the opponent's three party members take the three before it (scBattleArenaReceivePartyRecords), and the table fits in one unit's record. |
#define | DJINN_RECOVERY_AFTER_BATTLE -1 | DJINN_RECOVERY_ENTRY.turns of a Djinni on standby. |
#define | DJINN_RECOVERY_SUMMONED -2 | DJINN_RECOVERY_ENTRY.turns of a standby Djinni a summon has just used, until the summoner's action ends and sets its count of turns to recover (btUnitProcessActionEnd). |
Enumerations
| Name | Description | |
|---|---|---|
enum | BATTLE_SIDE { BATTLE_SIDE_NONE, BATTLE_SIDE_ENEMY, BATTLE_SIDE_PARTY } | UNIT.side: which side a unit fights on, if it is in the battle. |
enum | BATTLE_UNIT_LIST_MARK { BATTLE_UNIT_REMOVED, BATTLE_UNIT_LIST_END } | Marks in a list of unit ids, such as BATTLE_STATE.partyUnits and enemyIds. |
enum | BATTLE_SIDE_MASK { BATTLE_SIDE_MASK_PARTY, BATTLE_SIDE_MASK_ENEMIES, BATTLE_SID … } | Which sides a unit list takes, as btUnitListLiving reads it. |
Description
Which units are in a battle, and the Djinn recovery list.
Macros in detail
PLACE_PARTY
#define PLACE_PARTY (1 << 8)
The list place codes the target pickers return (battle_targeting.c,
mnBattleTargetRunSelection, btFindUnitPlace): a place in the party's list or
the enemies', or'd with the side's tag.
Referenced by btAIChooseRandomTarget(), btAIChooseTarget(), btFindUnitPlace(), mnBattleCollectPartyCommands() and mnBattleTargetRunSelection().
Definition at line 27 of file battle_side.h.
PLACE_ENEMY
#define PLACE_ENEMY (PLACE_PARTY | PLACE_ENEMY_SIDE)
Referenced by btAIChooseRandomTarget(), btAIChooseTarget(), btFindUnitPlace() and mnBattleTargetRunSelection().
Definition at line 28 of file battle_side.h.
PLACE_ENEMY_SIDE
#define PLACE_ENEMY_SIDE (1 << 7)
A place code's side bit, set for the enemies' list, and its place in the list
(btGetUnitAtPlace).
Referenced by btActionRunBuild() and btGetUnitAtPlace().
Definition at line 31 of file battle_side.h.
PLACE_INDEX_MASK
#define PLACE_INDEX_MASK ((1 << 4) - 1)
Referenced by btActionRunBuild() and btGetUnitAtPlace().
Definition at line 32 of file battle_side.h.
DJINN_RECOVERY_PARTY
#define DJINN_RECOVERY_PARTY 0
The Djinn recovery list's two tables (gmDjinnGetRecoveryTableStub): the
party's and the link opponent's.
Referenced by btActionRunBuild(), btDjinnCountStandby(), btDjinnRecoveryCountDown(), btDjinnRecoveryReconcile(), btLinkBattleSendParty(), btRun(), btSummonUpdateAvailability(), gmDjinnRecoveryCountStandby(), gmSummonListLearned(), mnBattleCommandRowRun(), mnBattleDjinnMenuRun() and scBattleArenaSendPartyRecords().
Definition at line 50 of file battle_side.h.
DJINN_RECOVERY_OPPONENT
#define DJINN_RECOVERY_OPPONENT 1
Referenced by btActionRunBuild(), btDjinnCountStandby(), btDjinnRecoveryReconcile(), btLinkBattleReceiveParty(), mnBattleDjinnMenuRun() and scBattleArenaReceivePartyRecords().
Definition at line 51 of file battle_side.h.
OPPONENT_RECOVERY_UNIT
#define OPPONENT_RECOVERY_UNIT (FIRST_ENEMY_UNIT + 3)
The enemy unit whose record holds the link opponent's Djinn recovery table:
the opponent's three party members take the three before it
(scBattleArenaReceivePartyRecords), and the table fits in one unit's record.
Referenced by gmDjinnGetRecoveryTable().
Definition at line 56 of file battle_side.h.
DJINN_RECOVERY_AFTER_BATTLE
#define DJINN_RECOVERY_AFTER_BATTLE -1
DJINN_RECOVERY_ENTRY.turns of a Djinni on standby. In battle it stays so
until a Djinn command sets it again or a summon uses it
(DJINN_RECOVERY_SUMMONED), both in btActionRunBuild; a party member who does
not fight has it set as the next battle starts, outside a link battle
(btDjinnRecoveryReconcile). btDjinnRecoveryCountDown counts down only
positive turns.
Referenced by btActionRunBuild(), btDjinnCountStandby(), btDjinnRecoveryReconcile(), btUnitProcessActionEnd(), gmDjinnRecoveryAddStandby() and gmDjinnRecoveryCountStandby().
Definition at line 64 of file battle_side.h.
DJINN_RECOVERY_SUMMONED
#define DJINN_RECOVERY_SUMMONED -2
DJINN_RECOVERY_ENTRY.turns of a standby Djinni a summon has just used, until
the summoner's action ends and sets its count of turns to recover
(btUnitProcessActionEnd).
Referenced by btActionRunBuild(), btUnitProcessActionEnd() and gmDjinnCanSet().
Definition at line 69 of file battle_side.h.
Enumerations in detail
BATTLE_SIDE
enum BATTLE_SIDE
UNIT.side: which side a unit fights on, if it is in the battle.
| Enumerator | Value | Description |
|---|---|---|
BATTLE_SIDE_NONE | 0 | |
BATTLE_SIDE_ENEMY | 1 | |
BATTLE_SIDE_PARTY | 2 |
Definition at line 10 of file battle_side.h.
BATTLE_UNIT_LIST_MARK
enum BATTLE_UNIT_LIST_MARK
Marks in a list of unit ids, such as BATTLE_STATE.partyUnits and enemyIds.
| Enumerator | Value | Description |
|---|---|---|
BATTLE_UNIT_REMOVED | 254 | a place whose unit has left the battle |
BATTLE_UNIT_LIST_END | 255 | ends the list |
Definition at line 18 of file battle_side.h.
BATTLE_SIDE_MASK
enum BATTLE_SIDE_MASK
Which sides a unit list takes, as btUnitListLiving reads it.
| Enumerator | Value | Description |
|---|---|---|
BATTLE_SIDE_MASK_PARTY | 1 | |
BATTLE_SIDE_MASK_ENEMIES | 2 | |
BATTLE_SIDE_MASK_BOTH | BATTLE_SIDE_MASK_PARTY | BATTLE_SIDE_MASK_ENEMIES |
Definition at line 35 of file battle_side.h.