Related Projectile
During the execution of its action, a spell can add projectiles (either fired immediately, or for 'with trigger' spells, fired later as part of a Trigger Payload).
Typically a spell's action is executed by the wand after drawing the spell. The action (and any projectiles it adds) can also be executed by other spells, e.g. Divide By, effectively copying both the spell's projectiles and modifications.
In some cases a spell's projectile(s) are used without calling the spell's action. This is facilitated by the related_projectiles
field in the spell's configuration, which usually holds a duplicate of the list of projectiles added via the add_projectile()
methods:
-
add_projectile()
-
add_projectile_trigger_hit_world()
-
add_projectile_trigger_timer()
add_projectile_trigger_death()
Add Trigger, Add Timer and Add Expiration Trigger all use the related projectile of their target to create a new projectile 'with trigger'.
The Plicate Spells also use related_projectiles
as the source for the action that they copy.
Spells with "wrong" Related Projectiles
Some spells define a sequence of related projectiles that don't match the sequence of projectiles in their action. This makes them behave differently if copied using the Add Trigger or Plicate spells.
- Matosade - creates a single "real" worm (which may drop a health upgrade on death), rather than the rain of heartless worms you get normally.
- Summon Firebug Swarm (and other swarms) - produce one extra bug, the count being one higher in their related projectiles.
The "related" projectiles will be used:
- When Add Trigger/etc. targets this spell and the payload search succeeds
- When Plicates target this spell, if this spell is of type Projectile or Static Projectile and there is enough mana.
If the original spell is also drawn and cast (which is very often the case with Plicates), then both "related" and "normal" projectile sequences may appear in the result.