Skip to Content
The Alchemy Project

include/battle/ability_staging.h

How each ability is staged in battle: the staging and effect tables (ability_staging.c) and the values of BATTLE_ACTION_RUN.staging and battleEffect.

Included by ability_staging.c and battle_internal.h.

Macros

NameDescription
#defineEFFECT_ID_MASK 0xfffBATTLE_ACTION_RUN.battleEffect: the effect kind in the low twelve bits and its strength (a double or triple blow) above them; then how the effect is staged.
#defineEFFECT_VARIANT_MASK 0x3000
#defineEFFECT_VARIANT_SHIFT 12
#defineEFFECT_BY_ID_RANGE 0x4000btEffectRunByIdRangeStub.
#defineEFFECT_SUMMON 0x8000btEffectRunSummonStub, acting unit's view.
#defineEFFECT_ON_DOWNED 0x10000Shown on downed targets too (revivals).
#defineEFFECT_OTHER_SIDE 0x20000Plays the effect on the side opposite its targets.
#defineEFFECT_ID_SEVERE_BLOW 135The effect kind Severe Blow alone has: the status window drops its PP row while it plays.
#defineEFFECT_VIEW_ACROSS 0x40000More of BATTLE_ACTION_RUN.battleEffect: the camera takes the other side's view (an enemy's cast a view of its own), or turns right round.
#defineEFFECT_VIEW_REVERSED 0x80000

Enumerations

NameDescription
enumBATTLE_STAGING { STAGING_MESSAGES, STAGING_ATTACK, STAGING_CAST, STAGING_ITEM … }BATTLE_ACTION_RUN.staging: how btStagingDispatchAction shows the action, set by btActionRunBuild from the ability (AbilityStaging where it gives one).

Variables

NameDescription
extern const Uint32AbilityBattleEffects []Each ability's staging bits (BATTLE_ACTION_RUN.battleEffect), by ability id 0 to 518 (ability_staging.c).
extern const Uint8AbilityStaging []Each ability's outcome staging (BATTLE_ACTION_RUN.staging), 0 for the default, by ability id 0 to 517 (ability_staging.c).

Description

How each ability is staged in battle: the staging and effect tables (ability_staging.c) and the values of BATTLE_ACTION_RUN.staging and battleEffect.

Macros in detail

EFFECT_ID_MASK

#define EFFECT_ID_MASK 0xfff

BATTLE_ACTION_RUN.battleEffect: the effect kind in the low twelve bits and its strength (a double or triple blow) above them; then how the effect is staged.

Referenced by btStagingBuildTargetList().

Definition at line 51 of file ability_staging.h.

EFFECT_VARIANT_MASK

#define EFFECT_VARIANT_MASK 0x3000

Referenced by btStagingBuildTargetList().

Definition at line 52 of file ability_staging.h.

EFFECT_VARIANT_SHIFT

#define EFFECT_VARIANT_SHIFT 12

Referenced by AbilityBattleEffects, btActionRunBuild() and btStagingBuildTargetList().

Definition at line 53 of file ability_staging.h.

EFFECT_BY_ID_RANGE

#define EFFECT_BY_ID_RANGE 0x4000

btEffectRunByIdRangeStub.

Referenced by AbilityBattleEffects and btActionRunBuild().

Definition at line 55 of file ability_staging.h.

EFFECT_SUMMON

#define EFFECT_SUMMON 0x8000

btEffectRunSummonStub, acting unit's view.

Referenced by AbilityBattleEffects and btStagingRunFullScreen().

Definition at line 57 of file ability_staging.h.

EFFECT_ON_DOWNED

#define EFFECT_ON_DOWNED 0x10000

Shown on downed targets too (revivals).

Referenced by btActionRunBuild() and btStagingBuildTargetList().

Definition at line 59 of file ability_staging.h.

EFFECT_OTHER_SIDE

#define EFFECT_OTHER_SIDE 0x20000

Plays the effect on the side opposite its targets. Unused: no entry of AbilityBattleEffects in either game sets it and no code adds it, so the flip in btStagingRunFullScreen never happens.

Referenced by btStagingRunFullScreen().

Definition at line 63 of file ability_staging.h.

EFFECT_ID_SEVERE_BLOW

#define EFFECT_ID_SEVERE_BLOW 135

The effect kind Severe Blow alone has: the status window drops its PP row while it plays.

Referenced by AbilityBattleEffects and btStagingRunAttack().

Definition at line 67 of file ability_staging.h.

EFFECT_VIEW_ACROSS

#define EFFECT_VIEW_ACROSS 0x40000

More of BATTLE_ACTION_RUN.battleEffect: the camera takes the other side's view (an enemy's cast a view of its own), or turns right round.

Referenced by AbilityBattleEffects and btStagingRunPsynergyCast().

Definition at line 71 of file ability_staging.h.

EFFECT_VIEW_REVERSED

#define EFFECT_VIEW_REVERSED 0x80000

Referenced by AbilityBattleEffects and btStagingRunPsynergyCast().

Definition at line 72 of file ability_staging.h.

Enumerations in detail

BATTLE_STAGING

enum BATTLE_STAGING

BATTLE_ACTION_RUN.staging: how btStagingDispatchAction shows the action, set by btActionRunBuild from the ability (AbilityStaging where it gives one).

EnumeratorValueDescription
STAGING_MESSAGES1No effect: each target's messages only.
STAGING_ATTACK2The acting unit runs up and strikes.
STAGING_CAST3Psynergy, and Venus, Mercury, Mars, Jupiter.
STAGING_ITEM4
STAGING_SUMMON5The larger summons, the acting unit hidden.
STAGING_DJINNI6A Djinni with no attack (Granite, Quartz...).
STAGING_FLEE7A unit runs.
STAGING_ENEMY_CAST8The action plays as a cast, the caster showing its element's streaks in place of the gathering star field. Where AbilityStaging gives no staging, it's how an enemy's ability plays when the ability isn't Psynergy (btAbilityIsPsynergy) and its entry of AbilityBattleEffects isn't 0; an enemy's Psynergy plays as STAGING_CAST. AbilityStaging gives it to Slice and to seven weapon unleashes: Blizzard, Drown, Demon Fire, Vorpal Slash, Rapid Smash, Sonic Smash and Titan Blade.
STAGING_FULL_SCREEN9Gaia, Rockfall, Procne and their kin.

Definition at line 24 of file ability_staging.h.