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 999991 137 999988 {auto:0b}
execute in overworld run data merge block 999991 138 999988 {auto:0b}
execute in overworld run data merge block 999991 139 999988 {auto:0b}
execute in overworld run data merge block 999991 140 999988 {auto:0b}
execute in overworld run data merge block 999991 141 999988 {auto:0b}
execute in overworld run data merge block 999991 142 999988 {auto:0b}
execute in overworld run data merge block 999991 143 999988 {auto:0b}
execute in overworld run data merge block 999991 144 999988 {auto:0b}
execute in overworld run data merge block 999991 145 999988 {auto:0b}
execute in overworld run data merge block 999990 143 999988 {auto:0b}
execute in overworld run data merge block 999990 144 999988 {auto:0b}
execute in overworld run data merge block 999990 145 999988 {auto:0b}
execute in overworld run data merge block 999990 146 999988 {auto:0b}
execute in overworld run data merge block 999990 147 999988 {auto:0b}
execute in overworld run data merge block 999991 146 999988 {auto:0b}
execute in overworld run data merge block 999991 147 999988 {auto:0b}
execute in overworld run data merge block 999991 148 999988 {auto:0b}
execute in overworld run data merge block 999991 149 999988 {auto:0b}
execute in overworld run data merge block 999991 150 999988 {auto:0b}
execute in overworld run data merge block 999991 151 999988 {auto:0b}
execute in overworld run data merge block 999991 152 999988 {auto:0b}
execute in overworld run data merge block 999991 153 999988 {auto:0b}
execute in overworld run data merge block 999991 154 999988 {auto:0b}
execute in overworld run data merge block 999991 155 999988 {auto:0b}
execute in overworld run data merge block 999991 156 999988 {auto:0b}
execute in overworld run data merge block 999991 157 999988 {auto:0b}
execute in overworld run data merge block 999991 158 999988 {auto:0b}
execute in overworld run data merge block 999991 159 999988 {auto:0b}
execute in overworld run data merge block 999991 160 999988 {auto:0b}
execute in overworld run data merge block 999991 161 999988 {auto:0b}
execute in overworld run data merge block 999991 162 999988 {auto:0b}
execute in overworld run data merge block 999991 163 999988 {auto:0b}
execute in overworld run data merge block 999991 164 999988 {auto:0b}
execute in overworld run data merge block 999991 165 999988 {auto:0b}
execute in overworld run data merge block 999991 166 999988 {auto:0b}