mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Added remaining options and fixed secure loading of dice models (#413)
This commit is contained in:
parent
dddee78356
commit
bf31ced3df
11 changed files with 167 additions and 100 deletions
|
|
@ -16,14 +16,19 @@ export default class DamageRoll extends DHRoll {
|
|||
for (const roll of config.roll) await roll.roll.evaluate();
|
||||
}
|
||||
roll._evaluated = true;
|
||||
const parts = config.roll.map(r => this.postEvaluate(r));
|
||||
const parts = [];
|
||||
for (let r of config.roll) {
|
||||
const part = this.postEvaluate(r);
|
||||
parts.push(part);
|
||||
}
|
||||
|
||||
config.roll = this.unifyDamageRoll(parts);
|
||||
}
|
||||
|
||||
static postEvaluate(roll, config = {}) {
|
||||
static async postEvaluate(roll, config = {}) {
|
||||
return {
|
||||
...roll,
|
||||
...super.postEvaluate(roll.roll, config),
|
||||
...(await super.postEvaluate(roll.roll, config)),
|
||||
damageTypes: [...(roll.damageTypes ?? [])],
|
||||
roll: roll.roll,
|
||||
type: config.type,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue