##id8 - Behavior and AI
#when dies - summons a totem that needs to be destroyed within 15 seconds to prevent from respawning
execute as @e[type=armor_stand,tag=id8_tombstone] run function main:mechanics/effects/stun_apply {duration:0}
execute as @e[type=armor_stand,tag=id8_tombstone,scores={enemy_ability_cooldown_1=1}] at @s run function main:game/mobs/spawn/id/id8_tombstone {"x":1,"y":1}
execute as @e[type=armor_stand,tag=id8_tombstone,scores={enemy_ability_cooldown_1=..0}] run kill @s
execute as @e[type=armor_stand,tag=id8_tombstone,scores={health=..0}] run kill @s