Fix the indiscriminate display of Pokémon with their form names.

This commit is contained in:
Lynn "Zhorken" Vaughan 2012-01-20 23:18:38 -05:00
parent 871f9aa58b
commit 111394315e

View file

@ -1082,6 +1082,12 @@ class Pokemon(TableBase):
@property
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
def stat(self, stat_identifier):