Alchemy

target_motes.c

Status motes: Taint, Delude, Paralyze, Sleep, Curse ....

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

Status motes: Taint, Delude, Paralyze, Sleep, Curse .... Part of effect.c, the battle effect object, compiled only through it.

Functions

BattleFx_RunTaint

void BattleFx_RunTaint(struct BattleEffectArgument *effect)

Lime smoke (effect->variant 0) or pink smoke.

Abilities: Taint, Poison (kind 32).

Used by gBattleFx_EffectHandlers.

Line 20

BattleFx_RunTargetMotesMode1

UNUSED void BattleFx_RunTargetMotesMode1(struct BattleEffectArgument *effect)

Pink smoke; no ☀️ effect table entry points here.

Line 29

BattleFx_RunDelude

void BattleFx_RunDelude(struct BattleEffectArgument *effect)

Cyan smoke that rises.

Abilities: Delude, Confuse, Mist (kind 33).

Used by gBattleFx_EffectHandlers.

Line 36

BattleFx_RunParalyze

void BattleFx_RunParalyze(struct BattleEffectArgument *effect)

Rising smoke with glints.

Abilities: Paralyze (kind 36).

Used by gBattleFx_EffectHandlers.

Line 42

BattleFx_RunHeartrender

void BattleFx_RunHeartrender(struct BattleEffectArgument *effect)

Hearts.

Abilities: Heartrender (kind 346); kind 35 is used by no ability.

Used by gBattleFx_EffectHandlers.

Line 48

BattleFx_RunMysticFlame

void BattleFx_RunMysticFlame(struct BattleEffectArgument *effect)

Glowing orbs.

Abilities: Mystic Flame (kind 312).

Used by BattleFx_RunCastingImpact, gBattleFx_EffectHandlers.

Line 54

BattleFx_RunDemonFire

void BattleFx_RunDemonFire(struct BattleEffectArgument *effect)

Glowing orbs in Mars Djinn colours, and the user strikes.

Abilities: Demon Fire (kind 64).

Used by gBattleFx_EffectHandlers.

Line 60

BattleFx_RunDrown

void BattleFx_RunDrown(struct BattleEffectArgument *effect)

Vortex motes.

Abilities: Drown (kind 66).

Used by gBattleFx_EffectHandlers.

Line 66

BattleFx_RunTargetMotes

void BattleFx_RunTargetMotes(struct BattleEffectArgument *effect, u32 mode)

Around each target in turn, 8 frames apart, motes (smoke, hearts, orbs)
turn about a point 20 pixels up, either closing in on it or rising, and
the target flashes until the end; the battle shows the damage 32 frames
before the end. The effect layer ripples, except in modes 0, 1 and 3.
mode : 0 lime smoke, 1 pink smoke, 2 cyan smoke, 3 smoke with glints,
       4 hearts, 5 glowing orbs, 6 vortex motes, 7 orbs in Mars Djinn
       colours, with the user stepping up to strike the first target.

Called by the wrappers above: BattleFx_RunTaint (mode 0 or 1), BattleFx_RunDelude (2), BattleFx_RunParalyze (3), BattleFx_RunHeartrender (4), BattleFx_RunMysticFlame (5), BattleFx_RunDrown (6) and BattleFx_RunDemonFire (7).

Overwrites PARTICLES 0 to 511, loads the mode's palette into the first 64 background colours, and in the rippling modes writes work->bg2xLines each frame for BattleFx_ArmBg2AffineHBlankDma, which it schedules and removes. It builds both blitters afresh for each target every frame and releases them again, mode 3 a mirrored one for each glint too, so it ends with none held. Mode 7 sets work->shakeFrames.

Used by BattleFx_RunDelude, BattleFx_RunDemonFire, BattleFx_RunDrown, BattleFx_RunHeartrender, BattleFx_RunMysticFlame, BattleFx_RunParalyze, BattleFx_RunTaint, BattleFx_RunTargetMotesMode1.

Line 106

BattleFx_RunSleep

void BattleFx_RunSleep(struct BattleEffectArgument *effect)

Twelve sheep drop onto the targets' side, one every 4 frames, tumbling through eight images (the last four mirrored both ways); each target takes its damage pose in turn from frame 64, and the battle shows the result on frame 80.

Abilities: Sleep (kind 37).

148 frames. PARTICLES 0 to 31 are the sheep, canvas pixels in 16.16; only the first twelve fall. Loads the sheep palette into the first 64 background colours and sets REG_BLDCNT and BG2's affine registers (the narrow canvas, moved over the party's side when side is 1).

Used by gBattleFx_EffectHandlers.

Line 356

Macros

TARGET_MOTES_START_WIDE

#define TARGET_MOTES_START_WIDE(mode)

Styles whose motes start in a wide ball and last 64 frames more.

Used by BattleFx_RunTargetMotes.

Line 70

TARGET_MOTES_CLOSE_IN

#define TARGET_MOTES_CLOSE_IN(mode)

Styles whose motes close in on the target; the others rise.

Used by BattleFx_RunTargetMotes.

Line 73

TARGET_MOTES_RIPPLE

#define TARGET_MOTES_RIPPLE(mode) (!((mode) <= 1 || (mode) == 3))

Modes other than 0, 1 and 3 ripple the canvas: BG2's x is set line by line from work->bg2xLines (BattleFx_ArmBg2AffineHBlankDma).

Used by BattleFx_RunTargetMotes.

Line 78

Also, macros without a comment: TARGET_MOTES, TARGET_MOTES_SLOTS, TARGET_MOTES_CYCLE, SLEEP_FRAMES, SLEEP_SEEDED, SLEEP_SHEEP.

On this page