ItemSettings beta
Interface of @v12-engine/engine
ts
export interface ItemSettingsWhat a hero may carry, and how what it carries works (RuleSettings.items)
Members
groups
ts
groups: Record<string, number>;The most of a group of items (ItemDef.group) one carrier may have, by group: { boots: 1 } when left out. An item's own groupLimit comes first; a group named nowhere is 1
mayCarry
ts
mayCarry?: (world: World, carrier: Entity, item: ItemDef, uses: readonly string[]) => MessageRef | undefined;The game's own rule of what a carrier may take, asked after the engine's (a group's limit) as it buys an item, picks one up or is handed one: a reason to refuse (a MessageRef, told to the player), nothing to let it. uses are the parts buying it uses up, by id (none for a pick-up or a hand-over). Everything may when left out
unique
ts
unique: boolean;Whether the passives of items sharing a unique name work once for all of them (yes), or each (no)