Skip to main content

Constructors

With these constructors, you can create instances of objects. These are used in various other functions; for example adding a participant to a combat session requires a Creature.

Assets

These functions create instances of assets that you created in the Editor. The name specified in these constructors must be the unique asset name, as it appears in the editor's asset list.

Creature
name
  • name (string) - the asset name of the desired Creature
  • (Creature) - a new instance of the requested asset
Creates and returns a new Creature instance based on the specified Creature asset.
Item
name
  • name (string) - the asset name of the desired Item
  • (Item) - a new instance of the requested asset
Creates and returns a new Item instance based on the specified Item asset.

Buffs

These functions create instances of PendingBuffs, describing temporary effects that can be applied to combat participants. Check the Combat or Player documentation to see how to apply them.

Buff.AttackDice
delta
duration
  • delta (number) - the modification in dice, may be positive or negative
  • duration (number) - number of combat rounds during which the buff remains active
  • (PendingBuff) - a new instance of the requested buff
Creates and returns a new buff that modifies Attack Dice.
Buff.DefenseDice
delta
duration
  • delta (number) - the modification in dice, may be positive or negative
  • duration (number) - number of combat rounds during which the buff remains active
  • (PendingBuff) - a new instance of the requested buff
Creates and returns a new buff that modifies Defense Dice.
Buff.GrappleDice
delta
duration
  • delta (number) - the modification in dice, may be positive or negative
  • duration (number) - number of combat rounds during which the buff remains active
  • (PendingBuff) - a new instance of the requested buff
Creates and returns a new buff that modifies Grapple Dice.
Buff.SwallowDice
delta
duration
  • delta (number) - the modification in dice, may be positive or negative
  • duration (number) - number of combat rounds during which the buff remains active
  • (PendingBuff) - a new instance of the requested buff
Creates and returns a new buff that modifies Swallow Dice.
Buff.StruggleDice
delta
duration
  • delta (number) - the modification in dice, may be positive or negative
  • duration (number) - number of combat rounds during which the buff remains active
  • (PendingBuff) - a new instance of the requested buff
Creates and returns a new buff that modifies Struggle Dice.
Buff.HealthOverTime
delta
duration
  • delta (number) - the HP modification, may be positive or negative
  • duration (number) - number of combat rounds during which the buff remains active
  • (PendingBuff) - a new instance of the requested buff
Creates and returns a new buff that applies a health change every turn (e.g. poison or regeneration).
Buff.Stun
duration
  • duration (number) - number of combat rounds during which the buff remains active
  • (PendingBuff) - a new instance of the requested buff
Creates and returns a new buff that forces a participant to skip their turn.