Skip to content

RequirementKnowsAbility ​

Inherits: Requirement < Resource

Needs the entity to have an ability, optionally at a rank: "needs Fireball to learn Fireball II".

Description ​

(RequirementAbilityRank asks about the rank of the ability that an effect belongs to; this one asks whether the entity has an ability at all.)

Properties ​

intability_id0
intmin_rank1

Methods ​

boolcheck( entity: Entity )
Stringget_failure_message( entity: Entity )
Stringget_summary()
Array[Dictionary]validate()

Property descriptions ​

int ability_id = 0 ​

The ability

int min_rank = 1 ​

The lowest rank (1 = any rank)

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() ​

Checks the settings of the requirement. Gives the problems found (empty when it is fine).