1. Dark

    Dark Thread Author Rookie member

    Joined:
    Apr 24, 2018
    Posts:
    7

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

    Discussion in 'Pokémon Essentials' started by Dark, Apr 25, 2018.

    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)
     
  2. BlasterMillennia

    BlasterMillennia Rookie member

    Joined:
    Jun 9, 2017
    Posts:
    6
    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: May 16, 2018 at 9:13 AM