Roll Chat message new design template

This commit is contained in:
Dapoolp 2025-07-30 21:40:42 +02:00
parent f14cb3936a
commit a3ef43aad6
21 changed files with 733 additions and 276 deletions

View file

@ -19,6 +19,12 @@ export default class D20Roll extends DHRoll {
static DefaultDialog = D20RollDialog;
get title() {
return game.i18n.localize(
"DAGGERHEART.GENERAL.d20Roll"
);
}
get d20() {
if (!(this.terms[0] instanceof foundry.dice.terms.Die)) this.createBaseDice();
return this.terms[0];

View file

@ -7,6 +7,12 @@ export default class DHRoll extends Roll {
if (!this.data || !Object.keys(this.data).length) this.data = options.data;
}
get title() {
return game.i18n.localize(
"DAGGERHEART.GENERAL.Roll"
);
}
static messageType = 'adversaryRoll';
static DefaultDialog = D20RollDialog;
@ -85,6 +91,8 @@ export default class DHRoll extends Roll {
msg = {
type: this.messageType,
user: game.user.id,
title: roll.title,
speaker: cls.getSpeaker(),
sound: config.mute ? null : CONFIG.sounds.dice,
system: config,
rolls: [roll]

View file

@ -17,6 +17,12 @@ export default class DualityRoll extends D20Roll {
static DefaultDialog = D20RollDialog;
get title() {
return game.i18n.localize(
"DAGGERHEART.GENERAL.dualityRoll"
);
}
get dHope() {
// if ( !(this.terms[0] instanceof foundry.dice.terms.Die) ) return;
if (!(this.dice[0] instanceof CONFIG.Dice.daggerheart.DualityDie)) this.createBaseDice();