ItemDef
Interface of @v12-engine/engine
export interface ItemDefThe definition of an item: what it costs, what it gives its carrier and how it is used
Members
ability
ability?: string;Id of the ability the item gives: using the item casts it, without mana
basedOn
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
bonus?: StatChange;Applies for as long as the item is carried
charges
charges?: number;Uses before it is gone. Items without charges stay
class
class?: string;Its kind of item, a word of the game's (permanent, charged, powerup): what an item table draws by too
cost
cost: Cost;What it costs in a shop, in resources
description
description?: string;What the item does, in words, shown when the pointer is over it
from
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
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
groupLimit?: number;How many of its group one carrier may have: the game's limit of the group, or 1, when left out
hotkey
hotkey?: string;The key that uses it from the command card
id
id: string;The item's id, shared by every game: give it a prefix of the game's
level
level?: number;How good it is, 1 and up (campaign plan GP3): what an item table draws by ({ level: 3 })
name
name: string;What the player sees the item called
passive
passive?: string;Id of an ability whose passive part works for whoever carries the item
powerUp
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
refill?: ItemRefill;How its charges come back (ItemRefill): at a shop, over time. Used up for good when left out
sellRate beta
sellRate?: number;The part of its price a shop gives back for it, over the game's (EconomySettings.sellPrice)
stack beta
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
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
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
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
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
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