AbilityReward ​
Grants an ability to the player
Properties ​
int | granted_ability_id | 0 |
AbilityDestination | ability_destination | AbilityDestination.ADD_ACTIVE |
int | initial_rank | 1 |
Methods ​
Dictionary | apply_to_player( player: Player ) |
bool | unapply_from_player( player: Player, tracking_data: Dictionary ) |
bool | supports_unapply() |
bool | should_apply_on_load() |
String | get_summary() |
Array[Dictionary] | validate() |
Enumerations ​
enum AbilityDestination ​
The options of ability destination: replace basic, add active, add passive.
- REPLACE_BASIC =
0 - ADD_ACTIVE =
1
Property descriptions ​
int granted_ability_id = 0 ​
The ability to grant
AbilityDestination ability_destination = AbilityDestination.ADD_ACTIVE ​
Where the ability goes: it replaces the basic attack, or is added to the active or to the passive abilities
int initial_rank = 1 ​
The rank the ability starts at (1 = the first; the ability's highest rank is its limit). Later ranks come from Ability Rank rewards
Method descriptions ​
Dictionary apply_to_player( player: Player ) ​
Gives the reward to the player. Gives back how it went and what it needs to take the reward back.
bool unapply_from_player( player: Player, tracking_data: Dictionary ) ​
Takes the reward back from the player (only for a reward that supports it).
bool supports_unapply() ​
Can the reward be taken back?
bool should_apply_on_load() ​
Is the reward given again when a save is loaded (the ability is put back)?
String get_summary() ​
A short text about the reward and its settings.
Array[Dictionary] validate() ​
Checks the settings of the reward. Gives the problems found (empty when it is fine).