+ move_id = Column(Integer, ForeignKey('moves.id'), primary_key=True, nullable=False, autoincrement=False,
+ info=dict(description="ID of the move"))
+ version_group_id = Column(Integer, ForeignKey('version_groups.id'), primary_key=True, nullable=False, autoincrement=False,
+ info=dict(description="ID of the version group this text appears in"))
+ flavor_text = Column(Unicode(255), nullable=False,
+ info=dict(description="The flavor text", official=True, format='gametext'))
+
+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,
+ info=dict(description="A numeric ID"))
+ meta_category_id = Column(Integer, ForeignKey('move_meta_categories.id'), nullable=False,
+ info=dict(description="ID of the move category"))
+ meta_ailment_id = Column(Integer, ForeignKey('move_meta_ailments.id'), nullable=False,
+ info=dict(description="ID of the caused ailment"))
+ min_hits = Column(Integer, nullable=True, index=True,
+ info=dict(description="Minimum number of hits per use"))
+ max_hits = Column(Integer, nullable=True, index=True,
+ info=dict(description="Maximum number of hits per use"))
+ min_turns = Column(Integer, nullable=True, index=True,
+ info=dict(description="Minimum number of turns the user is forced to use the move"))
+ max_turns = Column(Integer, nullable=True, index=True,
+ info=dict(description="Maximum number of turns the user is forced to use the move"))
+ recoil = Column(Integer, nullable=False, index=True,
+ info=dict(description="Recoil damage, in percent of damage done"))
+ healing = Column(Integer, nullable=False, index=True,
+ info=dict(description="Healing, in percent of user's max HP"))
+ crit_rate = Column(Integer, nullable=False, index=True,
+ info=dict(description="Critical hit rate bonus"))
+ ailment_chance = Column(Integer, nullable=False, index=True,
+ info=dict(description="Chance to cause an ailment, in percent"))
+ flinch_chance = Column(Integer, nullable=False, index=True,
+ info=dict(description="Chance to cause flinching, in percent"))
+ stat_chance = Column(Integer, nullable=False, index=True,
+ info=dict(description="Chance to cause a stat change, in percent"))
+
+class MoveMetaAilment(TableBase, OfficiallyNamed):
+ 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'
+ __singlename__ = 'move_meta_ailment'
+ id = Column(Integer, primary_key=True, nullable=False,
+ info=dict(description="A numeric ID"))
+ identifier = Column(Unicode(24), nullable=False,
+ info=dict(description="An identifier", format='identifier'))
+
+class MoveMetaCategory(TableBase):
+ u"""Very general categories that loosely group move effects."""
+ __tablename__ = 'move_meta_categories'
+ __singlename__ = 'move_meta_category'
+ id = Column(Integer, primary_key=True, nullable=False,
+ info=dict(description="A numeric ID"))
+ description = ProseColumn(Unicode(64), plural='descriptions', nullable=False,
+ info=dict(description="A description of the category"))
+
+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,
+ info=dict(description="ID of the move"))
+ stat_id = Column(Integer, ForeignKey('stats.id'), primary_key=True, nullable=False, autoincrement=False,
+ info=dict(description="ID of the stat"))
+ change = Column(Integer, nullable=False, index=True,
+ info=dict(description="Amount of increase/decrease, in stages"))
+
+class MoveTarget(TableBase, UnofficiallyNamed):
+ u"""Targetting or "range" of a move, e.g. "Affects all opponents" or "Affects user".
+ """