diff --git a/src/shattered_sword/AI/BullAI.ts b/src/shattered_sword/AI/BullAI.ts index a661462..9e276e8 100644 --- a/src/shattered_sword/AI/BullAI.ts +++ b/src/shattered_sword/AI/BullAI.ts @@ -12,6 +12,10 @@ export default class BullAI extends EnemyAI { this.attackTimer = new Timer(4000); } + canAttack(position: Vec2): boolean { + return this.attackTimer.isStopped(); + } + collideWithPlayer(player: PlayerController): void { player.damage(10); if (this.isAttaking && !player.invincible && !player.godMode) { diff --git a/src/shattered_sword/AI/TigerAI.ts b/src/shattered_sword/AI/TigerAI.ts index c3e2be0..c9f0ce2 100644 --- a/src/shattered_sword/AI/TigerAI.ts +++ b/src/shattered_sword/AI/TigerAI.ts @@ -17,6 +17,10 @@ export default class TigerAI extends EnemyAI { return null; } + canAttack(position: Vec2): boolean { + return this.attackTimer.isStopped(); + } + collideWithPlayer(player: PlayerController): void { player.damage(10); if (this.isAttaking && !player.invincible && !player.godMode) {