
# -> Reset adv trigger
advancement revoke @s only overly_realistic:player/player_get_hurt_potent_explosion

# -> Particles
particle minecraft:block{block_state:"minecraft:redstone_block"} ~ ~ ~ 0 0 0 0.001 40 normal @a

# -> Mental health decrease RNG
execute if predicate overly_realistic:player/damage/potent_direct_damage_rng run \
    function overly_realistic:players/mental_health/edit_mental_health {type:"remove",value:5}

# -> Bleeding RNG
execute if predicate overly_realistic:player/damage/direct_damage_bleeding_rng run \
    function overly_realistic:players/bleeding/start_bleeding

# -> If player is on ground then create blood splatter
execute if score #or.setting.generate_blood_splatters OverlyRealistic.Settings.ArbitrarySetting matches 1 \
    at @s \
    if score @s OverlyRealistic.PredicateValue.IsOnGround matches 1 run \
        function overly_realistic:players/misc/ground_markings/blood/create_blood_splatter

# -> Breaking bone sound
playsound minecraft:entity.player.big_fall player @a ~ ~ ~ 0.85 0

# -> Do RNG for physical trauma, if RNG passes then return
execute if predicate overly_realistic:player/damage/potent_explosion_rng run \
    return fail

# -> Apply HasPhysicalTrauma data
tag @s add OverlyRealistic.Player.HasPhysicalTrauma
tag @s add OverlyRealistic.Player.HasPhysicalTrauma_Type_PotentExplosion_IsDeaf

# -> Advancement
advancement grant @s only overly_realistic:advancements/livelyhood/sticks_and_stones

# -> Deafness
tag @s add OverlyRealistic.Player.IsDeaf

# -> Do RNG for blindness, if RNG passes then return
execute if predicate overly_realistic:player/damage/potent_direct_damage_rng run \
    return fail

# -> Apply HasPhysicalTrauma data
tag @s add OverlyRealistic.Player.HasPhysicalTrauma_Type_PotentExplosion_IsBlind

# -> Blindness
effect give @s blindness infinite 0 true
