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_PLAN.staging and battleEffect.

Included by ability_staging.c and battle_internal.h.

Macros

NameDescription
#defineEFFECT_ID_MASK 0xfffBATTLE_PLAN.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 0x20000Unused: no entry of AbilityBattleEffects sets it and no code adds it, so btStagingRunFullScreen's flip never happens.
#defineEFFECT_VIEW_ACROSS 0x40000The camera takes the other side's view (an enemy's cast a view of its own), or turns right round.
#defineEFFECT_VIEW_REVERSED 0x80000
#defineEFFECT_ID_SEVERE_BLOW 135Unused: The Broken Seal's effect kind for Severe Blow, which no row of AbilityBattleEffects gives here; btStagingRunAttack would play it with the status window's PP row hidden (Severe Blow is BATTLE_EFFECT_SEVERE_BLOW).

Enumerations

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

Variables

NameDescription
extern const Uint8ActionRunEffectChance []The effect chance by distance btActionRunBuild rolls ahead for Annihilation and Whorl, the same as RangeFalloffEffectChance.
extern const Uint8AbilityStaging []Each ability's outcome staging (BATTLE_PLAN.staging), 0 for the default, by ability id.
extern const Uint32AbilityBattleEffects []Each ability's staging bits (BATTLE_PLAN.battleEffect), by ability id.

Description

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

Macros in detail

EFFECT_ID_MASK

#define EFFECT_ID_MASK 0xfff

BATTLE_PLAN.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 59 of file ability_staging.h.

EFFECT_VARIANT_MASK

#define EFFECT_VARIANT_MASK 0x3000

Referenced by btStagingBuildTargetList().

Definition at line 60 of file ability_staging.h.

EFFECT_VARIANT_SHIFT

#define EFFECT_VARIANT_SHIFT 12

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

Definition at line 61 of file ability_staging.h.

EFFECT_BY_ID_RANGE

#define EFFECT_BY_ID_RANGE 0x4000

btEffectRunByIdRangeStub.

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

Definition at line 63 of file ability_staging.h.

EFFECT_SUMMON

#define EFFECT_SUMMON 0x8000

btEffectRunSummonStub, acting unit's view.

Referenced by AbilityBattleEffects, btStagingPlanDaedalus() and btStagingRunFullScreen().

Definition at line 65 of file ability_staging.h.

EFFECT_ON_DOWNED

#define EFFECT_ON_DOWNED 0x10000

Shown on downed targets too (revivals).

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

Definition at line 67 of file ability_staging.h.

EFFECT_OTHER_SIDE

#define EFFECT_OTHER_SIDE 0x20000

Unused: no entry of AbilityBattleEffects sets it and no code adds it, so btStagingRunFullScreen's flip never happens. It would play the effect on the side opposite its targets.

Referenced by btStagingRunFullScreen().

Definition at line 71 of file ability_staging.h.

EFFECT_VIEW_ACROSS

#define EFFECT_VIEW_ACROSS 0x40000

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 74 of file ability_staging.h.

EFFECT_VIEW_REVERSED

#define EFFECT_VIEW_REVERSED 0x80000

Referenced by AbilityBattleEffects and btStagingRunPsynergyCast().

Definition at line 75 of file ability_staging.h.

EFFECT_ID_SEVERE_BLOW

#define EFFECT_ID_SEVERE_BLOW 135

Unused: The Broken Seal's effect kind for Severe Blow, which no row of AbilityBattleEffects gives here; btStagingRunAttack would play it with the status window's PP row hidden (Severe Blow is BATTLE_EFFECT_SEVERE_BLOW).

Referenced by btStagingRunAttack().

Definition at line 79 of file ability_staging.h.

Enumerations in detail

BATTLE_STAGING

enum BATTLE_STAGING

BATTLE_PLAN.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: an enemy's ability that is not Psynergy and has a battle effect, Slice, and weapon unleashes such as Blizzard and Titan Blade.
STAGING_FULL_SCREEN9Gaia, Rockfall, Procne and their kin.
STAGING_TEAM_STRIKE10Meld ("Launch a powerful team strike.") and Mold: a second unit (BATTLE_PLAN.partnerId) strikes as the Djinni is unleashed.
STAGING_DJINN_RECOVERY11Eddy: "Speed up Djinn recovery time."
STAGING_MEGAERA12The summon, then High Impact on its side.
STAGING_IRIS13The summon, then the Aurora Field.
STAGING_DAEDALUS14Daedalus's strike queued for the turn's end, from no ability's row: only btStagingPlanDaedalus sets it.
STAGING_BEAST_ATTACK15The summoned beasts that strike: Wild Wolf, Roc, Orc, Grand Golem, Dinox and Call Zombie (btMotionCallBeast).
STAGING_BEAST_CAST16The summoned beasts that cast, Emu to Call Dullahan.
STAGING_BEAST_PSYNERGY17Unused: a beast called up (btMotionCallBeast takes 15 to 17) whose call then plays as the party's Psynergy cast (CAST_PSYNERGY). No ability's row in AbilityStaging gives it.

Definition at line 20 of file ability_staging.h.