execute store result score @s sinners_cruelty_max_health run attribute @s max_health get 1
execute store result score @s sinners_cruelty_current_health run data get entity @s Health 1
execute store result storage kiwi:sinners_cruelty_missing_health x int 0.5 run scoreboard players operation @s sinners_cruelty_max_health -= @s sinners_cruelty_current_health

execute as @e[type=#enemy_mobs_only,nbt={HurtTime:10s},limit=1,sort=nearest] at @s run function kiwi3:relics/sinners_cruelty/sinners_cruelty_damage_macro with storage kiwi:sinners_cruelty_missing_health