
# -> Reset var
scoreboard players set #or.player_count OverlyRealistic.General.ArbitraryData 0
scoreboard players set #or.animal_count OverlyRealistic.General.ArbitraryData 0

# -> Get player count
execute as @a[distance=..10] run \
    scoreboard players add #or.player_count OverlyRealistic.General.ArbitraryData 1

# -> If there are less than 3 players then return failure
execute if score #or.player_count OverlyRealistic.General.ArbitraryData matches ..2 run \
    return 0

# -> Get nearby animal count
execute as @e[type=#overly_realistic:common_animals_plus_special,distance=..8] run \
    scoreboard players add #or.animal_count OverlyRealistic.General.ArbitraryData 1

# -> If player count >= 3 and there are less than 3 nearby animals then return success
execute unless score #or.animal_count OverlyRealistic.General.ArbitraryData matches 3.. run \
    return 1

# -> Else, return failure
return 0