R6 object containing required information about your Pokémon team.
Methods
Method new()
Create a new Pokémon team
Usage
PokemonTeam$new(
pokemon_1,
pokemon_2,
pokemon_3,
pokemon_4,
pokemon_5,
pokemon_6,
random = FALSE,
level = 50L,
generation = 1L
)
Arguments
pokemon_1, pokemon_2, pokemon_3, pokemon_4, pokemon_5, pokemon_6
Pre-created Pokémon
random
Logical, should the team be randomised? Default set to TRUE
level
If random, the level the Pokémon should be
generation
The generation that the Pokémon comes from
Returns
A Team of 6 Pokémon
Method status()
Show current status of Pokémon Team
Usage
PokemonTeam$status(simple = TRUE)
Arguments
simple
Logical, do you just want the simple status (name + HP) printed?
Method get_pokemon()
Get the selected Pokémon
Usage
PokemonTeam$get_pokemon(slot)
Arguments
slot
The number of the position of the Pokémon
Returns
The selected Pokémon
Method all_pokemon()
Get the names of all Pokémon in the team
Usage
PokemonTeam$all_pokemon()
Returns
A character vector of the Pokémon in the team
Method healthy_pokemon()
Check for healthy Pokémon within the team
Usage
PokemonTeam$healthy_pokemon()
Returns
A numeric vector of the positions of the Pokémon that have non-zero HP
Method able_to_battle()
Check whether any Pokémon are healthy to continue battling
Usage
PokemonTeam$able_to_battle()
Returns
A logical value that says if at least one Pokémon hasn't fainted
Method get_team_stat()
Get a stat from each Pokémon in team
Usage
PokemonTeam$get_team_stat(stat)
Arguments
stat
The selected stat to extract
Returns
A vector of length 6, getting the stat of each Pokémon
Method clone()
The objects of this class are cloneable with this method.
Usage
PokemonTeam$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.