
# -> 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 50 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 at @s if predicate overly_realistic:global/is_on_ground run \
    summon minecraft:block_display ~ ~0.5 ~ {Tags:["OverlyRealistic.GroundBloodSplatter","OverlyRealistic.GroundMarking"], block_state: {Name: "minecraft:redstone_wire", Properties: {east: "none", north: "none", power: "0", south: "none", west: "none"}}, transformation: {left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [1.35f, 1.0f, 1.35f], translation: [-0.5f, -0.5f, -0.5f]}}

# -> 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

# -> 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

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

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