leveling up your pokemon, and gaining XP will work like this:
chain of 3 pokemon:
Example 1: Gastly
Gastly (basic pokemon) = 24 points to level up,.
Gastly wins a battle against a Machop, giving Gastly an XP roll with 3 6 sided die
you rolled a 4, 6, and 2
Gastly now needs 12 XP to lvl up
Example 2: Haunter:
your Gastly reached its evolution level and you let it evolve into a Haunter! Haunter gets no XP left over from Gastly and starts at 0, you also now need 32 XP to level up Haunter, as it is the mid stage of the Gastly chain. You can now only use 2 six sided die.
Example 3: Gengar:
Haunter Evolved into Gengar! it now needs 40 XP to lvl up, and it starts with 0, you can use 2 8 sided die
2 chain pokemon:
pokemon that evolve once are a bit difrent, this kind of pokemon will need 28 XP to level up, and its Evolved form, will need 40, its harder to train thease pokemon, but often times allot better.
Pokemon that will not evolve:
the more you train thease, over time you will see they are faster to train. Pokemon that do not evolve need 30 XP to lvl up each time, other than that, the rules are the same.