#damage
scoreboard players set .shift_duration brawler 0
scoreboard players set .shift_damage brawler 25
execute if score .combust brawler matches 1.. run scoreboard players add .shift_damage brawler 25
execute if score .combust brawler matches 2.. run scoreboard players add .shift_damage brawler 25
execute if score .combust brawler matches 3.. run scoreboard players add .shift_damage brawler 75
execute if score .combust brawler matches 3.. run function main:mechanics/combo/actions/characters/brawler/max_plunge

execute if entity @s[tag=upgrade_8] run function main:characters/brawler/upgrades/id/8/activation

execute if score .combust brawler matches 1.. run scoreboard players add @s health_absorption 15
execute if score .combust brawler matches 2.. run scoreboard players add @s health_absorption 30
execute if score .combust brawler matches 3.. run scoreboard players add @s health_absorption 75

execute if entity @s[tag=upgrade_9,scores={long_jump=..0}] run function main:characters/brawler/upgrades/id/9/activation

execute store result storage brawler shift_damage int 1 run scoreboard players get .shift_damage brawler
function main:characters/brawler/shift/id1/damage with storage brawler

#hit
execute positioned ~-5 ~-5 ~-5 as @e[type=#main:enemies,tag=enemy,dx=9,dz=9,dy=9] run function main:characters/brawler/shift/id1/hit

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

execute rotated ~ 90 run function main:particles/circle_small {particle:flame}
particle lava ~ ~ ~ 0 0 0 1 5
particle explosion_emitter ~ ~-2.5 ~ 0 0 0 1 1
playsound entity.firework_rocket.large_blast_far master @a ~ ~ ~ 10 1
# playsound entity.dragon_fireball.explode master @a ~ ~ ~ 10 1
playsound atmos:explosion_2 master @a ~ ~ ~ 10 1 1

item replace entity @s armor.head with air 1

#animation
execute if score .rc_animation brawler matches ..0 if score .rc brawler matches ..0 run scoreboard players set .shift_animation brawler 14
function main:mechanics/animation/start {"frames":131,"start":"100"}

execute if score .shift_damage brawler matches 25 run function main:mechanics/particles/start {"start":"^ ^ ^","id":crack_particle,"character":none,"type":none,"transformation":",transformation:[1.5000f,0.0000f,0.0000f,0.0000f,0.0000f,0.0000f,-0.1000f,0.0000f,0.0000f,1.5000f,0.0000f,0.0000f,0.0000f,0.0000f,0.0000f,1.0000f]","frames":15}

execute if score .shift_damage brawler matches 50 run function main:mechanics/particles/start {"start":"^ ^ ^","id":crack_particle,"character":none,"type":none,"transformation":",transformation:[3.0000f,0.0000f,0.0000f,0.0000f,0.0000f,0.0000f,-0.1000f,0.0000f,0.0000f,3.0000f,0.0000f,0.0000f,0.0000f,0.0000f,0.0000f,1.0000f]","frames":15}

execute if score .shift_damage brawler matches 75 run function main:mechanics/particles/start {"start":"^ ^ ^","id":crack_particle,"character":none,"type":none,"transformation":",transformation:[5.0000f,0.0000f,0.0000f,0.0000f,0.0000f,0.0000f,-0.1000f,0.0000f,0.0000f,5.0000f,0.0000f,0.0000f,0.0000f,0.0000f,0.0000f,1.0000f]","frames":15}

execute if score .shift_damage brawler matches 150 run function main:mechanics/particles/start {"start":"^ ^ ^","id":crack_particle,"character":none,"type":none,"transformation":",transformation:[7.0000f,0.0000f,0.0000f,0.0000f,0.0000f,0.0000f,-0.1000f,0.0000f,0.0000f,7.0000f,0.0000f,0.0000f,0.0000f,0.0000f,0.0000f,1.0000f]","frames":15}