Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_nirvana.c

Nirvana, Stone Justice, Soul Shatter and Serac, and Heavy Divide's and Strong Hit's ways into the heavy blow. More…

Included by battle_effect.c.

Macros

NameDescription
#defineNIRVANA_TICKS 80
#defineNIRVANA_SPARKS 24The orb is drawn as two rings of NIRVANA_SPARKS / 2 sparks, a quarter turn apart, turning about it; the rings open to NIRVANA_RING_RADIUS pixels and close again over the effect.
#defineNIRVANA_RING_RADIUS 64
#defineNIRVANA_PULL (distance) ((distance) >> 10)What the orb's speed gains toward the user each tick: 1/1024 of the distance between them.
#defineSTONE_JUSTICE_ROCKS 21
#defineSTONE_JUSTICE_TICKS 107
#defineSTONE_JUSTICE_HURL_TICK 64The tick the rocks are hurled at the target and the battle background starts to slide after them.
#defineSTONE_JUSTICE_SPIN_STEP 96A rock shows the next picture of its tumble each time its spin passes this much.
#defineSOUL_SHATTER_TICKS 106
#defineSOUL_SHATTER_COLUMN_WIDTH 14The column, LimeColumnSheet's half of it at the start of the effect's pictures, drawn twice side by side, the right half mirrored; BlastSheet's spark pictures follow it.
#defineSOUL_SHATTER_COLUMN_HEIGHT 80
#defineSOUL_SHATTER_SPARK_PICTURES PICTURE_BYTES(SOUL_SHATTER_COLUMN)
#defineSOUL_SHATTER_SPARKS 16The sparks, each drawn for SOUL_SHATTER_SPARK_TICKS, and the motes of the target's soul, after twice as many particles.
#defineSOUL_SHATTER_SPARK_TICKS 29
#defineSOUL_SHATTER_MOTES 32
#defineSERAC_SPIRE_CORNERS ((MODEL_VERTEX *)RamMapMetatileBuffer)The spire's corners and its mesh, in the map cell buffer.
#defineSERAC_SPIRE_MESH (RamMapMetatileBuffer + 8192)
#defineSERAC_MERCURY_DJINN_PICTURES 16384Where MercuryDjinnSheet is decoded in the effect's pictures.
#defineSERAC_TICKS 88
#defineSERAC_CLOUD_PUFFS 1024Where BlueCloudPuffSheet is decoded in the effect's pictures.
#defineSERAC_MIST 16384Where FlameBandTexture, the mist inside the spire, is decoded in the map cell buffer.
#defineSERAC_SPIRE_RINGS 8The spire of ice: a cone of SERAC_SPIRE_RINGS rings of SERAC_SPIRE_SIDES corners, each quad of its mesh 16 texels across and 8 high.
#defineSERAC_SPIRE_SIDES 8
#defineSERAC_SPIRE_QUAD_TEXELS 16
#defineSERAC_SPIRE_GROWTH toFIXED(0.1526)
#defineSERAC_SPIRE_SCALE toFIXED(0.91553)
#defineSERAC_CAMERA_TURN 320The camera circles the spire SERAC_CAMERA_TURN a tick, slowing from tick 64, and turns no further than SERAC_CAMERA_YAW_MAX either way.
#defineSERAC_CAMERA_YAW_MAX 14000
#defineSERAC_DUST_PUFFS 32The puffs of dust where the Djinni lands, each drawn for SERAC_DUST_PUFF_TICKS through BlueCloudPuffSheet's four pictures.
#defineSERAC_DUST_PUFF_TICKS 24
#defineSERAC_RINGS_TICK 22The four rings of mist spread from the spire's foot from tick SERAC_RINGS_TICK; a ring of BattleEffectCylinderMesh starts at SERAC_RING_START_SCALE and grows by its growth times SERAC_RING_GROWTH a tick.
#defineSERAC_RING_START_SCALE toFIXED(0.25586)
#defineSERAC_RING_GROWTH toFIXED(0.0229)
#defineSERAC_SHARD_SPEED_BIAS 12768A shard's y speed is three times a random fraction of a pixel less SERAC_SHARD_SPEED_BIAS: from about -0.58 to 2.42 pixels a tick, 0.92 on average.

Functions

NameDescription
voidbtEffectRunNirvana (BATTLE_EFFECT_PARM *args)The Meditation Rod's unleash: an orb leaves the first target, drawn as rings of sparks turning about it, and is pulled back into the user, who flashes white.
voidbtEffectRunStoneJustice (BATTLE_EFFECT_PARM *args)Themis' Axe's unleash: rocks rise in a column beside the user and spin as they fly; then they are hurled across the screen into the target while the battle background slides after them, and every rock that reaches the target shakes the screen and knocks it back.
voidbtEffectRunSoulShatter (BATTLE_EFFECT_PARM *args)The Soul Brand's unleash: a column bursts up under the target in a spray of sparks and throws it into the air; the user glows, and from tick 32 motes of the target's soul fly out and are drawn back into the user, who flashes white.
voidbtEffectRunSerac (BATTLE_EFFECT_PARM *args)"Strike a chilling finishing blow." The Mercury Djinni drops onto the target, dust bursting where it lands; a spire of ice (its mesh built on the first tick) grows up around the target in rings of mist while the camera circles, the caster closes in at tick 56, and at 64 the spire shatters into 64 tumbling shards.
voidbtEffectRunHeavyDivide (BATTLE_EFFECT_PARM *args)A great sword swings down onto the target, trailing blue after-images.
voidbtEffectRunStrongHit (BATTLE_EFFECT_PARM *args)An axe spins across from the user to the target.

Description

Nirvana, Stone Justice, Soul Shatter and Serac, and Heavy Divide's and Strong Hit's ways into the heavy blow. Part of battle_effect.c.

Macros in detail

NIRVANA_TICKS

#define NIRVANA_TICKS 80

Referenced by btEffectRunNirvana().

Definition at line 4 of file battle_effect_nirvana.c.

NIRVANA_SPARKS

#define NIRVANA_SPARKS 24

The orb is drawn as two rings of NIRVANA_SPARKS / 2 sparks, a quarter turn apart, turning about it; the rings open to NIRVANA_RING_RADIUS pixels and close again over the effect.

Referenced by btEffectRunNirvana().

Definition at line 8 of file battle_effect_nirvana.c.

NIRVANA_RING_RADIUS

#define NIRVANA_RING_RADIUS 64

Referenced by btEffectRunNirvana().

Definition at line 9 of file battle_effect_nirvana.c.

NIRVANA_PULL

#define NIRVANA_PULL(distance) ((distance) >> 10)

What the orb's speed gains toward the user each tick: 1/1024 of the distance between them.

Referenced by btEffectRunNirvana().

Definition at line 12 of file battle_effect_nirvana.c.

STONE_JUSTICE_ROCKS

#define STONE_JUSTICE_ROCKS 21

Referenced by btEffectRunStoneJustice().

Definition at line 131 of file battle_effect_nirvana.c.

STONE_JUSTICE_TICKS

#define STONE_JUSTICE_TICKS 107

Referenced by btEffectRunStoneJustice().

Definition at line 132 of file battle_effect_nirvana.c.

STONE_JUSTICE_HURL_TICK

#define STONE_JUSTICE_HURL_TICK 64

The tick the rocks are hurled at the target and the battle background starts to slide after them.

Referenced by btEffectRunStoneJustice().

Definition at line 135 of file battle_effect_nirvana.c.

STONE_JUSTICE_SPIN_STEP

#define STONE_JUSTICE_SPIN_STEP 96

A rock shows the next picture of its tumble each time its spin passes this much.

Referenced by btEffectRunStoneJustice().

Definition at line 138 of file battle_effect_nirvana.c.

SOUL_SHATTER_TICKS

#define SOUL_SHATTER_TICKS 106

Referenced by btEffectRunSoulShatter().

Definition at line 307 of file battle_effect_nirvana.c.

SOUL_SHATTER_COLUMN_WIDTH

#define SOUL_SHATTER_COLUMN_WIDTH 14

The column, LimeColumnSheet's half of it at the start of the effect's pictures, drawn twice side by side, the right half mirrored; BlastSheet's spark pictures follow it.

Referenced by btEffectRunSoulShatter().

Definition at line 311 of file battle_effect_nirvana.c.

SOUL_SHATTER_COLUMN_HEIGHT

#define SOUL_SHATTER_COLUMN_HEIGHT 80

Referenced by btEffectRunSoulShatter().

Definition at line 312 of file battle_effect_nirvana.c.

SOUL_SHATTER_SPARK_PICTURES

#define SOUL_SHATTER_SPARK_PICTURES PICTURE_BYTES(SOUL_SHATTER_COLUMN)

Referenced by btEffectRunSoulShatter().

Definition at line 313 of file battle_effect_nirvana.c.

SOUL_SHATTER_SPARKS

#define SOUL_SHATTER_SPARKS 16

The sparks, each drawn for SOUL_SHATTER_SPARK_TICKS, and the motes of the target's soul, after twice as many particles.

Referenced by btEffectRunSoulShatter().

Definition at line 316 of file battle_effect_nirvana.c.

SOUL_SHATTER_SPARK_TICKS

#define SOUL_SHATTER_SPARK_TICKS 29

Referenced by btEffectRunSoulShatter().

Definition at line 317 of file battle_effect_nirvana.c.

SOUL_SHATTER_MOTES

#define SOUL_SHATTER_MOTES 32

Referenced by btEffectRunSoulShatter().

Definition at line 318 of file battle_effect_nirvana.c.

SERAC_SPIRE_CORNERS

#define SERAC_SPIRE_CORNERS ((MODEL_VERTEX *)RamMapMetatileBuffer)

The spire's corners and its mesh, in the map cell buffer.

Referenced by btEffectRunSerac().

Definition at line 582 of file battle_effect_nirvana.c.

SERAC_SPIRE_MESH

#define SERAC_SPIRE_MESH (RamMapMetatileBuffer + 8192)

Referenced by btEffectRunSerac().

Definition at line 583 of file battle_effect_nirvana.c.

SERAC_MERCURY_DJINN_PICTURES

#define SERAC_MERCURY_DJINN_PICTURES 16384

Where MercuryDjinnSheet is decoded in the effect's pictures.

Referenced by btEffectRunSerac().

Definition at line 586 of file battle_effect_nirvana.c.

SERAC_TICKS

#define SERAC_TICKS 88

Referenced by btEffectRunSerac().

Definition at line 588 of file battle_effect_nirvana.c.

SERAC_CLOUD_PUFFS

#define SERAC_CLOUD_PUFFS 1024

Where BlueCloudPuffSheet is decoded in the effect's pictures.

Referenced by btEffectRunSerac().

Definition at line 591 of file battle_effect_nirvana.c.

SERAC_MIST

#define SERAC_MIST 16384

Where FlameBandTexture, the mist inside the spire, is decoded in the map cell buffer.

Referenced by btEffectRunSerac().

Definition at line 594 of file battle_effect_nirvana.c.

SERAC_SPIRE_RINGS

#define SERAC_SPIRE_RINGS 8

The spire of ice: a cone of SERAC_SPIRE_RINGS rings of SERAC_SPIRE_SIDES corners, each quad of its mesh 16 texels across and 8 high. It grows from tick 26 by SERAC_SPIRE_GROWTH a tick to its scale SERAC_SPIRE_SCALE.

Referenced by btEffectRunSerac().

Definition at line 599 of file battle_effect_nirvana.c.

SERAC_SPIRE_SIDES

#define SERAC_SPIRE_SIDES 8

Referenced by btEffectRunSerac().

Definition at line 600 of file battle_effect_nirvana.c.

SERAC_SPIRE_QUAD_TEXELS

#define SERAC_SPIRE_QUAD_TEXELS 16

Referenced by btEffectRunSerac().

Definition at line 601 of file battle_effect_nirvana.c.

SERAC_SPIRE_GROWTH

#define SERAC_SPIRE_GROWTH toFIXED(0.1526)

Referenced by btEffectRunSerac().

Definition at line 602 of file battle_effect_nirvana.c.

SERAC_SPIRE_SCALE

#define SERAC_SPIRE_SCALE toFIXED(0.91553)

Referenced by btEffectRunSerac().

Definition at line 603 of file battle_effect_nirvana.c.

SERAC_CAMERA_TURN

#define SERAC_CAMERA_TURN 320

The camera circles the spire SERAC_CAMERA_TURN a tick, slowing from tick 64, and turns no further than SERAC_CAMERA_YAW_MAX either way.

Referenced by btEffectRunSerac().

Definition at line 607 of file battle_effect_nirvana.c.

SERAC_CAMERA_YAW_MAX

#define SERAC_CAMERA_YAW_MAX 14000

Referenced by btEffectRunSerac().

Definition at line 608 of file battle_effect_nirvana.c.

SERAC_DUST_PUFFS

#define SERAC_DUST_PUFFS 32

The puffs of dust where the Djinni lands, each drawn for SERAC_DUST_PUFF_TICKS through BlueCloudPuffSheet's four pictures.

Referenced by btEffectRunSerac().

Definition at line 612 of file battle_effect_nirvana.c.

SERAC_DUST_PUFF_TICKS

#define SERAC_DUST_PUFF_TICKS 24

Referenced by btEffectRunSerac().

Definition at line 613 of file battle_effect_nirvana.c.

SERAC_RINGS_TICK

#define SERAC_RINGS_TICK 22

The four rings of mist spread from the spire's foot from tick SERAC_RINGS_TICK; a ring of BattleEffectCylinderMesh starts at SERAC_RING_START_SCALE and grows by its growth times SERAC_RING_GROWTH a tick.

Referenced by btEffectRunSerac().

Definition at line 619 of file battle_effect_nirvana.c.

SERAC_RING_START_SCALE

#define SERAC_RING_START_SCALE toFIXED(0.25586)

Referenced by btEffectRunSerac().

Definition at line 620 of file battle_effect_nirvana.c.

SERAC_RING_GROWTH

#define SERAC_RING_GROWTH toFIXED(0.0229)

Referenced by btEffectRunSerac().

Definition at line 621 of file battle_effect_nirvana.c.

SERAC_SHARD_SPEED_BIAS

#define SERAC_SHARD_SPEED_BIAS 12768

A shard's y speed is three times a random fraction of a pixel less SERAC_SHARD_SPEED_BIAS: from about -0.58 to 2.42 pixels a tick, 0.92 on average.

Referenced by btEffectRunSerac().

Definition at line 626 of file battle_effect_nirvana.c.

Functions in detail

btEffectRunNirvana

void btEffectRunNirvana(BATTLE_EFFECT_PARM *args)

The Meditation Rod's unleash: an orb leaves the first target, drawn as rings of sparks turning about it, and is pulled back into the user, who flashes white.

Abilities: Nirvana.

References BattleEffectMotePictures, btEffectPosProjectPoint(), btEffectStartCanvasLayer(), btEffectTintBattler(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btResourceLoadAndDecompress(), btUnitGetEffectHeightStub(), Sint32, syInitMatrix(), syLookAtLoad(), syPopMatrix(), syPushMatrix(), syRotX(), syRotZ(), sySin(), sySoundPlayStub() and syTranslate().

Referenced by BattleEffectHandlers.

Definition at line 19 of file battle_effect_nirvana.c.

btEffectRunStoneJustice

void btEffectRunStoneJustice(BATTLE_EFFECT_PARM *args)

Themis' Axe's unleash: rocks rise in a column beside the user and spin as they fly; then they are hurled across the screen into the target while the battle background slides after them, and every rock that reaches the target shakes the screen and knocks it back.

Abilities: Stone Justice.

References btCameraShake(), btEffectPosProjectScaledBattler(), btEffectStartActorMotion(), btEffectTintBattler(), btObjectGetStub(), btParticleAdvanceWithGravity2D(), btResourceLoadAndDecompress(), fdActorSelectAnimationStub(), fdActorSetAnimationSpeedStub(), Sint32, SpireShardHeights, SpireShardPictures, SpireShardWidths, syRandom() and sySoundPlayStub().

Referenced by BattleEffectHandlers.

Definition at line 146 of file battle_effect_nirvana.c.

btEffectRunSoulShatter

void btEffectRunSoulShatter(BATTLE_EFFECT_PARM *args)

The Soul Brand's unleash: a column bursts up under the target in a spray of sparks and throws it into the air; the user glows, and from tick 32 motes of the target's soul fly out and are drawn back into the user, who flashes white. The column rises from tick 8, stands at its full height and sinks from tick 80, as the target comes down.

Abilities: Soul Shatter.

References BattleEffectMotePictures, btCameraShake(), btEffectBuildCanvasBlitters(), btEffectEndCanvasLayer(), btEffectPosProjectBattler(), btEffectPosProjectPoint(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btObjectGetStub(), btParticleAdvanceWithGravity2D(), btParticleAdvanceWithGravity3D(), btResourceLoadAndDecompress(), btUnitGetEffectHeightStub(), Sint32, SoulShatterSparkPictures, SoulShatterSparkSizes, syCloseEvent(), syCos(), syHeapSlotRelease(), syInitMatrix(), syLookAtLoad(), syRandom(), sySin() and sySoundPlayStub().

Referenced by BattleEffectHandlers.

Definition at line 327 of file battle_effect_nirvana.c.

btEffectRunSerac

void btEffectRunSerac(BATTLE_EFFECT_PARM *args)

"Strike a chilling finishing blow." The Mercury Djinni drops onto the target, dust bursting where it lands; a spire of ice (its mesh built on the first tick) grows up around the target in rings of mist while the camera circles, the caster closes in at tick 56, and at 64 the spire shatters into 64 tumbling shards.

Abilities: Serac.

References BattleEffectCylinderCorners, BattleEffectCylinderMesh, BattleEffectTriangleCorners, BattleEffectTriangleMesh, btCameraShake(), btEffectBuildCanvasBlitters(), btEffectConfigureEffectDisplay(), btEffectRunDjinniEntrance(), btEffectStartTiledCanvas(), btEffectStartTiledCanvasFilled(), btEffectTintBattler(), btObjectGetStub(), btParticleAdvanceWithGravity3D(), btRenderAllocateModelList(), btRenderDrawModelList(), btRenderProjectVertices(), btResourceLoadAndDecompress(), fdActorSelectAnimationStub(), ProjectionWork, SeracMeshEnd, SeracRingGrowth, SeracRingHeights, SeracRingStarts, SeracRowHeights, SeracRowRadii, Sint32, syConvert3Dto2D(), syCos(), syHeapAllocateEWRAM(), syHeapRelease(), syInitMatrix(), syLookAtLoad(), syMatrixScaleUniform(), syPopMatrix(), syPushMatrix(), syRandom(), syRotX(), syRotZ(), syScale(), sySin(), sySoundPlayStub(), sySquartIWRAM(), syTranslate() and syWordsClear().

Referenced by BattleEffectHandlers.

Definition at line 635 of file battle_effect_nirvana.c.

btEffectRunHeavyDivide

void btEffectRunHeavyDivide(BATTLE_EFFECT_PARM *args)

A great sword swings down onto the target, trailing blue after-images.

Abilities: Heavy Divide.

References btEffectRunHeavyBlow().

Referenced by BattleEffectHandlers.

Definition at line 1142 of file battle_effect_nirvana.c.

btEffectRunStrongHit

void btEffectRunStrongHit(BATTLE_EFFECT_PARM *args)

An axe spins across from the user to the target.

Abilities: Strong Hit.

References btEffectRunHeavyBlow().

Referenced by BattleEffectHandlers.

Definition at line 1150 of file battle_effect_nirvana.c.