diff --git a/module/actor.js b/module/actor.js index 12a0a899..9f8e58f7 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2402,12 +2402,14 @@ export class RdDActor extends Actor { async rollCompetence(name) { let rollData = { competence: Misc.data(this.getCompetence(name)) } + //console.log("COMP CREATURE", name, rollData, name); if (rollData.competence.type == 'competencecreature') { if (rollData.competence.data.iscombat) { const arme = RdDItemCompetenceCreature.toArme(rollData.competence); RdDCombat.createUsingTarget(this).attaque(rollData.competence, arme); return; } + //console.log("COMP CREATURE2"); // Fake competence pour créature RdDItemCompetenceCreature.setRollDataCreature(rollData); } diff --git a/module/rdd-calendrier.js b/module/rdd-calendrier.js index df296080..905877f9 100644 --- a/module/rdd-calendrier.js +++ b/module/rdd-calendrier.js @@ -38,10 +38,11 @@ const MAX_NOMBRE_ASTRAL = 12; export class RdDCalendrier extends Application { getCalendrier(index) { + let month = Math.floor(index / 28) % 12; let calendrier = { heureRdD: 0, // Index dans heuresList minutesRelative: 0, - moisRdD: Math.floor(index / 28) % 12, + moisRdD: month, jour: (index - (month * 28)) + 1 } return calendrier; @@ -168,7 +169,11 @@ export class RdDCalendrier extends Application { /* -------------------------------------------- */ getNombreAstral(indexDate) { - const liste = this.listeNombreAstral ?? this._loadListNombreAstral(); + let liste = this.listeNombreAstral ?? this._loadListNombreAstral(); + if ( typeof(liste) != 'Array' || liste.length == 0 ) { + this.rebuildListeNombreAstral(); + liste = this.listeNombreAstral; + } let astralData = liste.find((nombreAstral, i) => nombreAstral.index == indexDate); if (!astralData?.nombreAstral) { this.rebuildListeNombreAstral(); diff --git a/system.json b/system.json index 1b21d2d9..d023826e 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "name": "foundryvtt-reve-de-dragon", "title": "Rêve de Dragon", "description": "Rêve de Dragon RPG for FoundryVTT", - "version": "1.4.23", + "version": "1.4.24", "manifestPlusVersion": "1.0.0", "minimumCoreVersion": "0.8.0", "compatibleCoreVersion": "0.8.99", diff --git a/templates/actor-creature-sheet.html b/templates/actor-creature-sheet.html index 1100ec55..70b233a5 100644 --- a/templates/actor-creature-sheet.html +++ b/templates/actor-creature-sheet.html @@ -114,9 +114,11 @@