mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Fix the indiscriminate display of Pokémon with their form names.
This commit is contained in:
parent
871f9aa58b
commit
111394315e
1 changed files with 7 additions and 1 deletions
|
@ -1082,6 +1082,12 @@ class Pokemon(TableBase):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
|
u"""Returns a name for this Pokémon, specifiying the form iff it
|
||||||
|
represents a specific PokemonForm.
|
||||||
|
"""
|
||||||
|
if any(not form.is_default for form in self.forms):
|
||||||
|
return self.species.name
|
||||||
|
else:
|
||||||
return self.default_form.pokemon_name or self.species.name
|
return self.default_form.pokemon_name or self.species.name
|
||||||
|
|
||||||
def stat(self, stat_identifier):
|
def stat(self, stat_identifier):
|
||||||
|
|
Loading…
Reference in a new issue