v10 migration, ongoing WIP

This commit is contained in:
2022-05-03 09:01:10 +02:00
parent 4538439c02
commit a3fb328b7d
11 changed files with 60 additions and 65 deletions

View File

@ -133,12 +133,12 @@ export class RdDItemCompetence extends Item {
/* -------------------------------------------- */
static computeXP(competence) {
const itemData = Misc.data(competence);
const factor = itemData.name.includes('Thanatos') ? 2 : 1; // Thanatos compte double !
const xpNiveau = RdDItemCompetence.computeDeltaXP(itemData.data.base, itemData.data.niveau ?? itemData.data.base);
const xp = itemData.data.xp ?? 0;
const xpSort = itemData.data.xp_sort ?? 0;
return factor * (xpNiveau + xp) + xpSort;
console.log("Competence", competence)
const factor = competence.name.includes('Thanatos') ? 2 : 1 // Thanatos compte double !
const xpNiveau = RdDItemCompetence.computeDeltaXP(competence.system.base, competence.system.niveau ?? competence.system.base)
const xp = competence.system.xp ?? 0
const xpSort = competence.system.xp_sort ?? 0
return factor * (xpNiveau + xp) + xpSort
}
/* -------------------------------------------- */