
scoreboard players add @s AttackTimer 1
execute at @s run particle minecraft:soul_fire_flame ~ ~ ~ 0 1 0 0.1 1

execute at @s[scores={AttackTimer=1}] run function zzzzdonotuse:cadeyrn/attacks/finalstand/finalstandstart

execute at @s[scores={AttackTimer=1..18}] run particle minecraft:crit ~ ~ ~ 0 0 0 0.15 10 force
execute as @s[scores={AttackTimer=5}] run effect clear @s minecraft:levitation
execute as @s[scores={AttackTimer=18..70}] run function zzzzdonotuse:cadeyrn/attacks/finalstand/finalstandtext
execute at @s[scores={AttackTimer=18..}] run tp @s ~ ~ ~ facing entity @p[tag=CadeyrnFightTag,gamemode=!spectator]

execute at @s[scores={AttackTimer=41..}] run function zzzzdonotuse:cadeyrn/attacks/finalstand/finalstandparticles

execute at @s[scores={AttackTimer=51..141}] run execute at @e[type=armor_stand,name=CadeyrnFight] run function zzzzdonotuse:cadeyrn/attacks/finalstand/tpstandtest
#execute as @e[type=armor_stand,tag=FinalStandTP2] run execute at @s run execute unless entity @e[type=armor_stand,tag=FinalStandLooky,limit=1,distance=..1] run tp @s ^ ^ ^.3
execute as @e[type=armor_stand,tag=FinalStandTP2,tag=!StopMove] run function zzzzdonotuse:cadeyrn/attacks/finalstand/firemove

#execute as @a[tag=CadeyrnFightTag,gamemode=!spectator] run execute at @s run execute if block ~ ~ ~ soul_fire run effect give @s wither 1 10

execute as @s[scores={AttackTimer=200}] run function zzzzdonotuse:cadeyrn/attacks/finalstand/reset

execute as @s[scores={AttackTimer=202}] run function zzzzdonotuse:cadeyrn/attacks/finalstand/resetv2


execute at @s[scores={AttackTimer=71..180}] run execute at @e[type=armor_stand,tag=FinalStandPart,limit=5,sort=random] run execute positioned ~ ~ ~ run playsound minecraft:entity.wither.ambient hostile @a[distance=..60] ~ ~ ~ 0.03 0.75 0.03

#execute as @s[scores={AttackTimer=200}] run execute as @e[type=armor_stand,tag=FireLine] run function zzzzdonotuse:cadeyrn/attacks/firesheet/reset




