Added automation on fear to countdowns

This commit is contained in:
WBHarry 2025-11-20 02:11:50 +01:00
parent 498e6b9aa2
commit f9f2abc484
5 changed files with 24 additions and 15 deletions

View file

@ -932,10 +932,11 @@
}, },
"CountdownType": { "CountdownType": {
"actionRoll": "Action Roll", "actionRoll": "Action Roll",
"characterAttack": "Character Attack",
"characterSpotlight": "Character Spotlight", "characterSpotlight": "Character Spotlight",
"spotlight": "Spotlight",
"custom": "Custom", "custom": "Custom",
"characterAttack": "Character Attack" "fear": "Fear",
"spotlight": "Spotlight"
}, },
"DamageType": { "DamageType": {
"physical": { "physical": {

View file

@ -616,21 +616,25 @@ export const countdownProgressionTypes = {
id: 'actionRoll', id: 'actionRoll',
label: 'DAGGERHEART.CONFIG.CountdownType.actionRoll' label: 'DAGGERHEART.CONFIG.CountdownType.actionRoll'
}, },
spotlight: { characterAttack: {
id: 'spotlight', id: 'characterAttack',
label: 'DAGGERHEART.CONFIG.CountdownType.spotlight' label: 'DAGGERHEART.CONFIG.CountdownType.characterAttack'
}, },
characterSpotlight: { characterSpotlight: {
id: 'characterSpotlight', id: 'characterSpotlight',
label: 'DAGGERHEART.CONFIG.CountdownType.characterSpotlight' label: 'DAGGERHEART.CONFIG.CountdownType.characterSpotlight'
}, },
characterAttack: {
id: 'characterAttack',
label: 'DAGGERHEART.CONFIG.CountdownType.characterAttack'
},
custom: { custom: {
id: 'custom', id: 'custom',
label: 'DAGGERHEART.CONFIG.CountdownType.custom' label: 'DAGGERHEART.CONFIG.CountdownType.custom'
},
fear: {
id: 'fear',
label: 'DAGGERHEART.CONFIG.CountdownType.fear'
},
spotlight: {
id: 'spotlight',
label: 'DAGGERHEART.CONFIG.CountdownType.spotlight'
} }
}; };
export const rollTypes = { export const rollTypes = {

View file

@ -248,6 +248,10 @@ export const registerRollDiceHooks = () => {
) { ) {
const { updateCountdowns } = game.system.api.applications.ui.DhCountdowns; const { updateCountdowns } = game.system.api.applications.ui.DhCountdowns;
await updateCountdowns(CONFIG.DH.GENERAL.countdownProgressionTypes.actionRoll.id); await updateCountdowns(CONFIG.DH.GENERAL.countdownProgressionTypes.actionRoll.id);
if (config.roll.result.duality === -1) {
await updateCountdowns(CONFIG.DH.GENERAL.countdownProgressionTypes.fear.id);
}
} }
const hopeFearAutomation = automationSettings.hopeFear; const hopeFearAutomation = automationSettings.hopeFear;

View file

@ -861,7 +861,7 @@
"img": "icons/creatures/abilities/mouth-teeth-fire-orange.webp", "img": "icons/creatures/abilities/mouth-teeth-fire-orange.webp",
"progress": { "progress": {
"looping": "noLooping", "looping": "noLooping",
"type": "custom", "type": "fear",
"max": "1d12", "max": "1d12",
"current": 1 "current": 1
}, },
@ -939,9 +939,9 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.351", "coreVersion": "13.351",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.2.3", "systemVersion": "1.2.4",
"createdTime": 1754140011482, "createdTime": 1754140011482,
"modifiedTime": 1763489806693, "modifiedTime": 1763601068928,
"lastModifiedBy": "Q4RzhhaPfvLUzzbw" "lastModifiedBy": "Q4RzhhaPfvLUzzbw"
}, },
"_key": "!actors.items!pMuXGCSOQaxpi5tb.uWiyaJPXcoW06pOM" "_key": "!actors.items!pMuXGCSOQaxpi5tb.uWiyaJPXcoW06pOM"

View file

@ -373,7 +373,7 @@
"img": "icons/magic/unholy/barrier-fire-pink.webp", "img": "icons/magic/unholy/barrier-fire-pink.webp",
"progress": { "progress": {
"looping": "noLooping", "looping": "noLooping",
"type": "custom", "type": "fear",
"max": "6", "max": "6",
"current": 1 "current": 1
}, },
@ -430,9 +430,9 @@
"exportSource": null, "exportSource": null,
"coreVersion": "13.351", "coreVersion": "13.351",
"systemId": "daggerheart", "systemId": "daggerheart",
"systemVersion": "1.2.3", "systemVersion": "1.2.4",
"createdTime": 1754215458731, "createdTime": 1754215458731,
"modifiedTime": 1763493605083, "modifiedTime": 1763600981803,
"lastModifiedBy": "Q4RzhhaPfvLUzzbw" "lastModifiedBy": "Q4RzhhaPfvLUzzbw"
}, },
"_key": "!actors.items!QAXXiOKBDmCTauHD.oFfu3hUhp4ta4qwT" "_key": "!actors.items!QAXXiOKBDmCTauHD.oFfu3hUhp4ta4qwT"