src/battle_effect/battle_effect_stat_change.c
Stat boosts and reductions (Impact, Guard, Ward, Dull, Weaken ...). More…
Included by battle_effect.c.
Macros
| Name | Description | |
|---|---|---|
#define | STAT_BOOST_BURST_TICK 52 | When the first target's flares burst and its sprite appears, with the damage; each later target follows STAT_BOOST_TARGET_DELAY ticks behind. |
#define | STAT_BOOST_SPRITE_TICK 80 | |
#define | STAT_BOOST_TARGET_DELAY 8 | |
#define | STAT_CHANGE_PARTICLES (PARTICLE_POOL_COUNT / 2) | The particles both kinds of stat change set out: the first half of the pool. |
#define | STAT_BOOST_TARGET_PARTICLES 64 | Each target swirls in STAT_BOOST_TARGET_FLARES flares from its own run of STAT_BOOST_TARGET_PARTICLES particles. |
#define | STAT_BOOST_TARGET_FLARES 32 | |
#define | STAT_BOOST_FLARE_SPIN (TRIG_TURN / 64) | How far the flares turn about the target each tick. |
#define | STAT_BOOST_FLARE_SIZE_MAX 6 | A flare is drawn at size STAT_BOOST_FLARE_SIZE_MAX at depth STAT_BOOST_FLARE_DEPTH_NEAR or nearer, one size smaller every STAT_BOOST_FLARE_DEPTH_STEP farther, and at size 1 from STAT_BOOST_FLARE_DEPTH_FAR on. |
#define | STAT_BOOST_FLARE_DEPTH_NEAR 314 | |
#define | STAT_BOOST_FLARE_DEPTH_STEP 64 | |
#define | STAT_BOOST_FLARE_DEPTH_FAR | |
#define | STAT_BOOST_DJINNI_SWAY 20 | How far the prelude's Djinni sways to either side, in pixels. |
#define | STAT_BOOST_PARTY_CANVAS_X (DISPLAY_WIDTH * 4 / 5 - CANVAS_SIZE) | The shift that sets the canvas, shown 1.25 times as wide, against the screen's right edge over the party. |
#define | STAT_REDUCTION_SHARD_PICTURES 9600 | The shard picture in the sprite sheet, then its DIMMED_COPIES - 1 dimmed copies. |
#define | STAT_REDUCTION_SHARD_BYTES 696 | bytes in each copy |
#define | STAT_REDUCTION_TARGET_PARTICLES 32 | Each target throws STAT_REDUCTION_TARGET_SHARDS shards from its own run of STAT_REDUCTION_TARGET_PARTICLES particles, STAT_REDUCTION_TARGET_DELAY ticks after the target before it. |
#define | STAT_REDUCTION_TARGET_SHARDS 24 | |
#define | STAT_REDUCTION_TARGET_DELAY 4 |
Enumerations
| Name | Description | |
|---|---|---|
enum | STAT_BOOST_MODE { STAT_BOOST_IMPACT, STAT_BOOST_GUARD, STAT_BOOST_WARD, STAT_B … } | The stat boosts' modes (btEffectRunStatBoost), each named for the effect that plays it. |
enum | STAT_REDUCTION_MODE { STAT_REDUCTION_DULL, STAT_REDUCTION_IMPAIR, STAT_REDUCTION_W … } | The stat reductions' modes (btEffectRunStatReduction). |
enum | STAT_BOOST_SHEET { STAT_BOOST_FLARES, STAT_BOOST_BURST, STAT_BOOST_PICTURE, STA … } | Where each picture sits in the sprite sheet. |
Functions
| Name | Description | |
|---|---|---|
void | btEffectRunImpact (BATTLE_EFFECT_PARM *args) | Light swirls into each target and bursts, then a dagger appears in Mars colours. |
void | btEffectRunGuard (BATTLE_EFFECT_PARM *args) | Light swirls into each target and bursts, then a shield appears in Mars colours. |
void | btEffectRunWard (BATTLE_EFFECT_PARM *args) | Light swirls into each target and bursts, then a shield appears in Jupiter colours. |
void | btEffectRunGranite (BATTLE_EFFECT_PARM *args) | Light swirls into each target and bursts, then a pane of light appears in Venus colours. |
void | btEffectRunFlash (BATTLE_EFFECT_PARM *args) | Light swirls into each target and bursts, then a pane of light appears in Mars colours. |
void | btEffectRunZephyr (BATTLE_EFFECT_PARM *args) | Light swirls into each target and bursts, then a gust of wind sweeps across it in the colours already loaded, as this is the one boost that keeps the palette. |
void | btEffectRunStatBoost (BATTLE_EFFECT_PARM *args, Uint32 mode) | Flares of light swirl in to the centre of each target in turn and burst, and the mode's picture plays over it. |
void | btEffectRunDull (BATTLE_EFFECT_PARM *args) | A dagger appears over each target and breaks into shards that fade through darker copies, in the pink burst's colours. |
void | btEffectRunImpair (BATTLE_EFFECT_PARM *args) | A shield appears over each target and breaks into shards that fade through darker copies, in the glow orb's colours. |
void | btEffectRunWeaken (BATTLE_EFFECT_PARM *args) | A shield appears over each target and breaks into fading shards, in the pink burst's colours. |
void | btEffectRunUnusedStatReduction (BATTLE_EFFECT_PARM *args) | Breaks the shield sprite into fading shards as Weaken does; no effect table entry reaches it. |
void | btEffectRunStatReduction (BATTLE_EFFECT_PARM *args, Sint32 mode) | A dagger (Dull) or a shield (the others) appears over each target and breaks into shards that fly off and fade. |
Description
Stat boosts and reductions (Impact, Guard, Ward, Dull, Weaken ...). Part of
battle_effect.c.
Macros in detail
STAT_BOOST_BURST_TICK
#define STAT_BOOST_BURST_TICK 52
When the first target's flares burst and its sprite appears, with the damage;
each later target follows STAT_BOOST_TARGET_DELAY ticks behind.
Referenced by btEffectRunStatBoost().
Definition at line 91 of file battle_effect_stat_change.c.
STAT_BOOST_SPRITE_TICK
#define STAT_BOOST_SPRITE_TICK 80
Referenced by btEffectRunStatBoost().
Definition at line 92 of file battle_effect_stat_change.c.
STAT_BOOST_TARGET_DELAY
#define STAT_BOOST_TARGET_DELAY 8
Referenced by btEffectRunStatBoost().
Definition at line 93 of file battle_effect_stat_change.c.
STAT_CHANGE_PARTICLES
#define STAT_CHANGE_PARTICLES (PARTICLE_POOL_COUNT / 2)
The particles both kinds of stat change set out: the first half of the pool.
Referenced by btEffectRunStatBoost() and btEffectRunStatReduction().
Definition at line 96 of file battle_effect_stat_change.c.
STAT_BOOST_TARGET_PARTICLES
#define STAT_BOOST_TARGET_PARTICLES 64
Each target swirls in STAT_BOOST_TARGET_FLARES flares from its own run of
STAT_BOOST_TARGET_PARTICLES particles.
Referenced by btEffectRunStatBoost().
Definition at line 99 of file battle_effect_stat_change.c.
STAT_BOOST_TARGET_FLARES
#define STAT_BOOST_TARGET_FLARES 32
Referenced by btEffectRunStatBoost().
Definition at line 100 of file battle_effect_stat_change.c.
STAT_BOOST_FLARE_SPIN
#define STAT_BOOST_FLARE_SPIN (TRIG_TURN / 64)
How far the flares turn about the target each tick.
Referenced by btEffectRunStatBoost().
Definition at line 102 of file battle_effect_stat_change.c.
STAT_BOOST_FLARE_SIZE_MAX
#define STAT_BOOST_FLARE_SIZE_MAX 6
A flare is drawn at size STAT_BOOST_FLARE_SIZE_MAX at depth
STAT_BOOST_FLARE_DEPTH_NEAR or nearer, one size smaller every
STAT_BOOST_FLARE_DEPTH_STEP farther, and at size 1 from
STAT_BOOST_FLARE_DEPTH_FAR on.
Referenced by btEffectRunStatBoost().
Definition at line 107 of file battle_effect_stat_change.c.
STAT_BOOST_FLARE_DEPTH_NEAR
#define STAT_BOOST_FLARE_DEPTH_NEAR 314
Referenced by btEffectRunStatBoost().
Definition at line 108 of file battle_effect_stat_change.c.
STAT_BOOST_FLARE_DEPTH_STEP
#define STAT_BOOST_FLARE_DEPTH_STEP 64
Referenced by btEffectRunStatBoost().
Definition at line 109 of file battle_effect_stat_change.c.
STAT_BOOST_FLARE_DEPTH_FAR
#define STAT_BOOST_FLARE_DEPTH_FAR
Referenced by btEffectRunStatBoost().
Definition at line 110 of file battle_effect_stat_change.c.
STAT_BOOST_DJINNI_SWAY
#define STAT_BOOST_DJINNI_SWAY 20
How far the prelude's Djinni sways to either side, in pixels.
Referenced by btEffectRunStatBoost().
Definition at line 114 of file battle_effect_stat_change.c.
STAT_BOOST_PARTY_CANVAS_X
#define STAT_BOOST_PARTY_CANVAS_X (DISPLAY_WIDTH * 4 / 5 - CANVAS_SIZE)
The shift that sets the canvas, shown 1.25 times as wide, against the screen's right edge over the party.
Referenced by btEffectRunStatBoost().
Definition at line 117 of file battle_effect_stat_change.c.
STAT_REDUCTION_SHARD_PICTURES
#define STAT_REDUCTION_SHARD_PICTURES 9600
The shard picture in the sprite sheet, then its DIMMED_COPIES - 1 dimmed
copies.
Referenced by btEffectRunStatReduction().
Definition at line 567 of file battle_effect_stat_change.c.
STAT_REDUCTION_SHARD_BYTES
#define STAT_REDUCTION_SHARD_BYTES 696
bytes in each copy
Referenced by btEffectRunStatReduction().
Definition at line 568 of file battle_effect_stat_change.c.
STAT_REDUCTION_TARGET_PARTICLES
#define STAT_REDUCTION_TARGET_PARTICLES 32
Each target throws STAT_REDUCTION_TARGET_SHARDS shards from its own run of
STAT_REDUCTION_TARGET_PARTICLES particles, STAT_REDUCTION_TARGET_DELAY ticks
after the target before it.
Referenced by btEffectRunStatReduction().
Definition at line 572 of file battle_effect_stat_change.c.
STAT_REDUCTION_TARGET_SHARDS
#define STAT_REDUCTION_TARGET_SHARDS 24
Referenced by btEffectRunStatReduction().
Definition at line 573 of file battle_effect_stat_change.c.
STAT_REDUCTION_TARGET_DELAY
#define STAT_REDUCTION_TARGET_DELAY 4
Referenced by btEffectRunStatReduction().
Definition at line 574 of file battle_effect_stat_change.c.
Enumerations in detail
STAT_BOOST_MODE
enum STAT_BOOST_MODE
The stat boosts' modes (btEffectRunStatBoost), each named for the effect that
plays it.
| Enumerator | Value | Description |
|---|---|---|
STAT_BOOST_IMPACT | a dagger, in Mars colours | |
STAT_BOOST_GUARD | a shield, in Mars colours | |
STAT_BOOST_WARD | a shield, in Jupiter colours | |
STAT_BOOST_GRANITE | a pane of light, in Venus colours | |
STAT_BOOST_ZEPHYR | a gust of wind, keeping the palette | |
STAT_BOOST_FLASH | a pane of light, in Mars colours |
Definition at line 6 of file battle_effect_stat_change.c.
STAT_REDUCTION_MODE
enum STAT_REDUCTION_MODE
The stat reductions' modes (btEffectRunStatReduction).
| Enumerator | Value | Description |
|---|---|---|
STAT_REDUCTION_DULL | a dagger, in the pink burst's colours | |
STAT_REDUCTION_IMPAIR | a shield, in the glow orb's colours | |
STAT_REDUCTION_WEAKEN | a shield, in the pink burst's colours | |
STAT_REDUCTION_UNUSED | played as STAT_REDUCTION_WEAKEN; unused |
Definition at line 17 of file battle_effect_stat_change.c.
STAT_BOOST_SHEET
enum STAT_BOOST_SHEET
Where each picture sits in the sprite sheet.
| Enumerator | Value | Description |
|---|---|---|
STAT_BOOST_FLARES | 0 | flares (BlueGlowSheet) |
STAT_BOOST_BURST | GLOW_SHEET_ROOM | six bursts of light (GlowOrb) |
STAT_BOOST_PICTURE | 11150 | the picture the mode picks |
STAT_BOOST_DJINNI | 26048 | the Djinni |
Definition at line 81 of file battle_effect_stat_change.c.
Functions in detail
btEffectRunImpact
void btEffectRunImpact(BATTLE_EFFECT_PARM *args)
Light swirls into each target and bursts, then a dagger appears in Mars colours.
Abilities: Impact, High Impact, Demon Spear, Angel Spear; Forge.





References btEffectRunStatBoost().
Referenced by BattleEffectHandlers.
Definition at line 29 of file battle_effect_stat_change.c.
btEffectRunGuard
void btEffectRunGuard(BATTLE_EFFECT_PARM *args)
Light swirls into each target and bursts, then a shield appears in Mars colours.
Abilities: Guard, Protect, Guardian, Protector; Corona.





References btEffectRunStatBoost().
Referenced by BattleEffectHandlers.
Definition at line 38 of file battle_effect_stat_change.c.
btEffectRunWard
void btEffectRunWard(BATTLE_EFFECT_PARM *args)
Light swirls into each target and bursts, then a shield appears in Jupiter colours.
Abilities: Ward, Resist, Magic Shell, Magic Shield; Breeze.




References btEffectRunStatBoost().
Referenced by BattleEffectHandlers.
Definition at line 47 of file battle_effect_stat_change.c.
btEffectRunGranite
void btEffectRunGranite(BATTLE_EFFECT_PARM *args)
Light swirls into each target and bursts, then a pane of light appears in Venus colours.
Abilities: Granite.

References btEffectRunStatBoost().
Referenced by BattleEffectHandlers.
Definition at line 56 of file battle_effect_stat_change.c.
btEffectRunFlash
void btEffectRunFlash(BATTLE_EFFECT_PARM *args)
Light swirls into each target and bursts, then a pane of light appears in Mars colours.
Abilities: Flash.
References btEffectRunStatBoost().
Referenced by BattleEffectHandlers.
Definition at line 65 of file battle_effect_stat_change.c.
btEffectRunZephyr
void btEffectRunZephyr(BATTLE_EFFECT_PARM *args)
Light swirls into each target and bursts, then a gust of wind sweeps across it in the colours already loaded, as this is the one boost that keeps the palette.
Abilities: Zephyr.
References btEffectRunStatBoost().
Referenced by BattleEffectHandlers.
Definition at line 75 of file battle_effect_stat_change.c.
btEffectRunStatBoost
void btEffectRunStatBoost(BATTLE_EFFECT_PARM *args, Uint32 mode)
Flares of light swirl in to the centre of each target in turn and burst, and the mode's picture plays over it.
References btEffectEndCanvasLayer(), btEffectRunDjinniEntrance(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btObjectGetStub(), btProjectionPoint(), btProjectionScaledUnit(), btResourceLoadAndDecompress(), btUnitGetEffectHeightStub(), Sint32, state, syCloseEvent(), syCos(), syHeapSlotRelease(), syMatrixTranslateVector(), syRandom(), syResourceGetTableEntry(), syRotX(), syRotY(), syRotZ(), sySetEvent(), sySin(), sySoundPlayStub(), sySquartIWRAM() and syWordsCopy().
Referenced by btEffectRunFlash(), btEffectRunGranite(), btEffectRunGuard(), btEffectRunImpact(), btEffectRunWard() and btEffectRunZephyr().
Definition at line 121 of file battle_effect_stat_change.c.
btEffectRunDull
void btEffectRunDull(BATTLE_EFFECT_PARM *args)
A dagger appears over each target and breaks into shards that fade through darker copies, in the pink burst's colours.
Abilities: Dull, Blunt.


References btEffectRunStatReduction().
Referenced by BattleEffectHandlers.
Definition at line 535 of file battle_effect_stat_change.c.
btEffectRunImpair
void btEffectRunImpair(BATTLE_EFFECT_PARM *args)
A shield appears over each target and breaks into shards that fade through darker copies, in the glow orb's colours.
Abilities: Impair, Debilitate.


References btEffectRunStatReduction().
Referenced by BattleEffectHandlers and btEffectRunCastingImpact().
Definition at line 544 of file battle_effect_stat_change.c.
btEffectRunWeaken
void btEffectRunWeaken(BATTLE_EFFECT_PARM *args)
A shield appears over each target and breaks into fading shards, in the pink burst's colours.
Abilities: Weaken, Enfeeble.


References btEffectRunStatReduction().
Referenced by BattleEffectHandlers.
Definition at line 553 of file battle_effect_stat_change.c.
btEffectRunUnusedStatReduction
void btEffectRunUnusedStatReduction(BATTLE_EFFECT_PARM *args)
Breaks the shield sprite into fading shards as Weaken does; no effect table entry reaches it.
References btEffectRunStatReduction().
Definition at line 560 of file battle_effect_stat_change.c.
btEffectRunStatReduction
void btEffectRunStatReduction(BATTLE_EFFECT_PARM *args, Sint32 mode)
A dagger (Dull) or a shield (the others) appears over each target and breaks into shards that fly off and fade.
References btEffectBuildCanvasBlitters(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btProjectionPoint(), btResourceLoadAndDecompress(), Sint32, StatChangeShardHeights, StatChangeShardPictures, StatChangeShardWidths, state, syCos(), syMatrixTranslateVector(), syRandom(), syResourceGetTableEntry(), sySin(), sySoundPlayStub() and syWordsCopy().
Referenced by btEffectRunDull(), btEffectRunImpair(), btEffectRunUnusedStatReduction() and btEffectRunWeaken().
Definition at line 578 of file battle_effect_stat_change.c.