GrantRewardEffect ​
Inherits: Effect < DatabaseResource < Resource
Applies a Reward to the target entity Works with the existing Reward system to grant abilities, items, currency, effects, etc. Supports reverting rewards when the effect ends (if the reward type supports unapply)
Description ​
NOTE: QuestReward is not allowed as it cannot be reversed
Properties ​
Reward | reward | |
NoRoomRule | if_no_room | NoRoomRule.WAIT |
Methods ​
void | specific_effect_logic( effect_instance: EffectInstance ) |
void | on_apply_finished( effect_instance: EffectInstance ) |
String | get_effect_description() |
String | get_editor_description() |
Array[Dictionary] | validate() |
bool | is_one_off_application() |
Enumerations ​
enum NoRoomRule ​
The options of no room rule: wait, refuse.
- WAIT =
0- The reward waits and is given as soon as there is room (Player.grant_reward); a waiting reward is never reverted by this effect - REFUSE =
1- Nothing is given and the effect fails with a warning to the player
Property descriptions ​
Reward reward ​
The reward to grant
NoRoomRule if_no_room = NoRoomRule.WAIT ​
What happens when the reward needs room that the target has not got (items in a full bag). The reward is never lost or put over another item
Method descriptions ​
void specific_effect_logic( effect_instance: EffectInstance ) ​
Apply the reward to the target
void on_apply_finished( effect_instance: EffectInstance ) ​
When effect is removed, unapply the reward if it supports it
String get_effect_description() ​
The text of the effect for tooltips, with its values filled in.
String get_editor_description() ​
A short text for the effect editor that says what the effect does.
Array[Dictionary] validate() ​
Validation
bool is_one_off_application() ​
What this effect does it does once, when it is applied: a loaded save does not do it again