forked from public/foundryvtt-reve-de-dragon
Chiffre astral ajuste la chance
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user