Effects - mganzarcik/fabulae GitHub Wiki
Effects are basically Groovy scripts that can be attached to UsableItems, TrapTypes, Perks, Spells and Weapons (all implementing the EffectContainer interface). They are defined in XML and executed when it makes sense for the particular container (when the item is used, when the weapon hits, when the trap is sprung, etc.).
Each effect is defined by the parameters it accepts, the duration of the effect (can be instant, if not, the duration is measured in combat turns), the action it should take when the target is hit, and for effects that have a duration, the action it should take every turn while it is in effect and when it expires.
Note that the duration and the various actions are all scripts - they can be dynamic based on the parameters the effect accepts, or based on some property of the user / target (for example skill ranks).
The description of the effect is rather dynamic as well. You define both the language file key to use and any additional parameters that should be provided to the language key. This allows you to define descriptions that are dynamic and for example describe the actual level of parameters important to this effect.
Persistent effects can also have indicators attached. These are particle effects that will be displayed on the character affected by the effect while it is in progress. You can define delays (in seconds) and offsets to character center (in tiles) for these.
Samples:
https://github.com/mganzarcik/fabulae-showcase/blob/master/showcase/effects/Armor.xml
https://github.com/mganzarcik/fabulae-showcase/blob/master/showcase/effects/Fireball.xml
https://github.com/mganzarcik/fabulae-showcase/blob/master/showcase/effects/Paralyze.xml