Just a warning, you might overflow when calculating experience requirements as well. Chengband allows ridiculous racial/class/personality xp requirements, so I've run into this issue. Try something like the following rather than naked table reads sprinkled throughout the code:
Code:
int exp_requirement(int level) { int base = player_exp[level-1]; if (base % 100 == 0) return base / 100 * p_ptr->expfact; else return base * p_ptr->expfact / 100; }
Comment