Deleting old templates

This commit is contained in:
Dapoolp 2025-08-02 03:16:59 +02:00
parent 9b3632be2f
commit aff5998a45
21 changed files with 447 additions and 1015 deletions

View file

@ -11,7 +11,6 @@ export default class DamageRoll extends DHRoll {
static DefaultDialog = DamageDialog;
static async buildEvaluate(roll, config = {}, message = {}) {
console.log(roll,config)
if (config.evaluate !== false)
for (const roll of config.roll) await roll.roll.evaluate();
@ -33,6 +32,21 @@ export default class DamageRoll extends DHRoll {
};
}
static async buildPost(roll, config, message) {
if (game.modules.get('dice-so-nice')?.active) {
const pool = foundry.dice.terms.PoolTerm.fromRolls(
Object.values(config.damage).flatMap(r => r.parts.map(p => p.roll))
),
diceRoll = Roll.fromTerms([pool]);
await game.dice3d.showForRoll(diceRoll, game.user, true);
}
await super.buildPost(roll, config, message);
if (config.source?.message) {
const chatMessage = ui.chat.collection.get(config.source.message);
chatMessage.update({ 'system.damage': config.damage });
}
}
static unifyDamageRoll(rolls) {
const unified = {};
rolls.forEach(r => {