Minot fixes

This commit is contained in:
2023-02-19 19:35:03 +01:00
parent f6554f6945
commit 5df2b7e624
4 changed files with 62 additions and 58 deletions

View File

@ -2,7 +2,7 @@ import { BoLDefaultRoll } from "../controllers/bol-rolls.js";
// Spell circle to min PP cost
const __circle2minpp = { 0: 0, 1: 2, 2: 6, 3: 11 }
const __validDices = {"6": 1, "8": 1, "10": 1, "12": 1}
export class BoLUtility {
@ -146,6 +146,10 @@ export class BoLUtility {
this.criticalFailureValue = Number(value)
}
static getDiceData() {
let df = this.diceFormula
if ( !__validDices[String(this.diceFormula)]) {
df = "6"
}
return {
diceFormula: this.diceFormula,
successValue : this.successValue,