execute if entity @s[nbt={ActiveEffects:[{Id:31b,Amplifier:0b}],HurtTime:5s}] run function cartographer_core:helper/deal_damage/1

execute if entity @s[nbt={ActiveEffects:[{Id:31b,Amplifier:1b}],HurtTime:5s}] run function cartographer_core:helper/deal_damage/2

execute if entity @s[nbt={ActiveEffects:[{Id:31b,Amplifier:2b}],HurtTime:5s}] run function cartographer_core:helper/deal_damage/3

execute if entity @s[nbt={ActiveEffects:[{Id:31b,Amplifier:3b}],HurtTime:5s}] run function cartographer_core:helper/deal_damage/4

execute if entity @s[nbt={ActiveEffects:[{Id:31b,Amplifier:4b}],HurtTime:5s}] run function cartographer_core:helper/deal_damage/5