execute at @s if entity @e[type=!player,type=!#entity_hit_matching:non_mob,distance=..5] run function custom_items:armor/fortified/apply_pre
execute at @s unless entity @e[type=!player,type=!#entity_hit_matching:non_mob,distance=..5] run execute as @s run function custom_items:armor/fortified/reset