Reference catalogue#
Every name you can write in a rule, in one place: 55 value hooks, 50 events, 24 conditions and 33 actions; 0 more value hooks are planned but not usable yet. This page is generated from the game code, so it is always up to date: do not edit it by hand.
How to read this page#
- A value hook is a number the game asks for, such as damage or light radius. A modifier changes it:
{ "hook": "attack.damage", "op": "add", "value": 1 }. - An event is something that just happened, such as a kill or a spell cast. A listener reacts to it by running an action:
{ "on": "mob.killed", "action": "heal", "params": { "amount": 1 } }. - A condition limits when a rule applies. It goes in
when, for example{ "hpBelow": 30 }. - An action is what a listener does when its event happens: heal, deal damage, give gold.
- wired means the game really uses the name. planned means it is declared but not used yet, and the validator refuses it. Use wired names only.
The columns of the hook and event tables#
| Column | Meaning |
|---|---|
| Name | The stable name you write in hook (value) or on (event). |
| Kind | value or event, then its status: wired or planned. |
| Description | What the value measures or the event announces, then the context keys: the facts the game gives with it, the only ones when can read. |
| Example | A syntax skeleton, not a sensible rule: copy the shape, not the numbers or the action. |
Check a name before you use it#
- Find the name on this page. If it is not here, it does not exist (use the filter box).
- Check that it is
wired. - Check its kind: an event in
hook, or a value inon, is refused. - Check its context keys before you write a
when.
For worked examples, see the cookbook; if the game refuses a file, see troubleshooting.
Value hooks and events, by context#
Combat#
| Name | Kind | Description | Example |
|---|---|---|---|
attack.accuracy | value, wired | How accurate a blow or shot is. Use it to make attacks hit more or less often; kind: ranged is a shot.Context: target, weapon, kind, side | { "hook": "attack.accuracy", "op": "add", "value": 1 } |
attack.damage | value, wired | Bonus damage of a blow or shot. Use it to make attacks hit harder; kind: ranged is a shot, kind: melee a blow.Context: weapon, kind, side | { "hook": "attack.damage", "op": "add", "value": 1 } |
attack.critRange | value, wired | The lowest die result that counts as a critical hit. Lower it to crit more often; kind: ranged is a shot, kind: melee a blow.Context: weapon, target, kind, side | { "hook": "attack.critRange", "op": "add", "value": 1 } |
attack.ranged | value, wired | Multiplier applied to ranged shots. Context: weapon, target, side | { "hook": "attack.ranged", "op": "add", "value": 1 } |
defense.armorClass | value, wired | Armor class of the wearer against an attacker. Higher means harder to hit. Context: attacker, kind, weapon, side, resource | { "hook": "defense.armorClass", "op": "add", "value": 1 } |
defense.dodge | value, wired | Chance to dodge a blow, in percent. Context: attacker, kind, weapon, side, resource | { "hook": "defense.dodge", "op": "add", "value": 1 } |
damage.taken | value, wired | Damage the wearer receives, after resistance. The wearer’s health, mana and hunger are also given, so a rule can depend on them. Context: element, hpPercent, manaPercent, hunger | { "hook": "damage.taken", "op": "add", "value": 1 } |
retaliation.damage | value, wired | Damage sent back to the attacker when the wearer is hit. Context: — | { "hook": "retaliation.damage", "op": "add", "value": 1 } |
bind.chance | value, wired | Chance to bind (root) an enemy, in percent. Context: target | { "hook": "bind.chance", "op": "add", "value": 1 } |
hit.element | value, wired | Damage of the element named by the element parameter, added to every blow, for any element of the catalogue. A blow hits each element once, with the sum of its modifiers.Context: element | { "hook": "hit.element", "op": "add", "value": 1 } |
hit.frost | value, wired | Duration of the slowdown added to every blow. Context: — | { "hook": "hit.frost", "op": "add", "value": 1 } |
hit.poison | value, wired | Strength of the poison added to every blow. Context: — | { "hook": "hit.poison", "op": "add", "value": 1 } |
hit.drain | value, wired | Health given back to the wearer on every blow. Context: — | { "hook": "hit.drain", "op": "add", "value": 1 } |
hit.leech | value, wired | Percentage of the damage of an element that is given back as health. The element is the element parameter of the read.Context: element | { "hook": "hit.leech", "op": "add", "value": 1 } |
hit.dealt | event, wired | The wearer has just landed a blow. Context: target, weapon, critical, side, hpPercent, manaPercent, hunger | { "on": "hit.dealt", "action": "heal", "params": { "amount": 1 } } |
hit.taken | event, wired | The wearer has just been hit; element is set for an elemental blow.Context: attacker, element, hpPercent, manaPercent, hunger | { "on": "hit.taken", "action": "heal", "params": { "amount": 1 } } |
hit.avoided | event, wired | A creature’s blow has just missed the wearer. avoidanceReason says why: roll for a natural miss, armorClass for a total that was too low, dodge for a dodge.Context: attacker, avoidanceReason, hpPercent, manaPercent, hunger | { "on": "hit.avoided", "action": "heal", "params": { "amount": 1 } } |
mob.killed | event, wired | A creature has just been killed. Context: target, hpPercent, manaPercent, hunger | { "on": "mob.killed", "action": "heal", "params": { "amount": 1 } } |
poison.applied | event, wired | A venom has just been applied to a blade or to ammunition. Context: kind, hpPercent, manaPercent, hunger | { "on": "poison.applied", "action": "heal", "params": { "amount": 1 } } |
hit.missed | event, wired | A blow or shot has just missed, or struck empty air. avoidanceReason says why the target took nothing: roll, armorClass or dodge; it is absent when the blow struck empty air.Context: target, weapon, kind, side, avoidanceReason, hpPercent, manaPercent, hunger | { "on": "hit.missed", "action": "heal", "params": { "amount": 1 } } |
turn.started | event, wired | A turn begins. Context: turn, hpPercent, manaPercent, hunger | { "on": "turn.started", "action": "heal", "params": { "amount": 1 } } |
turn.ended | event, wired | A turn ends, after the creatures have played. Context: turn, hpPercent, manaPercent, hunger | { "on": "turn.ended", "action": "heal", "params": { "amount": 1 } } |
Survival (hunger, food, mana, health)#
| Name | Kind | Description | Example |
|---|---|---|---|
hunger.cost | value, wired | Hunger an action uses up (turn, walking, fighting, crafting). The wearer’s hunger is also given. Context: action, hunger | { "hook": "hunger.cost", "op": "add", "value": 1 } |
hunger.satiety | value, wired | Reduction of the hunger used up, in percent. Context: — | { "hook": "hunger.satiety", "op": "add", "value": 1 } |
hunger.max | value, wired | Maximum hunger. Context: — | { "hook": "hunger.max", "op": "add", "value": 1 } |
food.satiety | value, wired | Satiety a food gives back. Context: food | { "hook": "food.satiety", "op": "add", "value": 1 } |
mana.max | value, wired | Maximum mana of the wearer. Context: — | { "hook": "mana.max", "op": "add", "value": 1 } |
mana.regen | value, wired | Mana regained per turn. Context: — | { "hook": "mana.regen", "op": "add", "value": 1 } |
rest.taken | event, wired | The wearer rests at the camp. Context: hpPercent, manaPercent, hunger | { "on": "rest.taken", "action": "heal", "params": { "amount": 1 } } |
player.healed | event, wired | The wearer recovers health at the camp. Context: hpPercent, manaPercent, hunger | { "on": "player.healed", "action": "heal", "params": { "amount": 1 } } |
player.dying | event, wired | A deadly blow is about to hit the wearer; a listener can cancel it before death. Context: hpPercent, manaPercent, hunger | { "on": "player.dying", "action": "heal", "params": { "amount": 1 } } |
player.died | event, wired | The wearer dies. Context: hpPercent, manaPercent, hunger | { "on": "player.died", "action": "heal", "params": { "amount": 1 } } |
food.eaten | event, wired | A food has just been eaten. Context: food, hpPercent, manaPercent, hunger | { "on": "food.eaten", "action": "heal", "params": { "amount": 1 } } |
hunger.stageChanged | event, wired | The hunger stage changes. Context: hungerStage, previousHungerStage, hpPercent, manaPercent, hunger | { "on": "hunger.stageChanged", "action": "heal", "params": { "amount": 1 } } |
potion.drunk | event, wired | A potion has just been drunk. Context: kind, hpPercent, manaPercent, hunger | { "on": "potion.drunk", "action": "heal", "params": { "amount": 1 } } |
Magic#
| Name | Kind | Description | Example |
|---|---|---|---|
spell.cost | value, wired | Mana a spell costs. The spell’s element, and the caster’s health, mana and hunger, are also given. Context: kind, element, hpPercent, manaPercent, hunger | { "hook": "spell.cost", "op": "add", "value": 1 } |
spell.doseConsumed | value, wired | Dose of reagent a spell uses up. Context: resource | { "hook": "spell.doseConsumed", "op": "add", "value": 1 } |
spell.power | value, wired | Power of a spell. The syllable formula also gives its shape and element, fixed before the power; a charged enchantment gives only the skill. Context: skill, kind, element | { "hook": "spell.power", "op": "add", "value": 1 } |
spell.waveRadius | value, wired | Radius of a spell’s wave. Context: kind, element | { "hook": "spell.waveRadius", "op": "add", "value": 1 } |
spell.chainTargets | value, wired | Number of extra creatures a spell reaches by bouncing, the closest to the target first. Context: kind, element | { "hook": "spell.chainTargets", "op": "add", "value": 1 } |
spell.chainRadius | value, wired | How far a spell’s bounces reach from the target, in cells. Context: kind, element | { "hook": "spell.chainRadius", "op": "add", "value": 1 } |
spell.chainFactor | value, wired | Share of a spell’s power and status duration that carries over to each bounce. Context: kind, element | { "hook": "spell.chainFactor", "op": "add", "value": 1 } |
spell.cast | event, wired | A spell has just been cast. Context: kind, element, hpPercent, manaPercent, hunger | { "on": "spell.cast", "action": "heal", "params": { "amount": 1 } } |
spell.hit | event, wired | One of the wearer’s spells has just reached a creature. Context: target, kind, element, hpPercent, manaPercent, hunger | { "on": "spell.hit", "action": "heal", "params": { "amount": 1 } } |
spell.taken | event, wired | A creature’s magical effect (spell, breath, elemental power) has just hit the wearer. Context: attacker, element, hpPercent, manaPercent, hunger | { "on": "spell.taken", "action": "heal", "params": { "amount": 1 } } |
Exploration (light, harvesting, traps, chests)#
| Name | Kind | Description | Example |
|---|---|---|---|
light.radius | value, wired | How far the wearer sees, in cells. Context: — | { "hook": "light.radius", "op": "add", "value": 1 } |
torch.duration | value, wired | How long a torch burns, in turns. Context: kind | { "hook": "torch.duration", "op": "add", "value": 1 } |
harvest.yield | value, wired | Amount gathered from a resource node. Context: resource | { "hook": "harvest.yield", "op": "add", "value": 1 } |
trap.power | value, wired | Strength of a trap that is set. Context: kind | { "hook": "trap.power", "op": "add", "value": 1 } |
trap.detection | value, wired | Chance to spot a trap, in percent. Context: — | { "hook": "trap.detection", "op": "add", "value": 1 } |
chest.rolls | value, wired | Number of loot rolls a chest gives. Context: depth | { "hook": "chest.rolls", "op": "add", "value": 1 } |
chest.trapChance | value, wired | Chance that a chest is trapped, from 0 to 1. Context: depth | { "hook": "chest.trapChance", "op": "add", "value": 1 } |
resource.harvested | event, wired | A resource has just been gathered. Context: resource, hpPercent, manaPercent, hunger | { "on": "resource.harvested", "action": "heal", "params": { "amount": 1 } } |
room.entered | event, wired | The wearer enters a room from outside; firstVisit is set if it was unexplored.Context: depth, firstVisit, hpPercent, manaPercent, hunger | { "on": "room.entered", "action": "heal", "params": { "amount": 1 } } |
floor.entered | event, wired | The wearer arrives on a new floor. Context: depth, hpPercent, manaPercent, hunger | { "on": "floor.entered", "action": "heal", "params": { "amount": 1 } } |
trap.triggered | event, wired | A trap goes off; target is the creature caught, if there is one.Context: kind, target, hpPercent, manaPercent, hunger | { "on": "trap.triggered", "action": "heal", "params": { "amount": 1 } } |
chest.opened | event, wired | A chest has just been opened. Context: depth, hpPercent, manaPercent, hunger | { "on": "chest.opened", "action": "heal", "params": { "amount": 1 } } |
trap.placed | event, wired | A trap has just been set. Context: kind, hpPercent, manaPercent, hunger | { "on": "trap.placed", "action": "heal", "params": { "amount": 1 } } |
torch.lit | event, wired | A torch has just been lit. Context: kind, hpPercent, manaPercent, hunger | { "on": "torch.lit", "action": "heal", "params": { "amount": 1 } } |
torch.burnedOut | event, wired | A torch has gone out because it ran out of fuel. Context: kind, hpPercent, manaPercent, hunger | { "on": "torch.burnedOut", "action": "heal", "params": { "amount": 1 } } |
stairs.used | event, wired | The wearer takes a staircase, down or up. Context: kind, hpPercent, manaPercent, hunger | { "on": "stairs.used", "action": "heal", "params": { "amount": 1 } } |
npc.talked | event, wired | The wearer talks to a character. Context: hpPercent, manaPercent, hunger | { "on": "npc.talked", "action": "heal", "params": { "amount": 1 } } |
Items (loot, merchants, forge, engraving, reforge, enchanting)#
| Name | Kind | Description | Example |
|---|---|---|---|
ammo.consumed | value, wired | Ammunition used up by one shot. Context: resource | { "hook": "ammo.consumed", "op": "add", "value": 1 } |
loot.quality | value, wired | Quality of an item that is found. Context: depth | { "hook": "loot.quality", "op": "add", "value": 1 } |
loot.family | value, wired | Share of an item family in the loot. Context: depth | { "hook": "loot.family", "op": "add", "value": 1 } |
merchant.price | value, wired | Price of an item at a merchant. Context: kind | { "hook": "merchant.price", "op": "add", "value": 1 } |
merchant.recipeOffers | value, wired | Number of recipes a merchant offers. Context: depth | { "hook": "merchant.recipeOffers", "op": "add", "value": 1 } |
craft.skill | value, wired | Forge skill used for the quality odds: the raw skill, capped. A catalyst changes it for its own craft only. Context: — | { "hook": "craft.skill", "op": "add", "value": 1 } |
craft.quality | value, wired | Quality of what is forged. Context: kind | { "hook": "craft.quality", "op": "add", "value": 1 } |
craft.duration | value, wired | How long a craft takes, in turns. Context: skill | { "hook": "craft.duration", "op": "add", "value": 1 } |
engrave.chance | value, wired | Chance that an engraving works, from 0 to 1. Context: skill | { "hook": "engrave.chance", "op": "add", "value": 1 } |
engrave.cost | value, wired | Reagents an engraving costs. Context: resource | { "hook": "engrave.cost", "op": "add", "value": 1 } |
reforge.chance | value, wired | Chance that a reforge works, from 0 to 1. Context: skill | { "hook": "reforge.chance", "op": "add", "value": 1 } |
reforge.cost | value, wired | Cost of a reforge. Context: resource | { "hook": "reforge.cost", "op": "add", "value": 1 } |
consumable.amount | value, wired | Size of a consumable’s effect, by its kind or resource and its action. Context: kind, resource, action | { "hook": "consumable.amount", "op": "add", "value": 1 } |
dismantle.yield | value, wired | Amount of a resource recovered by dismantling. Context: resource | { "hook": "dismantle.yield", "op": "add", "value": 1 } |
enchant.chance | value, wired | Chance that an enchantment holds, from 0 to 1. Context: kind, side, skill | { "hook": "enchant.chance", "op": "add", "value": 1 } |
enchant.cost | value, wired | Reagents an enchantment costs. Context: resource | { "hook": "enchant.cost", "op": "add", "value": 1 } |
item.crafted | event, wired | An item has just been crafted. Context: kind, side, hpPercent, manaPercent, hunger | { "on": "item.crafted", "action": "heal", "params": { "amount": 1 } } |
item.equipped | event, wired | An item has just been equipped. Context: kind, side, hpPercent, manaPercent, hunger | { "on": "item.equipped", "action": "heal", "params": { "amount": 1 } } |
item.unequipped | event, wired | An item has just been unequipped. Context: kind, side, hpPercent, manaPercent, hunger | { "on": "item.unequipped", "action": "heal", "params": { "amount": 1 } } |
consumable.used | event, wired | A consumable has just been used: an item named by kind, or a reagent named by resource.Context: kind, resource, hpPercent, manaPercent, hunger | { "on": "consumable.used", "action": "heal", "params": { "amount": 1 } } |
item.dismantled | event, wired | An item has just been dismantled. Context: kind, side, hpPercent, manaPercent, hunger | { "on": "item.dismantled", "action": "heal", "params": { "amount": 1 } } |
ammo.dismantled | event, wired | Ammunition has just been dismantled. Context: resource, hpPercent, manaPercent, hunger | { "on": "ammo.dismantled", "action": "heal", "params": { "amount": 1 } } |
affix.learned | event, wired | An affix has just been learned in the library. Context: hpPercent, manaPercent, hunger | { "on": "affix.learned", "action": "heal", "params": { "amount": 1 } } |
item.engraved | event, wired | An affix has just been engraved on an item. Context: kind, side, hpPercent, manaPercent, hunger | { "on": "item.engraved", "action": "heal", "params": { "amount": 1 } } |
item.reforged | event, wired | An item has just been reforged. Context: kind, side, hpPercent, manaPercent, hunger | { "on": "item.reforged", "action": "heal", "params": { "amount": 1 } } |
item.enchanted | event, wired | An item has just been enchanted. Context: kind, side, hpPercent, manaPercent, hunger | { "on": "item.enchanted", "action": "heal", "params": { "amount": 1 } } |
item.enchantFailed | event, wired | An enchantment fails: the reagents are lost and the item is unchanged. Context: kind, side, hpPercent, manaPercent, hunger | { "on": "item.enchantFailed", "action": "heal", "params": { "amount": 1 } } |
item.recharged | event, wired | A charged enchantment has just been recharged. Context: kind, side, hpPercent, manaPercent, hunger | { "on": "item.recharged", "action": "heal", "params": { "amount": 1 } } |
item.rerolled | event, wired | An affix has just been rerolled. Context: kind, side, hpPercent, manaPercent, hunger | { "on": "item.rerolled", "action": "heal", "params": { "amount": 1 } } |
recipe.learned | event, wired | A recipe has just been learned. Context: hpPercent, manaPercent, hunger | { "on": "recipe.learned", "action": "heal", "params": { "amount": 1 } } |
item.bought | event, wired | The wearer buys an item, a resource or a recipe. Context: kind, side, hpPercent, manaPercent, hunger | { "on": "item.bought", "action": "heal", "params": { "amount": 1 } } |
item.sold | event, wired | The wearer sells an item or a resource. Context: kind, side, hpPercent, manaPercent, hunger | { "on": "item.sold", "action": "heal", "params": { "amount": 1 } } |
gold.gained | event, wired | The wearer receives gold. Context: kind, hpPercent, manaPercent, hunger | { "on": "gold.gained", "action": "heal", "params": { "amount": 1 } } |
gold.spent | event, wired | The wearer spends gold. Context: kind, hpPercent, manaPercent, hunger | { "on": "gold.spent", "action": "heal", "params": { "amount": 1 } } |
merchant.visited | event, wired | The wearer visits a merchant: talks to them or opens their panel. Context: depth, hpPercent, manaPercent, hunger | { "on": "merchant.visited", "action": "heal", "params": { "amount": 1 } } |
merchant.stocked | event, wired | A merchant’s stock is created, the first time they are met. Context: depth, hpPercent, manaPercent, hunger | { "on": "merchant.stocked", "action": "heal", "params": { "amount": 1 } } |
Skills#
| Name | Kind | Description | Example |
|---|---|---|---|
skill.value | value, wired | Effective value of a skill. Context: skill | { "hook": "skill.value", "op": "add", "value": 1 } |
skill.progression | value, wired | How fast practice progresses, in percent. Context: skill | { "hook": "skill.progression", "op": "add", "value": 1 } |
skill.increased | event, wired | A skill goes up a rank. Context: skill, hpPercent, manaPercent, hunger | { "on": "skill.increased", "action": "heal", "params": { "amount": 1 } } |
Monsters (noise and perception)#
| Name | Kind | Description | Example |
|---|---|---|---|
noise.intensity | value, wired | Loudness of a noise that is made: its hearing radius is multiplied by it, before the cap. Context: kind | { "hook": "noise.intensity", "op": "add", "value": 1 } |
stealth.noise | value, wired | Multiplier on the noise of footsteps and physical actions, depending on the gear worn. Context: kind | { "hook": "stealth.noise", "op": "add", "value": 1 } |
stealth.visual | value, wired | Multiplier on the chance of not being seen, depending on the gear worn. Context: — | { "hook": "stealth.visual", "op": "add", "value": 1 } |
noise.emitted | event, wired | The wearer has just made a noise, for example a footstep. Context: kind, hpPercent, manaPercent, hunger | { "on": "noise.emitted", "action": "heal", "params": { "amount": 1 } } |
Conditions#
| Name | Expected value | Example |
|---|---|---|
target | lit, slowed, bound (rooted or frozen), poisoned | { "target": "target" } |
attacker | depends on the condition | { "attacker": "value" } |
self | depends on the condition | { "self": "value" } |
selfRecovering | depends on the condition | { "selfRecovering": "value" } |
element | an element, or present | { "element": "value" } |
skill | depends on the condition | { "skill": "value" } |
side | depends on the condition | { "side": "value" } |
kind | depends on the condition | { "kind": "value" } |
resource | depends on the condition | { "resource": "value" } |
food | depends on the condition | { "food": "value" } |
hungerStage | depends on the condition | { "hungerStage": "value" } |
hungerBelow | depends on the condition | { "hungerBelow": "value" } |
hpBelow | depends on the condition | { "hpBelow": "value" } |
manaBelow | depends on the condition | { "manaBelow": "value" } |
depthAtLeast | depends on the condition | { "depthAtLeast": "value" } |
targetFamily | depends on the condition | { "targetFamily": "value" } |
attackerFamily | depends on the condition | { "attackerFamily": "value" } |
targetBoss | depends on the condition | { "targetBoss": "value" } |
attackerBoss | depends on the condition | { "attackerBoss": "value" } |
action | depends on the condition | { "action": "value" } |
turnEvery | depends on the condition | { "turnEvery": 10 } |
critical | depends on the condition | { "critical": "value" } |
firstVisit | depends on the condition | { "firstVisit": "value" } |
avoidanceReason | depends on the condition | { "avoidanceReason": "value" } |
Actions#
An action never raises an event: an event raised during an action is ignored (so actions cannot trigger each other in a loop). For example giveGold does not raise gold.gained; that event is raised by the system that grants the gold. A parameter can be a number, a text, a true/false value, a number read from a value hook ({ "hook": "…" }), or a rule marker ($value, $power) where the rule provides one.
| Name | Description | Parameters | Example |
|---|---|---|---|
damage | Deals damage of an element to the creature that at names: the target of the blow, or the wearer’s attacker. | at (target or attacker, required): target (the target of the blow) or attacker (the wearer’s attacker).element (physical or fire or frost or lightning or arcane or poison, required): Element of the damage, one of the elements of magic.elements (magic.json).amount (number, {hook}, $value, $power, required): Damage dealt, in hit points. | {"action":"damage","params":{"at":"target","element":"fire","amount":2}} |
strike | Adds damage of an element to the blow, on its target, if the target is still standing and the amount is positive. | element (physical or fire or frost or lightning or arcane or poison, required): Element of the damage added to the blow.amount (number, {hook}, $value, $power, required): Damage added, in hit points. | {"action":"strike","params":{"element":"lightning","amount":1}} |
push | Pushes back the creature that at names, along the line from the source of the blow (the target’s attacker, the attacker’s target, or the character) to it. A wall, an occupied cell or an immobilised creature stops the push, without cancelling the blow. The total pushed during a turn is capped by push (combat.json). | at (target or attacker, required): target or attacker, the creature that is pushed back.cells (number, {hook}, $value, $power, optional): Number of cells to travel. Default: push.distance, capped by push.maxDistance. | {"action":"push","params":{"at":"target","cells":2}} |
slow | Slows a creature: the longer of its current slowdown and the new count applies. | at (target or attacker, required): target or attacker, the creature that is slowed.turns (number, {hook}, $value, $power, required): Duration of the slowdown, in turns.requireAlive (true or false, optional): True: does not slow a creature that has already fallen. | {"action":"slow","params":{"at":"target","turns":2,"requireAlive":true}} |
bind | Tries to bind a creature for one turn, with a chance in percent, changed by bind.chance. The roll is always made. | at (target or attacker, required): target or attacker, the creature aimed at.percent (number, {hook}, $value, $power, required): Chance to bind, in percent. | {"action":"bind","params":{"at":"target","percent":20}} |
burst | Deals damage to every creature around a centre: the target of the blow, or the wearer. | around (target or player, optional): target (around the target) or player (around the wearer). Default: player.excludeTarget (true or false, optional): True: the target of the blow is not hit.element (physical or fire or frost or lightning or arcane or poison, required): Element of the damage.amount (number, {hook}, $value, $power, required): Damage dealt to each creature, in hit points. | {"action":"burst","params":{"around":"target","excludeTarget":true,"element":"physical","amount":2}} |
wave | Every every hits by the wearer, deals damage around them. The hit count is kept in the listener’s store. | every (number, {hook}, $value, $power, required): Number of hits between two waves.element (physical or fire or frost or lightning or arcane or poison, required): Element of the wave’s damage.amount (number, {hook}, $value, $power, required): Damage dealt to each nearby creature, in hit points. | {"action":"wave","params":{"every":5,"element":"arcane","amount":3}} |
shock | Deals damage around the wearer, then is ready again only after cooldown turns. The turn when it will be ready is kept in the listener’s store. | cooldown (number, {hook}, $value, $power, required): Turns between two shocks.element (physical or fire or frost or lightning or arcane or poison, required): Element of the shock’s damage.amount (number, {hook}, $value, $power, required): Damage dealt to each nearby creature, in hit points. | {"action":"shock","params":{"cooldown":5,"element":"arcane","amount":4}} |
chain | A lightning bolt jumps from the target to the closest creatures in range: targets of them, each taking amount. The target is not struck again. | element (physical or fire or frost or lightning or arcane or poison, required): Element of the bolt.amount (number, {hook}, $value, $power, required): Damage taken by each creature hit, in hit points.targets (number, {hook}, $value, $power, required): Number of creatures hit, closest first.range (number, {hook}, $value, $power, required): Range of the bounce, in cells, from the target. | {"action":"chain","params":{"element":"lightning","amount":2,"targets":2,"range":3}} |
heal | Heals the wearer, never above their maximum health. A heal of zero does nothing. | amount (number, {hook}, $value, $power, required): Health given back, in hit points. | {"action":"heal","params":{"amount":2}} |
regenerate | Regenerates the wearer’s health: the same heal as heal, named for the protections that give it. | amount (number, {hook}, $value, $power, required): Health given back, in hit points. | {"action":"regenerate","params":{"amount":1}} |
restoreMana | Gives mana back to the wearer, never above their maximum mana. A restore of zero or less does nothing. | amount (number, {hook}, $value, $power, required): Mana given back. | {"action":"restoreMana","params":{"amount":2}} |
curePoison | Removes the poison from the rule’s wearer, a character or a creature still present. | — | {"action":"curePoison","params":{}} |
leech | Gives the wearer back a share, in percent, of the damage of one element of the blow, rounded to a whole number. | amount (number, {hook}, $value, $power, required): Damage of the blow for the element concerned.percent (number, {hook}, $value, $power, required): Share of the damage given back as health, in percent. | {"action":"leech","params":{"amount":6,"percent":25}} |
poison | Poisons a creature at the given strength. With spread, the poison passes to neighbouring creatures. | at (target or attacker, optional): target or attacker, the creature that is poisoned. Default: target.power (number, {hook}, $value, $power, required): Strength of the poison, in hit points per turn.spread (true or false, optional): True: neighbouring creatures receive the poison too. | {"action":"poison","params":{"at":"target","power":2,"spread":false}} |
bladePoison | Uses up one dose of the blade’s poison on every blow or miss. A blow that lands poisons the target with the dose. | miss (true or false, optional): True for a miss: the dose is used up without poisoning. | {"action":"bladePoison","params":{"miss":false}} |
spreadPoison | A poisoned creature that dies passes its poison, at its strength, to neighbouring creatures. | — | {"action":"spreadPoison","params":{}} |
burn | Sets a creature on fire for turns turns, at the given strength. | at (target or attacker, optional): target or attacker, the creature that burns. Default: target.turns (number, {hook}, $value, $power, required): Duration of the burning, in turns.power (number, {hook}, $value, $power, required): Damage per turn of the burning. | {"action":"burn","params":{"at":"attacker","turns":1,"power":2}} |
becomeInvisible | Makes the wearer invisible: monsters have no ordinary sight of them, and they make no noise, until they attack. | — | {"action":"becomeInvisible","params":{}} |
engage | Commits the wearer to an accepted action: stealth mode ends, and the action’s noise is made, from the given cell or on the spot. | kind (melee or shot or spell, required): Nature of the action: melee (blow), shot or spell.offensive (true or false, optional): True for an offensive action, which makes more noise.x (number, {hook}, $value, $power, optional): Column of the cell the noise comes from (with y).y (number, {hook}, $value, $power, optional): Row of the cell the noise comes from (with x). | {"action":"engage","params":{"kind":"melee","offensive":true}} |
noise | Makes a noise at the resolved cell, otherwise at the subject, otherwise at the player. Loudness is a finite number from 0 to 12, fractions allowed; hooks, cycle and spread are those of hearing. A cancelled noise keeps the item and the turn. | intensity (number, {hook}, $value, $power, required): Explicit loudness from 0 to 12, fractions allowed. | {"action":"noise","params":{"intensity":2}} |
restoreSatiety | Restores the wearer’s satiety, never above a full stomach. | amount (number, {hook}, $value, $power, required): Satiety given back. | {"action":"restoreSatiety","params":{"amount":30}} |
freeze | Immobilises a creature for turns turns. The longer of the current duration and the new one applies. | at (target or attacker, optional): target or attacker, the creature that is immobilised. Default: target.turns (number, {hook}, $value, $power, required): Duration of the immobilisation, in turns. | {"action":"freeze","params":{"at":"target","turns":1}} |
gainResource | Puts a resource in the bag: a reagent, ammunition, ore or wood. | resource (text, required): Identifier of the resource.amount (number, {hook}, $value, $power, required): Quantity given. | {"action":"gainResource","params":{"resource":"ore","amount":1}} |
giveGold | Gives gold to the character. An amount of zero or less does nothing. | amount (number, {hook}, $value, $power, required): Gold given. | {"action":"giveGold","params":{"amount":5}} |
reroll | Draws draws random values and keeps the best in the source’s record: a reroll of a result that the source keeps. | draws (number, {hook}, $value, $power, optional): Number of draws; two by default. | {"action":"reroll","params":{"draws":3}} |
revealTraps | Reveals the traps on the map without moving them: all of them, those within radius cells of the wearer, or those in their light at its current radius. | radius (number, {hook}, $value, $power, optional): Radius, in cells, around the wearer.within (light, optional): light: only the traps inside the wearer’s light. | {"action":"revealTraps","params":{"within":"light"}} |
illuminate | Lights up a creature for turns turns: it stays visible and lit within radius cells of itself. | at (target or attacker, optional): target or attacker, the creature that is lit. Default: target.turns (number, {hook}, $value, $power, required): Duration of the light, in turns.radius (number, {hook}, $value, $power, optional): Radius of the light, in cells. Default: 1. | {"action":"illuminate","params":{"at":"target","turns":10,"radius":2}} |
teleport | Teleports the wearer distance cells away, onto a free cell. spare leaves them at least that much health: a cancelled deadly blow leaves them alive. | distance (number, {hook}, $value, $power, required): Distance of the teleport, in cells.spare (number, {hook}, $value, $power, optional): Minimum health left to the wearer. | {"action":"teleport","params":{"distance":3,"spare":1}} |
chargedEnchantment | Uses up one charge of a charged inscription of the wearer and casts its spell on the creature that was struck, or that struck the wearer. | beforeTurn (true or false, optional): True: the spell lands before the creatures’ turn, like the wearer’s blows. | {"action":"chargedEnchantment","params":{"beforeTurn":true}} |
burningGround | Leaves burning ground around the wearer for turns turns: a spell field that sets alight whatever stands on it. | turns (number, {hook}, $value, $power, required): Duration of the burning ground, in turns. | {"action":"burningGround","params":{"turns":3}} |
field | Creates a named field at the resolved cell, otherwise around the wearer. The duration follows the fields’ cycle: it counts down before the effect and expires on the last turn. A refusal keeps the item and the turn. | field (text, required): Reference to magic.namedFields.radius (number, {hook}, $value, $power, required): Whole-number radius, from 0 to 6 cells.turns (number, {hook}, $value, $power, required): Whole-number duration, from 1 to 50 turns. | {"action":"field","params":{"field":"burning-ground","radius":1,"turns":3}} |
itemProperty | Applies a property of a weapon or a protection (fire, frost or drain) on every blow where it takes part. | — | {"action":"itemProperty","params":{}} |
Listeners: identity, cooldown and memory#
A listener may carry an id (optional): a lowercase identifier, unique in the list where it is written. Without an id, it gets a content key, computed from what it does, so reordering listeners changes nothing about their cooldown (cooldown) or their memory.
The cooldown and the memory are kept in the game state, under the key source#listener. A source tied to an item carries the item’s identifier: affix:<item>, synergy:<synergy>:<item>, enchant:<item>, worn:<item>, which keeps two items that carry the same synergy apart. The listeners of an affix are prefixed by the affix (<affix>/…). A listener without a record of its own keeps its counter in listenerStores.
Rule markers#
| Marker | Where it has a value | Where it is refused |
|---|---|---|
$value | modifiers and listeners of affixes (affixEffects) and of enchantments (equipment.json:enchantments.mechanics) | synergies (effects), sets, onHit, the special of a synergy (a listener without power) |
$power | parameters of the special of a synergy, when it declares a power (scaled by quality) | everywhere else |
$skill | conditions (when) of affix effects (affixEffects) | parameters, modifier values, synergies, sets, onHit, enchantments |
Spell and cell kinds#
These are the kinds that spells and cells can use in JSON. You pick from these lists; the validator refuses any other name. Adding a new kind takes code. See magic and terrain and cells.
Spell transforms#
| Name | Phase | Description |
|---|---|---|
field-ticks | timing | The blow hits ticks times: once on casting, then once per turn on the cells it reached. |
spread-over-turns | timing | The blow is spread over turns turns, plus repeatTurns for each repeat of the syllable; the total is multiplied by yield. |
convert-action | action | An action of type from becomes the action to; with overTurns, it lasts the turns of the blow. |
scale-with-repeats | action | A numeric field of an action grows by perRepeat for each repeat after the first. |
Spell actions#
| Name | Description |
|---|---|
damage | Damage of an element (element), from 0.01 to 10 times the power (factor). |
heal | Heals the caster, from 0.01 to 10 times the power (factor). |
status | Applies a spell status (see Spell statuses below): status, turns from 1 to 100, and factor if the status takes one. |
light | A light source: anchor (see Light anchors below) and radius from 1 to 10. |
push | Pushes the struck creature extra cells further than push.distance, up to push.maxDistance; extra is from 0 to 7. |
Spell statuses#
| Name | Takes a factor | Own duration | Description |
|---|---|---|---|
burning | no | no | Sets the creature on fire for turns turns. |
regeneration | yes | yes | Regenerates factor times the spell’s power each turn, for turns turns. |
frozen | no | no | Immobilises the creature; the longer duration wins. |
slowed | no | no | Slows the creature; the longer duration wins. |
Light anchors#
| Name | Description |
|---|---|
caster | Lights the caster, with the fixed sight of the light system. |
target | Lights the struck creature, for the duration of the spell. |
ground | Light placed on the ground, kept by the light system (a field delivery). |
Cell components#
| Name | Parameters | Description |
|---|---|---|
blocksMovement | — | Declares an obstacle to movement, regardless of sight. |
blocksSight | — | Declares an obstacle to sight, regardless of movement. |
dampensSound | factor (whole number from 0 to 100) | Multiplies the range of sound by a coefficient in hundredths: factor, a whole number from 0 to 100 (5 is 0.05; 40 is 0.40). Without the component, the coefficient is 1. The coefficients of the cells crossed are multiplied together, leaving out the source and the listener. |
interact | actions (list of actions), priority (beforeAdjacent or afterAdjacent, optional), reach (self or adjacent, optional) | Manual terrain actions only (openChest, talkStory, claimRelic, operateControl, useExit, useBreach, useLift, travelFloor, harvest, rest, revealPassage, operateDoor, forceDoor). beforeAdjacent runs before the search of adjacent cells, afterAdjacent (default) runs after it; reach targets self (default) or an adjacent cardinal cell. |
flammable | — | Destroyed by an interaction that targets it (fire, in the shipped game). |
slowsMovement | cost (whole number from 2 to 10) | One step onto the cell costs the creature cost steps. |
consumedOnTrigger | — | The occupant is spent as soon as it has triggered. |
regenerates | duration (whole number from 1 to 20) | The creature regenerates; a suppression of the regeneration lasts duration turns. |
onEnter | actions (list of actions) | Actions done to whoever enters the cell, once per turn. |
onStay | actions (list of actions) | Actions done, every turn, to whoever stays on the cell. |
Cell actions#
| Name | Parameters | Description |
|---|---|---|
forceDoor | tile (text) | Offers forcing by hand or with a weapon toward the declared tile, which must be known, passable and different from the source; requires world.doorForcing. The offer spends no turn; each confirmed strike costs a turn, noise and, with a weapon, durability. |
operateDoor | tile (text), operation (open or close) | Opens or closes a door toward the declared tile, which must be known and different from the source; closing an occupied doorway is refused at no cost. |
openChest | — | Opens the targeted chest and applies its loot. |
talkStory | — | Talks to the targeted campaign character. |
claimRelic | — | Picks up the targeted campaign relic. |
operateControl | — | Operates the targeted campaign control. |
useExit | — | Shows the state of the targeted campaign exit. |
useBreach | — | Gives the hint of the targeted campaign breach. |
useLift | — | Uses the targeted campaign lift. |
travelFloor | direction (down or up) | Changes floor in the declared direction, under the conditions of the movement command. |
harvest | — | Gathers the targeted resource, at the cost of the harvest command. |
rest | — | Rests the player, at the cost of the rest command. |
revealPassage | — | Reveals the targeted passage and spends an interaction turn. |
hurt | element (text, optional), cause (DEATH_RIFT or DEATH_MONSTER_TRAP, optional) | Hits whoever is on the cell, with the occupant’s power. |
burn | duration (whole number from 1 to 20, optional), damage (whole number from 1 to 10000, optional) | Sets the player or a creature on fire, with the occupant’s own burn by default. |
destroy | — | Removes the occupant: a hazard, a field or a trap. |
suppressRegeneration | — | Suspends the creature’s regeneration for the duration of its regenerates component. |
status | status (burning or frozen or slowed), turns (whole number from 1 to 50) | Applies a spell status to the player or a creature, with no direct blow; a burn may deal its damage later. |