Skip to contents

Given a list of pokémon types present on a player's team, calculate a measure of how weak the team is to each type in the game.

Creates a list in which the keys are each of the 18 types in the game, and the values are integers measuring the level of weakness the input team has to that key (type). Higher values indicate a higher level of weakness to that type.

Usage

calc_weaknesses(team_types)

Arguments

team_list

: list of list of strings list of pokémon types associated to the user's team obtained via get_types

Value

weaknesses : list a list containing all 18 pokémon types and integers measuring the level of weakness the input team has to that type as values.

Examples

calc_weaknesses(list(list("Electric"), list("Fire", "Flying")))
#> Error in calc_weaknesses(list(list("Electric"), list("Fire", "Flying"))): Input should be a list of character vectors of pokemon types.