From 1c6c3e7736a7ab395219ac32f91697501188eec4 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sun, 21 Jun 2026 01:00:08 +0200 Subject: [PATCH] Neater code for critical --- module/applications/dialogs/tagTeamDialog.mjs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/module/applications/dialogs/tagTeamDialog.mjs b/module/applications/dialogs/tagTeamDialog.mjs index b05e667b..f728a327 100644 --- a/module/applications/dialogs/tagTeamDialog.mjs +++ b/module/applications/dialogs/tagTeamDialog.mjs @@ -778,17 +778,17 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio const fearResourceMap = actorResourceMaps[tagTeamData.initiator.memberId]; for (const memberId in tagTeamData.members) { const resourceMap = actorResourceMaps[memberId]; - if (finalRoll.isCritical || finalRoll.withHope) { + if (finalRoll.withHope) { resourceMap.addResources([{ key: 'hope', value: 1, enabled: true }]); } - if (finalRoll.isCritical) - resourceMap.addResources([{ key: 'stress', value: -1, enabled: true }]); - if (finalRoll.withFear) { - fearResourceMap.addResources([{ - key: 'fear', - value: 1, - enabled: true - }]); + if (finalRoll.isCritical) { + resourceMap.addResources([ + { key: 'stress', value: -1, enabled: true }, + { key: 'hope', value: 1, enabled: true } + ]); + } + else if (finalRoll.withFear) { + fearResourceMap.addResources([{ key: 'fear', value: 1, enabled: true }]); } } }