This is psuedo fix to the incorrect resource usage when using multiple experiences.

This commit is contained in:
Chris Ryan 2025-09-04 17:46:02 +10:00
parent 3c893df175
commit 830c772c8b
2 changed files with 14 additions and 6 deletions

View file

@ -226,16 +226,16 @@ export const registerRollDiceHooks = () => {
let updates = [];
if (!actor) return;
if (config.roll.isCritical || config.roll.result.duality === 1)
updates.push({ key: 'hope', value: 1, total: -1, enabled: true });
if (config.roll.isCritical) updates.push({ key: 'stress', value: 1, total: -1, enabled: true });
if (config.roll.result.duality === -1) updates.push({ key: 'fear', value: 1, total: -1, enabled: true });
updates.push({ key: 'hope', value: -1, total: -1, enabled: true });
if (config.roll.isCritical) updates.push({ key: 'stress', value: -1, total: -1, enabled: true });
if (config.roll.result.duality === -1) updates.push({ key: 'fear', value: -1, total: -1, enabled: true });
if (config.rerolledRoll) {
if (config.rerolledRoll.isCritical || config.rerolledRoll.result.duality === 1)
updates.push({ key: 'hope', value: -1, total: 1, enabled: true });
if (config.rerolledRoll.isCritical) updates.push({ key: 'stress', value: -1, total: 1, enabled: true });
updates.push({ key: 'hope', value: -1, total: -1, enabled: true });
if (config.rerolledRoll.isCritical) updates.push({ key: 'stress', value: -1, total: -1, enabled: true });
if (config.rerolledRoll.result.duality === -1)
updates.push({ key: 'fear', value: -1, total: 1, enabled: true });
updates.push({ key: 'fear', value: -1, total: -1, enabled: true });
}
if (updates.length) {