added resource cost to spells