mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 18:39:55 +02:00
Fixed so that GroupRolls and TagTeams respect the HopeFear automation setting
This commit is contained in:
parent
0b7ae8a76c
commit
3115e96c17
4 changed files with 13 additions and 5 deletions
|
|
@ -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([
|
||||
|
|
|
|||
|
|
@ -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 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue