execute as @e[tag=iframes,type=projectile:slash] at @s run execute as @e[r=3,type=!projectile:slash] at @s if score @s petID = @e[rm=0.25,r=3,type=projectile:slash,c=1] petID run scoreboard players add @s stun 4
execute as @e[tag=iframes,type=projectile:slash] at @s run execute as @e[r=3,type=!projectile:slash] at @s if score @s petID = @e[rm=0.25,r=3,type=projectile:slash,c=1] petID run scoreboard players remove @s emotionP 1
execute as @e[tag=iframes,type=projectile:slash] at @s run execute as @e[r=3,type=!projectile:slash] at @s if score @s petID = @e[rm=0.25,r=3,type=projectile:slash,c=1] petID run damage @s 25 projectile

execute as @e[type=projectile:slash] at @s unless blocks ^3^1.5^1 ^-3^1.5^1 ~~~ all run event entity @s despawn