function main:mechanics/effects/screenshake/start {duration:5,strength:300}

tag @a remove knight_weapon
function main:settings/stats/attack_speed/calculation {"max":10}
scoreboard players set @s weapon_combo_reset 25
# function main:characters/knight/energy {"energy":20}
execute if score .coordinated knight matches ..0 run scoreboard players set .coordinated knight 20
#reset
tag @e[type=#main:enemies,tag=enemy,tag=knight_weapon_hit] remove knight_weapon_hit

function main:mechanics/damage/enemy/calculation {"id":id1,"character":knight,"type":"weapon","damage":55,"stat":"attack","local_bonus":0,"indicator":10}
function main:mechanics/damage/enemy/calculation {"id":id1_1,"character":knight,"type":"weapon","damage":20,"stat":"attack","local_bonus":0,"indicator":5}

execute at @s anchored eyes run function main:mechanics/interaction/weapon/attack/start {"id":id1,"hitbox_type":'"follow",',"hitbox_duration":10,"sound_1":"entity.player.attack.sweep master @s ~ ~ ~ 3 0","sound_2":"item.trident.throw master @s ~ ~ ~ 3 0","character":knight,"type":weapon,"particle":"dust{color:[1,1,0],scale:0.75}","x":5,"y":2,"z":4}
playsound block.amethyst_block.chime master @a ~ ~ ~ 3 0
playsound block.amethyst_block.resonate master @a ~ ~ ~ 3 0

#attack speed
scoreboard players operation @s attack_speed = @s attack_speed_max

#particle sword
execute at @s rotated ~90 ~ run function animated_java:knight_weapon/summon with storage aj:temp
execute as @e[type=item_display,tag=aj.knight_weapon.root,tag=newborn] run function animated_java:knight_weapon/animations/attack2/play
execute as @e[type=item_display,tag=aj.knight_weapon.root,tag=newborn] run tag @s remove newborn