kill @e[tag=DiePls]
kill @e[tag=CadeyrnMinion]
kill @e[tag=FakeCadeyrn]
scoreboard players set @s[tag=!DeathTimey] AttackTimer 0
tag @s add DeathTimey
#data merge block ~ ~ ~ {auto:0b}
data merge entity @e[type=stray,tag=CadeyrnTP,limit=1] {NoAI:1,NoGravity:1}
tag @e[type=stray,tag=CadeyrnTP] add MidAttack

execute at @e[type=armor_stand,name=CadeyrnFight] run fill ~-1 ~-1 ~-1 ~ ~ ~ tnt
execute at @e[type=armor_stand,name=CadeyrnFight] run fill ~-10 ~-10 ~-10 ~10 ~10 ~10 air replace obsidian
execute at @e[type=armor_stand,name=CadeyrnFight] run fill ~-25 128 ~-25 ~25 128 ~25 obsidian
execute at @e[type=armor_stand,name=CadeyrnFight] run summon tnt

execute at @e[type=stray,tag=CadeyrnTP] run summon minecraft:armor_stand ~ ~ ~ {Marker:0b,Invisible:1b,Silent:1b,Silent:1b,Tags:["DiePls","DeathGoMid"],NoGravity:1}

execute at @s run tellraw @a[distance=..150] ["",{"text":"[","color":"dark_blue"},{"text":"Cadeyrn the Wretched","color":"gold"},{"text":"] ","color":"dark_blue"},{"text":"...","color":"dark_red","italic":"true"}]

execute at @e[tag=CadeyrnTP] run effect give @a[distance=..75,gamemode=survival] resistance 7 5
execute at @e[tag=CadeyrnTP] run effect give @a[distance=..75,gamemode=survival] fire_resistance 20 5


execute in overworld run data merge block 999996 120 999969 {auto:0b}
execute in overworld run data merge block 999996 121 999969 {auto:0b}
execute in overworld run data merge block 999996 122 999969 {auto:0b}
execute in overworld run data merge block 999996 123 999969 {auto:0b}
execute in overworld run data merge block 999996 124 999969 {auto:0b}
execute in overworld run data merge block 999996 125 999969 {auto:0b}
execute in overworld run data merge block 999996 126 999969 {auto:0b}
execute in overworld run data merge block 999996 127 999969 {auto:0b}
execute in overworld run data merge block 999996 128 999969 {auto:0b}
execute in overworld run data merge block 999997 126 999969 {auto:0b}
execute in overworld run data merge block 999997 127 999969 {auto:0b}
execute in overworld run data merge block 999997 128 999969 {auto:0b}
execute in overworld run data merge block 999997 129 999969 {auto:0b}
execute in overworld run data merge block 999997 130 999969 {auto:0b}
execute in overworld run data merge block 999996 129 999969 {auto:0b}
execute in overworld run data merge block 999996 130 999969 {auto:0b}
execute in overworld run data merge block 999995 120 999969 {auto:0b}
execute in overworld run data merge block 999995 121 999969 {auto:0b}
execute in overworld run data merge block 999995 122 999969 {auto:0b}
execute in overworld run data merge block 999995 123 999969 {auto:0b}
execute in overworld run data merge block 999995 124 999969 {auto:0b}
execute in overworld run data merge block 999995 125 999969 {auto:0b}
execute in overworld run data merge block 999995 126 999969 {auto:0b}
execute in overworld run data merge block 999995 127 999969 {auto:0b}
execute in overworld run data merge block 999995 128 999969 {auto:0b}
execute in overworld run data merge block 999995 129 999969 {auto:0b}
execute in overworld run data merge block 999995 130 999969 {auto:0b}
execute in overworld run data merge block 999994 120 999969 {auto:0b}
execute in overworld run data merge block 999994 121 999969 {auto:0b}
execute in overworld run data merge block 999994 122 999969 {auto:0b}
execute in overworld run data merge block 999994 123 999969 {auto:0b}
execute in overworld run data merge block 999994 124 999969 {auto:0b}
execute in overworld run data merge block 999994 125 999969 {auto:0b}
execute in overworld run data merge block 999994 126 999969 {auto:0b}
execute in overworld run data merge block 999994 127 999969 {auto:0b}