Skip to content

ImmunityDefinition ​

Inherits: DatabaseResource < Resource

Defines immunity to specific damage types, status effects, schools, or custom conditions

Properties ​

ColorcolorColor.WHITE
ImmunityTypeimmunity_typeImmunityType.DAMAGE_TYPE
Array[int]protected_targets[] # What this immunity protects against
Array[int]exclusions[] # Exceptions to the immunity

Methods ​

boolis_valid()
Array[Dictionary]validate()
boolis_immune_to( target: int )
intget_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.