tag @s add ignorethorns
execute at @s[tag=critready] as @e[tag=!ignorethorns,nbt={HurtTime:10s}] at @s run function survivalplus:tools/dealdmg/crit_effect
execute at @s[predicate=survivalplus:withersword] run function survivalplus:tools/dealdmg/withersword
execute at @s[predicate=survivalplus:icegem] run function survivalplus:tools/dealdmg/icegem
execute as @s[predicate=survivalplus:strengthsword,predicate=survivalplus:2hand] at @s run function survivalplus:tools/dealdmg/bigstrengthsword
execute at @s[nbt={SelectedItem:{id:"minecraft:torch"}}] as @n[nbt={HurtTime:10s}] run data merge entity @s {Fire:29s}
execute as @s[predicate=survivalplus:formless/sword,predicate=survivalplus:10chance] at @s run function survivalplus:tools/formless/sword
execute as @s[predicate=survivalplus:maxhpdown] at @s run function survivalplus:tools/dealdmg/maxhpdown
function survivalplus:tools/dealdmg/tempeffect
execute if score bookstats hardmode matches 4 at @s as @n[nbt={HurtTime:10s},tag=!ignorethorns] run function survivalplus:tools/dealdmg/randomdebuff
execute if entity @s[predicate=survivalplus:holyweapon,predicate=survivalplus:10chance] as @n[nbt={HurtTime:10s},tag=!ignorethorns] at @s run function survivalplus:tools/dealdmg/holystrike
execute as @s[predicate=survivalplus:holyweapon,predicate=survivalplus:10chance] run effect give @s instant_health 1 0 true
execute as @s[predicate=survivalplus:holyweapon,predicate=survivalplus:10chance] run effect give @s resistance 30
execute if entity @s[tag=tcurse2] as @n[nbt={HurtTime:10s},tag=!ignorethorns,predicate=survivalplus:5chance] run function survivalplus:tools/dealdmg/instakill
#execute as @e[nbt={HurtTime:10s},predicate=survivalplus:10chance] run ride @s dismount
tag @s remove ignorethorns
advancement revoke @s only survivalplus:tools/dealdmg