## Activated ability for wraith. Adjust animation length (cooldown) in endmo-bp/animations/player.json > animation.player.morph_wraith_activated

tag @e[r=4,family=mob] add PlayerWraithDamage
tag @e[r=4,family=goat] add PlayerWraithDamage
tag @e[r=4,family=fish] add PlayerWraithDamage
tag @e[r=4,family=panda] add PlayerWraithDamage
tag @e[r=4,family=piglin] add PlayerWraithDamage
tag @e[r=4,family=monster] add PlayerWraithDamage
tag @e[r=4,family=ender] add PlayerWraithDamage

execute unless entity @e[r=4,tag=PlayerWraithDamage] run event entity @s add_wraith_activated
execute positioned ^ ^ ^2 at @e[r=2,tag=PlayerWraithDamage] if entity @e[r=4,tag=PlayerWraithDamage] run function projectiles/wraith_projectile_player
