Skip to content

Commit

Permalink
Extract AdjustDegreeOfSuccess synthetics for action macros (foundryvt…
Browse files Browse the repository at this point in the history
  • Loading branch information
stwlam authored Jan 25, 2023
1 parent c897cf3 commit 86f59d4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/module/system/action-macros/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import {
import { WeaponPF2e } from "@item";
import { WeaponTrait } from "@item/weapon/types";
import { RollNotePF2e } from "@module/notes";
import { extractModifierAdjustments, extractRollSubstitutions } from "@module/rules/helpers";
import {
extractDegreeOfSuccessAdjustments,
extractModifierAdjustments,
extractRollSubstitutions,
} from "@module/rules/helpers";
import { CheckDC, DegreeOfSuccessString } from "@system/degree-of-success";
import { setHasElement, sluggify } from "@util";
import { getSelectedOrOwnActors } from "@util/token-actor-utils";
Expand Down Expand Up @@ -198,6 +202,8 @@ export class ActionMacroHelpers {
finalOptions
);

const dosAdjustments = extractDegreeOfSuccessAdjustments(actor.synthetics, [stat.slug]);

CheckPF2e.roll(
check,
{
Expand All @@ -210,6 +216,7 @@ export class ActionMacroHelpers {
type: options.checkType,
options: finalOptions,
notes,
dosAdjustments,
substitutions,
traits: traitObjects,
title: `${game.i18n.localize(options.title)} - ${game.i18n.localize(options.subtitle)}`,
Expand Down

0 comments on commit 86f59d4

Please sign in to comment.