mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-11 03:27:08 +01:00
Consume post roll logic
This commit is contained in:
parent
99af4a41d3
commit
d38d7deeb7
10 changed files with 87 additions and 19 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue