X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/0707c9a69f42cb2f637ea708d77d58f6931f7eea..65b89cfc18745c569c81058754cb85c709426b2f:/pokedex/db/tables.py diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 4271efd..80c191a 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -398,6 +398,13 @@ class Nature(TableBase): hates_flavor_id = Column(Integer, ForeignKey('contest_types.id'), nullable=False) likes_flavor_id = Column(Integer, ForeignKey('contest_types.id'), nullable=False) + @property + def is_neutral(self): + u"""Returns True iff this nature doesn't alter a Pokémon's stats, + bestow taste preferences, etc. + """ + return self.increased_stat_id == self.decreased_stat_id + class NatureBattleStylePreference(TableBase): __tablename__ = 'nature_battle_style_preferences' nature_id = Column(Integer, ForeignKey('natures.id'), primary_key=True, nullable=False)