Skip to content

ItemDef ​

Interface of @v12-engine/engine

ts
export interface ItemDef

The definition of an item: what it costs, what it gives its carrier and how it is used

Members ​

ability ​

ts
ability?: string;

Id of the ability the item gives: using the item casts it, without mana

basedOn ​

ts
basedOn?: string;

The definition this one is a copy of, made from the data (copyOf in a data.json, the editor's Copy as new): what it is drawn, heard and pictured as where the game gives it no look of its own

bonus ​

ts
bonus?: StatChange;

Applies for as long as the item is carried

charges ​

ts
charges?: number;

Uses before it is gone. Items without charges stay

class ​

ts
class?: string;

Its kind of item, a word of the game's (permanent, charged, powerup): what an item table draws by too

cost ​

ts
cost: Cost;

What it costs in a shop, in resources

description ​

ts
description?: string;

What the item does, in words, shown when the pointer is over it

from ​

ts
from?: string[];

Items it is made of. Those the buyer carries are used up and taken off the price, which is for all of it

group beta ​

ts
group?: string;

A group of items a hero carries only so many of (boots): groupLimit, or the game's limit of the group (ItemSettings.groups), 1 when neither says. Buying, picking up or being handed one more is refused, saying why

groupLimit beta ​

ts
groupLimit?: number;

How many of its group one carrier may have: the game's limit of the group, or 1, when left out

hotkey ​

ts
hotkey?: string;

The key that uses it from the command card

id ​

ts
id: string;

The item's id, shared by every game: give it a prefix of the game's

level ​

ts
level?: number;

How good it is, 1 and up (campaign plan GP3): what an item table draws by ({ level: 3 })

name ​

ts
name: string;

What the player sees the item called

passive ​

ts
passive?: string;

Id of an ability whose passive part works for whoever carries the item

powerUp ​

ts
powerUp?: boolean;

Used as it is picked up, by walking over it or by the order, and never carried: a rune, a tome. Its ability is cast by whoever picked it. In a game with the runes pack (runesPack, whose powerUp says it in code)

refill beta ​

ts
refill?: ItemRefill;

How its charges come back (ItemRefill): at a shop, over time. Used up for good when left out

sellRate beta ​

ts
sellRate?: number;

The part of its price a shop gives back for it, over the game's (EconomySettings.sellPrice)

stack beta ​

ts
stack?: number;

How many of it go in one slot: another bought, picked up or handed over goes into the slot of one carried, its charges added, up to so many of it (a stack of potions). One a slot when left out

stock ​

ts
stock?: {
        max: number;
        restock: number;
    };

How many a shop has at most, and the seconds it takes to get one back. As many as anyone wants when left out

suits beta ​

ts
suits?: string[];

The callings of heroes it is meant for (vanguard, ranger…): what a shop suggests and filters by. Never a lock: any hero may buy it

tags beta ​

ts
tags?: string[];

Free words of the game's for what it is (attack, lifesteal, anti-heal, early): its categories, what a search finds it by (#lifesteal), what a shop filters by. A TagDef gives one a name and a look (Rules.tags)

tier ​

ts
tier?: ItemTier;

Where it goes in a shop: consumable, starter, basic, intermediate, legendary, relic (ItemTier). epic, the old word, is read as intermediate

unique beta ​

ts
unique?: string;

The name of its passive (or the passive of items that share it): two carried, of it or of items sharing the name, work once (the first carried). Its stats (bonus) always count. Every passive works when left out