Class TrainerData
java.lang.Object
com.pixelmonmod.pixelmon.entities.npcs.registry.TrainerData
- All Implemented Interfaces:
ITrainerData
JSON data for NPC Trainers.
-
Field Summary
Modifier and TypeFieldDescriptionThe name of the Trainer class.Indexing data for the Trainer.int
The base amount of PokéDollars awarded after defeating the Trainer. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds possible dialogue to the Trainer.void
addPokemon
(PokemonBase poke) Adds a possible Pokémon to the Trainer.getChat
(int index) int
int
int
int
getName
(int index) int
Randomly chooses an index corresponding to dialogue the Trainer can have.int
Randomly chooses an index corresponding to a pokemonLevel the Trainer's Pokémon can be.int
Randomly chooses an index corresponding to a name the Trainer can have.Randomly chooses a party for the Trainer to have.
-
Field Details
-
trainerType
Indexing data for the Trainer. -
winnings
public int winningsThe base amount of PokéDollars awarded after defeating the Trainer. -
id
The name of the Trainer class.
-
-
Constructor Details
-
TrainerData
Initializes the NPC Trainer data.- Parameters:
id
- The name of the Trainer class.
-
-
Method Details
-
addPokemon
Adds a possible Pokémon to the Trainer.- Parameters:
poke
- A Pokémon the Trainer can have.
-
addChat
Adds possible dialogue to the Trainer.- Parameters:
opening
- Dialogue when the Trainer begins a battle.win
- Dialogue when the Trainer wins a battle.lose
- Dialogue when the Trainer loses a battle.
-
getRandomParty
Randomly chooses a party for the Trainer to have.- Returns:
- A randomly chosen party for the Trainer.
-
getRandomName
public int getRandomName()Randomly chooses an index corresponding to a name the Trainer can have.- Returns:
- An index corresponding to a name the Trainer can have.
-
getRandomChat
public int getRandomChat()Randomly chooses an index corresponding to dialogue the Trainer can have.- Returns:
- An index corresponding to dialogue the Trainer can have.
-
getRandomLevel
public int getRandomLevel()Randomly chooses an index corresponding to a pokemonLevel the Trainer's Pokémon can be.- Returns:
- An index corresponding to a pokemonLevel the Trainer's Pokémon can be.
-
getMinLevel
public int getMinLevel() -
getMaxLevel
public int getMaxLevel() -
getMinPartyPokemon
public int getMinPartyPokemon() -
getMaxPartyPokemon
public int getMaxPartyPokemon() -
getName
- Specified by:
getName
in interfaceITrainerData
-
getChat
- Specified by:
getChat
in interfaceITrainerData
-