SetStatActiveStateEffect ​
Inherits: Effect < DatabaseResource < Resource
Switches stats on or off on the target entity: one stat, or every stat of a stat group (all Offensive stats off while the target is disarmed). What each stat was before is remembered and put back when the effect ends.
Properties ​
Targets | target_mode | Targets.SINGLE_STAT |
int | stat_id | 0 |
int | stat_group_id | 0 |
Array[int] | excluded_stats | [] |
bool | set_active | true |
Methods ​
Array[int] | resolve_stat_ids( stats_component: StatsComponent ) |
void | specific_effect_logic( effect_instance: EffectInstance ) |
void | on_apply_finished( effect_instance: EffectInstance ) |
String | get_effect_description() |
String | get_editor_description() |
bool | is_valid_configuration() |
void | set_stat( new_stat_id: int, new_set_active: bool = true ) |
void | set_stat_group( new_group_id: int, new_set_active: bool = true ) |
Enumerations ​
enum Targets ​
The options of targets: single stat, stat group.
- SINGLE_STAT =
0- the stat chosen below - STAT_GROUP =
1- every stat of a stat group the target has
Property descriptions ​
Stat Configuration
Targets target_mode = Targets.SINGLE_STAT ​
One stat, or every stat of a stat group
int stat_id = 0 ​
The stat that is switched (or the stat group, when the effect targets a group).
int stat_group_id = 0 ​
The stat group whose stats are all switched (group mode)
Array[int] excluded_stats = [] ​
Stats of the group that are left out (group mode)
bool set_active = true ​
True switches the stats on, false switches them off.
Method descriptions ​
Array[int] resolve_stat_ids( stats_component: StatsComponent ) ​
The stats this effect switches on its target: the chosen stat, or the stats of the group the target has (without the excluded ones)
void specific_effect_logic( effect_instance: EffectInstance ) ​
What the effect does to its target when it is applied.
void on_apply_finished( effect_instance: EffectInstance ) ​
Handle effect removal - restore previous state
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.
bool is_valid_configuration() ​
Check if this effect is properly configured
void set_stat( new_stat_id: int, new_set_active: bool = true ) ​
Set the stat to modify
void set_stat_group( new_group_id: int, new_set_active: bool = true ) ​
Set the stat group to switch