+class MoveMeta(TableBase):
+ u"""Metadata for move effects, sorta-kinda ripped straight from the game"""
+ __tablename__ = 'move_meta'
+ move_id = Column(Integer, ForeignKey('moves.id'), primary_key=True, nullable=False, autoincrement=False)
+ meta_category_id = Column(Integer, ForeignKey('move_meta_categories.id'), nullable=False)
+ meta_ailment_id = Column(Integer, ForeignKey('move_meta_ailments.id'), nullable=False)
+ min_hits = Column(Integer, nullable=True, index=True)
+ max_hits = Column(Integer, nullable=True, index=True)
+ min_turns = Column(Integer, nullable=True, index=True)
+ max_turns = Column(Integer, nullable=True, index=True)
+ recoil = Column(Integer, nullable=False, index=True)
+ healing = Column(Integer, nullable=False, index=True)
+ crit_rate = Column(Integer, nullable=False, index=True)
+ ailment_chance = Column(Integer, nullable=False, index=True)
+ flinch_chance = Column(Integer, nullable=False, index=True)
+ stat_chance = Column(Integer, nullable=False, index=True)
+
+class MoveMetaAilment(TableBase):
+ u"""Common status ailments moves can inflict on a single Pokémon, including
+ major ailments like paralysis and minor ailments like trapping.
+ """
+ __tablename__ = 'move_meta_ailments'
+ id = Column(Integer, primary_key=True, nullable=False)
+ name = Column(Unicode(24), nullable=False)
+
+class MoveMetaCategory(TableBase):
+ u"""Very general categories that loosely group move effects."""
+ __tablename__ = 'move_meta_categories'
+ id = Column(Integer, primary_key=True, nullable=False)
+ description = Column(Unicode(64), nullable=False)
+
+class MoveMetaStatChange(TableBase):
+ u"""Stat changes moves (may) make."""
+ __tablename__ = 'move_meta_stat_changes'
+ move_id = Column(Integer, ForeignKey('moves.id'), primary_key=True, nullable=False, autoincrement=False)
+ stat_id = Column(Integer, ForeignKey('stats.id'), primary_key=True, nullable=False, autoincrement=False)
+ change = Column(Integer, nullable=False, index=True)
+