Divers fixes + fiches creatures

This commit is contained in:
2022-11-13 23:01:41 +01:00
parent f88fbf977d
commit 50e42d4ecf
17 changed files with 552 additions and 105 deletions

View File

@@ -9,11 +9,9 @@ export class HawkmoonCombat extends Combat {
for (let cId = 0; cId < ids.length; cId++) {
const c = this.combatants.get(ids[cId]);
let id = c._id || c.id;
let initBonus = c.actor ? c.actor.getInitiativeScore() : 0
let roll = new Roll("1d10 + "+initBonus).roll({ async: false})
await HawkmoonUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"))
let initValue = c.actor ? c.actor.getInitiativeScore() : 0
//console.log("Init bonus", initBonus, roll.total)
await this.updateEmbeddedDocuments("Combatant", [ { _id: id, initiative: roll.total } ]);
await this.updateEmbeddedDocuments("Combatant", [ { _id: id, initiative: initValue } ]);
}
return this;