tag @s add nl_Caster
loot spawn ~ ~ ~ loot next_level:magic/dmg_quartz_staff
execute store result score @s nl.MagicDamage run data get entity @e[limit=1,sort=nearest,nbt={Item:{tag:{nl_MagicDMG:1b}}}] Item.tag.AttributeModifiers.[0].Amount
kill @e[nbt={Item:{tag:{nl_MagicDMG:1b}}}]
execute at @s[scores={nl.MP.Current=2..}] positioned ~ ~1.4 ~ run function next_level:magic/staffs/dark_quartz/cast
execute at @s[scores={nl.MP.Current=2..}] positioned ~ ~1.4 ~ run function next_level:magic/staffs/reduce_durability
execute at @s[scores={nl.MP.Current=2..}] run playsound minecraft:item.trident.riptide_1 voice @s ~ ~ ~ 1 1
scoreboard players remove @s[scores={nl.MP.Current=2..},tag=!nl_CoolDownStaff] nl.MP.Current 2

tag @s remove nl_Caster
