#
execute if score .rc brawler matches ..0 if score .rc_charge brawler matches 1..9 run function main:characters/brawler/rc/id1/fail
execute if score .rc brawler matches ..0 if score .rc_charge brawler matches 10..19 run function main:characters/brawler/rc/id1/start_weak
execute if score .rc brawler matches ..0 if score .rc_charge brawler matches 20..39 run function main:characters/brawler/rc/id1/start

#vfx
# execute if score @s rc_duration_t matches 1.. at @s anchored eyes run particle dust{color:[1.0,0.5,0.0],scale:0.5} ^-0.25 ^ ^0.25 0.05 0.05 0.05 5 1
execute if score .rc brawler matches ..0 if score .rc_charge brawler matches 1.. run function main:characters/brawler/rc/id1/reset

#hud
execute if score .rc brawler matches 1.. if score .rc_charge brawler matches 20.. run item replace entity @s armor.chest with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={slot:"chest",camera_overlay:"custom/overlay/red_crosshair"}] 1

execute if score .rc brawler matches 1.. if score .rc_charge brawler matches ..20 run scoreboard players add .rc_charge brawler 1
execute if score .rc brawler matches ..0 run scoreboard players set .rc_charge brawler 0
execute if score .rc brawler matches 1.. run scoreboard players remove .rc brawler 1
execute if score .rc_cd brawler matches 1.. run scoreboard players remove .rc_cd brawler 1
execute if score .rc_duration brawler matches 1.. run scoreboard players remove .rc_duration brawler 1
execute if score .rc_duration brawler matches 1.. at @s positioned ~-1.5 ~-1.5 ~-1.5 as @e[type=#main:enemies,tag=enemy,dx=2,dz=2,dy=2] run function main:characters/brawler/rc/id1/hit

execute at @s run function main:characters/brawler/rc/id1/sfx

execute if score .rc_charge brawler matches 20 if score .rc_animation_hold brawler matches ..0 run scoreboard players set .rc_animation_hold brawler 9

execute if score .rc brawler matches 1.. if score .rc_animation_hold brawler matches 1 run scoreboard players set .rc_animation_hold brawler 9

execute if score .rc_animation_hold brawler matches 9 run function main:mechanics/animation/start {"frames":131,"start":"40"}

execute if score .rc_animation_hold brawler matches ..0 if score .rc_animation brawler matches 1.. run scoreboard players remove .rc_animation brawler 1
execute if score .rc_animation_hold brawler matches 1.. run scoreboard players remove .rc_animation_hold brawler 1