mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-23 02:49:55 +02:00
[Fix] Reroll Fixes (#2103)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
This commit is contained in:
parent
ffa7912d01
commit
80cc7f1502
7 changed files with 15 additions and 8 deletions
|
|
@ -20,7 +20,10 @@ export default class BaseDie extends foundry.dice.terms.Die {
|
|||
|
||||
if (['c', 'cc'].some(x => this.modifiers.includes(x))) {
|
||||
await this.handleComboDiceReroll(resultIndex, result);
|
||||
}
|
||||
}
|
||||
|
||||
rerolledResult.rerolled = true;
|
||||
return rerolledResult;
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@ export default class DualityDie extends BaseDie {
|
|||
this.modifiers = [];
|
||||
}
|
||||
|
||||
get isRerolled() {
|
||||
return this.results.some(x => x.rerolled);
|
||||
}
|
||||
|
||||
#getDualityState(roll) {
|
||||
if (!roll) return null;
|
||||
return roll.withHope ? 1 : roll.withFear ? -1 : 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue