Added to compendium

This commit is contained in:
WBHarry 2026-02-26 21:05:38 +01:00
parent 1ba08e2f51
commit eea1b6e6b8
6 changed files with 184 additions and 60 deletions

View file

@ -21,12 +21,14 @@ export class EffectConditionals extends foundry.data.fields.ArrayField {
x => !x.disabled && x.statuses.has(conditional.key) x => !x.disabled && x.statuses.has(conditional.key)
); );
if (!hasStatus) return true; if (!hasStatus) return true;
break;
case CONFIG.DH.GENERAL.activeEffectConditionalType.attribute.id: case CONFIG.DH.GENERAL.activeEffectConditionalType.attribute.id:
const actorValue = foundry.utils.getProperty(actor, conditional.key); const actorValue = foundry.utils.getProperty(actor, conditional.key);
const conditionalValue = game.system.api.documents.DhActiveEffect.effectSafeEval( const conditionalValue = game.system.api.documents.DhActiveEffect.effectSafeEval(
itemAbleRollParse(conditional.value, actor) itemAbleRollParse(conditional.value, actor)
); );
if (!compareValues(actorValue, conditionalValue, conditional.comparator)) return true; if (!compareValues(actorValue, conditionalValue, conditional.comparator)) return true;
break;
} }
} }

View file

@ -8,6 +8,9 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
/**@override */ /**@override */
get isSuppressed() { 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 // If this is a copied effect from an attachment, never suppress it
// (These effects have attachmentSource metadata) // (These effects have attachmentSource metadata)
if (this.flags?.daggerheart?.attachmentSource) { if (this.flags?.daggerheart?.attachmentSource) {
@ -26,9 +29,6 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
return isVaultSupressed || domainTouchedSupressed; return isVaultSupressed || domainTouchedSupressed;
} }
const conditionalSuspended = game.system.api.data.activeEffects.EffectConditionals.isConditionalSuspended(this);
if (conditionalSuspended) return true;
return super.isSuppressed; return super.isSuppressed;
} }

View file

@ -28,27 +28,36 @@
"type": "withinRange", "type": "withinRange",
"target": "hostile", "target": "hostile",
"range": "melee" "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", "_id": "UJTsJlnhi5Zi0XQ2",
"img": "systems/daggerheart/assets/icons/domains/domain-card/bone.png", "img": "systems/daggerheart/assets/icons/domains/domain-card/bone.png",
"changes": [ "disabled": false,
{
"key": "system.rules.damageReduction.thresholdImmunities.minor",
"mode": 5,
"value": "1",
"priority": null
}
],
"disabled": true,
"duration": { "duration": {
"startTime": null, "value": null,
"combat": null, "units": "seconds",
"seconds": null, "expiry": null,
"rounds": null, "expired": false
"turns": null,
"startRound": null,
"startTurn": null
}, },
"description": "<p class=\"Body\">When you have 2 or fewer Hit Points unmarked, you dont take Minor damage.</p>", "description": "<p class=\"Body\">When you have 2 or fewer Hit Points unmarked, you dont take Minor damage.</p>",
"origin": null, "origin": null,
@ -60,6 +69,16 @@
"_stats": { "_stats": {
"compendiumSource": null "compendiumSource": null
}, },
"start": {
"time": 0,
"combat": null,
"combatant": null,
"initiative": null,
"round": null,
"turn": null
},
"showIcon": 1,
"folder": null,
"_key": "!items.effects!zbxPl81kbWEegKQN.UJTsJlnhi5Zi0XQ2" "_key": "!items.effects!zbxPl81kbWEegKQN.UJTsJlnhi5Zi0XQ2"
} }
], ],

View file

@ -30,31 +30,40 @@
"type": "withinRange", "type": "withinRange",
"target": "hostile", "target": "hostile",
"range": "melee" "range": "melee"
}
},
"changes": [
{
"key": "system.bonuses.damage.physical.bonus",
"mode": 2,
"value": "@system.levelData.level.current",
"priority": null
}, },
{ "changes": [
"key": "system.bonuses.damage.magical.bonus", {
"mode": 2, "key": "system.bonuses.damage.physical.bonus",
"value": "@system.levelData.level.current", "value": "@system.levelData.level.current",
"priority": null "priority": null,
} "type": "add"
], },
"disabled": true, {
"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": { "duration": {
"startTime": null, "value": null,
"combat": null, "units": "seconds",
"seconds": null, "expiry": null,
"rounds": null, "expired": false
"turns": null,
"startRound": null,
"startTurn": null
}, },
"description": "<p>While you're Vulnerable, add your level to your damage rolls.</p>", "description": "<p>While you're Vulnerable, add your level to your damage rolls.</p>",
"tint": "#ffffff", "tint": "#ffffff",
@ -64,6 +73,16 @@
"_stats": { "_stats": {
"compendiumSource": null "compendiumSource": null
}, },
"start": {
"time": 0,
"combat": null,
"combatant": null,
"initiative": null,
"round": null,
"turn": null
},
"showIcon": 1,
"folder": null,
"_key": "!items.effects!uByM34yQlw38yf1V.HMx9uZ54mvMiH95x" "_key": "!items.effects!uByM34yQlw38yf1V.HMx9uZ54mvMiH95x"
} }
], ],

View file

@ -26,27 +26,36 @@
"type": "withinRange", "type": "withinRange",
"target": "hostile", "target": "hostile",
"range": "melee" "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", "_id": "0i7GVOvjH6bK5AUM",
"img": "icons/magic/defensive/barrier-shield-dome-blue-purple.webp", "img": "icons/magic/defensive/barrier-shield-dome-blue-purple.webp",
"changes": [
{
"key": "system.evasion",
"mode": 2,
"value": "@system.proficiency",
"priority": 21
}
],
"disabled": false, "disabled": false,
"duration": { "duration": {
"startTime": null, "value": null,
"combat": null, "units": "seconds",
"seconds": null, "expiry": null,
"rounds": null, "expired": false
"turns": null,
"startRound": null,
"startTurn": null
}, },
"description": "<p>While you have at least 2 Hope, you add your Proficiency to your Evasion.</p>", "description": "<p>While you have at least 2 Hope, you add your Proficiency to your Evasion.</p>",
"origin": null, "origin": null,
@ -58,6 +67,16 @@
"_stats": { "_stats": {
"compendiumSource": null "compendiumSource": null
}, },
"start": {
"time": 0,
"combat": null,
"combatant": null,
"initiative": null,
"round": null,
"turn": null
},
"showIcon": 1,
"folder": null,
"_key": "!items.effects!oirsCnN66GOlK3Fa.0i7GVOvjH6bK5AUM" "_key": "!items.effects!oirsCnN66GOlK3Fa.0i7GVOvjH6bK5AUM"
} }
], ],

View file

@ -16,7 +16,72 @@
"artist": "" "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": "<p>While you have 2 or fewer Hit Points unmarked, you can roll a d20 as your Hope Die.</p>",
"origin": null,
"tint": "#ffffff",
"transfer": true,
"statuses": [],
"showIcon": 1,
"folder": null,
"sort": 0,
"flags": {},
"_stats": {
"compendiumSource": null
},
"_key": "!items.effects!dcutk8RVOJ2sEkO1.MA744uJrGMQCDywg"
}
],
"sort": 0, "sort": 0,
"ownership": { "ownership": {
"default": 0, "default": 0,