Chiffre astral ajuste la chance

This commit is contained in:
2020-12-11 03:23:34 +01:00
parent 02f04791b9
commit a75157226e
4 changed files with 28 additions and 15 deletions

View File

@ -85,7 +85,7 @@ export class RdDCalendrier extends Application {
}
/* -------------------------------------------- */
ajouterNombreAstral(index) {
ajouterNombreAstral(index) {
return {
nombreAstral: new Roll("1d12").roll().total,
valeursFausses: [],
@ -100,7 +100,7 @@ export class RdDCalendrier extends Application {
let index = this.getCurrentDayIndex();
return this.listeNombreAstral[index].nombreAstral;
}
return '?';
return 0;
}
/* -------------------------------------------- */
@ -203,6 +203,23 @@ export class RdDCalendrier extends Application {
return data;
}
getAjustementAstrologique(heureNaissance)
{
let hn = heuresDef[heureNaissance].heure;
let chiffreAstral = this.getCurrentNombreAstral();
let heureCourante = this.calendrier.heureRdD;
let ecartChance = (hn + chiffreAstral - heureCourante)%12;
console.log("ajustementAstrologique", heureNaissance, hn, chiffreAstral, heureCourante, ecartChance);
switch (ecartChance)
{
case 0: return 4;
case 4: case 8: return 2;
case 6: return -4;
case 3: case 9: return -2;
}
return 0;
}
/* -------------------------------------------- */
getData() {
let data = super.getData();