Fixed so hope is taken from the initiator if the roll is with fear

This commit is contained in:
WBHarry 2025-12-06 22:34:14 +01:00
parent bcc87334b6
commit 7b4de067ee

View file

@ -263,14 +263,16 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
const fearUpdate = { key: 'fear', value: null, total: null, enabled: true }; const fearUpdate = { key: 'fear', value: null, total: null, enabled: true };
for (let memberId of Object.keys(this.data.members)) { for (let memberId of Object.keys(this.data.members)) {
const resourceUpdates = []; const resourceUpdates = [];
if (systemData.roll.isCritical || systemData.roll.result.duality === 1) { const rollGivesHope = systemData.roll.isCritical || systemData.roll.result.duality === 1;
const value = if (memberId === this.data.initiator.id) {
memberId !== this.data.initiator.id const value = this.data.initiator.cost
? 1 ? rollGivesHope
: this.data.initiator.cost ? 1 - this.data.initiator.cost
? 1 - this.data.initiator.cost : -this.data.initiator.cost
: 1; : 1;
resourceUpdates.push({ key: 'hope', value: value, total: -value, enabled: true }); resourceUpdates.push({ key: 'hope', value: value, total: -value, enabled: true });
} else if (rollGivesHope) {
resourceUpdates.push({ key: 'hope', value: 1, total: -1, enabled: true });
} }
if (systemData.roll.isCritical) resourceUpdates.push({ key: 'stress', value: -1, total: 1, enabled: true }); if (systemData.roll.isCritical) resourceUpdates.push({ key: 'stress', value: -1, total: 1, enabled: true });
if (systemData.roll.result.duality === -1) { if (systemData.roll.result.duality === -1) {