Ambush Enemy

The Ambush enemy lays in wait for the player to get within attack range and then strikes when it is least expected. The general concept is for a quick one two damage spike and then slowly trying to get at the player for another chance at a heavy attack while doing small amounts of damage more often.

Idea originates in part from the concept of Flounders and their stealthed bodies.

Active
Once the player comes within a certain range of the Ambush Enemy, it enters the idle state and then engages the player if the player moves within a short attack range.

Attack State

 * In this state the Ambush enemy is vulnerable to damage and has the following behaviors:


 * 1) Lashes out at the player with a whip like tentacle slowing player movement and dealing low damage
 * 2) Bites the player dealing high damage
 * 3) Slowly moves towards the player occasionally stopping to try and lash the player again with its tentacle but mainly trying to get in range for another bite attack.
 * 4) When the abush enemy sustains 40% damage or more it attempts to flee from the player and find a new hiding spot to lay in wait.

Idle State

 * In this state the Ambush enemy behaviors include:


 * 1) Laying perfectly still to look like a coral/rock, a plant/stalactite/stalagmite or empty ocean.
 * 2) Very rarely the Ambush enemy will peek an eye out from its hiding spot to quickly  and sneakily survey the area. This ability won't trigger for the first time until a specified duration of time has lapsed after the player enters the Active range of the Ambush enemy.

Inactive
The Ambush enemy during inactive state, ie the player is outside of visible range, will occasionally snap at and eat passing fish that would normally just be background/environment art and added flare. This will eventually create a pocket of no fish or much reduced fish around the Ambush enemy that, ideally, will be the biggest tell that the Ambush enemy is nearby.

Public Variables

 * Idle/Inactive State Range
 * Attack State Range
 * Health of Ambush Enemy
 * %Health to sustain prior to fleeing
 * Damage of Whip attack
 * Range of Whip Attack
 * Delay between Whip attacks
 * Slow Percentage of Whip attack (ie reduction in player speed)
 * Slow Duration of Whip attack
 * Damage of Bite attack
 * Range of Bite Attack
 * Delay between Bite attacks
 * Base Speed of Ambush enemy
 * Retreat Speed of Ambush enemy
 * Delay time in between and prior to first "peek" animation

Approval
Design -

Engineering -

Art -