Fixes from 29th of june
This commit is contained in:
@@ -41,7 +41,7 @@ export class Hero6Utility {
|
||||
return list.length > 0;
|
||||
})
|
||||
Handlebars.registerHelper('mul', function (a, b) {
|
||||
return parseInt(a) * parseInt(b);
|
||||
return Number(a) * Number(b);
|
||||
})
|
||||
Handlebars.registerHelper('locationLabel', function (key) {
|
||||
return __locationNames[key]
|
||||
@@ -390,9 +390,12 @@ export class Hero6Utility {
|
||||
let hasHalfDice = ""
|
||||
if (hero6Formula.match("1/2d6")) {
|
||||
hero6Formula = hero6Formula.replace("1/2d6", "d6")
|
||||
hasHalfDice = "+round(1d6)"
|
||||
hasHalfDice = "+round(1d6/2)"
|
||||
}
|
||||
if (hero6Formula.match(".5")) {
|
||||
hero6Formula = hero6Formula.replace(".5", "")
|
||||
hasHalfDice = "+round(1d6/2)"
|
||||
}
|
||||
|
||||
let foundryFormula = hero6Formula + hasHalfDice
|
||||
foundryFormula = foundryFormula.replace(' ', '')
|
||||
console.log("Parsed formula : ", hero6Formula, foundryFormula)
|
||||
|
Reference in New Issue
Block a user