Abilities - AtlasAttack/AtlasCoreDocumentation GitHub Wiki

Abilities let you create activatable effects that the player can use as seen in the abilities menu ingame:

image

To make a new ability use: AbilityManager.RegisterAbility(ability);

Example: RegisterAbility( new Ability("Inspire", "Nearby party members and friends gain +2 to their highest stat for 6 minutes. ~o~Requires 6+ Charisma.~s~", InspireUsed, 1080f, true, () => { return activeCharacter.GetStatValue(CharacterStatType.Charisma) >= 6; }));

When creating the ability, you'll need to specify the information above including the name, description, cooldown, and whether or not that ability is a 'default' ability, meaning players have the ability unlocked by default. You'll also provide an on-use callback function, and you can optionally provide a validation function which will allow the ability to be used only when it returns true.

In the example above, the Inspire ability will call the InspireUsed function when used, and will only allow the ability to be used if the player's charisma is 6 or higher. By convention, any ability requirements should be stated in the description using orange text.