From eea1b6e6b809e037c3a7a4e92d3cbc159f00e3f7 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Thu, 26 Feb 2026 21:05:38 +0100 Subject: [PATCH] Added to compendium --- .../data/activeEffect/effectConditional.mjs | 2 + module/documents/activeEffect.mjs | 6 +- ...ainCard_On_the_Brink_zbxPl81kbWEegKQN.json | 53 ++++++++++----- .../feature_Adrenaline_uByM34yQlw38yf1V.json | 65 +++++++++++------- ...ature_Conjure_Shield_oirsCnN66GOlK3Fa.json | 51 +++++++++----- ...ise_to_the_Challenge_dcutk8RVOJ2sEkO1.json | 67 ++++++++++++++++++- 6 files changed, 184 insertions(+), 60 deletions(-) diff --git a/module/data/activeEffect/effectConditional.mjs b/module/data/activeEffect/effectConditional.mjs index 6191176b..7ed91e33 100644 --- a/module/data/activeEffect/effectConditional.mjs +++ b/module/data/activeEffect/effectConditional.mjs @@ -21,12 +21,14 @@ export class EffectConditionals extends foundry.data.fields.ArrayField { x => !x.disabled && x.statuses.has(conditional.key) ); if (!hasStatus) return true; + break; case CONFIG.DH.GENERAL.activeEffectConditionalType.attribute.id: const actorValue = foundry.utils.getProperty(actor, conditional.key); const conditionalValue = game.system.api.documents.DhActiveEffect.effectSafeEval( itemAbleRollParse(conditional.value, actor) ); if (!compareValues(actorValue, conditionalValue, conditional.comparator)) return true; + break; } } diff --git a/module/documents/activeEffect.mjs b/module/documents/activeEffect.mjs index f407ac4d..ad664f15 100644 --- a/module/documents/activeEffect.mjs +++ b/module/documents/activeEffect.mjs @@ -8,6 +8,9 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { /**@override */ get isSuppressed() { + const conditionalSuspended = game.system.api.data.activeEffects.EffectConditionals.isConditionalSuspended(this); + if (conditionalSuspended) return true; + // If this is a copied effect from an attachment, never suppress it // (These effects have attachmentSource metadata) if (this.flags?.daggerheart?.attachmentSource) { @@ -26,9 +29,6 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { return isVaultSupressed || domainTouchedSupressed; } - const conditionalSuspended = game.system.api.data.activeEffects.EffectConditionals.isConditionalSuspended(this); - if (conditionalSuspended) return true; - return super.isSuppressed; } diff --git a/src/packs/domains/domainCard_On_the_Brink_zbxPl81kbWEegKQN.json b/src/packs/domains/domainCard_On_the_Brink_zbxPl81kbWEegKQN.json index e5f90fe4..bdfda213 100644 --- a/src/packs/domains/domainCard_On_the_Brink_zbxPl81kbWEegKQN.json +++ b/src/packs/domains/domainCard_On_the_Brink_zbxPl81kbWEegKQN.json @@ -28,27 +28,36 @@ "type": "withinRange", "target": "hostile", "range": "melee" - } + }, + "changes": [ + { + "key": "system.rules.damageReduction.thresholdImmunities.minor", + "value": 1, + "priority": null, + "type": "override" + } + ], + "duration": { + "type": "" + }, + "conditionals": [ + { + "type": "attribute", + "key": "system.resources.hitPoints.value", + "value": "@system.resources.hitPoints.max - 2", + "comparator": "gte", + "target": "self" + } + ] }, "_id": "UJTsJlnhi5Zi0XQ2", "img": "systems/daggerheart/assets/icons/domains/domain-card/bone.png", - "changes": [ - { - "key": "system.rules.damageReduction.thresholdImmunities.minor", - "mode": 5, - "value": "1", - "priority": null - } - ], - "disabled": true, + "disabled": false, "duration": { - "startTime": null, - "combat": null, - "seconds": null, - "rounds": null, - "turns": null, - "startRound": null, - "startTurn": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, "description": "

When you have 2 or fewer Hit Points unmarked, you don’t take Minor damage.

", "origin": null, @@ -60,6 +69,16 @@ "_stats": { "compendiumSource": null }, + "start": { + "time": 0, + "combat": null, + "combatant": null, + "initiative": null, + "round": null, + "turn": null + }, + "showIcon": 1, + "folder": null, "_key": "!items.effects!zbxPl81kbWEegKQN.UJTsJlnhi5Zi0XQ2" } ], diff --git a/src/packs/subclasses/feature_Adrenaline_uByM34yQlw38yf1V.json b/src/packs/subclasses/feature_Adrenaline_uByM34yQlw38yf1V.json index dc25498b..8b9524f5 100644 --- a/src/packs/subclasses/feature_Adrenaline_uByM34yQlw38yf1V.json +++ b/src/packs/subclasses/feature_Adrenaline_uByM34yQlw38yf1V.json @@ -30,31 +30,40 @@ "type": "withinRange", "target": "hostile", "range": "melee" - } - }, - "changes": [ - { - "key": "system.bonuses.damage.physical.bonus", - "mode": 2, - "value": "@system.levelData.level.current", - "priority": null }, - { - "key": "system.bonuses.damage.magical.bonus", - "mode": 2, - "value": "@system.levelData.level.current", - "priority": null - } - ], - "disabled": true, + "changes": [ + { + "key": "system.bonuses.damage.physical.bonus", + "value": "@system.levelData.level.current", + "priority": null, + "type": "add" + }, + { + "key": "system.bonuses.damage.magical.bonus", + "value": "@system.levelData.level.current", + "priority": null, + "type": "add" + } + ], + "duration": { + "type": "" + }, + "conditionals": [ + { + "type": "status", + "key": "vulnerable", + "value": "", + "comparator": "eq", + "target": "self" + } + ] + }, + "disabled": false, "duration": { - "startTime": null, - "combat": null, - "seconds": null, - "rounds": null, - "turns": null, - "startRound": null, - "startTurn": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, "description": "

While you're Vulnerable, add your level to your damage rolls.

", "tint": "#ffffff", @@ -64,6 +73,16 @@ "_stats": { "compendiumSource": null }, + "start": { + "time": 0, + "combat": null, + "combatant": null, + "initiative": null, + "round": null, + "turn": null + }, + "showIcon": 1, + "folder": null, "_key": "!items.effects!uByM34yQlw38yf1V.HMx9uZ54mvMiH95x" } ], diff --git a/src/packs/subclasses/feature_Conjure_Shield_oirsCnN66GOlK3Fa.json b/src/packs/subclasses/feature_Conjure_Shield_oirsCnN66GOlK3Fa.json index 99b04487..27a4f0d0 100644 --- a/src/packs/subclasses/feature_Conjure_Shield_oirsCnN66GOlK3Fa.json +++ b/src/packs/subclasses/feature_Conjure_Shield_oirsCnN66GOlK3Fa.json @@ -26,27 +26,36 @@ "type": "withinRange", "target": "hostile", "range": "melee" - } + }, + "changes": [ + { + "key": "system.evasion", + "value": "@system.proficiency", + "priority": 21, + "type": "add" + } + ], + "duration": { + "type": "" + }, + "conditionals": [ + { + "type": "attribute", + "key": "system.resources.hope.value", + "value": "2", + "comparator": "gte", + "target": "self" + } + ] }, "_id": "0i7GVOvjH6bK5AUM", "img": "icons/magic/defensive/barrier-shield-dome-blue-purple.webp", - "changes": [ - { - "key": "system.evasion", - "mode": 2, - "value": "@system.proficiency", - "priority": 21 - } - ], "disabled": false, "duration": { - "startTime": null, - "combat": null, - "seconds": null, - "rounds": null, - "turns": null, - "startRound": null, - "startTurn": null + "value": null, + "units": "seconds", + "expiry": null, + "expired": false }, "description": "

While you have at least 2 Hope, you add your Proficiency to your Evasion.

", "origin": null, @@ -58,6 +67,16 @@ "_stats": { "compendiumSource": null }, + "start": { + "time": 0, + "combat": null, + "combatant": null, + "initiative": null, + "round": null, + "turn": null + }, + "showIcon": 1, + "folder": null, "_key": "!items.effects!oirsCnN66GOlK3Fa.0i7GVOvjH6bK5AUM" } ], diff --git a/src/packs/subclasses/feature_Rise_to_the_Challenge_dcutk8RVOJ2sEkO1.json b/src/packs/subclasses/feature_Rise_to_the_Challenge_dcutk8RVOJ2sEkO1.json index 5421f1fd..dfd3223c 100644 --- a/src/packs/subclasses/feature_Rise_to_the_Challenge_dcutk8RVOJ2sEkO1.json +++ b/src/packs/subclasses/feature_Rise_to_the_Challenge_dcutk8RVOJ2sEkO1.json @@ -16,7 +16,72 @@ "artist": "" } }, - "effects": [], + "effects": [ + { + "name": "Rise To The Challenge", + "type": "base", + "system": { + "changes": [ + { + "key": "system.rules.dualityRoll.defaultHopeDice", + "type": "upgrade", + "value": 20, + "priority": null, + "phase": "initial" + } + ], + "conditionals": [ + { + "type": "attribute", + "key": "system.resources.hitPoints.value", + "value": "@system.resources.hitPoints.max - 2", + "comparator": "gte", + "target": "self" + } + ], + "duration": { + "description": "", + "type": "" + }, + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "_id": "MA744uJrGMQCDywg", + "img": "icons/magic/control/debuff-energy-hold-levitate-yellow.webp", + "disabled": false, + "start": { + "time": 0, + "combat": null, + "combatant": null, + "initiative": null, + "round": null, + "turn": null + }, + "duration": { + "value": null, + "units": "seconds", + "expiry": null, + "expired": false + }, + "description": "

While you have 2 or fewer Hit Points unmarked, you can roll a d20 as your Hope Die.

", + "origin": null, + "tint": "#ffffff", + "transfer": true, + "statuses": [], + "showIcon": 1, + "folder": null, + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null + }, + "_key": "!items.effects!dcutk8RVOJ2sEkO1.MA744uJrGMQCDywg" + } + ], "sort": 0, "ownership": { "default": 0,