diff --git a/module/actor.js b/module/actor.js
index 8517a852..1ab93c47 100644
--- a/module/actor.js
+++ b/module/actor.js
@@ -702,7 +702,7 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */
async updateCreatureCompetence(compName, fieldName, compValue) {
let comp = this.getCompetence(compName);
- console.log(comp);
+ //console.log(comp);
if (comp) {
const update = { _id: comp._id }
if (fieldName == "niveau")
@@ -711,7 +711,7 @@ export class RdDActor extends Actor {
update['data.dommages'] = compValue;
else
update['data.carac_value'] = compValue;
- console.log(update);
+ //console.log(update);
const updated = await this.updateEmbeddedEntity("OwnedItem", update); // Updates one EmbeddedEntity
}
}
@@ -1991,8 +1991,8 @@ export class RdDActor extends Actor {
if (rollData.competence.type == 'competencecreature') {
if (rollData.competence.data.iscombat) {
- const arme = RdDItemCompetenceCreature.toArme(competence);
- RdDCombat.createUsingTarget(this).attaque(competence, arme);
+ const arme = RdDItemCompetenceCreature.toArme(rollData.competence);
+ RdDCombat.createUsingTarget(this).attaque(rollData.competence, arme);
return;
}
// Fake competence pour créature
diff --git a/module/item-competencecreature.js b/module/item-competencecreature.js
index 67896acb..3835bc12 100644
--- a/module/item-competencecreature.js
+++ b/module/item-competencecreature.js
@@ -33,10 +33,12 @@ export class RdDItemCompetenceCreature extends Item {
return undefined;
}
+ /* -------------------------------------------- */
static isCompetenceAttaque(item) {
return item.type == 'competencecreature' && item.data.iscombat;
}
+ /* -------------------------------------------- */
static isCompetenceParade(item) {
return item.type == 'competencecreature' && item.data.isparade;
}
diff --git a/module/tmr-rencontres.js b/module/tmr-rencontres.js
index 01fc81a7..6905b6cc 100644
--- a/module/tmr-rencontres.js
+++ b/module/tmr-rencontres.js
@@ -327,11 +327,11 @@ export class TMRRencontres {
if (!roll || roll <= 0 || roll > 100) {
roll = new Roll("1d100").evaluate().total;
}
- let rencontre = TMRRencontres.getRencontreAleatoire(terrain, roll);
+ let rencontre = await TMRRencontres.getRencontreAleatoire(terrain, roll);
ChatMessage.create({
user: game.user._id,
whisper: [game.user._id],
- content: `Rencontre en ${terrain} (jet : ${roll}%)
Vous rencontrez un ${rencontre.name} de ${force} Points de Rêve`
+ content: `Rencontre en ${terrain} (jet : ${roll}%)
Vous rencontrez un ${rencontre.name} de ${rencontre.force} Points de Rêve`
});
return false;
}
@@ -360,11 +360,12 @@ export class TMRRencontres {
roll = new Roll("1d100").evaluate().total;
}
terrain = Grammar.toLowerCaseNoAccent(terrain);
- console.log("getRencontreAleatoire", terrain, roll);
+ //console.log("getRencontreAleatoire", terrain, roll);
const code = tableRencontres[terrain].find(it => it.range[0] <= roll && roll <= it.range[1]).code;
const rencontre = duplicate(rencontresStandard.find(it => it.code == code));
rencontre.roll = roll;
await TMRRencontres.evaluerForceRencontre(rencontre);
+ //console.log(rencontre);
return rencontre;
}
@@ -405,6 +406,7 @@ export class TMRRencontres {
return gestion;
}
+ /* -------------------------------------------- */
static async gererRencontre(tmrDialog, data) {
let gestion = TMRRencontres.getGestionRencontre(data.rencontre.type);
if (data.rolled.isSuccess) {
@@ -424,6 +426,7 @@ export class TMRRencontres {
return gestion.postEchec;
}
+ /* -------------------------------------------- */
static msgEchecPasseurFou(data) {
data.sortReserve = data.actor.data.data.reve.reserve.list[0];
if (data.sortReserve) {
diff --git a/system.json b/system.json
index 25b90434..b6a845ba 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.3.20",
+ "version": "1.3.21",
"manifestPlusVersion": "1.0.0",
"minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.9",