[Feature] Active Party (#1803)

This commit is contained in:
WBHarry 2026-04-16 02:26:39 +02:00 committed by GitHub
parent 8808e4646d
commit 7d5cdeb09d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 179 additions and 71 deletions

View file

@ -189,7 +189,13 @@ 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?.party?.system.partyMembers.length ?? 0
};
const terms = Object.keys(CONFIG.DH.GENERAL.multiplierTypes).map(type => {
return { term: type, default: 1 };
});