Fixes from 29th of june

This commit is contained in:
2023-06-30 22:20:44 +02:00
parent 297c94adb7
commit 8f10b9825e
4 changed files with 16 additions and 10 deletions

View File

@@ -398,19 +398,24 @@ export class Hero6Actor extends Actor {
}
game.combat.rebuildInitiative()
}
async disableAbortAction() {
await this.setFlag("world", "abort-action", { state: false, count: 0 })
}
async abortAction() {
if (this.getFlag("world", "abort-action")) {
await this.setFlag("world", "abort-action", false)
let abort = this.getFlag("world", "abort-action")
if ( abort.state) {
await this.setFlag("world", "abort-action", { state: false, count: 0 })
} else {
await this.setFlag("world", "abort-action", true)
await this.setFlag("world", "abort-action", { state: true, count: 0 })
}
game.combat.rebuildInitiative()
}
getHoldAction() {
return this.getFlag("world", "hold-action")
}
getAbortAction() {
return this.getFlag("world", "abort-action")
getAbortAction() {
let abort = this.getFlag("world", "abort-action")
return abort?.state || false
}
/* -------------------------------------------- */
@@ -422,7 +427,7 @@ export class Hero6Actor extends Actor {
}
/* -------------------------------------------- */
getSegments() {
let index = [ Math.min(Math.max(this.system.characteristics.spd.value, 1), 12) ] // Security bounds
let index = [Math.min(Math.max(this.system.characteristics.spd.value, 1), 12)] // Security bounds
return __speed2Segments[index]
}
/* -------------------------------------------- */