Changed plain C style arrays to std::array and added mana cost deduction in finishCasting()