Suggested Formal Description of Narwhal Behaviour (GCI Task)

#1
Natural Behaviour
Swimming
- Most of the time should be spent swimming, with the horn pointing almost straight forward, but bobbing up and down slightly
Diving - Every once in a while, the narwhal should point at a quite steep angle and go straight down on that trajectory, then stay going straight along the bottom for a short amount of time, and finally angle itself upwards on a slightly smaller angle, so it takes slightly longer to get to the surface than it took to get to the bottom
Resting - A narwhal sleeps upside down, drifting downwards slightly, for short periods of time. Its sleep can be at any time; it is not nocturnal or diurnal.
Breathing - Every once in a while the narwhal should go in a slight curve so that it's back is out of the water (like dolphins do)

Situational Behaviour
Fleeing
- If a player comes within 10 blocks of the narwhal, it should flee at a fair speed (decided after play-testing?)
Dive-Fleeing - If a player gets within 3 blocks of the narwhal, it should change its gradient to be going downwards, so that a player is more likely to drown trying to catch it
Crept up on while sleeping - If a player is sneaking up on it whilst it sleeps, it should detect the player from anywhere between 7 blocks away to until the player actually hits it, and it should start fleeing. If the player is within 3 blocks of the narwhal, it should not start dive-fleeing, unless the player gets out of 3 blocks radius and then returns to 3 block radius
Hunting - If a fish from any module that is significantly smaller than the narwhal approaches to within 20 blocks, it should begin to shake its horn to try and hit it, and then suck it into its mouth (I don't know how easy this one is to implement)
Socialising - If another narwhal approaches they should approach each other and begin to swim next to each other, even hunting together, but if one sleeps or a set amount of time passes, they should separate again
Communicating - If three (or more) narwhals are near each other, the game should begin to play clicking noises at different pitches, as if the narwhals are communicating (sound effects will be needed for this one)