/** * Ward draughts (James, 2026-10-01): "the equivalent of the protection potions in other games but split for elements. It * shouldn't offer full protection, for example think of a dragon's attack, the frost potion would protect from the * fire but they can still get hit by claws." His sheet: backend design-references/ward-draughts. * * - One ward at a time, WARD_MS long, ended early by death; a new draught replaces the old one. * - Drunk only out of combat, and never in a duel or its staking phase ("potions are treated like food out of combat * and not allowed during stakes"). * - Against monsters only. Each tagged monster attack carries an element and the share of the hit that is * elemental (NPC_ATTACK_ELEMENTS, SIGNATURE_ELEMENTS); a matching ward takes WARD_REDUCTION off that share and * nothing else, so a bite, a claw or a sword still lands in full. A dragon's breath is all fire. * - Drinking leaves the empty WARD_PHIAL_KIND (the sheet's "Crystal Phial", renamed: that name is already the Frost * Alchemist's relic, iceDepths.ts). * * How the draughts are brewed (Potion Making 46-58, a boss part each, the Crystal Phial) is the endgame plan's * phase C; until then only admins hand them out. */ export type WardElement = 'fire' | 'frost' | 'venom' | 'blight' | 'missile'; export type WardId = 'rimeward' | 'emberward' | 'venomward' | 'blightward' | 'shieldward'; export type WardInfo = { id: WardId; /** The bag item that gives it. */ item: string; name: string; element: WardElement; /** What it wards off, for the bag, the Boosts panel and the guide ("dragonfire"). */ against: string; }; export declare const WARD_IDS: readonly WardId[]; export declare const WARDS: Readonly>; /** The bottle every draught comes in, left empty in the bag when one is drunk. */ export declare const WARD_PHIAL_KIND = "wardphial"; /** How long one draught's ward lasts (James: "say 1 minute"). */ export declare const WARD_MS = 60000; /** The share of a matching element a ward takes off. Never all of it: "no ward is perfect". */ export declare const WARD_REDUCTION = 0.9; export declare function wardForItem(kind: string): WardInfo | null; export declare function isWardDraught(kind: string): boolean; export declare function isWardId(raw: unknown): raw is WardId; /** An attack's element and the share of its damage that is that element (0..1). */ export type AttackElement = { element: WardElement; share: number; }; /** * Ordinary attacks with an element, by NPC kind. Only creatures whose blows are partly or wholly elemental: a frost * troll's fist is still a fist. A boss's signature can differ (SIGNATURE_ELEMENTS wins while it lands). */ export declare const NPC_ATTACK_ELEMENTS: Readonly>; /** Boss signature attacks with an element of their own (types bossSignatures.ts ids). */ export declare const SIGNATURE_ELEMENTS: Readonly>; /** A dragon's breath: all fire. */ export declare const DRAGONFIRE_ELEMENT: AttackElement; /** The element of one monster blow: the signature's if it has one, else the kind's ordinary attack, else none. */ export declare function npcAttackElement(npcKind: string, signatureId?: string | null): AttackElement | null; /** * Damage after a ward: the elemental share is cut by WARD_REDUCTION, the rest lands in full. A blow that did * anything still does at least 1. Unchanged when the ward does not match the element. */ export declare function wardedDamage(damage: number, attack: AttackElement | null, ward: WardId | null): number; /** The share of the elemental part a ward lets through, for the dragonfire roll's `fireTaken` (1 = no ward). */ export declare function wardTaken(attack: AttackElement, ward: WardId | null): number; //# sourceMappingURL=wards.d.ts.map