Skip to Content
The Alchemy Project

src/battle_effect/battle_effect_target_strike.c

Monster bites and slashes on one target. More…

Included by battle_effect.c.

Macros

NameDescription
#defineTARGET_STRIKE_MOTES_PER_TARGET 128The motes in PARTICLES, 128 for each target, then the strike sparks.
#defineTARGET_STRIKE_MOTE_SLOTS 512
#defineTARGET_STRIKE_SPARK_COUNT 512
#defineTARGET_STRIKE_SPARKS (PARTICLES + TARGET_STRIKE_MOTE_SLOTS)
#defineTARGET_STRIKE_SMOKE_PICTURES 12800The smoke pictures in the sprite sheet: six 24x48 puffs, each shown for TARGET_STRIKE_SMOKE_TICKS as a puff rises.
#defineTARGET_STRIKE_SMOKE_PUFFS 6
#defineTARGET_STRIKE_SMOKE_TICKS 4
#defineTARGET_STRIKE_SPARKS_PER_SLASH 32The sparks each hit lights, a block of them for each hit: a slash's and a bite's; of the sparks, the first TARGET_STRIKE_SPARKS_SHOWN are drawn.
#defineTARGET_STRIKE_SPARKS_PER_BITE 64
#defineTARGET_STRIKE_SPARKS_SHOWN 128
#defineTARGET_STRIKE_PUFFS_PER_HIT 8The smoke puffs a hit raises, from a block of TARGET_STRIKE_HIT_BLOCK in the effect's particles, and the motes it sends out, the block's whole of the target's motes; of these, the first TARGET_STRIKE_DRAIN_MOTES are drawn.
#defineTARGET_STRIKE_HIT_BLOCK 16
#defineTARGET_STRIKE_HIT (mode, tick)The hit a tick belongs to: hits are counted six pictures apart, each with its block of sparks, puffs and motes.
#defineTARGET_STRIKE_DRAIN_MOTES 64
#defineTARGET_STRIKE_MOTE_FLIGHT_TICKS 10The ticks a drained mote flies out before the user pulls it in.
#defineTARGET_STRIKE_BITE_Y 56The canvas row the fangs' pictures start at.
#defineTARGET_STRIKE_BITE_PICTURES 3200The bite's stages after the tornado sprite sheet: BeamImage for a slash, BlueDropletSheet otherwise.
#defineTARGET_STRIKE_BITE_WIDTH 18
#defineTARGET_STRIKE_BITE_HEIGHT 48
#defineTARGET_STRIKE_FANGS_MET 3The bite's last stage, the fangs met (TargetStrikeBiteStages).
#defineTARGET_STRIKE_VALUE (mode, field) TargetStrikeStyles[(mode)][(field)]Column field of style mode's row of TargetStrikeStyles.

Enumerations

NameDescription
enumanonymous enum { TARGET_STRIKE_KIND, TARGET_STRIKE_HITS, TARGET_STRIKE_FLAGS, … }The columns of TargetStrikeStyles.

Functions

NameDescription
voidbtEffectRunNumbingSting (BATTLE_EFFECT_PARM *args)One slash strikes the first target among glints, in lightning colours.
voidbtEffectRunCannibalFang (BATTLE_EFFECT_PARM *args)Fangs bite the first target three times, in ember colours, and drain it into the user.
voidbtEffectRunPoisonousBite (BATTLE_EFFECT_PARM *args)Fangs bite the first target once, in lime, with smoke.
voidbtEffectRunRabidFang (BATTLE_EFFECT_PARM *args)Fangs bite the first target once, with smoke, in Mars Djinn colours.
voidbtEffectRunElectricBite (BATTLE_EFFECT_PARM *args)Fangs bite the first target three times among glints, in lightning colours.
voidbtEffectRunPoisonTail (BATTLE_EFFECT_PARM *args)One lime slash strikes the first target, with smoke.
voidbtEffectRunVampiricFang (BATTLE_EFFECT_PARM *args)Fangs bite the first target three times and drain it, in Mars Djinn colours.
voidbtEffectRunDoubleFang (BATTLE_EFFECT_PARM *args)Fangs bite the first target twice, in blue, with sparks.
voidbtEffectRunMortalBlow (BATTLE_EFFECT_PARM *args)One heavy slash strikes the first target, with sparks, in Mars Djinn colours.
voidbtEffectRunTwinBeaks (BATTLE_EFFECT_PARM *args)Two slashes strike the first target, with sparks, in lightning colours.
voidbtEffectRunAcidBite (BATTLE_EFFECT_PARM *args)Fangs bite the first target three times, in pink, with smoke.
voidbtEffectRunDrainFang (BATTLE_EFFECT_PARM *args)Fangs bite the first target three times, added to what lies under them, and drain it with large motes, in Mars Djinn colours.
voidbtEffectRunTargetStrike (BATTLE_EFFECT_PARM *args, Sint32 mode)Strikes the first target with slashes or a bite of closing fangs, with the extras its flags choose.

Description

Monster bites and slashes on one target. Part of battle_effect.c.

Macros in detail

TARGET_STRIKE_MOTES_PER_TARGET

#define TARGET_STRIKE_MOTES_PER_TARGET 128

The motes in PARTICLES, 128 for each target, then the strike sparks.

Referenced by btEffectRunTargetStrike().

Definition at line 4 of file battle_effect_target_strike.c.

TARGET_STRIKE_MOTE_SLOTS

#define TARGET_STRIKE_MOTE_SLOTS 512

Definition at line 5 of file battle_effect_target_strike.c.

TARGET_STRIKE_SPARK_COUNT

#define TARGET_STRIKE_SPARK_COUNT 512

Referenced by btEffectRunTargetStrike().

Definition at line 6 of file battle_effect_target_strike.c.

TARGET_STRIKE_SPARKS

#define TARGET_STRIKE_SPARKS (PARTICLES + TARGET_STRIKE_MOTE_SLOTS)

Referenced by btEffectRunTargetStrike().

Definition at line 7 of file battle_effect_target_strike.c.

TARGET_STRIKE_SMOKE_PICTURES

#define TARGET_STRIKE_SMOKE_PICTURES 12800

The smoke pictures in the sprite sheet: six 24x48 puffs, each shown for TARGET_STRIKE_SMOKE_TICKS as a puff rises.

Referenced by btEffectRunTargetStrike().

Definition at line 11 of file battle_effect_target_strike.c.

TARGET_STRIKE_SMOKE_PUFFS

#define TARGET_STRIKE_SMOKE_PUFFS 6

Referenced by btEffectRunTargetStrike().

Definition at line 12 of file battle_effect_target_strike.c.

TARGET_STRIKE_SMOKE_TICKS

#define TARGET_STRIKE_SMOKE_TICKS 4

Referenced by btEffectRunTargetStrike().

Definition at line 13 of file battle_effect_target_strike.c.

TARGET_STRIKE_SPARKS_PER_SLASH

#define TARGET_STRIKE_SPARKS_PER_SLASH 32

The sparks each hit lights, a block of them for each hit: a slash's and a bite's; of the sparks, the first TARGET_STRIKE_SPARKS_SHOWN are drawn.

Referenced by btEffectRunTargetStrike().

Definition at line 16 of file battle_effect_target_strike.c.

TARGET_STRIKE_SPARKS_PER_BITE

#define TARGET_STRIKE_SPARKS_PER_BITE 64

Referenced by btEffectRunTargetStrike().

Definition at line 17 of file battle_effect_target_strike.c.

TARGET_STRIKE_SPARKS_SHOWN

#define TARGET_STRIKE_SPARKS_SHOWN 128

Referenced by btEffectRunTargetStrike().

Definition at line 18 of file battle_effect_target_strike.c.

TARGET_STRIKE_PUFFS_PER_HIT

#define TARGET_STRIKE_PUFFS_PER_HIT 8

The smoke puffs a hit raises, from a block of TARGET_STRIKE_HIT_BLOCK in the effect's particles, and the motes it sends out, the block's whole of the target's motes; of these, the first TARGET_STRIKE_DRAIN_MOTES are drawn.

Referenced by btEffectRunTargetStrike().

Definition at line 22 of file battle_effect_target_strike.c.

TARGET_STRIKE_HIT_BLOCK

#define TARGET_STRIKE_HIT_BLOCK 16

Referenced by btEffectRunTargetStrike().

Definition at line 23 of file battle_effect_target_strike.c.

TARGET_STRIKE_HIT

#define TARGET_STRIKE_HIT(mode, tick)

The hit a tick belongs to: hits are counted six pictures apart, each with its block of sparks, puffs and motes.

Referenced by btEffectRunTargetStrike().

Definition at line 26 of file battle_effect_target_strike.c.

TARGET_STRIKE_DRAIN_MOTES

#define TARGET_STRIKE_DRAIN_MOTES 64

Referenced by btEffectRunTargetStrike().

Definition at line 28 of file battle_effect_target_strike.c.

TARGET_STRIKE_MOTE_FLIGHT_TICKS

#define TARGET_STRIKE_MOTE_FLIGHT_TICKS 10

The ticks a drained mote flies out before the user pulls it in.

Referenced by btEffectRunTargetStrike().

Definition at line 30 of file battle_effect_target_strike.c.

TARGET_STRIKE_BITE_Y

#define TARGET_STRIKE_BITE_Y 56

The canvas row the fangs' pictures start at.

Referenced by btEffectRunTargetStrike().

Definition at line 32 of file battle_effect_target_strike.c.

TARGET_STRIKE_BITE_PICTURES

#define TARGET_STRIKE_BITE_PICTURES 3200

The bite's stages after the tornado sprite sheet: BeamImage for a slash, BlueDropletSheet otherwise.

Referenced by btEffectRunTargetStrike().

Definition at line 35 of file battle_effect_target_strike.c.

TARGET_STRIKE_BITE_WIDTH

#define TARGET_STRIKE_BITE_WIDTH 18

Referenced by btEffectRunTargetStrike().

Definition at line 36 of file battle_effect_target_strike.c.

TARGET_STRIKE_BITE_HEIGHT

#define TARGET_STRIKE_BITE_HEIGHT 48

Referenced by btEffectRunTargetStrike().

Definition at line 37 of file battle_effect_target_strike.c.

TARGET_STRIKE_FANGS_MET

#define TARGET_STRIKE_FANGS_MET 3

The bite's last stage, the fangs met (TargetStrikeBiteStages).

Referenced by btEffectRunTargetStrike().

Definition at line 39 of file battle_effect_target_strike.c.

TARGET_STRIKE_VALUE

#define TARGET_STRIKE_VALUE(mode, field) TargetStrikeStyles[(mode)][(field)]

Column field of style mode's row of TargetStrikeStyles.

Referenced by btEffectRunTargetStrike().

Definition at line 42 of file battle_effect_target_strike.c.

Enumerations in detail

anonymous enum

enum { TARGET_STRIKE_KIND, TARGET_STRIKE_HITS, TARGET_STRIKE_FLAGS, TARGET_STRIKE_COLOR, … }

The columns of TargetStrikeStyles.

EnumeratorValueDescription
TARGET_STRIKE_KINDSTRIKE_KIND_SLASH or STRIKE_KIND_BITE
TARGET_STRIKE_HITShow many times the target is struck
TARGET_STRIKE_FLAGSSTRIKE_SMOKE and so on
TARGET_STRIKE_COLORbackground palette, a STRIKE_COLOR_
TARGET_STRIKE_PICTURE_TICKSticks each strike picture is shown
TARGET_STRIKE_COMPOSITEhow the fangs are drawn (COMPOSITE_LIGHTEN or _ADDITIVE)
TARGET_STRIKE_TICKSlength of the effect in ticks

Definition at line 45 of file battle_effect_target_strike.c.

Functions in detail

btEffectRunNumbingSting

void btEffectRunNumbingSting(BATTLE_EFFECT_PARM *args)

One slash strikes the first target among glints, in lightning colours.

Abilities: Numbing Sting.

References btEffectRunTargetStrike().

Referenced by BattleEffectHandlers.

Definition at line 60 of file battle_effect_target_strike.c.

btEffectRunCannibalFang

void btEffectRunCannibalFang(BATTLE_EFFECT_PARM *args)

Fangs bite the first target three times, in ember colours, and drain it into the user.

Abilities: Cannibal Fang.

References btEffectRunTargetStrike().

Referenced by BattleEffectHandlers.

Definition at line 69 of file battle_effect_target_strike.c.

btEffectRunPoisonousBite

void btEffectRunPoisonousBite(BATTLE_EFFECT_PARM *args)

Fangs bite the first target once, in lime, with smoke.

Abilities: Poisonous Bite; Poison Fang.

References btEffectRunTargetStrike().

Referenced by BattleEffectHandlers.

Definition at line 77 of file battle_effect_target_strike.c.

btEffectRunRabidFang

void btEffectRunRabidFang(BATTLE_EFFECT_PARM *args)

Fangs bite the first target once, with smoke, in Mars Djinn colours.

Abilities: Rabid Fang.

References btEffectRunTargetStrike().

Referenced by BattleEffectHandlers.

Definition at line 85 of file battle_effect_target_strike.c.

btEffectRunElectricBite

void btEffectRunElectricBite(BATTLE_EFFECT_PARM *args)

Fangs bite the first target three times among glints, in lightning colours.

Abilities: Electric Bite.

References btEffectRunTargetStrike().

Referenced by BattleEffectHandlers.

Definition at line 93 of file battle_effect_target_strike.c.

btEffectRunPoisonTail

void btEffectRunPoisonTail(BATTLE_EFFECT_PARM *args)

One lime slash strikes the first target, with smoke.

Abilities: Poison Tail.

References btEffectRunTargetStrike().

Referenced by BattleEffectHandlers.

Definition at line 101 of file battle_effect_target_strike.c.

btEffectRunVampiricFang

void btEffectRunVampiricFang(BATTLE_EFFECT_PARM *args)

Fangs bite the first target three times and drain it, in Mars Djinn colours.

Abilities: Vampiric Fang.

References btEffectRunTargetStrike().

Referenced by BattleEffectHandlers.

Definition at line 109 of file battle_effect_target_strike.c.

btEffectRunDoubleFang

void btEffectRunDoubleFang(BATTLE_EFFECT_PARM *args)

Fangs bite the first target twice, in blue, with sparks.

Abilities: Double Fang.

References btEffectRunTargetStrike().

Referenced by BattleEffectHandlers.

Definition at line 117 of file battle_effect_target_strike.c.

btEffectRunMortalBlow

void btEffectRunMortalBlow(BATTLE_EFFECT_PARM *args)

One heavy slash strikes the first target, with sparks, in Mars Djinn colours.

Abilities: Mortal Blow.

References btEffectRunTargetStrike().

Referenced by BattleEffectHandlers.

Definition at line 125 of file battle_effect_target_strike.c.

btEffectRunTwinBeaks

void btEffectRunTwinBeaks(BATTLE_EFFECT_PARM *args)

Two slashes strike the first target, with sparks, in lightning colours.

Abilities: Twin Beaks.

References btEffectRunTargetStrike().

Referenced by BattleEffectHandlers.

Definition at line 133 of file battle_effect_target_strike.c.

btEffectRunAcidBite

void btEffectRunAcidBite(BATTLE_EFFECT_PARM *args)

Fangs bite the first target three times, in pink, with smoke.

Abilities: Acid Bite.

References btEffectRunTargetStrike().

Referenced by BattleEffectHandlers.

Definition at line 141 of file battle_effect_target_strike.c.

btEffectRunDrainFang

void btEffectRunDrainFang(BATTLE_EFFECT_PARM *args)

Fangs bite the first target three times, added to what lies under them, and drain it with large motes, in Mars Djinn colours.

Abilities: Drain Fang.

References btEffectRunTargetStrike().

Referenced by BattleEffectHandlers.

Definition at line 150 of file battle_effect_target_strike.c.

btEffectRunTargetStrike

void btEffectRunTargetStrike(BATTLE_EFFECT_PARM *args, Sint32 mode)

Strikes the first target with slashes or a bite of closing fangs, with the extras its flags choose.

References BattleEffectGlintPictureHeights, BattleEffectGlintPictures, BattleEffectGlintPictureWidths, btCameraShake(), btEffectEndCanvasLayer(), btEffectStartCanvasLayer(), btEffectTintBattler(), btEffectTransferCanvas(), btObjectGetStub(), btParticleAdvanceWithGravity2D(), btParticleAdvanceWithGravity3D(), btProjectionPoint(), btProjectionScaledUnit(), btProjectionUnit(), btResourceLoadAndDecompress(), Sint32, state, syCloseEvent(), syCos(), syHeapSlotRelease(), syRandom(), syResourceGetTableEntry(), sySin(), sySoundPlayStub(), syWordsCopy(), TargetStrikeBiteStages, TargetStrikeGlintDrawFlags, TargetStrikeHeights, TargetStrikePictures, TargetStrikeReach and TargetStrikeWidths.

Referenced by btEffectRunAcidBite(), btEffectRunCannibalFang(), btEffectRunDoubleFang(), btEffectRunDrainFang(), btEffectRunElectricBite(), btEffectRunMortalBlow(), btEffectRunNumbingSting(), btEffectRunPoisonousBite(), btEffectRunPoisonTail(), btEffectRunRabidFang(), btEffectRunTwinBeaks() and btEffectRunVampiricFang().

Definition at line 158 of file battle_effect_target_strike.c.