add moveCancelable to Ability

This commit is contained in:
2025-01-17 14:43:49 +09:00
parent 787b48a4df
commit 1a5e811020
2 changed files with 4 additions and 2 deletions
+1 -2
View File
@@ -120,9 +120,8 @@ export default class Entity {
this.#moving = false
}
// TODO: cancelable and uncancelable abilities
moveAction(cursor, attack = false) {
if (this.casting != null && (!this.#attacking || this.casting.ability.id != this.abilities[0].id)) {
if (this.casting != null && this.casting.ability.moveCancelable) {
this.casting = null
}