unsigned int xp_gain(Pokemon &poke, Pokemon &poke_adv) { (void) poke; unsigned int xp; unsigned int e; //Lucky egg float a; float s; //xp_share, pokemon on the battle etc... cf poke_doc/xp.info a = (poke_adv.get_owner() == IS_WILD) ? 1 : 1.5; e = 1; s = 1.0; xp = static_cast<unsigned int>(((a * PokemonModel::pokedex[poke_adv.get_id()]->get_xp_base() * poke_adv.get_level()) / static_cast<unsigned int>(5 * s)) * (static_cast<unsigned int>(std::pow((2 * poke_adv.get_level()), 2.5) + 1) * e)); return (xp); }