Added ActiveEffect rules for default hope and fear dice

This commit is contained in:
WBHarry 2026-01-10 21:59:48 +01:00
parent 0b343c9f52
commit f37f3ea899
6 changed files with 176 additions and 15 deletions

View file

@ -194,6 +194,8 @@
"unequip": "Unequip",
"useItem": "Use Item"
},
"defaultHopeDice": "Default Hope Dice",
"defaultFearDice": "Default Fear Dice",
"disadvantageSources": {
"label": "Disadvantage Sources",
"hint": "Add single words or short text as reminders and hints of what a character has disadvantage on."

View file

@ -280,6 +280,22 @@ export default class DhCharacter extends BaseDataActor {
})
})
}),
dualityRoll: new fields.SchemaField({
defaultHopeDice: new fields.StringField({
nullable: false,
required: true,
choices: CONFIG.DH.GENERAL.diceTypes,
initial: CONFIG.DH.GENERAL.diceTypes.d12,
label: 'DAGGERHEART.ACTORS.Character.defaultHopeDice'
}),
defaultFearDice: new fields.StringField({
nullable: false,
required: true,
choices: CONFIG.DH.GENERAL.diceTypes,
initial: CONFIG.DH.GENERAL.diceTypes.d12,
label: 'DAGGERHEART.ACTORS.Character.defaultFearDice'
})
}),
runeWard: new fields.BooleanField({ initial: false }),
burden: new fields.SchemaField({
ignore: new fields.BooleanField()

View file

@ -130,9 +130,14 @@ export default class DualityRoll extends D20Roll {
this.terms = [this.terms[0], this.terms[1], this.terms[2]];
return;
}
this.terms[0] = new foundry.dice.terms.Die({ faces: 12 });
const { defaultHopeDice, defaultFearDice } = this.data.rules.dualityRoll;
const hopeFaces = Number.parseInt(defaultHopeDice.substring(1));
const fearFaces = Number.parseInt(defaultFearDice.substring(1));
this.terms[0] = new foundry.dice.terms.Die({ faces: hopeFaces });
this.terms[1] = new foundry.dice.terms.OperatorTerm({ operator: '+' });
this.terms[2] = new foundry.dice.terms.Die({ faces: 12 });
this.terms[2] = new foundry.dice.terms.Die({ faces: fearFaces });
}
applyAdvantage() {

View file

@ -312,7 +312,14 @@
"range": "melee"
}
},
"changes": [],
"changes": [
{
"key": "system.rules.dualityRoll.defaultHopeDice",
"mode": 5,
"value": "d8",
"priority": null
}
],
"disabled": false,
"duration": {
"startTime": null,
@ -323,7 +330,7 @@
"startRound": null,
"startTurn": null
},
"description": "<p>All targets aff ected replace their Hope Die with a <strong>d8</strong> until they roll a success with Hope or their next rest.</p>",
"description": "<p>All targets affected replace their Hope Die with a <strong>d8</strong> until they roll a success with Hope or their next rest.</p>",
"tint": "#ffffff",
"statuses": [],
"sort": 0,

View file

@ -256,34 +256,45 @@
"description": "<p><strong>Spend a Fear</strong> to boil the blood of all PCs within Far range. They use a d20 as their Fear Die until the end of the scene.</p><p>@Template[type:emanation|range:f]</p>",
"resource": null,
"actions": {
"V142qYppCGJn8OiN": {
"jKvzbQT0vp66DDOH": {
"type": "effect",
"_id": "V142qYppCGJn8OiN",
"_id": "jKvzbQT0vp66DDOH",
"systemPath": "actions",
"baseAction": false,
"description": "",
"chatDisplay": true,
"originItem": {
"type": "itemCollection"
},
"actionType": "action",
"cost": [
{
"scalable": false,
"key": "fear",
"value": 1,
"step": null
"itemId": null,
"step": null,
"consumeOnSuccess": false
}
],
"uses": {
"value": null,
"max": "",
"recovery": null
"recovery": null,
"consumeOnSuccess": false
},
"effects": [],
"effects": [
{
"_id": "gFeHLGgeRoDdd3VG",
"onSave": false
}
],
"target": {
"type": "self",
"type": "hostile",
"amount": null
},
"name": "Spend Fear",
"img": "icons/skills/melee/maneuver-greatsword-yellow.webp",
"range": ""
"range": "far"
}
},
"originItemType": null,
@ -292,7 +303,51 @@
},
"_id": "a33PW8UkziliowlR",
"img": "icons/skills/melee/maneuver-greatsword-yellow.webp",
"effects": [],
"effects": [
{
"name": "Battle Lust",
"img": "icons/skills/melee/maneuver-greatsword-yellow.webp",
"origin": "Compendium.daggerheart.adversaries.Actor.5lphJAgzoqZI3VoG.Item.a33PW8UkziliowlR",
"transfer": false,
"_id": "gFeHLGgeRoDdd3VG",
"type": "base",
"system": {
"rangeDependence": {
"enabled": false,
"type": "withinRange",
"target": "hostile",
"range": "melee"
}
},
"changes": [
{
"key": "system.rules.dualityRoll.defaultFearDice",
"mode": 5,
"value": "d20",
"priority": null
}
],
"disabled": false,
"duration": {
"startTime": null,
"combat": null,
"seconds": null,
"rounds": null,
"turns": null,
"startRound": null,
"startTurn": null
},
"description": "<p>You use a d20 as your Fear Die until the end of the scene.</p>",
"tint": "#ffffff",
"statuses": [],
"sort": 0,
"flags": {},
"_stats": {
"compendiumSource": null
},
"_key": "!actors.items.effects!5lphJAgzoqZI3VoG.a33PW8UkziliowlR.gFeHLGgeRoDdd3VG"
}
],
"folder": null,
"sort": 0,
"ownership": {

View file

@ -136,13 +136,89 @@
"system": {
"description": "<p>Cultists dedicated this place to the Fallen Gods, and their foul influence seeps into it. Reduce the PCs Hope Die to a d10 while in this environment. The desecration can be removed with a Progress Countdown (6).</p><section class=\"secret\" id=\"secret-iPgKjrXJYw4cy0EX\"><p><em>How do the PCs fist notice that something is wrong about this place? What fears resurface while hope is kept at bay?</em></p></section>",
"resource": null,
"actions": {},
"actions": {
"7W3sWRLzjG3dKcgq": {
"type": "effect",
"_id": "7W3sWRLzjG3dKcgq",
"systemPath": "actions",
"baseAction": false,
"description": "",
"chatDisplay": true,
"originItem": {
"type": "itemCollection"
},
"actionType": "action",
"cost": [],
"uses": {
"value": null,
"max": "",
"recovery": null,
"consumeOnSuccess": false
},
"effects": [
{
"_id": "8yNIw8Y7rfMdOqWC",
"onSave": false
}
],
"target": {
"type": "any",
"amount": null
},
"name": "Influence",
"range": ""
}
},
"originItemType": null,
"originId": null
},
"_id": "iiHjguQG2aBn9g8i",
"img": "icons/magic/unholy/orb-contained-pink.webp",
"effects": [],
"effects": [
{
"name": "Desecrated Ground",
"img": "icons/magic/unholy/orb-contained-pink.webp",
"origin": "Compendium.daggerheart.environments.Actor.QAXXiOKBDmCTauHD.Item.iiHjguQG2aBn9g8i",
"transfer": false,
"_id": "8yNIw8Y7rfMdOqWC",
"type": "base",
"system": {
"rangeDependence": {
"enabled": false,
"type": "withinRange",
"target": "hostile",
"range": "melee"
}
},
"changes": [
{
"key": "system.rules.dualityRoll.defaultHopeDice",
"mode": 5,
"value": "d10",
"priority": null
}
],
"disabled": false,
"duration": {
"startTime": null,
"combat": null,
"seconds": null,
"rounds": null,
"turns": null,
"startRound": null,
"startTurn": null
},
"description": "<p>Your Hope Die is reduced to a d10 while in the Desecrated Grounds.</p>",
"tint": "#ffffff",
"statuses": [],
"sort": 0,
"flags": {},
"_stats": {
"compendiumSource": null
},
"_key": "!actors.items.effects!QAXXiOKBDmCTauHD.iiHjguQG2aBn9g8i.8yNIw8Y7rfMdOqWC"
}
],
"folder": null,
"sort": 0,
"ownership": {