Skip to content

Commit

Permalink
chore: Remove deprecation warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
xdy committed Jan 3, 2025
1 parent 7e91fbb commit a8c7c80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/module/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,14 @@ export function pf2eRerollHook(
if (!heroPoint || keep !== "new") return;

// @ts-ignore
const die = newRoll.dice.find((d) => d instanceof Die && d.number === 1 && d.faces === 20);
const die = newRoll.dice.find((d) => d instanceof foundry.dice.terms.Die && d.number === 1 && d.faces === 20);
const result = die?.results.find((r) => r.active && r.result <= 10);
if (die && result) {
newRoll.terms.push(
// @ts-ignore
OperatorTerm.fromData({ class: "OperatorTerm", operator: "+", evaluated: true }),
foundry.dice.terms.OperatorTerm.fromData({ class: "OperatorTerm", operator: "+", evaluated: true }),
// @ts-ignore
NumericTerm.fromData({ class: "NumericTerm", number: 10, evaluated: true }),
foundry.dice.terms.NumericTerm.fromData({ class: "NumericTerm", number: 10, evaluated: true }),
);
// @ts-ignore It's protected. Meh.
newRoll._total += 10;
Expand Down

0 comments on commit a8c7c80

Please sign in to comment.