Feature/517 action cost on success (#546)

* Add checkboxes

* Consume post roll logic
This commit is contained in:
Dapoulp 2025-08-03 18:45:11 +02:00 committed by GitHub
parent 90a97c7105
commit c46d676cc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 93 additions and 18 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;