
# -> Debug
#tellraw @a {score:{name:"@s",objective:"OverlyRealistic.Animal.PanicTime"}}

# -> Decrease panic time
scoreboard players remove @s OverlyRealistic.Animal.PanicTime 1

# -> If the animal ran through all their panic time and there are still players near them then reset panic time
execute if score @s OverlyRealistic.Animal.PanicTime matches ..0 \
    if entity @p[gamemode=!spectator,distance=..12,sort=arbitrary] run \
        scoreboard players set @s OverlyRealistic.Animal.PanicTime 100

# -> Motion application
function overly_realistic:animals/operations/forward_velocity_animal_panic
