mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
l
This commit is contained in:
parent
dbb07008f0
commit
faa32c1fba
10 changed files with 90 additions and 59 deletions
|
|
@ -143,6 +143,7 @@ export default class D20Roll extends DHRoll {
|
|||
static postEvaluate(roll, config = {}) {
|
||||
const data = super.postEvaluate(roll, config);
|
||||
if (config.targets?.length) {
|
||||
config.targetSelection = true;
|
||||
config.targets.forEach(target => {
|
||||
const difficulty = config.roll.difficulty ?? target.difficulty ?? target.evasion;
|
||||
target.hit = this.isCritical || roll.total >= difficulty;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ export default class DHRoll extends Roll {
|
|||
}
|
||||
|
||||
static postEvaluate(roll, config = {}) {
|
||||
console.log(roll, config)
|
||||
return {
|
||||
type: config.roll.type,
|
||||
total: roll.total,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue