#cooldown
scoreboard players set .shift_cooldown gunner 4
execute if entity @s[tag=upgrade_9] run scoreboard players add .shift_cooldown gunner 1
execute if entity @s[tag=upgrade_10] run function main:characters/gunner/upgrades/id/10/calc

execute store result storage gunner shift_cooldown int 1 run scoreboard players get .shift_cooldown gunner
function main:characters/gunner/shift/id1/cooldown with storage gunner

scoreboard players set .rc_animation gunner 0
scoreboard players set .weapon_animation gunner 0
scoreboard players set .q_animation gunner 0

#dmg
function main:mechanics/damage/enemy/calculation {"id":id1,"character":gunner,"type":"shift","damage":100,"stat":"attack","local_bonus":0,"indicator":3}

# execute as @e[type=#main:enemies,tag=enemy,tag=gunner_upgrade_1_hit] run tag @s remove gunner_shift_1_hit

execute as @s[tag=!upgrade_2] at @s anchored eyes run function main:mechanics/projectile/projectile_item_display {"id":id1,"character":gunner,"type":shift,"distance":80,"texture":"weapons/gunner/shift","size":"1f,1f,1f","translation":"0f,0f,0f","x":"~","y":"~","angle_1":"~","angle_2":"~","pierce":1,"spin":',"spin"',"rotation":"1","tags":"","position":""}
execute if entity @s[tag=upgrade_2] run function main:characters/gunner/upgrades/id/2/activation

scoreboard players set .shift_animation gunner 9
function main:mechanics/animation/start {"frames":106,"start":"80"}

playsound entity.player.attack.sweep master @a ~ ~ ~ 10 1
playsound atmos:mechanical_2 master @a ~ ~ ~ 10 2