fixes error found with ATTRIBUTO
parent
cc60f9e57f
commit
07ba1c889b
|
|
@ -182,16 +182,19 @@ export class SpellDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
}
|
||||
|
||||
normalizeCastingCost() {
|
||||
|
||||
let costFormula = this._costModel.additionalFormula
|
||||
if (costFormula) {
|
||||
|
||||
this._costModel.variables.forEach(v => {
|
||||
this._costModel.variables.forEach(v => {
|
||||
|
||||
costFormula = costFormula.replace(v, this._costMutators[v])
|
||||
costFormula = costFormula.replace(v, this._costMutators[v])
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
costFormula = Number(eval(costFormula)) + Number(this._costModel.cost)
|
||||
costFormula = Number(eval(costFormula)) + Number(this._costModel.cost)
|
||||
} else {
|
||||
costFormula = this._costModel.cost
|
||||
}
|
||||
if (costFormula <= this._costModel.min) {
|
||||
costFormula = this._costModel.min
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue