// The conditions a combatant can be under, each with its rule in a sentence // or two. They are reminders for the table: the site changes no number for // them. "Concentrating" is not a condition in the rules, but it is tracked the // same way. export const CONDITION_RULES: Record = { Blinded: 'Cannot see: fails any check that needs sight. Attacks against them have advantage; their own attacks have disadvantage.', Charmed: 'Cannot attack the charmer or target them with anything harmful. The charmer has advantage on social checks with them.', Deafened: 'Cannot hear: fails any check that needs hearing.', Frightened: 'Disadvantage on ability checks and attacks while the source of the fear is in sight, and cannot willingly move closer to it.', Grappled: 'Speed is 0. Ends if the grappler is incapacitated or the two are forced apart.', Incapacitated: 'Cannot take actions or reactions.', Invisible: 'Cannot be seen without magic or a special sense. Attacks against them have disadvantage; their own attacks have advantage.', Paralyzed: 'Incapacitated; cannot move or speak. Fails Strength and Dexterity saves. Attacks against them have advantage, and a hit from within 5 ft is a critical hit.', Petrified: 'Turned to stone: incapacitated, cannot move or speak, unaware. Attacks against them have advantage; fails Strength and Dexterity saves; resists all damage; immune to poison and disease.', Poisoned: 'Disadvantage on attack rolls and ability checks.', Prone: 'Can only crawl, and standing up costs half their speed. Disadvantage on their attacks. Attacks from within 5 ft have advantage against them; from further away, disadvantage.', Restrained: 'Speed is 0. Attacks against them have advantage; their own have disadvantage. Disadvantage on Dexterity saves.', Stunned: 'Incapacitated; cannot move and can barely speak. Fails Strength and Dexterity saves. Attacks against them have advantage.', Unconscious: 'Incapacitated; cannot move or speak, unaware, drops what they hold and falls prone. Fails Strength and Dexterity saves. Attacks against them have advantage, and a hit from within 5 ft is a critical hit.', Concentrating: 'Holding a spell. Taking damage calls for a Constitution save, DC 10 or half the damage if that is higher; a failure ends the spell. So does casting another concentration spell, or being incapacitated.', }; export const CONDITIONS = Object.keys(CONDITION_RULES); // What a condition does; empty for one the DM typed in by another name. export function conditionRule(name: string): string { return CONDITION_RULES[name] ?? ''; } // Exhaustion has six levels, each adding to the ones before it. export const EXHAUSTION_LEVELS = [ 'Disadvantage on ability checks.', 'Speed halved.', 'Disadvantage on attack rolls and saving throws.', 'Hit point maximum halved.', 'Speed reduced to 0.', 'Death.', ]; export const MAX_EXHAUSTION = EXHAUSTION_LEVELS.length; // Everything a level of exhaustion means, one effect per line. export function exhaustionRule(level: number): string { if (level <= 0) return 'Not exhausted.'; return EXHAUSTION_LEVELS.slice(0, level) .map((effect, i) => `${i + 1}: ${effect}`) .join('\n'); }