This commit is contained in:
WBHarry 2026-04-15 00:48:38 +02:00
parent c6335980ba
commit 22f38d796b
9 changed files with 156 additions and 69 deletions

View file

@ -189,7 +189,15 @@ export const getDeleteKeys = (property, innerProperty, innerPropertyDefaultValue
// Fix on Foundry native formula replacement for DH
const nativeReplaceFormulaData = Roll.replaceFormulaData;
Roll.replaceFormulaData = function (formula, data = {}, { missing, warn = false } = {}) {
Roll.replaceFormulaData = function (formula, baseData = {}, { missing, warn = false } = {}) {
/* Inserting global data */
const data = {
...baseData,
partySize:
!game.actors ? 0 :
game.actors.find(x => x.type === 'party' && x.system.active)?.system.partyMembers.length ?? 0,
};
const terms = Object.keys(CONFIG.DH.GENERAL.multiplierTypes).map(type => {
return { term: type, default: 1 };
});