$scoreboard players remove .mana sorcerer $(mana)
scoreboard players set .e_e sorcerer 0
scoreboard players add .e_e_count sorcerer 1
scoreboard players add .e_e_cost sorcerer 20
scoreboard players remove .w_e_cost sorcerer 20
scoreboard players remove .w_l_cost sorcerer 20
scoreboard players remove .l_l_cost sorcerer 20
scoreboard players remove .e_l_cost sorcerer 20
scoreboard players remove .w_w_cost sorcerer 20
data modify storage sorcerer last set value "e_e"

kill @e[type=#main:not_enemies,tag=sorcerer_rc_e_e,tag=first]
execute as @e[type=#main:not_enemies,tag=sorcerer_rc_e_e,tag=!first] run tag @s add first

execute at @s run function main:mechanics/interaction/weapon/attack/hitbox/start {"id":id1,"character":sorcerer,"type":rc_e_e,"x":6,"y":4,"z":1,"texture":',NoAI:true',"mob":"shulker","gridbox":',"sorcerer_rc_e_e","sorcerer_rc_e_e_hitbox","stay"',"positioned":"^ ^-1 ^2.25"}
summon marker ~ ~ ~ {Tags:["sorcerer_rc_e_e"]}
execute at @e[type=shulker,tag=id1_sorcerer_rc_e_e_attack_hitbox,tag=!first] positioned ~-0.5 ~ ~-0.5 run summon block_display ~ ~ ~ {Tags:["sorcerer_rc_e_e"],block_state:{Name:"minecraft:coarse_dirt"}}

#sfx
execute at @s run playsound minecraft:block.amethyst_block.place master @a ~ ~ ~ 3 1
execute at @s run playsound minecraft:block.amethyst_block.place master @a ~ ~ ~ 3 1
execute at @s run playsound minecraft:block.amethyst_block.place master @a ~ ~ ~ 3 1
execute at @s run playsound minecraft:block.amethyst_block.place master @a ~ ~ ~ 3 1
execute at @s run playsound minecraft:block.amethyst_block.place master @a ~ ~ ~ 3 1
execute at @s run playsound minecraft:block.amethyst_block.place master @a ~ ~ ~ 3 1
execute at @s run playsound entity.firework_rocket.blast master @a ~ ~ ~ 3 0
execute at @s run playsound entity.firework_rocket.blast master @a ~ ~ ~ 3 0
execute at @s run playsound entity.dragon_fireball.explode master @a ~ ~ ~ 3 1

execute as @e[type=shulker,tag=sorcerer_rc_e_e,tag=!particle_sent] at @s run particle block{block_state:dirt} ~ ~ ~ 0.2 0.2 0.2 1 10 normal

execute as @e[type=#main:not_enemies,tag=sorcerer_rc_e_e,tag=!particle_sent] run scoreboard players set @s particle_lifetime 300

execute as @e[type=#main:not_enemies,tag=sorcerer_rc_e_e,tag=!particle_sent] run tag @s add particle_sent

$execute unless score .0 number matches $(mana) run function main:characters/sorcerer/rc/id1/spells/clear