Skip to Content
The Alchemy Project

src/field/script_commands_douse.c

Douse: a rain cloud floats out over the target and rains on it, then shrinks back into the caster. More…

Included by script_commands.c.

Macros

NameDescription
#defineDOUSE_DROPS 10The drops Douse rains: cast at nothing, cast on a target, and cast on a target in Mercury Lighthouse's entrance or middle floors (FIELD_EFFECT_STATE.lit), where larger blue drops sway down in their place and none splashes; elsewhere, as in Imil, the drops are small and white.
#defineDOUSE_DROPS_ON_TARGET 24
#defineDOUSE_SWAYING_DROPS_ON_TARGET 30

Functions

NameDescription
voidfdEffectUpdateDouseDrop (ACTOR *drop)Per-tick update of a falling drop: on reaching its ground height it is released 2 ticks later and scatters three half-size splashes, which hop toward points 32 pixels away and are released after 6 ticks.
voidfdEffectUpdateDriftingFallActor (ACTOR *particle)Per-tick update: drifts from side to side, up to a pixel a tick, as it falls 0.3 pixels a tick, and is released on reaching its ground height.
voidfdPsynergyDouseOnTarget (Sint32 unused)Runs Douse cast on a target, through fdPsynergyDouse.
voidfdPsynergyDouse (void)A rain cloud rises from 16 pixels above the caster to 32 pixels above the destination (80 with sceneVariant) over GROW_STEPS ticks, growing as it goes, rains drops, and returns.

Description

Douse: a rain cloud floats out over the target and rains on it, then shrinks back into the caster. Part of script_commands.c.

Macros in detail

DOUSE_DROPS

#define DOUSE_DROPS 10

The drops Douse rains: cast at nothing, cast on a target, and cast on a target in Mercury Lighthouse's entrance or middle floors (FIELD_EFFECT_STATE.lit), where larger blue drops sway down in their place and none splashes; elsewhere, as in Imil, the drops are small and white. open question (no evidence): why those two floors take other drops; the code only tests the map, and a recording shows the difference, not its reason.

Referenced by fdPsynergyDouse().

Definition at line 12 of file script_commands_douse.c.

DOUSE_DROPS_ON_TARGET

#define DOUSE_DROPS_ON_TARGET 24

Referenced by fdPsynergyDouse().

Definition at line 13 of file script_commands_douse.c.

DOUSE_SWAYING_DROPS_ON_TARGET

#define DOUSE_SWAYING_DROPS_ON_TARGET 30

Referenced by fdPsynergyDouse().

Definition at line 14 of file script_commands_douse.c.

Functions in detail

fdEffectUpdateDouseDrop

void fdEffectUpdateDouseDrop(ACTOR *drop)

Per-tick update of a falling drop: on reaching its ground height it is released 2 ticks later and scatters three half-size splashes, which hop toward points 32 pixels away and are released after 6 ticks.

References fdActorSetTargetPosFromMagnitudeAngle(), fdActorSpawn(), fdActorStartScriptStub(), FieldEffectSharedParticleScript, Sint32 and syRandom().

Referenced by fdPsynergyDouse().

Definition at line 19 of file script_commands_douse.c.

fdEffectUpdateDriftingFallActor

void fdEffectUpdateDriftingFallActor(ACTOR *particle)

Per-tick update: drifts from side to side, up to a pixel a tick, as it falls 0.3 pixels a tick, and is released on reaching its ground height.

References fdActorStartScriptStub(), FieldEffectSharedParticleScript, Sint32 and syRandom().

Referenced by fdPsynergyDouse().

Definition at line 56 of file script_commands_douse.c.

fdPsynergyDouseOnTarget

void fdPsynergyDouseOnTarget(Sint32 unused)

Runs Douse cast on a target, through fdPsynergyDouse.

References fdPsynergyDouse() and Sint32.

Referenced by fdPsynergyDispatch().

Definition at line 70 of file script_commands_douse.c.

fdPsynergyDouse

void fdPsynergyDouse(void)

A rain cloud rises from 16 pixels above the caster to 32 pixels above the destination (80 with sceneVariant) over GROW_STEPS ticks, growing as it goes, rains drops, and returns.

References fdActorReleaseStub(), fdActorSelectAnimationStub(), fdActorSetSpriteColorModeStub(), fdActorSpawn(), fdEffectInterpolate(), fdEffectUpdateDouseDrop(), fdEffectUpdateDriftingFallActor(), fdMapGridGetTerrainHeightStub(), fdPsynergyFadeFromCastColor(), fdPsynergyFadeToCastColor(), Sint32, syRandom(), sySoundPlayStub(), sySynch() and syVectorAddPolarOffset().

Referenced by fdPsynergyDouseOnTarget() and fdPsynergyRun().

Definition at line 78 of file script_commands_douse.c.