Fix review comments.
This commit is contained in:
parent
25119fd9e3
commit
42868e4a83
2 changed files with 2 additions and 9 deletions
|
@ -12,7 +12,7 @@ interface TermData {
|
|||
* Implements DS4 Checks as an emulated "dice throw".
|
||||
*
|
||||
* @notes
|
||||
* Be aware that, even though this behaves like one roll, it actually throws several iones internally
|
||||
* Be aware that, even though this behaves like one roll, it actually throws several ones internally
|
||||
*
|
||||
* @example
|
||||
* - Roll a check against a Check Target Number (CTV) of 18: `/r dsv18`
|
||||
|
@ -29,7 +29,6 @@ export class DS4Check extends DiceTerm {
|
|||
modifiers: termData.modifiers ?? [],
|
||||
options: termData.options ?? {},
|
||||
});
|
||||
console.log("This @ constructor: ", termData);
|
||||
|
||||
// Store and parse target value.
|
||||
const targetValueModifier = this.modifiers.filter((m) => m[0] === "v")[0];
|
||||
|
@ -65,12 +64,8 @@ export class DS4Check extends DiceTerm {
|
|||
|
||||
/**
|
||||
* @override
|
||||
* @param param0
|
||||
*
|
||||
* @private_notes This gets only called once for the first roll.
|
||||
*/
|
||||
roll({ minimize = false, maximize = false } = {}): RollResult {
|
||||
console.log(`This targetValue @ roll: ${this.targetValue}`);
|
||||
const rollResult = this.rollWithDifferentBorders({ minimize, maximize });
|
||||
this.results.push(rollResult);
|
||||
if (rollResult.status == RollResultStatus.CRITICAL_SUCCESS) {
|
||||
|
|
|
@ -40,10 +40,8 @@ export function rollCheckSingleDie(
|
|||
): RollResult {
|
||||
const usedOptions = new DefaultRollOptions().mergeWith(rollOptions);
|
||||
|
||||
if (dice == null || dice.length != 1) {
|
||||
console.error(`Rolled a dice. Target: ${checkTargetValue}`);
|
||||
if (dice?.length != 1) {
|
||||
dice = [new DS4RollProvider().getNextRoll()];
|
||||
console.log(dice);
|
||||
}
|
||||
const usedDice = dice;
|
||||
const rolledDie = usedDice[0];
|
||||
|
|
Loading…
Reference in a new issue