Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_target_motes.c

The status motes of Taint, Delude, Paralyze, Heartrender, Mystic Flame, Demon Fire and Drown, then Sleep's sheep and Curse's flames. More…

Included by battle_effect.c.

Macros

NameDescription
#defineTARGET_MOTES_START_WIDE (mode)Styles whose motes start in a wide ball, and run on TARGET_MOTES_WIDE_RUN_ON ticks after the last target's motes start.
#defineTARGET_MOTES_CLOSE_IN (mode)Styles whose motes close in on the target; the others rise.
#defineTARGET_MOTES_RIPPLE (mode)Every style but Taint's smokes and Paralyze ripples the canvas.
#defineTARGET_MOTES 512motes scattered at the start
#defineTARGET_MOTES_SLOTS 64particles reserved for each target
#defineTARGET_MOTES_CYCLE 24ticks of a mote's image cycle
#defineTARGET_MOTES_PER_TARGET 16The motes about each target: TARGET_MOTES_PER_TARGET, or Demon Fire's orbs or Drown's drops.
#defineDEMON_FIRE_ORBS 24
#defineDROWN_DROPS 32
#defineTARGET_MOTES_STAGGER 8The ticks between one target's motes starting and the next's.
#defineTARGET_MOTES_RUN_ON 32The ticks the effect runs on after the last target's motes start.
#defineTARGET_MOTES_WIDE_RUN_ON 64
#defineTARGET_MOTES_DAMAGE_END_TICKS 32The ticks the effect runs on after the damage shows.
#defineDEMON_FIRE_LEAP_TICKS 14
#defineDEMON_FIRE_APPROACH_TICKS 16
#defineDROWN_DROP_WIDTH 12VortexSheet's water drop, after its three 16x64 swirls.
#defineDROWN_DROP_HEIGHT 24
#defineDROWN_DROP_PICTURE (3 * 16 * 64)
#defineSLEEP_TICKS 148
#defineSLEEP_SEEDED 32Particles cleared at the start.
#defineSLEEP_SHEEP 12Sheep dropped.
#defineSLEEP_SHEEP_STAGGER 4The sheep drop SLEEP_SHEEP_STAGGER ticks apart; the targets fall asleep SLEEP_TARGET_STAGGER ticks apart from SLEEP_ASLEEP_TICK, and the damage shows at SLEEP_DAMAGE_TICK.
#defineSLEEP_ASLEEP_TICK 64
#defineSLEEP_TARGET_STAGGER 16
#defineSLEEP_DAMAGE_TICK 80
#defineSLEEP_GROUND_Y toFIXED(92)The ground the sheep were meant to bounce off.
#defineSHEEP_WIDTH 32SheepSheet: four pictures, then the four drawn flipped.
#defineSHEEP_HEIGHT 32
#defineSHEEP_PICTURES 4
#defineSHEEP_TUMBLE_STEP 16A sheep's variant counts its tumble, z a tick: it turns to its next picture every SHEEP_TUMBLE_STEP.
#defineCURSE_CANDLE_TICKS 72how long each target's candle burns
#defineCURSE_STAGGER 16The ticks between one target's candle and the next's.
#defineCURSE_FLICKER_TICKS 6The flame flickers through its pictures, CURSE_FLICKER_TICKS a picture.
#defineCURSE_FLAME_WIDTH 16FlameColumnSheet: the flame's nine pictures, then the candle.
#defineCURSE_FLAME_HEIGHT 12
#defineCURSE_FLAME_PICTURES 9
#defineCURSE_CANDLE_WIDTH 16
#defineCURSE_CANDLE_HEIGHT 20
#defineCURSE_CANDLE_PICTURE (CURSE_FLAME_PICTURES * PICTURE_BYTES(CURSE_FLAME))

Enumerations

NameDescription
enumTARGET_MOTES_MODE { TARGET_MOTES_TAINT, TARGET_MOTES_PINK_SMOKE, TARGET_MOTES_DE … }The target motes' styles (btEffectRunTargetMotes), each named for the effect that plays it.
enumanonymous enum { TARGET_MOTES_GLINT_PICTURES }Where Paralyze keeps its glint images in state->sheet.

Functions

NameDescription
voidbtEffectRunTaint (BATTLE_EFFECT_PARM *args)Lime smoke swirls in on each target, or pink smoke for a stronger variant.
voidbtEffectRunUnusedPinkSmoke (BATTLE_EFFECT_PARM *args)Pink smoke swirls in on each target, as Taint shows it for a stronger variant.
voidbtEffectRunDelude (BATTLE_EFFECT_PARM *args)Cyan smoke rises around each target.
voidbtEffectRunParalyze (BATTLE_EFFECT_PARM *args)Smoke rises around each target, and glints sparkle near it.
voidbtEffectRunHeartrender (BATTLE_EFFECT_PARM *args)Hearts close in on each target, turning as they come.
voidbtEffectRunMysticFlame (BATTLE_EFFECT_PARM *args)Glowing orbs spiral in on each target.
voidbtEffectRunDemonFire (BATTLE_EFFECT_PARM *args)Glowing orbs in Mars Djinn colours rise around each target, and then the user steps up to the first target and strikes it.
voidbtEffectRunDrown (BATTLE_EFFECT_PARM *args)Thirty-two water drops spiral in on each target.
voidbtEffectRunTargetMotes (BATTLE_EFFECT_PARM *args, Uint32 mode)Around each target in turn, motes (smoke, hearts, orbs) close in on it or rise, and the target flashes.
voidbtEffectRunSleep (BATTLE_EFFECT_PARM *args)Twelve sheep drop onto the targets' side, tumbling, and each target falls asleep in turn.
voidbtEffectRunCurse (BATTLE_EFFECT_PARM *args)A candle stands on each target's head in turn, a small flame burning on it.

Description

The status motes of Taint, Delude, Paralyze, Heartrender, Mystic Flame, Demon Fire and Drown, then Sleep's sheep and Curse's flames. Part of battle_effect.c.

Macros in detail

TARGET_MOTES_START_WIDE

#define TARGET_MOTES_START_WIDE(mode)

Styles whose motes start in a wide ball, and run on TARGET_MOTES_WIDE_RUN_ON ticks after the last target's motes start.

Referenced by btEffectRunTargetMotes().

Definition at line 96 of file battle_effect_target_motes.c.

TARGET_MOTES_CLOSE_IN

#define TARGET_MOTES_CLOSE_IN(mode)

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

Referenced by btEffectRunTargetMotes().

Definition at line 101 of file battle_effect_target_motes.c.

TARGET_MOTES_RIPPLE

#define TARGET_MOTES_RIPPLE(mode)

Every style but Taint's smokes and Paralyze ripples the canvas.

Referenced by btEffectRunTargetMotes().

Definition at line 106 of file battle_effect_target_motes.c.

TARGET_MOTES

#define TARGET_MOTES 512

motes scattered at the start

Referenced by btEffectRunTargetMotes().

Definition at line 115 of file battle_effect_target_motes.c.

TARGET_MOTES_SLOTS

#define TARGET_MOTES_SLOTS 64

particles reserved for each target

Referenced by btEffectRunTargetMotes().

Definition at line 116 of file battle_effect_target_motes.c.

TARGET_MOTES_CYCLE

#define TARGET_MOTES_CYCLE 24

ticks of a mote's image cycle

Referenced by btEffectRunTargetMotes().

Definition at line 117 of file battle_effect_target_motes.c.

TARGET_MOTES_PER_TARGET

#define TARGET_MOTES_PER_TARGET 16

The motes about each target: TARGET_MOTES_PER_TARGET, or Demon Fire's orbs or Drown's drops.

Referenced by btEffectRunTargetMotes().

Definition at line 121 of file battle_effect_target_motes.c.

DEMON_FIRE_ORBS

#define DEMON_FIRE_ORBS 24

Referenced by btEffectRunTargetMotes().

Definition at line 122 of file battle_effect_target_motes.c.

DROWN_DROPS

#define DROWN_DROPS 32

Referenced by btEffectRunTargetMotes().

Definition at line 123 of file battle_effect_target_motes.c.

TARGET_MOTES_STAGGER

#define TARGET_MOTES_STAGGER 8

The ticks between one target's motes starting and the next's.

Referenced by btEffectRunTargetMotes().

Definition at line 125 of file battle_effect_target_motes.c.

TARGET_MOTES_RUN_ON

#define TARGET_MOTES_RUN_ON 32

The ticks the effect runs on after the last target's motes start.

Referenced by btEffectRunTargetMotes().

Definition at line 127 of file battle_effect_target_motes.c.

TARGET_MOTES_WIDE_RUN_ON

#define TARGET_MOTES_WIDE_RUN_ON 64

Referenced by btEffectRunTargetMotes().

Definition at line 128 of file battle_effect_target_motes.c.

TARGET_MOTES_DAMAGE_END_TICKS

#define TARGET_MOTES_DAMAGE_END_TICKS 32

The ticks the effect runs on after the damage shows. Demon Fire's user sets off DEMON_FIRE_LEAP_TICKS before then and reaches the first target over DEMON_FIRE_APPROACH_TICKS, striking it as the damage shows.

Referenced by btEffectRunTargetMotes().

Definition at line 132 of file battle_effect_target_motes.c.

DEMON_FIRE_LEAP_TICKS

#define DEMON_FIRE_LEAP_TICKS 14

Referenced by btEffectRunTargetMotes().

Definition at line 133 of file battle_effect_target_motes.c.

DEMON_FIRE_APPROACH_TICKS

#define DEMON_FIRE_APPROACH_TICKS 16

Referenced by btEffectRunTargetMotes().

Definition at line 134 of file battle_effect_target_motes.c.

DROWN_DROP_WIDTH

#define DROWN_DROP_WIDTH 12

VortexSheet's water drop, after its three 16x64 swirls.

Referenced by btEffectRunTargetMotes().

Definition at line 136 of file battle_effect_target_motes.c.

DROWN_DROP_HEIGHT

#define DROWN_DROP_HEIGHT 24

Referenced by btEffectRunTargetMotes().

Definition at line 137 of file battle_effect_target_motes.c.

DROWN_DROP_PICTURE

#define DROWN_DROP_PICTURE (3 * 16 * 64)

Referenced by btEffectRunTargetMotes().

Definition at line 138 of file battle_effect_target_motes.c.

SLEEP_TICKS

#define SLEEP_TICKS 148

Referenced by btEffectRunSleep().

Definition at line 437 of file battle_effect_target_motes.c.

SLEEP_SEEDED

#define SLEEP_SEEDED 32

Particles cleared at the start.

Referenced by btEffectRunSleep().

Definition at line 439 of file battle_effect_target_motes.c.

SLEEP_SHEEP

#define SLEEP_SHEEP 12

Sheep dropped.

Referenced by btEffectRunSleep().

Definition at line 441 of file battle_effect_target_motes.c.

SLEEP_SHEEP_STAGGER

#define SLEEP_SHEEP_STAGGER 4

The sheep drop SLEEP_SHEEP_STAGGER ticks apart; the targets fall asleep SLEEP_TARGET_STAGGER ticks apart from SLEEP_ASLEEP_TICK, and the damage shows at SLEEP_DAMAGE_TICK.

Referenced by btEffectRunSleep().

Definition at line 445 of file battle_effect_target_motes.c.

SLEEP_ASLEEP_TICK

#define SLEEP_ASLEEP_TICK 64

Referenced by btEffectRunSleep().

Definition at line 446 of file battle_effect_target_motes.c.

SLEEP_TARGET_STAGGER

#define SLEEP_TARGET_STAGGER 16

Referenced by btEffectRunSleep().

Definition at line 447 of file battle_effect_target_motes.c.

SLEEP_DAMAGE_TICK

#define SLEEP_DAMAGE_TICK 80

Referenced by btEffectRunSleep().

Definition at line 448 of file battle_effect_target_motes.c.

SLEEP_GROUND_Y

#define SLEEP_GROUND_Y toFIXED(92)

The ground the sheep were meant to bounce off.

Referenced by btEffectRunSleep().

Definition at line 450 of file battle_effect_target_motes.c.

SHEEP_WIDTH

#define SHEEP_WIDTH 32

SheepSheet: four pictures, then the four drawn flipped.

Referenced by btEffectRunSleep().

Definition at line 452 of file battle_effect_target_motes.c.

SHEEP_HEIGHT

#define SHEEP_HEIGHT 32

Referenced by btEffectRunSleep().

Definition at line 453 of file battle_effect_target_motes.c.

SHEEP_PICTURES

#define SHEEP_PICTURES 4

Referenced by btEffectRunSleep().

Definition at line 454 of file battle_effect_target_motes.c.

SHEEP_TUMBLE_STEP

#define SHEEP_TUMBLE_STEP 16

A sheep's variant counts its tumble, z a tick: it turns to its next picture every SHEEP_TUMBLE_STEP.

Referenced by btEffectRunSleep().

Definition at line 457 of file battle_effect_target_motes.c.

CURSE_CANDLE_TICKS

#define CURSE_CANDLE_TICKS 72

how long each target's candle burns

Referenced by btEffectRunCurse().

Definition at line 577 of file battle_effect_target_motes.c.

CURSE_STAGGER

#define CURSE_STAGGER 16

The ticks between one target's candle and the next's.

Referenced by btEffectRunCurse().

Definition at line 579 of file battle_effect_target_motes.c.

CURSE_FLICKER_TICKS

#define CURSE_FLICKER_TICKS 6

The flame flickers through its pictures, CURSE_FLICKER_TICKS a picture.

Referenced by btEffectRunCurse().

Definition at line 581 of file battle_effect_target_motes.c.

CURSE_FLAME_WIDTH

#define CURSE_FLAME_WIDTH 16

FlameColumnSheet: the flame's nine pictures, then the candle.

Referenced by btEffectRunCurse().

Definition at line 584 of file battle_effect_target_motes.c.

CURSE_FLAME_HEIGHT

#define CURSE_FLAME_HEIGHT 12

Referenced by btEffectRunCurse().

Definition at line 585 of file battle_effect_target_motes.c.

CURSE_FLAME_PICTURES

#define CURSE_FLAME_PICTURES 9

Referenced by btEffectRunCurse().

Definition at line 586 of file battle_effect_target_motes.c.

CURSE_CANDLE_WIDTH

#define CURSE_CANDLE_WIDTH 16

Referenced by btEffectRunCurse().

Definition at line 587 of file battle_effect_target_motes.c.

CURSE_CANDLE_HEIGHT

#define CURSE_CANDLE_HEIGHT 20

Referenced by btEffectRunCurse().

Definition at line 588 of file battle_effect_target_motes.c.

CURSE_CANDLE_PICTURE

#define CURSE_CANDLE_PICTURE (CURSE_FLAME_PICTURES * PICTURE_BYTES(CURSE_FLAME))

Referenced by btEffectRunCurse().

Definition at line 589 of file battle_effect_target_motes.c.

Enumerations in detail

TARGET_MOTES_MODE

enum TARGET_MOTES_MODE

The target motes' styles (btEffectRunTargetMotes), each named for the effect that plays it.

EnumeratorValueDescription
TARGET_MOTES_TAINTlime smoke closing in
TARGET_MOTES_PINK_SMOKEpink smoke closing in; Taint's stronger variant
TARGET_MOTES_DELUDEcyan smoke rising
TARGET_MOTES_PARALYZEsmoke rising, with glints
TARGET_MOTES_HEARTRENDERhearts closing in
TARGET_MOTES_MYSTIC_FLAMEglowing orbs closing in
TARGET_MOTES_DROWNwater drops closing in
TARGET_MOTES_DEMON_FIREorbs in Mars Djinn colours rising, then a strike

Definition at line 7 of file battle_effect_target_motes.c.

anonymous enum

enum { TARGET_MOTES_GLINT_PICTURES }

Where Paralyze keeps its glint images in state->sheet.

EnumeratorValueDescription
TARGET_MOTES_GLINT_PICTURES9600

Definition at line 110 of file battle_effect_target_motes.c.

Functions in detail

btEffectRunTaint

void btEffectRunTaint(BATTLE_EFFECT_PARM *args)

Lime smoke swirls in on each target, or pink smoke for a stronger variant.

Abilities: Taint, Poison.

Taint
Taint
Poison
Poison

References btEffectRunTargetMotes().

Referenced by BattleEffectHandlers.

Definition at line 28 of file battle_effect_target_motes.c.

btEffectRunUnusedPinkSmoke

void btEffectRunUnusedPinkSmoke(BATTLE_EFFECT_PARM *args)

Pink smoke swirls in on each target, as Taint shows it for a stronger variant. No effect table entry in The Broken Seal points here.

References btEffectRunTargetMotes().

Definition at line 40 of file battle_effect_target_motes.c.

btEffectRunDelude

void btEffectRunDelude(BATTLE_EFFECT_PARM *args)

Cyan smoke rises around each target.

Abilities: Delude, Confuse, Mist.

Delude
Delude
Confuse
Confuse
Mist
Mist

References btEffectRunTargetMotes().

Referenced by BattleEffectHandlers.

Definition at line 48 of file battle_effect_target_motes.c.

btEffectRunParalyze

void btEffectRunParalyze(BATTLE_EFFECT_PARM *args)

Smoke rises around each target, and glints sparkle near it.

Abilities: Paralyze.

Paralyze
Paralyze

References btEffectRunTargetMotes().

Referenced by BattleEffectHandlers.

Definition at line 56 of file battle_effect_target_motes.c.

btEffectRunHeartrender

void btEffectRunHeartrender(BATTLE_EFFECT_PARM *args)

Hearts close in on each target, turning as they come.

Abilities: Heartrender.

References btEffectRunTargetMotes().

Referenced by BattleEffectHandlers.

Definition at line 64 of file battle_effect_target_motes.c.

btEffectRunMysticFlame

void btEffectRunMysticFlame(BATTLE_EFFECT_PARM *args)

Glowing orbs spiral in on each target.

Abilities: Mystic Flame.

References btEffectRunTargetMotes().

Referenced by BattleEffectHandlers and btEffectRunCastingImpact().

Definition at line 72 of file battle_effect_target_motes.c.

btEffectRunDemonFire

void btEffectRunDemonFire(BATTLE_EFFECT_PARM *args)

Glowing orbs in Mars Djinn colours rise around each target, and then the user steps up to the first target and strikes it.

Abilities: Demon Fire.

References btEffectRunTargetMotes().

Referenced by BattleEffectHandlers.

Definition at line 81 of file battle_effect_target_motes.c.

btEffectRunDrown

void btEffectRunDrown(BATTLE_EFFECT_PARM *args)

Thirty-two water drops spiral in on each target.

Abilities: Drown.

References btEffectRunTargetMotes().

Referenced by BattleEffectHandlers.

Definition at line 89 of file battle_effect_target_motes.c.

btEffectRunTargetMotes

void btEffectRunTargetMotes(BATTLE_EFFECT_PARM *args, Uint32 mode)

Around each target in turn, motes (smoke, hearts, orbs) close in on it or rise, and the target flashes.

References BattleEffectGlintPictureHeights, BattleEffectGlintPictures, BattleEffectGlintPictureWidths, btCameraShake(), btEffectArmBg2AffineHBlankDMA(), btEffectEndCanvasLayer(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btMotionApplyKnockbackStub(), btMotionApproachTargetStub(), btObjectGetStub(), btProjectionPoint(), btProjectionScaledUnit(), btResourceLoadAndDecompress(), Sint32, state, syCloseEvent(), syCos(), syHeapSlotRelease(), syMatrixTranslateVector(), syRandom(), syResourceGetTableEntry(), syRotX(), syRotY(), sySetEvent(), sySin(), sySoundPlayStub(), sySquartIWRAM(), syWordsCopy() and TargetMotesGlintFlips.

Referenced by btEffectRunDelude(), btEffectRunDemonFire(), btEffectRunDrown(), btEffectRunHeartrender(), btEffectRunMysticFlame(), btEffectRunParalyze(), btEffectRunTaint() and btEffectRunUnusedPinkSmoke().

Definition at line 142 of file battle_effect_target_motes.c.

btEffectRunSleep

void btEffectRunSleep(BATTLE_EFFECT_PARM *args)

Twelve sheep drop onto the targets' side, tumbling, and each target falls asleep in turn.

Abilities: Sleep.

Sleep
Sleep

References btEffectTintBattler(), btObjectGetStub(), btResourceLoadAndDecompress(), Sint32, state, syMatrixTranslateVector(), syRandom() and sySoundPlayStub().

Referenced by BattleEffectHandlers.

Definition at line 463 of file battle_effect_target_motes.c.

btEffectRunCurse

void btEffectRunCurse(BATTLE_EFFECT_PARM *args)

A candle stands on each target's head in turn, a small flame burning on it.

Abilities: Curse; Lucid Prophecy.

Curse
Curse

References btEffectTransferCanvas(), btProjectionScaledUnit(), btResourceLoadAndDecompress(), Sint32, state, syRandom(), sySetEvent() and sySoundPlayStub().

Referenced by BattleEffectHandlers.

Definition at line 594 of file battle_effect_target_motes.c.