scoreboard players remove n_items items_generic 1
function items_py:give/shard/all/small_mana_shard
execute unless score n_items items_generic matches 0 run function items_py:shard_break/all/medium_mana_shard