
# -> If player is a ghost then return
execute if entity @s[tag=OverlyRealistic.Player.IsGhost] run \
    return fail

# -> If player is moving with a map, on RNG, award intelligence
execute if score @s OverlyRealistic.Player.WalkOneCm matches 10000.. \
    if items entity @s weapon.* filled_map run \
        function overly_realistic:players/misc/cartography/int_gain_from_explore
execute if score @s OverlyRealistic.Player.SprintOneCm matches 12000.. \
    if items entity @s weapon.* filled_map run \
        function overly_realistic:players/misc/cartography/int_gain_from_explore

# -> If temperature is less than 20 then do white smokey breath particles
execute if score @s OverlyRealistic.Player.Stats.Temperature matches ..19 \
    anchored eyes run \
        particle minecraft:snowflake ^ ^ ^0.35 0 0 0 0.00001 3 normal @a

# -> If temperature is over 85 then do sweat particles
execute if score @s OverlyRealistic.Player.Stats.Temperature matches 86.. run \
    particle minecraft:falling_water ~ ~1 ~ 0.2 0.5 0.2 0.1 2 normal @a

# -> If player is at 0 stamina and swimming then damage
execute if score @s OverlyRealistic.Player.Stats.Stamina matches 0 \
    if score @s OverlyRealistic.PredicateValue.IsSwimming matches 1 run \
        function overly_realistic:players/stamina/damage_on_water
