Pas mal de bugfixes
This commit is contained in:
parent
d837c25468
commit
5e53dc5262
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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}%)<br>Vous rencontrez un ${rencontre.name} de ${force} Points de Rêve`
|
||||
content: `Rencontre en ${terrain} (jet : ${roll}%)<br>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) {
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user