Review sheet and headers

This commit is contained in:
2022-03-11 14:00:14 +01:00
parent e887828d53
commit 7974897c03
7 changed files with 52 additions and 29 deletions

View File

@@ -20,15 +20,19 @@ export class PegasusCombat extends Combat {
_onUpdate(changed, options, userId) {
}
/* -------------------------------------------- */
static async checkTurnPosition() {
while (game.combat.turn > 0) {
await game.combat.previousTurn()
}
}
/* -------------------------------------------- */
static async decInitBy10( combatantId, value) {
const combatant = game.combat.combatants.get(combatantId)
let initValue = combatant.initiative + value
await game.combat.setInitiative(combatantId, initValue)
while (game.combat.turn > 0) {
await game.combat.previousTurn()
}
console.log("COMBAT", game.combat )
setTimeout( this.checkTurnPosition, 400) // The setInitiative is no more blocking for unknown reason
}
}