Enemy:Phantom - Orhu/Summer2023Project GitHub Wiki
Overview
The phantom is an enemy that moves by teleporting around the room and attacking the player by teleporting next to them. The player will need to either wait for the phantom to attack them and quickly counter attack, or attempt reach the phantom wherever they teleport to.
Behaviors
Movement
The phantom is unable to move without teleporting. When teleporting without attacking, the phantom will teleport as far away from the player as possible. When teleporting to attack, the phantom will teleport to an open position next to the player and attempt to attack them. If the player hits the phantom before they can attack, the attack is cancelled and the phantom is briefly stunned.
Note: Phantoms do not deal on-touch damage and can be walked through.
Attacks
Hex
The phantom will teleport next to the player and attack whenever hex is off cooldown. After teleporting, the player has a brief 0.5 second window to react and attack the phantom to stop the attack or move out of range. If the attack connects, the player will become stunned for the duration of the attack (invisible status effect) and will take 1 damage.
Special
Teleport
Whenever teleport is off cooldown and hex is not, the phantom will teleport to the open tile that is furthest from the player. When hex is off cooldown as well, the phantom will teleport to an open tile adjacent to the player and try to use a hex attack.
Graphical representation of AI behavior
[Insert decision tree diagram here]
Sprite Gallery
[Insert sprites and animations here]