Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_gathering_lights.c

Demon Night, Rumble, Haunting and Thorny Grave. More…

Included by battle_effect.c.

Macros

NameDescription
#defineGATHERING_SPIRITS_SLOTS 128particles reserved for each target
#defineGATHERING_SPIRITS_TARGET_TICKS 20The targets' turns, this many ticks apart: each is struck by its spirits from GATHERING_SPIRITS_HIT_TICK.
#defineGATHERING_SPIRITS_HIT_TICK 70
#defineGATHERING_SPIRITS_SWAY 16The background's widest sway, in pixels, at the effect's midpoint.
#defineBG_OFFSETS (horizontal, vertical) ((horizontal) | (vertical) << 16)A layer's BGnHOFS and BGnVOFS as one word, as an HBlank DMA writes them.
#defineSPIRIT_WIDTH 20The spirits' pictures, three of the sprite sheet's four drawn.
#defineSPIRIT_HEIGHT 32

Enumerations

NameDescription
enumGATHERING_SPIRITS_MODE { GATHERING_SPIRITS_DEMON_NIGHT, GATHERING_SPIRITS_RUMBLE, GAT … }The evil spirits' modes (btEffectRunGatheringLights), each named for the effect that plays it, and its row of GatheringLightsCounts.

Functions

NameDescription
voidbtEffectRunDemonNight (BATTLE_EFFECT_PARM *args)Sixteen pink spirits burst out of the user and are pulled into each target.
voidbtEffectRunRumble (BATTLE_EFFECT_PARM *args)Eight spirits in Mars Djinn colours burst out of the user and are pulled into each target.
voidbtEffectRunHaunting (BATTLE_EFFECT_PARM *args)Twelve spirits in Mercury Djinn colours burst out of the user and are pulled into each target.
voidbtEffectRunThornyGrave (BATTLE_EFFECT_PARM *args)Sixteen dark spirits edged in white burst out of the user, are pulled into each target and push it back as they arrive.
voidbtEffectRunGatheringLights (BATTLE_EFFECT_PARM *args, Sint32 mode)For each target in turn, spirits burst out of the user every way and from 30 ticks on are pulled toward the middle of the target's body, vanishing once they have crossed it, in the mode's colours.

Description

Demon Night, Rumble, Haunting and Thorny Grave. Part of battle_effect.c.

Macros in detail

GATHERING_SPIRITS_SLOTS

#define GATHERING_SPIRITS_SLOTS 128

particles reserved for each target

Referenced by btEffectRunGatheringLights().

Definition at line 48 of file battle_effect_gathering_lights.c.

GATHERING_SPIRITS_TARGET_TICKS

#define GATHERING_SPIRITS_TARGET_TICKS 20

The targets' turns, this many ticks apart: each is struck by its spirits from GATHERING_SPIRITS_HIT_TICK.

Referenced by btEffectRunGatheringLights().

Definition at line 51 of file battle_effect_gathering_lights.c.

GATHERING_SPIRITS_HIT_TICK

#define GATHERING_SPIRITS_HIT_TICK 70

Referenced by btEffectRunGatheringLights().

Definition at line 52 of file battle_effect_gathering_lights.c.

GATHERING_SPIRITS_SWAY

#define GATHERING_SPIRITS_SWAY 16

The background's widest sway, in pixels, at the effect's midpoint.

Referenced by btEffectRunGatheringLights().

Definition at line 54 of file battle_effect_gathering_lights.c.

BG_OFFSETS

#define BG_OFFSETS(horizontal, vertical) ((horizontal) | (vertical) << 16)

A layer's BGnHOFS and BGnVOFS as one word, as an HBlank DMA writes them.

Referenced by btEffectRunGatheringLights().

Definition at line 56 of file battle_effect_gathering_lights.c.

SPIRIT_WIDTH

#define SPIRIT_WIDTH 20

The spirits' pictures, three of the sprite sheet's four drawn.

Referenced by btEffectRunGatheringLights().

Definition at line 58 of file battle_effect_gathering_lights.c.

SPIRIT_HEIGHT

#define SPIRIT_HEIGHT 32

Referenced by btEffectRunGatheringLights().

Definition at line 59 of file battle_effect_gathering_lights.c.

Enumerations in detail

GATHERING_SPIRITS_MODE

enum GATHERING_SPIRITS_MODE

The evil spirits' modes (btEffectRunGatheringLights), each named for the effect that plays it, and its row of GatheringLightsCounts.

EnumeratorValueDescription
GATHERING_SPIRITS_DEMON_NIGHTpink
GATHERING_SPIRITS_RUMBLEMars Djinn colours
GATHERING_SPIRITS_HAUNTINGMercury Djinn colours
GATHERING_SPIRITS_THORNY_GRAVEpink, the ramp reversed

Definition at line 5 of file battle_effect_gathering_lights.c.

Functions in detail

btEffectRunDemonNight

void btEffectRunDemonNight(BATTLE_EFFECT_PARM *args)

Sixteen pink spirits burst out of the user and are pulled into each target.

Abilities: Demon Night.

References btEffectRunGatheringLights().

Referenced by BattleEffectHandlers.

Definition at line 16 of file battle_effect_gathering_lights.c.

btEffectRunRumble

void btEffectRunRumble(BATTLE_EFFECT_PARM *args)

Eight spirits in Mars Djinn colours burst out of the user and are pulled into each target.

Abilities: Rumble.

References btEffectRunGatheringLights().

Referenced by BattleEffectHandlers.

Definition at line 25 of file battle_effect_gathering_lights.c.

btEffectRunHaunting

void btEffectRunHaunting(BATTLE_EFFECT_PARM *args)

Twelve spirits in Mercury Djinn colours burst out of the user and are pulled into each target.

Abilities: Haunting.

References btEffectRunGatheringLights().

Referenced by BattleEffectHandlers.

Definition at line 34 of file battle_effect_gathering_lights.c.

btEffectRunThornyGrave

void btEffectRunThornyGrave(BATTLE_EFFECT_PARM *args)

Sixteen dark spirits edged in white burst out of the user, are pulled into each target and push it back as they arrive.

Abilities: Thorny Grave.

References btEffectRunGatheringLights().

Referenced by BattleEffectHandlers.

Definition at line 43 of file battle_effect_gathering_lights.c.

btEffectRunGatheringLights

void btEffectRunGatheringLights(BATTLE_EFFECT_PARM *args, Sint32 mode)

For each target in turn, spirits burst out of the user every way and from 30 ticks on are pulled toward the middle of the target's body, vanishing once they have crossed it, in the mode's colours. The battle background sways sideways, swelling and dying away over the effect. In Thorny Grave every spirit that arrives also pushes its target back.

References BgScrollWork, btEffectArmBg1HBlankDMA(), btEffectBuildCanvasBlitters(), btEffectEndCanvasLayer(), btEffectPosProjectPoint(), btEffectStartActorMotion(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btObjectGetStub(), btPaletteMirrorBgColors(), btParticleAdvanceWithGravity3D(), btResourceLoadAndDecompress(), btUnitGetEffectHeightStub(), GatheringLightsCounts, Sint32, syCloseEvent(), syRandom(), sySetEvent(), sySin() and sySoundPlayStub().

Referenced by btEffectRunDemonNight(), btEffectRunHaunting(), btEffectRunRumble() and btEffectRunThornyGrave().

Definition at line 66 of file battle_effect_gathering_lights.c.