

# -> Extra damage
attribute @s knockback_resistance modifier add overly_realistic:temp_no_kb 0.365 add_value
damage @s 0.0001 overly_realistic:player_head_hit at ^ ^1 ^1
attribute @s knockback_resistance modifier remove overly_realistic:temp_no_kb

scoreboard players operation #or.percentage_value OverlyRealistic.General.ArbitraryData = #or.static_num_100 OverlyRealistic.General.ArbitraryData

scoreboard players operation #or.player_max_stamina OverlyRealistic.General.ArbitraryData = @s OverlyRealistic.Player.Stats.MaxStamina
scoreboard players operation #or.player_max_stamina OverlyRealistic.General.ArbitraryData *= #or.static_num_100 OverlyRealistic.General.ArbitraryData

scoreboard players operation #or.percentage_value OverlyRealistic.General.ArbitraryData /= #or.player_max_stamina OverlyRealistic.General.ArbitraryData
scoreboard players operation #or.percentage_value OverlyRealistic.General.ArbitraryData *= #or.static_num_1000 OverlyRealistic.General.ArbitraryData
#tellraw @a {score:{name:"#or.percentage_value",objective:"OverlyRealistic.General.ArbitraryData"}}

execute store result score #or.percentage_value OverlyRealistic.General.ArbitraryData run \
    execute store result storage overly_realistic:temp_values generic_value_0 int 0.1 run \
        scoreboard players get @s OverlyRealistic.Player.Stats.MaxStamina
#tellraw @a {score:{name:"#or.percentage_value",objective:"OverlyRealistic.General.ArbitraryData"}}
#tellraw @a {nbt:"generic_value_0",storage:"overly_realistic:temp_values"}

execute store result score #or.percentage_value OverlyRealistic.General.ArbitraryData run \
    data get storage overly_realistic:temp_values generic_value_0
#tellraw @a {score:{name:"#or.percentage_value",objective:"OverlyRealistic.General.ArbitraryData"}}
#tellraw @a {nbt:"generic_value_0",storage:"overly_realistic:temp_values"}
