mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 02:19:54 +02:00
[Rework] Damage and Damage Resource split (#2094)
This commit is contained in:
parent
c90c6afc19
commit
3b68c6c895
31 changed files with 730 additions and 531 deletions
|
|
@ -41,6 +41,10 @@ export default class DHRoll extends BaseRoll {
|
|||
return config;
|
||||
}
|
||||
|
||||
static createRollInstance(config) {
|
||||
return new this(config.roll.formula, config.data, config);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Partial<RollConfig>} config
|
||||
* @returns {Promise<RollConfig>}
|
||||
|
|
@ -58,7 +62,7 @@ export default class DHRoll extends BaseRoll {
|
|||
|
||||
this.temporaryModifierBuilder(config);
|
||||
|
||||
let roll = new this(config.roll.formula, config.data, config);
|
||||
let roll = this.createRollInstance(config);
|
||||
if (config.dialog.configure !== false) {
|
||||
// Open Roll Dialog
|
||||
const DialogClass = config.dialog?.class ?? this.DefaultDialog;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue