diff --git a/daggerheart.mjs b/daggerheart.mjs index 533691f5..6fb6cc40 100644 --- a/daggerheart.mjs +++ b/daggerheart.mjs @@ -43,7 +43,7 @@ Hooks.once('init', () => { ); CONFIG.statusEffects = [ - ...CONFIG.statusEffects, + ...CONFIG.statusEffects.filter(x => !['dead', 'unconscious'].includes(x.id)), ...Object.values(SYSTEM.GENERAL.conditions).map(x => ({ ...x, name: game.i18n.localize(x.name), diff --git a/lang/en.json b/lang/en.json index b9e0fefa..11afac01 100755 --- a/lang/en.json +++ b/lang/en.json @@ -559,9 +559,9 @@ "twoHanded": "Two-Handed" }, "Condition": { - "vulnerable": { - "name": "Vulnerable", - "description": "While a creature is Vulnerable, all rolls targeting them have advantage.\nA creature who is already Vulnerable can’t be made to take the condition again." + "dead": { + "name": "Dead", + "description": "The character is dead" }, "hidden": { "name": "Hidden", @@ -570,6 +570,14 @@ "restrained": { "name": "Restrained", "description": "When an effect makes a creature Restrained, it means they cannot move until this condition is cleared.\nThey can still take actions from their current position." + }, + "unconcious": { + "name": "Unconcious", + "description": "Your character can’t move or act while unconscious, they can’t be targeted by an attack." + }, + "vulnerable": { + "name": "Vulnerable", + "description": "While a creature is Vulnerable, all rolls targeting them have advantage.\nA creature who is already Vulnerable can’t be made to take the condition again." } }, "CountdownType": { diff --git a/module/config/generalConfig.mjs b/module/config/generalConfig.mjs index 54430860..704a5401 100644 --- a/module/config/generalConfig.mjs +++ b/module/config/generalConfig.mjs @@ -110,6 +110,18 @@ export const conditions = { name: 'DAGGERHEART.CONFIG.Condition.restrained.name', icon: 'icons/magic/control/debuff-chains-shackle-movement-red.webp', description: 'DAGGERHEART.CONFIG.Condition.restrained.description' + }, + unconcious: { + id: 'unconcious', + name: 'DAGGERHEART.CONFIG.Condition.unconcious.name', + icon: 'icons/magic/control/sleep-bubble-purple.webp', + description: 'DAGGERHEART.CONFIG.Condition.unconcious.description' + }, + dead: { + id: 'dead', + name: 'DAGGERHEART.CONFIG.Condition.dead.name', + icon: 'icons/magic/death/grave-tombstone-glow-teal.webp', + description: 'DAGGERHEART.CONFIG.Condition.dead.description' } }; diff --git a/module/dice/dhRoll.mjs b/module/dice/dhRoll.mjs index 7530e4dd..33de251b 100644 --- a/module/dice/dhRoll.mjs +++ b/module/dice/dhRoll.mjs @@ -192,7 +192,9 @@ export const registerRollDiceHooks = () => { if (updates.length) { const target = actor.system.partner ?? actor; - target.modifyResource(updates); + if (!['dead', 'unconcious'].some(x => actor.statuses.has(x))) { + target.modifyResource(updates); + } } if (!config.roll.hasOwnProperty('success') && !config.targets?.length) return;