From 111394315e44f620cb265193669501aa2c1af62c Mon Sep 17 00:00:00 2001 From: "Lynn \"Zhorken\" Vaughan" Date: Fri, 20 Jan 2012 23:18:38 -0500 Subject: [PATCH] =?UTF-8?q?Fix=20the=20indiscriminate=20display=20of=20Pok?= =?UTF-8?q?=C3=A9mon=20with=20their=20form=20names.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pokedex/db/tables.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 5ed1482..d38fa5e 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -1082,7 +1082,13 @@ class Pokemon(TableBase): @property def name(self): - return self.default_form.pokemon_name or self.species.name + 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): u"""Returns a PokemonStat record for the given stat name (or Stat row