Correction initiative et meilleur affichage sur jet D20
All checks were successful
Release Creation / build (release) Successful in 51s

This commit is contained in:
2026-03-10 20:50:43 +01:00
parent f0a74d5daa
commit 71b384c963
101 changed files with 287 additions and 240 deletions

View File

@@ -10,7 +10,14 @@ export class HawkmoonCombat extends Combat {
const c = this.combatants.get(cId);
console.log("Init for combattant", c, ids)
let id = c._id || c.id
let initValue = c.actor ? c.actor.getInitiativeScore() : 0
let initValue = 0
if (c.actor) {
const combat = c.actor.getCombatValues()
const roll = await new Roll(`1d10 + ${combat.initTotal}`).roll()
await HawkmoonUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"))
initValue = roll.total
await c.actor.setFlag("world", "last-initiative", initValue)
}
await this.updateEmbeddedDocuments("Combatant", [ { _id: id, initiative: initValue } ]);
}