v10.6.3 #613

Merged
uberwald merged 8 commits from VincentVk/foundryvtt-reve-de-dragon:v10 into v10 2023-01-19 10:50:28 +01:00
Showing only changes of commit 37704558e0 - Show all commits

View File

@ -1,6 +1,5 @@
import { ChatUtility } from "./chat-utility.js"; import { ChatUtility } from "./chat-utility.js";
import { ENTITE_BLURETTE, ENTITE_INCARNE, ENTITE_NONINCARNE, HIDE_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js"; import { ENTITE_BLURETTE, HIDE_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
import { DialogSelectTarget } from "./dialog-select-target.js";
import { Grammar } from "./grammar.js"; import { Grammar } from "./grammar.js";
import { RdDItemArme } from "./item-arme.js"; import { RdDItemArme } from "./item-arme.js";
import { RdDItemCompetence } from "./item-competence.js"; import { RdDItemCompetence } from "./item-competence.js";
@ -111,10 +110,10 @@ export class RdDCombatManager extends Combat {
if (!roll.total) { if (!roll.total) {
roll.evaluate({ async: false }); roll.evaluate({ async: false });
} }
if (roll.total <= 0) roll.total = 0.00; const total = Math.max(roll.total, 0.00);
console.log("Compute init for", rollFormula, roll.total, combatant); console.log("Compute init for", rollFormula, roll, total, combatant);
let id = combatant._id || combatant.id; let id = combatant._id || combatant.id;
await this.updateEmbeddedDocuments("Combatant", [{ _id: id, initiative: roll.total }]); await this.updateEmbeddedDocuments("Combatant", [{ _id: id, initiative: total }]);
// Send a chat message // Send a chat message
let rollMode = messageOptions.rollMode || game.settings.get("core", "rollMode"); let rollMode = messageOptions.rollMode || game.settings.get("core", "rollMode");