tag @e[type=armor_stand,tag=MoveSkeleStand,limit=1,tag=!GotCoord] add GetCoord
tag @a remove ShootAtMe
execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute at @s run tag @a[limit=1,sort=random,distance=..100,tag=CadeyrnFightTag,gamemode=!spectator] add ShootAtMe
execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute at @s run tag @e[limit=1,sort=nearest,distance=..2,type=wither_skeleton,tag=!Launched] add LaunchMe

execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute as @e[type=wither_skeleton,tag=MovingSkele,limit=1,sort=nearest,tag=LaunchMe,tag=!Launched] run data merge entity @s {NoAI:0}
execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute as @e[type=wither_skeleton,tag=MovingSkele,limit=1,sort=nearest,tag=LaunchMe,tag=!Launched] run execute store result score @s PosX run data get entity @s Pos[0]
execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute as @e[type=wither_skeleton,tag=MovingSkele,limit=1,sort=nearest,tag=LaunchMe,tag=!Launched] run execute store result score @s PosY run data get entity @s Pos[1]
execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute as @e[type=wither_skeleton,tag=MovingSkele,limit=1,sort=nearest,tag=LaunchMe,tag=!Launched] run execute store result score @s PosZ run data get entity @s Pos[2]

execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute as @e[type=wither_skeleton,tag=MovingSkele,limit=1,sort=nearest,tag=LaunchMe,tag=!Launched] run execute store result score @s PosXTemp run data get entity @p[tag=ShootAtMe] Pos[0]
execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute as @e[type=wither_skeleton,tag=MovingSkele,limit=1,sort=nearest,tag=LaunchMe,tag=!Launched] run execute store result score @s PosYTemp run data get entity @p[tag=ShootAtMe] Pos[1]
execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute as @e[type=wither_skeleton,tag=MovingSkele,limit=1,sort=nearest,tag=LaunchMe,tag=!Launched] run execute store result score @s PosZTemp run data get entity @p[tag=ShootAtMe] Pos[2]

execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute as @e[type=wither_skeleton,tag=MovingSkele,limit=1,sort=nearest,tag=LaunchMe,tag=!Launched] run scoreboard players operation @s PosXTemp -= @s PosX
execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute as @e[type=wither_skeleton,tag=MovingSkele,limit=1,sort=nearest,tag=LaunchMe,tag=!Launched] run scoreboard players operation @s PosYTemp -= @s PosY
execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute as @e[type=wither_skeleton,tag=MovingSkele,limit=1,sort=nearest,tag=LaunchMe,tag=!Launched] run scoreboard players operation @s PosZTemp -= @s PosZ

execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute as @e[type=wither_skeleton,tag=MovingSkele,limit=1,sort=nearest,tag=LaunchMe,tag=!Launched] run execute store result entity @s Motion[0] double 0.16 run scoreboard players get @s PosXTemp
execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute as @e[type=wither_skeleton,tag=MovingSkele,limit=1,sort=nearest,tag=LaunchMe,tag=!Launched] run execute store result entity @s Motion[1] double 0.07 run scoreboard players get @s PosYTemp
execute as @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord,tag=!GotCoord,limit=1] run execute as @e[type=wither_skeleton,tag=MovingSkele,limit=1,sort=nearest,tag=LaunchMe,tag=!Launched] run execute store result entity @s Motion[2] double 0.16 run scoreboard players get @s PosZTemp
effect give @e[type=wither_skeleton,tag=!Launched,tag=LaunchMe] minecraft:slow_falling 1 0
effect give @e[type=wither_skeleton,tag=!Launched,tag=LaunchMe] minecraft:absorption 2 3
execute at @e[type=wither_skeleton,tag=MovingSkele,limit=1,sort=nearest,tag=LaunchMe,tag=!Launched] run playsound minecraft:entity.player.breath hostile @a ~ ~ ~ 10 1 1
tag @e[type=armor_stand,tag=MoveSkeleStand,tag=GetCoord] add GotCoord
tag @e[type=wither_skeleton,tag=!Launched,tag=LaunchMe] add Launched
tag @a remove ShootAtMe


