Make the new candy item as you usually would and then in PBItem_ItemEffects, underneath the Rare Candy effect is probably best, add this:
ItemHandlers::UseOnPokemon.add(:YOURITEMNAME,proc{|item,pokemon,scene|
if pokemon.level==1 || (pokemon.isShadow? rescue false)
scene.pbDisplay(_INTL("It...