Good for now

This commit is contained in:
Dapoolp 2025-08-02 05:15:08 +02:00
parent 53ba65df07
commit b7cb97c323
15 changed files with 167 additions and 476 deletions

View file

@ -13,8 +13,6 @@ export default class D20Roll extends DHRoll {
DISADVANTAGE: -1
};
static messageType = 'adversaryRoll';
static CRITICAL_TRESHOLD = 20;
static DefaultDialog = D20RollDialog;
@ -153,7 +151,6 @@ export default class D20Roll extends DHRoll {
data.difficulty = config.roll.difficulty;
data.success = roll.isCritical || roll.total >= config.roll.difficulty;
}
data.type = config.roll.type;
data.advantage = {
type: config.roll.advantage,
dice: roll.dAdvantage?.denomination,
@ -167,7 +164,7 @@ export default class D20Roll extends DHRoll {
rerolls: dice.results.filter(x => x.rerolled)
}
}));
data.isCritical = roll.isCritical;
data.isCritical = config.isCritical = roll.isCritical;
data.extra = roll.dice
.filter(d => !roll.baseTerms.includes(d))
.map(d => {

View file

@ -6,8 +6,6 @@ export default class DamageRoll extends DHRoll {
super(formula, data, options);
}
static messageType = 'dualityRoll';
static DefaultDialog = DamageDialog;
static async buildEvaluate(roll, config = {}, message = {}) {

View file

@ -92,11 +92,8 @@ export default class DHRoll extends Roll {
system: config,
rolls: [roll]
};
// msg.applyRollMode(config.selectedRollMode);
// return msg;
if(roll._evaluated) return await cls.create(msg, { rollMode: config.selectedRollMode });
return msg;
// return await cls.create(msg);
}
static applyKeybindings(config) {