Alchemy

healing.c

Healing motes: Ply, Wish, Cure, Cure Poison.

games/tbs/src/effect/parts/healing.c on GitHub

Healing motes: Ply, Wish, Cure, Cure Poison. Part of effect.c, the battle effect object, compiled only through it.

Functions

BattleFx_RunPly

void BattleFx_RunPly(struct BattleEffectArgument *effect)

Ply: sparkles of light swirl around each target and close in on it, in the ice shard's or ice block's colours; the canvas is shown at its own width, centred on the first target.

Abilities: Ply, Ply Well, Pure Ply, Herb, Nut, Vial, Potion, Soothing Water (kind 22); Fizz (kind 204).

Used by gBattleFx_EffectHandlers.

Line 25

BattleFx_RunWish

void BattleFx_RunWish(struct BattleEffectArgument *effect)

Wish (scattering style 1): healing motes tumble in from all around each target.

Abilities: Wish, Wish Well, Pure Wish (kind 23); Regenerate (kind 44); Reflect (kind 45); Spritz (kind 206).

Used by gBattleFx_EffectHandlers.

Line 33

BattleFx_RunCure

void BattleFx_RunCure(struct BattleEffectArgument *effect)

Cure (mode 2): a ring of healing motes below each target closes in on it, in the blast sheet's colours.

Abilities: Cure, Cure Well, Potent Cure, Corn (kind 21); Worms (kind 352).

Used by gBattleFx_EffectHandlers.

Line 40

BattleFx_RunCurePoison

void BattleFx_RunCurePoison(struct BattleEffectArgument *effect)

Cure Poison: sparkles twinkle around each target, four more a frame, and go out one by one instead of closing in.

Abilities: Cure Poison, Restore, Antidote, Elixir (kind 24).

Used by gBattleFx_EffectHandlers.

Line 47

BattleFx_RunHealingMotesMode4

UNUSED void BattleFx_RunHealingMotesMode4(struct BattleEffectArgument *effect)

Healing sparkles with scattering style 4, sent out from each target, as Cure Poison plays them for variants other than 0. No effect table entry reaches this one.

Line 58

BattleFx_RunTonic

void BattleFx_RunTonic(struct BattleEffectArgument *effect)

Tonic (scattering style 5): sparkles twinkle around each target, turning on two axes, and go out one by one; mode 5 plays as mode 4 does.

Abilities: Tonic (kind 208).

Used by gBattleFx_EffectHandlers.

Line 65

BattleFx_RunPsyCrystal

void BattleFx_RunPsyCrystal(struct BattleEffectArgument *effect)

Psy Crystal: healing motes gather around each target in the Mars Djinni palette; with a prelude, a Mars Djinni appears first.

Abilities: Psy Crystal, Adept Ring, Ember (kind 212).

Used by gBattleFx_EffectHandlers.

Line 72

BattleFx_RunHealingMotes

void BattleFx_RunHealingMotes(struct BattleEffectArgument *effect, u32 mode)

Healing sparkles: motes of light scattered around each target swirl in towards it, one target every 8 frames, with the recovery sound on each target's 20th frame and a tint on its 36th.

Called by the wrappers above: BattleFx_RunPly (mode 0), BattleFx_RunWish (1), BattleFx_RunCure (2), BattleFx_RunCurePoison (3 or 4), BattleFx_RunTonic (5) and BattleFx_RunPsyCrystal (6).

Sets work->effect, overwrites PARTICLES 0 to 511 and the first 64 colours of the background palette, decodes into the battle sheet slot and work->sheet, and in mode 0 writes REG_BG2X and REG_BG2PA. After a djinni prelude it clears effect->variant, so the variant's mote count and resource fall back to variant 0's. The transfer callback it adds is removed again at the end, with the blitters and the canvas layer.

effect: the targets. With prelude 1, a djinni (Mars in mode 6, Mercury
        otherwise) appears first, sways and rises. variant picks the
        motes per target (0: 32, 2: 128, others: 64) and, in modes 0,
        1, 3, 4 and 5, the resource (0: ice shard, others: ice block).
mode: how the motes scatter and turn. Only mode 0 shows the canvas at
      its own width, centred on the first target. Modes 3, 4 and 5 put
      the motes out one by one instead of drawing them in; modes 0, 3,
      4 and 5 draw sparkle dots. Mode 6 takes the Mars resource, mode 2
      the blast resource.

Used by BattleFx_RunCure, BattleFx_RunCurePoison, BattleFx_RunHealingMotesMode4, BattleFx_RunPly, BattleFx_RunPsyCrystal, BattleFx_RunTonic, BattleFx_RunWish.

Line 107

Macros, without a comment: HEALING_DJINNI_CELLS, HEALING_MOTES, HEALING_SLOTS, HEALING_STAGGER, HEALING_SOUND_DELAY, HEALING_TINT_DELAY, HEALING_TINT_FRAMES, HEALING_DAMAGE_FRAME.

On this page