Fixes from 29th of june
This commit is contained in:
@@ -385,11 +385,39 @@ export class Hero6Actor extends Actor {
|
||||
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
||||
}
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
async cleanCombat() {
|
||||
await this.setFlag("world", "hold-action", false)
|
||||
await this.setFlag("world", "abort-action", false)
|
||||
}
|
||||
async holdAction() {
|
||||
if (this.getFlag("world", "hold-action")) {
|
||||
await this.setFlag("world", "hold-action", false)
|
||||
} else {
|
||||
await this.setFlag("world", "hold-action", true)
|
||||
}
|
||||
game.combat.rebuildInitiative()
|
||||
}
|
||||
async abortAction() {
|
||||
if (this.getFlag("world", "abort-action")) {
|
||||
await this.setFlag("world", "abort-action", false)
|
||||
} else {
|
||||
await this.setFlag("world", "abort-action", true)
|
||||
}
|
||||
game.combat.rebuildInitiative()
|
||||
}
|
||||
getHoldAction() {
|
||||
return this.getFlag("world", "hold-action")
|
||||
}
|
||||
getAbortAction() {
|
||||
return this.getFlag("world", "abort-action")
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
hasPhase(segmentNumber) {
|
||||
let index = Math.min(Math.max(this.system.characteristics.spd.value, 1), 12) // Security bounds
|
||||
let phases = __speed2Segments[index]
|
||||
console.log("index", segmentNumber, index, phases, phases.includes(segmentNumber))
|
||||
return phases.includes(segmentNumber)
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user