Skip to Content
The Alchemy Project

src/field/script_commands_cloak.c

Cloak, Douse, falling particles and steering a lifted target. More…

Included by script_commands.c.

Macros

NameDescription
#defineCLOAK_END (ABILITY_CLOAK | ACT_PACKED)The Psynergy request that ends Cloak, without paying PP: what the ground check (fdEffectCheckCloakTile) makes when the caster does not stand on a tile it can hide on.
#defineCLOAK_BLINKS 10The times the caster blinks as Cloak hides it.

Functions

NameDescription
voidfdEffectCheckCloakTile (void)An event of Cloak: when the controlled character does not stand on a tile Cloak can hide on, requests CLOAK_END (Cloak, packed).
voidfdPsynergyEndCloak (void)Show the Cloaked caster again: stop checking the ground under it, then flicker it back into view over twenty ticks and clear the cloak (fdPsynergyRunEnd).
voidfdPsynergyResumeCloakCheck (void)Starts the Cloak metatile check if the leader is hidden.
voidfdPsynergyStartCloak (void)Cloak the caster: flicker it CLOAK_BLINKS times, leave it half transparent, then check the ground under it every tick.

Description

Cloak, Douse, falling particles and steering a lifted target. Part of script_commands.c.

Macros in detail

CLOAK_END

#define CLOAK_END (ABILITY_CLOAK | ACT_PACKED)

The Psynergy request that ends Cloak, without paying PP: what the ground check (fdEffectCheckCloakTile) makes when the caster does not stand on a tile it can hide on.

Referenced by fdPsynergyStartCloak().

Definition at line 7 of file script_commands_cloak.c.

#define CLOAK_BLINKS 10

The times the caster blinks as Cloak hides it.

Referenced by fdPsynergyStartCloak().

Definition at line 9 of file script_commands_cloak.c.

Functions in detail

fdEffectCheckCloakTile

void fdEffectCheckCloakTile(void)

An event of Cloak: when the controlled character does not stand on a tile Cloak can hide on, requests CLOAK_END (Cloak, packed).

References fdActorLookup(), fdMapGridIsCloakMetatile() and fdPartyGetLeaderActor().

Referenced by fdPsynergyEndCloak(), fdPsynergyResumeCloakCheck() and fdPsynergyStartCloak().

Definition at line 13 of file script_commands_cloak.c.

fdPsynergyEndCloak

void fdPsynergyEndCloak(void)

Show the Cloaked caster again: stop checking the ground under it, then flicker it back into view over twenty ticks and clear the cloak (fdPsynergyRunEnd).

References fdActorSelectAnimationStub(), fdEffectCheckCloakTile(), MainRoutineStateWork, syCloseEvent(), sySoundPlayStub() and sySynch().

Referenced by fdPsynergyRunEnd() and fdPsynergyStartCloak().

Definition at line 27 of file script_commands_cloak.c.

fdPsynergyResumeCloakCheck

void fdPsynergyResumeCloakCheck(void)

Starts the Cloak metatile check if the leader is hidden. fdEngineRun calls it as a scene loads, since MainRoutineStateWork.cloaked outlives the scene.

References fdEffectCheckCloakTile(), MainRoutineStateWork and sySetEvent().

Referenced by fdEngineRun().

Definition at line 70 of file script_commands_cloak.c.

fdPsynergyStartCloak

void fdPsynergyStartCloak(void)

Cloak the caster: flicker it CLOAK_BLINKS times, leave it half transparent, then check the ground under it every tick. When it cannot hide where it stands, show it again at once.

References fdActorSelectAnimationStub(), fdEffectCheckCloakTile(), fdPsynergyEndCloak(), MainRoutineStateWork, Sint32, sySetEvent(), sySoundPlayStub() and sySynch().

Referenced by fdPsynergyDispatch() and fdPsynergyRun().

Definition at line 79 of file script_commands_cloak.c.