Fix error in calculating mana.
Changes syntax and fixes error in mana calculation.