Utilisation Misc.data
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { Grammar } from "./grammar.js";
|
||||
import { Misc } from "./misc.js";
|
||||
|
||||
const tableCaracDerivee = {
|
||||
// xp: coût pour passer du niveau inférieur à ce niveau
|
||||
@ -61,7 +62,7 @@ export class RdDCarac {
|
||||
static computeTotal(carac, beaute = undefined) {
|
||||
const total = Object.values(carac).filter(c => !c.derivee)
|
||||
.map(it => parseInt(it.value))
|
||||
.reduce((a, b) => a + b, 0);
|
||||
.reduce(Misc.sum(), 0);
|
||||
const beauteSuperieur10 = Math.max((beaute ?? 10) - 10, 0);
|
||||
return total + beauteSuperieur10;
|
||||
}
|
||||
|
Reference in New Issue
Block a user