
scoreboard players add @s svm_ep.style_sword_dance_tick 1
effect give @s minecraft:speed 1 7 true
effect give @s[advancements={svm_ep:storyline/sword_mastery_2=true}] minecraft:speed 1 9 true
effect give @s[advancements={svm_ep:storyline/sword_mastery_3=true}] minecraft:speed 1 12 true

execute as @s[scores={svm_ep.style_sword_dance_tick=5}] at @s run playsound minecraft:entity.player.attack.weak master @a[distance=..30] ~ ~ ~ 1.5 0.7
execute as @s[scores={svm_ep.style_sword_dance_tick=8}] at @s run playsound minecraft:entity.player.attack.weak master @a[distance=..30] ~ ~ ~ 1.5 0.7
execute as @s[scores={svm_ep.style_sword_dance_tick=11}] at @s run playsound minecraft:entity.player.attack.weak master @a[distance=..30] ~ ~ ~ 1.5 0.7
execute as @s[scores={svm_ep.style_sword_dance_tick=14}] at @s run playsound minecraft:entity.player.attack.weak master @a[distance=..30] ~ ~ ~ 1.5 0.7

execute as @s[scores={svm_ep.style_sword_dance_tick=5}] run function svm_ep:fighting_style/sword/movement/dance/step
execute as @s[scores={svm_ep.style_sword_dance_tick=14..}] at @s anchored eyes positioned ^ ^ ^ run function svm_ep:fighting_style/sword/movement/dance/slash
execute as @s[advancements={svm_ep:storyline/sword_mastery_2=true},scores={svm_ep.style_sword_dance_tick=11..}] at @s anchored eyes positioned ^ ^ ^ run function svm_ep:fighting_style/sword/movement/dance/slash
execute as @s[advancements={svm_ep:storyline/sword_mastery_3=true},scores={svm_ep.style_sword_dance_tick=8..}] at @s anchored eyes positioned ^ ^ ^ run function svm_ep:fighting_style/sword/movement/dance/slash
