Perks - mganzarcik/fabulae GitHub Wiki

Perks are special abilities a character might have. Perks can be passive (always active), or activated. Activated perks are further divided in to attacks and spell-like perks.

Technically, a perk is a collection of Effects and Modifiers with a defined Projectile, target type and requirements for learning and activating. Activated perks also have associated costs (AP, SP, HP, MP). If perk is a spell-like perk but an animation different from Cast should be used for it, it can also define an animationState the character should use when using the perk.

If the perk is an attack, the user will have to perform a standard attack roll to determine if he has hit. Any effects attached to the perk will only be executed if the attack was a success.

Modifiers attached to a perk behave differently based on the type of the perk. For passive perks, a modifier is just added to the character and is always active. Since perks cannot be “unlearned”, the modifier becomes permanent for the character. For active perks, the modifiers are added to the character before the target is chosen and are removed once the attack has been performed. This means the modifiers are only in effect during target selection and attack execution.

Examples:

https://github.com/mganzarcik/fabulae-showcase/blob/master/showcase/perks/Backstab.xml

https://github.com/mganzarcik/fabulae-showcase/blob/master/showcase/perks/ExplodingShot.xml

https://github.com/mganzarcik/fabulae-showcase/blob/master/showcase/perks/Health.xml