Gestion des quantites et de l'argent

This commit is contained in:
2022-12-03 23:57:30 +01:00
parent 5ab6b99ef6
commit 5dde9ac72f
9 changed files with 134 additions and 14 deletions

View File

@ -305,6 +305,16 @@ export class HawkmoonUtility {
}
}
/* -------------------------------------------- */
static computeMonnaieDetails(valueSC) {
let po = Math.floor(valueSC / 400)
let pa = Math.floor((valueSC - (po*400)) / 20)
let sc = valueSC - (po*400) - (pa*20)
return {
po: po, pa: pa, sc: sc, valueSC: valueSC
}
}
/* -------------------------------------------- */
static computeResult(rollData) {
rollData.diceResult = rollData.roll.terms[0].results[0].result