execute at @s run playsound minecraft:entity.player.attack.sweep master @a[distance=..20] ~ ~ ~ 1 1.3
execute at @s run particle minecraft:sweep_attack ~ ~1 ~ 0.25 0.25 0.25 1 1

scoreboard players reset @s svm_ep.deal_damage
execute store result score @s svm_ep.deal_damage run attribute @e[tag=executor,limit=1] minecraft:generic.attack_damage get

scoreboard players remove @s svm_ep.deal_damage 1


execute if score %SPEED_TYPE svm_ep.style_ability matches 2 run scoreboard players add @s svm_ep.deal_damage 4
execute if score %SPEED_TYPE svm_ep.style_ability matches 2 if entity @e[advancements={svm_ep:storyline/sword_mastery_2=true},tag=executor] run scoreboard players add @s svm_ep.deal_damage 1
execute if score %SPEED_TYPE svm_ep.style_ability matches 2 if entity @e[advancements={svm_ep:storyline/sword_mastery_3=true},tag=executor] run scoreboard players add @s svm_ep.deal_damage 1

execute if score %MOVEMENT_TYPE svm_ep.style_ability matches 1 run scoreboard players add @s svm_ep.deal_damage 1
execute if score %MOVEMENT_TYPE svm_ep.style_ability matches 1 if entity @e[advancements={svm_ep:storyline/sword_mastery_2=true},tag=executor] run scoreboard players add @s svm_ep.deal_damage 1
execute if score %MOVEMENT_TYPE svm_ep.style_ability matches 1 if entity @e[advancements={svm_ep:storyline/sword_mastery_3=true},tag=executor] run scoreboard players add @s svm_ep.deal_damage 1
execute if score %MOVEMENT_TYPE svm_ep.style_ability matches 4 run scoreboard players remove @s svm_ep.deal_damage 3
execute if score %MOVEMENT_TYPE svm_ep.style_ability matches 5 run scoreboard players add @s svm_ep.deal_damage 2


execute if score %SLASH_TYPE svm_ep.style_ability matches 1 run scoreboard players add @s svm_ep.deal_damage 1
execute if score %SLASH_TYPE svm_ep.style_ability matches 2 run scoreboard players add @s svm_ep.deal_damage 3
execute if score %SLASH_TYPE svm_ep.style_ability matches 3 run scoreboard players add @s svm_ep.deal_damage 0
execute if score %SLASH_TYPE svm_ep.style_ability matches 4 run scoreboard players add @s svm_ep.deal_damage 4



execute if score %MOVEMENT_TYPE svm_ep.style_ability matches 2 run scoreboard players add @s svm_ep.deal_damage 2
execute if entity @e[advancements={svm_ep:storyline/sword_mastery_2=true},tag=executor] if score %MOVEMENT_TYPE svm_ep.style_ability matches 2 run scoreboard players add @s svm_ep.deal_damage 1
execute if entity @e[advancements={svm_ep:storyline/sword_mastery_3=true},tag=executor] if score %MOVEMENT_TYPE svm_ep.style_ability matches 2 run scoreboard players add @s svm_ep.deal_damage 1

execute if score %MOVEMENT_TYPE svm_ep.style_ability matches 3 run scoreboard players remove @s svm_ep.deal_damage 4
execute if entity @e[advancements={svm_ep:storyline/sword_mastery_2=true},tag=executor] if score %MOVEMENT_TYPE svm_ep.style_ability matches 2 run scoreboard players add @s svm_ep.deal_damage 1
execute if entity @e[advancements={svm_ep:storyline/sword_mastery_3=true},tag=executor] if score %MOVEMENT_TYPE svm_ep.style_ability matches 2 run scoreboard players add @s svm_ep.deal_damage 1


execute if entity @e[advancements={svm_ep:storyline/sword_mastery_2=true},tag=executor] run scoreboard players add @s svm_ep.deal_damage 1
execute if entity @e[advancements={svm_ep:storyline/sword_mastery_3=true},tag=executor] run scoreboard players add @s svm_ep.deal_damage 1
function svm_ep:damage/deal_no_effects {"damage":"0","attacker":"@e[limit=1,tag=executor]","type":"no_cooldown"}

tag @s remove hitby
