Correction initiative et meilleur affichage sur jet D20
All checks were successful
Release Creation / build (release) Successful in 51s
All checks were successful
Release Creation / build (release) Successful in 51s
This commit is contained in:
@@ -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 } ]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user