Revert "Made the active PartySize available as a parameter for formulas"

This reverts commit ca097c21a3.
This commit is contained in:
WBHarry 2026-04-15 00:37:30 +02:00
parent e4b3f5d5bd
commit e3673c50c6
9 changed files with 70 additions and 155 deletions

View file

@ -189,15 +189,7 @@ export const getDeleteKeys = (property, innerProperty, innerPropertyDefaultValue
// Fix on Foundry native formula replacement for DH
const nativeReplaceFormulaData = Roll.replaceFormulaData;
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,
};
Roll.replaceFormulaData = function (formula, data = {}, { missing, warn = false } = {}) {
const terms = Object.keys(CONFIG.DH.GENERAL.multiplierTypes).map(type => {
return { term: type, default: 1 };
});