Minot fixes
This commit is contained in:
@ -577,7 +577,7 @@ export class BoLRoll {
|
||||
rollbase = 0
|
||||
}
|
||||
|
||||
let diceData = BoLUtility.getDiceData()
|
||||
let diceData = BoLUtility.getDiceData()
|
||||
const modifiers = rollbase + rollData.careerBonus + rollData.mod + rollData.weaponModifier - rollData.defence - rollData.modArmorMalus + rollData.shieldMalus + rollData.attackModifier + rollData.appliedArmorMalus + rollData.effectModifier
|
||||
const formula = (isMalus) ? rollData.nbDice + "d" + diceData.diceFormula + "kl2 + " + modifiers : rollData.nbDice + "d" + diceData.diceFormula + "kh2 + " + modifiers
|
||||
rollData.formula = formula
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user