mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[PR] [Feature] 590 - Daggerheart Menu (#1007)
* Added menu with refresh tools * Replaced menu icon
This commit is contained in:
parent
eefb28c312
commit
f1b6d3851d
53 changed files with 730 additions and 350 deletions
|
|
@ -47,8 +47,7 @@ export default class DamageRoll extends DHRoll {
|
|||
);
|
||||
}
|
||||
await super.buildPost(roll, config, message);
|
||||
if (config.source?.message)
|
||||
chatMessage.update({ 'system.damage': config.damage });
|
||||
if (config.source?.message) chatMessage.update({ 'system.damage': config.damage });
|
||||
}
|
||||
|
||||
static unifyDamageRoll(rolls) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export default class DHRoll extends Roll {
|
|||
static async buildConfigure(config = {}, message = {}) {
|
||||
config.hooks = [...this.getHooks(), ''];
|
||||
config.dialog ??= {};
|
||||
|
||||
|
||||
for (const hook of config.hooks) {
|
||||
if (Hooks.call(`${CONFIG.DH.id}.preRoll${hook.capitalize()}`, config, message) === false) return null;
|
||||
}
|
||||
|
|
@ -46,7 +46,10 @@ export default class DHRoll extends Roll {
|
|||
}
|
||||
|
||||
for (const hook of config.hooks) {
|
||||
if (Hooks.call(`${CONFIG.DH.id}.post${hook.capitalize()}RollConfiguration`, roll, config, message) === false) return [];
|
||||
if (
|
||||
Hooks.call(`${CONFIG.DH.id}.post${hook.capitalize()}RollConfiguration`, roll, config, message) === false
|
||||
)
|
||||
return [];
|
||||
}
|
||||
return roll;
|
||||
}
|
||||
|
|
@ -91,7 +94,7 @@ export default class DHRoll extends Roll {
|
|||
system: config,
|
||||
rolls: [roll]
|
||||
};
|
||||
|
||||
|
||||
config.selectedRollMode ??= game.settings.get('core', 'rollMode');
|
||||
|
||||
if (roll._evaluated) {
|
||||
|
|
|
|||
|
|
@ -153,10 +153,13 @@ export default class DualityRoll extends D20Roll {
|
|||
|
||||
applyBaseBonus() {
|
||||
const modifiers = super.applyBaseBonus();
|
||||
|
||||
|
||||
if (this.options.roll.trait && this.data.traits?.[this.options.roll.trait])
|
||||
modifiers.unshift({
|
||||
label: this.options.roll.type === CONFIG.DH.GENERAL.rollTypes.spellcast.id ? "DAGGERHEART.CONFIG.RollTypes.spellcast.name" : `DAGGERHEART.CONFIG.Traits.${this.options.roll.trait}.name`,
|
||||
label:
|
||||
this.options.roll.type === CONFIG.DH.GENERAL.rollTypes.spellcast.id
|
||||
? 'DAGGERHEART.CONFIG.RollTypes.spellcast.name'
|
||||
: `DAGGERHEART.CONFIG.Traits.${this.options.roll.trait}.name`,
|
||||
value: this.data.traits[this.options.roll.trait].value
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue