$scoreboard players remove .mana sorcerer $(mana)
scoreboard players set .w_w_cd sorcerer 0
scoreboard players set .w_w_frozen sorcerer 1
scoreboard players add .w_w_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 .e_e_cost sorcerer 20 
data modify storage sorcerer last set value "w_w"

kill @e[type=item_display,tag=sorcerer_rc_w_w]

execute at @s run function main:mechanics/interaction/weapon/attack/hitbox/start {"id":id1,"character":sorcerer,"type":rc_w_w,"x":6,"y":4,"z":1,"texture":',NoAI:true',"mob":"shulker","gridbox":',"sorcerer_rc_w_w","stay"',"positioned":"^ ^-1 ^2"}

execute at @e[type=shulker,tag=id1_sorcerer_rc_w_w_attack_hitbox,tag=!first] positioned ~ ~0.5 ~ run summon item_display ~ ~ ~ {Tags:["sorcerer_rc_w_w","sorcerer_rc_w_w_hitbox"],item:{id:"minecraft:blue_stained_glass",components:{"minecraft:item_model":"minecraft:weapons/sorcerer/w_w"}}}
tp @e[type=shulker,tag=sorcerer_rc_w_w] ~ ~-100 ~
kill @e[type=shulker,tag=sorcerer_rc_w_w]

# execute at @s run function main:mechanics/interaction/weapon/attack/hitbox/start {"id":id1,"character":sorcerer,"type":rc,"x":6,"y":4,"z":1,"texture":',item:{id:"minecraft:blue_stained_glass",count:1,components:{"minecraft:item_model":"minecraft:weapons/sorcerer/w_w"}}',"mob":"item_display","gridbox":',"sorcerer_rc_w_w","sorcerer_rc_w_w_hitbox"',"positioned":"^ ^-1 ^2"}

#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 block.water.ambient master @a ~ ~ ~ 3 0
execute at @s run playsound ambient.underwater.exit master @a ~ ~ ~ 3 0

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

execute as @e[type=item_display,tag=sorcerer_rc_w_w,tag=!particle_sent] run scoreboard players set @s particle_lifetime 200

execute as @e[type=item_display,tag=sorcerer_rc_w_w,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