mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-21 18:09:54 +02:00
.
This commit is contained in:
parent
bc7060ce36
commit
de0d4ef9b4
1 changed files with 4 additions and 2 deletions
|
|
@ -20,10 +20,12 @@ export default class BaseDie extends foundry.dice.terms.Die {
|
|||
/* The Combo only continues if the latest roll was higher than the previous */
|
||||
if (this.results[lastIndex].result <= this.results[lastIndex - 1].result) return false;
|
||||
|
||||
const increaseDiceSize = maxIncreasesDiceSize && this.results[lastIndex].result === this.faces;
|
||||
const lastFaces = this.results[lastIndex].denomination?.slice(1) ?? this.faces;
|
||||
const increaseDiceSize = maxIncreasesDiceSize && lastFaces < 12 && this.results[lastIndex].result === lastFaces;
|
||||
const denomination = increaseDiceSize ? adjustDice(this.denomination, false) : this.denomination;
|
||||
|
||||
const newRoll = await (new Roll(`1${denomination}`)).evaluate();
|
||||
this.results.push({ result: newRoll.total, active: true });
|
||||
this.results.push({ result: newRoll.total, denomination: denomination, active: true });
|
||||
this.number += 1;
|
||||
|
||||
return this.continueCombo();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue