ImmunityDefinition ​
Inherits: DatabaseResource < Resource
Defines immunity to specific damage types, status effects, schools, or custom conditions
Properties ​
Color | color | Color.WHITE |
ImmunityType | immunity_type | ImmunityType.DAMAGE_TYPE |
Array[int] | protected_targets | [] # What this immunity protects against |
Array[int] | exclusions | [] # Exceptions to the immunity |
Methods ​
bool | is_valid() |
Array[Dictionary] | validate() |
bool | is_immune_to( target: int ) |
int | get_id() |
Enumerations ​
enum ImmunityType ​
The options of immunity type: damage type, status effect, school type.
- DAMAGE_TYPE =
0 - STATUS_EFFECT =
1 - SCHOOL_TYPE =
2
Property descriptions ​
Basic Properties
Color color = Color.WHITE ​
The color that stands for this in the interface
Immunity Targets
ImmunityType immunity_type = ImmunityType.DAMAGE_TYPE ​
What the immunity protects against: damage types, status effects or ability schools
Array[int] protected_targets = [] # What this immunity protects against ​
The ids of what the immunity protects against (damage types, status effects or schools, by the immunity type)
Array[int] exclusions = [] # Exceptions to the immunity ​
The ids that are left out of the immunity: an exception to the protected targets
Method descriptions ​
bool is_valid() ​
Does the immunity have an id, a name and something to protect against?
Array[Dictionary] validate() ​
Checks the immunity. Gives the problems found (empty when it is fine).
bool is_immune_to( target: int ) ​
Does the immunity protect against this?
int get_id() ​
The id of the immunity.