
# -> If player is a ghost then return
execute if entity @s[tag=OverlyRealistic.Player.IsGhost] run \
    return run \
        function overly_realistic:players/ghost/operate_20t


# -> Remove horse attack damage modifier if player is not on a horse
execute unless predicate overly_realistic:player/actions/player_riding_horse run \
    attribute @s attack_damage modifier remove overly_realistic:riding_horse_attack_damage_boost

# --> Pain operations

# -> If player is in pain then operate
execute if score @s OverlyRealistic.Player.PlayerPainTimer matches 1.. run \
    function overly_realistic:players/pain/pain_operate_20t

# --> Bleeding operations

# -> Bleed out
execute if score @s OverlyRealistic.Player.BleedingTimer matches 1.. run \
    function overly_realistic:players/bleeding/player_bleed

# --> Status operations

# -> Breath
execute if score @s OverlyRealistic.Player.Stats.Stamina matches 0..5 run \
    function overly_realistic:players/stamina/breathe/player_breathe

# -> Set current status (1)
function overly_realistic:players/status/set_current_status_1

# -> Function tag
function #overly_realistic:mechanics/player_status_set_1


# --> Regeneration operations

# -> Do regeneration
function overly_realistic:players/regeneration/regeneration_operate


# --> Hygiene operations

# -> Function tag
function #overly_realistic:mechanics/player_clean_hygiene_operate

# -> Improve hygiene
execute if block ~ ~ ~ water run \
    return run \
        function overly_realistic:players/hygiene/add_3_hygiene
execute if block ~ ~1 ~ water run \
    return run \
        function overly_realistic:players/hygiene/add_3_hygiene
