Meilleure gestion initiative

This commit is contained in:
2023-03-15 17:35:07 +01:00
parent 5df2b7e624
commit 0c502a2188
5 changed files with 29 additions and 130 deletions

View File

@ -25,7 +25,7 @@ export class BoLCombatManager extends Combat {
// calculate initiative
for (let cId = 0; cId < ids.length; cId++) {
const combatant = this.combatants.get(ids[cId])
let fvttInit = combatant.actor.getInitiativeRank(false, true)
let fvttInit = combatant.actor.getInitiativeRank(false, true, {combatId: this.id, combatantId: combatant.id } )
fvttInit += (cId / 100)
await this.updateEmbeddedDocuments("Combatant", [{ _id: ids[cId], initiative: fvttInit }]);
}