Combat tracker fixes

This commit is contained in:
2023-07-07 15:35:24 +02:00
parent 3762e6185b
commit 6d6b7075df
4 changed files with 32 additions and 10 deletions

View File

@@ -393,10 +393,11 @@ export class Hero6Actor extends Actor {
async holdAction() {
if (this.getFlag("world", "hold-action")) {
await this.setFlag("world", "hold-action", false)
return false
} else {
await this.setFlag("world", "hold-action", true)
return true
}
game.combat.rebuildInitiative()
}
async disableHoldAction() {
await this.setFlag("world", "hold-action", false)
@@ -408,10 +409,11 @@ export class Hero6Actor extends Actor {
let abort = this.getFlag("world", "abort-action")
if (abort.state) {
await this.setFlag("world", "abort-action", { state: false, count: 0 })
game.combat.abortAction(this.id, false)
} else {
await this.setFlag("world", "abort-action", { state: true, count: 0 })
game.combat.abortAction(this.id, true)
}
game.combat.rebuildInitiative()
}
getHoldAction() {
return this.getFlag("world", "hold-action")