PokéRogue
    Preparing search index...

    Function getRandomTrainerFunc

    • Helper function to generate a random trainer for evil team trainers and the elite 4/champion

      Parameters

      • trainerPool: readonly (TrainerType | readonly TrainerType[])[]

        The TrainerType or list of TrainerTypes that can possibly be generated

      • randomGender: boolean = false

        (default false); Whether or not to randomly (50%) generate a female trainer (for use with evil team grunts)

      • seedOffset: number = 0

        (default 0); A seed offset indicating the invocation count of the function to attempt to choose a random, but unique, trainer from the pool

      Returns GetTrainerFunc

      A function to generate a random trainer