Conditions

Conditions have to be registered in order for them to show up on a figure or in the Context Menu.

This is done by using the ConditionApi. At least a name and the link to the image for this condition have to be provided.

local ConditionApi = require("api.ConditionApi")

ConditionApi.registerCondition("My Condition", {
  -- the link to the image for this condition
  image = "http://..."
})

If the condition is stackable, the attribute max can be used as well.

local ConditionApi = require("api.ConditionApi")

ConditionApi.registerCondition("My Condition", {
  image = "http://...",
  -- The condition can be stacked up to 5 times
  max = 5,
})

If an image for the immunity to that condition also exists, it can be provided as well. Also Condition immunities can be shared. E.g. you can define that a figure is always immune to this new condition, when it also has immunity to "Stun". When a figure with a "Stun" immunity spawns, the immunity image for this new condition is applied as well. This can be done by providing an immunity attribute.

local ConditionApi = require("api.ConditionApi")

ConditionApi.registerCondition("My Condition", {
  image = "http://...",
  max = 5,
  immunity = {
    -- The image for the immunity
    image = "http://...",
    -- A list of other conditions or effects
    -- When the figure is immune to one of those, it will also be immune to "My Condition"
    sharedWith = { "Stun", "Pull" }
  }
})

Effects

Effects are any special effect that a figure has. They can be registered, so that an image (or text) can be shown below the figure’s HP bar. When an Effect’s name is then added to its Stats, it will show the registered image (or text). Effects can also be used to add additional images for movement types, or area of effects.

Registering an Effect is similar to a condition. In fact, every Condition is also an Effect (so you don’t have to register it twice). The registration is done via the registerEffect function in the ConditionApi. The attributes are similar to registering a Condition. A difference is that the name is part of the table and not the first parameter to the function call. Also Effects currently don’t use the max attribute. Either an image or a text has to be supplied. If the image is supplied, it will be shown when the Effect is active. Otherwise, the text will be used (e.g. "AgD" is used for the Effect "Attacker gain Disadvantage"). Immunities work the same as for Conditions.

local ConditionApi = require("api.ConditionApi")

ConditionApi.registerEffect({
  -- The name is part of the table, instead of an extra function parameter
  name = "My Effect",
  -- Either an image or a text has to be provided
  image = "http://...",
  text = "MyEff",
  -- Works the same as for conditions
  immunity = {
    image = "http://...",
    sharedWith = { "Stun", "Pull" }
  }
})

The following Effects already exist:

  • Advantage (shown as an A)

  • Attackers gain Disadvantage (shown as AgD)

  • Curse

  • Flying, Jumping, Moving (used for the default move icon)

  • Generate Any, Generate Air, Generate Dark, Generate Earth, Generate Fire, Generate Ice, Generate Light, Generate Light or Dark

  • Pierce

  • Pull, Push

  • Range (used as the range icon for ranged Retaliate)

  • Retaliate, Shield

  • Target (number of targets)