# Fear Factor

In the formulae below:

• distance = Distance between the predator (the player or another animal) and the prey animal.
• range = Predator's detection range (detectRange value), which can be reduced by taking Predatory Instincts.
• fear = Prey's fear factor (fearFactor value).

A prey will be put on alert if: ${\displaystyle {\mathit {distance}}<({\mathit {range}}\times {\mathit {fear}})}$

The prey's alertness towards a predator is assigned each tick according to the following formula:

${\displaystyle {\mathit {alertness}}={\mathit {alertness}}+{{\mathit {range}}^{2}-{\mathit {distance}}^{2} \over {\mathit {range}}^{2}}\times 50}$

If ${\displaystyle {\mathit {alertness}}\geq 100}$ the prey will flee. Default alertness to predators may be hard coded currently.