[Fix] Damage Rerolls (#1566)

* Fixed so that damage rerolls work again

* Set default data for a roll instead and fix title (#1570)

* Set default data for a roll instead and fix title

* Ensure same options object is used

---------

Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>
This commit is contained in:
WBHarry 2026-01-22 23:21:42 +01:00 committed by GitHub
parent 1f7d4d6f1e
commit fa3b3fa0a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View file

@ -607,6 +607,7 @@
}, },
"RerollDialog": { "RerollDialog": {
"title": "Reroll", "title": "Reroll",
"damageTitle": "Reroll Damage",
"deselectDiceNotification": "Deselect one of the selected dice first", "deselectDiceNotification": "Deselect one of the selected dice first",
"acceptCurrentRolls": "Accept Current Rolls" "acceptCurrentRolls": "Accept Current Rolls"
}, },

View file

@ -3,7 +3,7 @@ import D20RollDialog from '../applications/dialogs/d20RollDialog.mjs';
export default class DHRoll extends Roll { export default class DHRoll extends Roll {
baseTerms = []; baseTerms = [];
constructor(formula, data = {}, options = {}) { constructor(formula, data = {}, options = {}) {
super(formula, data, options); super(formula, data, foundry.utils.mergeObject(options, { roll: [] }, { overwrite: false }));
options.bonusEffects = this.bonusEffectBuilder(); options.bonusEffects = this.bonusEffectBuilder();
if (!this.data || !Object.keys(this.data).length) this.data = options.data; if (!this.data || !Object.keys(this.data).length) this.data = options.data;
} }

View file

@ -2,7 +2,7 @@
"id": "daggerheart", "id": "daggerheart",
"title": "Daggerheart", "title": "Daggerheart",
"description": "An unofficial implementation of the Daggerheart system", "description": "An unofficial implementation of the Daggerheart system",
"version": "1.5.4", "version": "1.5.5",
"compatibility": { "compatibility": {
"minimum": "13.346", "minimum": "13.346",
"verified": "13.351", "verified": "13.351",