Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
You could simply add and define an attribute to the PokeBattle_Pokemon class that counts the number of fights the Pokémon object has had or won; or you could simply increase the Pokémon's happiness whenever said-Pokémon is sent out or defeats an opponent. The latter case can make it easier for Pokémon who are programmed to evolve by happiness. You can also use happiness for affection-related effects e.g. 20% boost in XP gain; probability of the Endure effect happening (increases at higher happiness levels); probability of an opponent's attack automatically missing or the Pokémon curing itself of a status affliction; probability of the Pokémon's attack scoring a critical hit.