Fixed so that GroupRolls and TagTeams respect the HopeFear automation setting

This commit is contained in:
WBHarry 2026-06-19 11:44:46 +02:00
parent 0b7ae8a76c
commit 3115e96c17
4 changed files with 13 additions and 5 deletions

View file

@ -1,4 +1,5 @@
import { ResourceUpdateMap } from '../../data/action/baseAction.mjs';
import { shouldUseHopeFearAutomation } from '../../helpers/utils.mjs';
import { emitGMUpdate, GMUpdateEvent, RefreshType, socketEvent } from '../../systemRegistration/socket.mjs';
import Party from '../sheets/actors/party.mjs';
@ -480,6 +481,8 @@ export default class GroupRollDialog extends HandlebarsApplicationMixin(Applicat
await cls.create(msgData);
if (!shouldUseHopeFearAutomation()) return this.cancelRoll({ confirm: false });
const resourceMap = new ResourceUpdateMap(actor);
if (totalRoll.isCritical) {
resourceMap.addResources([

View file

@ -1,5 +1,5 @@
import { MemberData } from '../../data/tagTeamData.mjs';
import { getCritDamageBonus } from '../../helpers/utils.mjs';
import { getCritDamageBonus, shouldUseHopeFearAutomation } from '../../helpers/utils.mjs';
import { emitGMUpdate, GMUpdateEvent, RefreshType, socketEvent } from '../../systemRegistration/socket.mjs';
import Party from '../sheets/actors/party.mjs';
@ -750,6 +750,8 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
await cls.create(msgData);
if (!shouldUseHopeFearAutomation()) return this.cancelRoll({ confirm: false });
/* Handle resource updates from the finished TagTeamRoll */
const tagTeamData = this.party.system.tagTeam;
const fearUpdate = { key: 'fear', value: null, total: null, enabled: true };