diff --git a/src/shattered_sword/AI/SnakeAI.ts b/src/shattered_sword/AI/SnakeAI.ts index c925f1b..d12e4b2 100644 --- a/src/shattered_sword/AI/SnakeAI.ts +++ b/src/shattered_sword/AI/SnakeAI.ts @@ -1,4 +1,5 @@ import AnimatedSprite from "../../Wolfie2D/Nodes/Sprites/AnimatedSprite"; +import PlayerController from "../Player/PlayerController"; import EnemyAI, { EnemyStates } from "./EnemyAI"; import SnakeAttack from "./EnemyStates/SnakeAttack"; @@ -7,4 +8,11 @@ export default class SnakeAI extends EnemyAI { super.initializeAI(owner, options); this.addState(EnemyStates.ATTACK, new SnakeAttack(this, owner)); } + + collideWithPlayer(player: PlayerController): void { + player.damage(10); + if (this.isAttaking && !player.invincible && !player.godMode) { + player.poisonCounter = 5; + } + } } \ No newline at end of file