How to decrease XP gained to 0 if your level is higher than the opponent's

Dark

Rookie
Member
Joined
Apr 24, 2018
Posts
7
I was wondering i couldnt find anything via the search tool.
For challenge purposes for of course - so that u just put up no mons before a gym leader/rival that r higher than him/her to assure ppl go in with an equal or lower level. that way u dont need to restrict ur level artifically (which really feels clunky to me)
 

BlasterMillennia

Novice
Member
Joined
Jun 10, 2017
Posts
17
In the PokeBattle_Battle script, the pbGainEXP method is called whenever an enemy Pokémon faints. The method then goes through each Pokémon in your party, calling pbGainExpOne (which calculates Experience for, and adds it to, a specific party Pokémon) whenever it finds a party Pokémon that's eligible to gain Experience due to the enemy Pokémon fainting. You could add more conditions within pbGainEXP so that a party Pokémon, whose level exceeds the defeated Pokémon's level, would be ineligible for pbGainExpOne to be called on it.
 
Last edited:
Top