Skip to content

RequirementStat ​

Inherits: Requirement < Resource

Requires entity to have a minimum value in a specific stat

Properties ​

intstat_id0
floatminimum_value0.0
boolcheck_base_statfalse

Methods ​

boolcheck( entity: Entity )
Stringget_failure_message( entity: Entity )
Stringget_summary()
Array[Dictionary]validate()
voidconnect_to_entity_signals( entity: Entity )
voiddisconnect_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