protected virtual int cost(int spellLevel, int casterLevel) { if (spellLevel == 0) return (casterLevel * baseCost) / 2; return spellLevel * casterLevel * baseCost; }