data modify entity @s beam_target[0] set from entity @n[tag=boss] Pos[0]
data modify entity @s beam_target[1] set from entity @n[tag=boss] Pos[1]
data modify entity @s beam_target[2] set from entity @n[tag=boss] Pos[2]
scoreboard players add @s time 1
execute if score @s time matches 20 as @n[tag=boss,tag=!lowhp] run function survivalplus:finale/boss/heal2half
execute if score @s time matches 20.. run scoreboard players reset @s time