mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
More
This commit is contained in:
parent
5113e37574
commit
c99a76f4f4
15 changed files with 78 additions and 67 deletions
|
|
@ -557,3 +557,12 @@ export function calculateExpectedValue(formulaOrTerms) {
|
|||
: [formulaOrTerms];
|
||||
return terms.reduce((r, t) => r + (t.bonus ?? 0) + (t.diceQuantity ? (t.diceQuantity * (t.faces + 1)) / 2 : 0), 0);
|
||||
}
|
||||
|
||||
export function getNextUnusedDamageType(parts) {
|
||||
const usedKeys = Object.keys(parts);
|
||||
for (const key of Object.keys(CONFIG.DH.GENERAL.healingTypes)) {
|
||||
if (!usedKeys.includes(key)) return key;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue