RequirementStat ​
Inherits: Requirement < Resource
Requires entity to have a minimum value in a specific stat
Properties ​
int | stat_id | 0 |
float | minimum_value | 0.0 |
bool | check_base_stat | false |
Methods ​
bool | check( entity: Entity ) |
String | get_failure_message( entity: Entity ) |
String | get_summary() |
Array[Dictionary] | validate() |
void | connect_to_entity_signals( entity: Entity ) |
void | disconnect_from_entity_signals( entity: Entity ) |
Property descriptions ​
int stat_id = 0 ​
Name of the stat to check (e.g., "strength", "intelligence")
float minimum_value = 0.0 ​
Minimum stat value required
bool check_base_stat = false ​
If true, check base stat; if false, check modified stat
Method descriptions ​
bool check( entity: Entity ) ​
Does the entity meet the requirement?
String get_failure_message( entity: Entity ) ​
The reason shown when the entity does not meet the requirement.
String get_summary() ​
A short text about the requirement and its settings.
Array[Dictionary] validate() ​
No stat chosen means the requirement asks nothing
void connect_to_entity_signals( entity: Entity ) ​
Connect to entity stat change signals
void disconnect_from_entity_signals( entity: Entity ) ​
Disconnect from entity stat change signals