Enemy:Mole - Orhu/Summer2023Project GitHub Wiki

Overview

The mole is an enemy that can dig underneath rooms and will pop up to attack the player. They cannot be attacked while underground, so the player must aim to attack them when they are above the ground.

Behaviors

Movement

Moles cannot move while on the surface. Moles can only move by using their dig ability. They do not directly move towards the player, but rather move around at random and will attack the player if they ever enter the mole's attack range while they are on the surface.

Attacks

Rock Throw

When on the surface and the player is within range (even if they are behind an obstacle), the mole will throw a rock projectile at the player. It has no special properties, breaks on contact with obstacles or the player, and deals damage on hit if hitting the player.

On Touch

If the mole touches the player (by being walked into or emerging from a dig beneath the player), deal damage.

Special

Dig

Moles can dig underground, becoming intangible for the duration of the ability. While digging, moles create a particle effect on the surface that shows where they are moving. Though the dig ability has a duration, it will not complete until the mole is in a position where it can safely emerge (i.e. no indestructible obstacles are above it). Moles are unable to cross pits, water, lava, and other pit-based obstacles while digging.

Graphical representation of AI behavior

[Insert decision tree diagram here]

Sprite Gallery

[Insert sprites and animations here]