-
Notifications
You must be signed in to change notification settings - Fork 824
Replacements
This page covers how to create replacement effects.
The base syntax looks like this:
R:Event$ <ReplacementType> | <Type-specific params> | [Description$ {String}]
-
ReplacementTypeis the event being replaced - Most replacement effects will also have a
ReplaceWith$parameter which points to an SVar which contains the subability that should replace the event -
Layer$ {CantHappen/Control/Copy/Transform}is optional and needs to be set if the effect is ordered to happen before others.
NotableCantHappenis Forge's way to handle CR 614.17, though not available for every replacement since some are also implemented as Statics instead
Similarly to triggers, the replacing code can access special variables pertaining to the event it replaced. These are specific to each event, and the most common ones are listed below.
This event gets checked when damage is about to be assigned to a card or player.
They may have a Prevent$ True parameter instead of an Execute$ though, which means that nothing happens instead of the event.
Parameters:
-
ValidSource- The damage source must match this for the event to be replaced -
ValidTarget- The damage target must match this for the event to be replaced -
DamageAmount- The amount of damage must match this -
IsCombat- If true, the damage must be combat damage, if false, it can't be
ReplacedObjects:
-
DamageAmount- The amount of damage to be assigned -
Target- The target of the damage -
Source- The source of the damage
This event gets checked when a player is about to discard a card.
Parameters:
-
ValidPlayer- The player who would discard must match this -
ValidCard- The card that would be discarded must match this -
ValidSource- The card causing the discard must match this - DiscardFromEffect - If true, only discards caused by spells/effects will be replaced. Cleanup/statebased discards will not.
ReplacedObjects:
-
Card- The card that would be discarded -
Player- The player that would have discarded
This events gets checked when a player is about to draw a card.
Parameters:
-
ValidPlayer- The player who would draw must match this
This events gets checked when a player would gain life.
Parameters:
-
ValidPlayer- The player who would gain life must match this
This event gets checked when a player would lose.
Parameters:
-
ValidPlayer- The player who would lose must match this
This event gets checked when a card would be moved between zones.
Parameters:
-
ValidCard- The moving card must match this -
Origin- The card must be moving from this zone -
Destination- The card must be moving to this zone
ReplacedObjects:
-
Card- The moving card
-
Adventure Mode
-
Gameplay Guide
-
Tutorials
-
-
Development
-
Customization & Themes