function svm_ep:fighting_style/sword/calculate
scoreboard players operation %OLD_MANA svm_ep.numbers = @s svm_ep.mana

execute if score @s svm_ep.style_ability_type1 matches 1 run scoreboard players remove @s svm_ep.mana 15
execute if score @s svm_ep.style_ability_type1 matches 2 run scoreboard players remove @s svm_ep.mana 35
execute if score @s svm_ep.style_ability_type1 matches 3 run scoreboard players remove @s svm_ep.mana 40
execute if score @s svm_ep.style_ability_type1 matches 4 run scoreboard players remove @s svm_ep.mana 40
execute if score @s svm_ep.style_ability_type1 matches 5 run scoreboard players remove @s svm_ep.mana 30
execute if score @s svm_ep.style_ability_type2 matches 1 run scoreboard players remove @s svm_ep.mana 0
execute if score @s svm_ep.style_ability_type2 matches 2 run scoreboard players remove @s svm_ep.mana 10
execute if score @s svm_ep.style_ability_type2 matches 3 run scoreboard players remove @s svm_ep.mana 15
execute if score @s svm_ep.style_ability_type2 matches 4 run scoreboard players remove @s svm_ep.mana 25
execute if score @s svm_ep.style_ability_type3 matches 1 run scoreboard players remove @s svm_ep.mana 0
execute if score @s svm_ep.style_ability_type3 matches 2 run scoreboard players remove @s svm_ep.mana 10

execute if score @s svm_ep.style_ability_type1 matches 1 run scoreboard players add @s svm_ep.style_ability_delay 0
execute if score @s svm_ep.style_ability_type1 matches 2 run scoreboard players add @s svm_ep.style_ability_delay 80
execute if score @s svm_ep.style_ability_type1 matches 3 run scoreboard players add @s svm_ep.style_ability_delay 300
execute if score @s svm_ep.style_ability_type1 matches 4 run scoreboard players add @s svm_ep.style_ability_delay 150
execute if score @s svm_ep.style_ability_type1 matches 5 run scoreboard players add @s svm_ep.style_ability_delay 150
execute if score @s svm_ep.style_ability_type2 matches 1 run scoreboard players add @s svm_ep.style_ability_delay 0
execute if score @s svm_ep.style_ability_type2 matches 2 run scoreboard players add @s svm_ep.style_ability_delay 15
execute if score @s svm_ep.style_ability_type2 matches 3 run scoreboard players add @s svm_ep.style_ability_delay 30
execute if score @s svm_ep.style_ability_type2 matches 4 run scoreboard players add @s svm_ep.style_ability_delay 5
execute if score @s svm_ep.style_ability_type3 matches 1 run scoreboard players add @s svm_ep.style_ability_delay 10
execute if score @s svm_ep.style_ability_type3 matches 2 run scoreboard players add @s svm_ep.style_ability_delay 80



execute unless score @s svm_ep.mana matches 1.. run scoreboard players reset @s svm_ep.style_ability_delay
scoreboard players operation @s[scores={svm_ep.selected_style_ability=1}] svm_ep.style_ability1_delay = @s svm_ep.style_ability_delay
scoreboard players operation @s[scores={svm_ep.selected_style_ability=2}] svm_ep.style_ability2_delay = @s svm_ep.style_ability_delay
scoreboard players operation @s[scores={svm_ep.selected_style_ability=3}] svm_ep.style_ability3_delay = @s svm_ep.style_ability_delay
scoreboard players reset @s svm_ep.style_ability_delay

execute if score @s svm_ep.mana matches 1.. run scoreboard players set @s svm_ep.using_move 10099
execute unless score @s svm_ep.mana matches 1.. run scoreboard players operation @s svm_ep.mana = %OLD_MANA svm_ep.numbers
