Consume post roll logic

This commit is contained in:
Dapoolp 2025-08-03 18:33:34 +02:00
parent 99af4a41d3
commit d38d7deeb7
10 changed files with 87 additions and 19 deletions

View file

@ -147,6 +147,7 @@ export default class D20Roll extends DHRoll {
const difficulty = config.roll.difficulty ?? target.difficulty ?? target.evasion;
target.hit = this.isCritical || roll.total >= difficulty;
});
data.success = config.targets.some(target => target.hit)
} else if (config.roll.difficulty) {
data.difficulty = config.roll.difficulty;
data.success = roll.isCritical || roll.total >= config.roll.difficulty;