+ __singlename__ = 'ability'
+ id = Column(Integer, primary_key=True, nullable=False,
+ info=dict(description="This ability's unique ID; matches the games' internal ID"))
+ name = Column(Unicode(24), nullable=False,
+ info=dict(description="The official English name of this ability", official=True, format='plaintext'))
+ generation_id = Column(Integer, ForeignKey('generations.id'), nullable=False,
+ info=dict(description="The ID of the generation this ability was introduced in", detail=True))
+ effect = Column(markdown.MarkdownColumn(5120), nullable=False,
+ info=dict(description="A detailed description of this ability's effect", format='markdown'))
+ short_effect = Column(markdown.MarkdownColumn(255), nullable=False,
+ info=dict(description="A short summary of this ability's effect", format='markdown'))
+
+class AbilityChangelog(TableBase):
+ """History of changes to abilities across main game versions."""
+ __tablename__ = 'ability_changelog'
+ ability_id = Column(Integer, ForeignKey('abilities.id'), primary_key=True, nullable=False,
+ info=dict(description="The ID of the ability that changed"))
+ changed_in_version_group_id = Column(Integer, ForeignKey('version_groups.id'), primary_key=True, nullable=False,
+ info=dict(description="The ID of the version group in which the ability changed"))
+ effect = Column(markdown.MarkdownColumn(255), nullable=False,
+ info=dict(description="A description of the old behavior", format='markdown'))
+
+class AbilityFlavorText(TableBase):
+ u"""In-game flavor text of an ability
+ """
+ __tablename__ = 'ability_flavor_text'
+ ability_id = Column(Integer, ForeignKey('abilities.id'), primary_key=True, nullable=False, autoincrement=False,
+ info=dict(description="The ID of the ability"))
+ version_group_id = Column(Integer, ForeignKey('version_groups.id'), primary_key=True, nullable=False, autoincrement=False,
+ info=dict(description="The ID of the version group this flavor text is taken from"))
+ flavor_text = Column(Unicode(64), nullable=False,
+ info=dict(description="The actual flavor text", official=True, format='gametext'))
+
+class AbilityName(TableBase):
+ u"""Non-English official name of an ability
+ """
+ __tablename__ = 'ability_names'
+ ability_id = Column(Integer, ForeignKey('abilities.id'), primary_key=True, nullable=False, autoincrement=False,
+ info=dict(description="The ID of the ability"))
+ language_id = Column(Integer, ForeignKey('languages.id'), primary_key=True, nullable=False, autoincrement=False,
+ info=dict(description="The ID of the language"))
+ name = Column(Unicode(16), nullable=False,
+ info=dict(description="The ID of the language", official=True, foreign=True, format='plaintext'))
+
+class Berry(TableBase):
+ u"""A Berry, consumable item that grows on trees
+
+ For data common to all items, such as the name, see the corresponding item entry.
+ """
+ __tablename__ = 'berries'
+ id = Column(Integer, primary_key=True, nullable=False,
+ info=dict(description="This Berry's in-game number"))
+ item_id = Column(Integer, ForeignKey('items.id'), nullable=False,
+ info=dict(description="The ID of the item that represents this Berry"))
+ firmness_id = Column(Integer, ForeignKey('berry_firmness.id'), nullable=False,
+ info=dict(description="The ID of this Berry's firmness category"))
+ natural_gift_power = Column(Integer, nullable=True,
+ info=dict(description="Natural Gift's power when used with this Berry"))
+ natural_gift_type_id = Column(Integer, ForeignKey('types.id'), nullable=True,
+ info=dict(description="The ID of the Type that Natural Gift has when used with this Berry"))
+ size = Column(Integer, nullable=False,
+ info=dict(description=u"The size of this Berry, in millimeters"))
+ max_harvest = Column(Integer, nullable=False,
+ info=dict(description="The maximum number of these berries that can grow on one tree in Generation IV"))
+ growth_time = Column(Integer, nullable=False,
+ info=dict(description="Time it takes the tree to grow one stage, in hours. Berry trees go through four of these growth stages before they can be picked."))
+ soil_dryness = Column(Integer, nullable=False,
+ info=dict(description="The speed at which this Berry dries out the soil as it grows. A higher rate means the soil dries more quickly."))
+ smoothness = Column(Integer, nullable=False,
+ info=dict(description="The smoothness of this Berry, used in making Pokéblocks or Poffins"))
+
+class BerryFirmness(TableBase):
+ u"""A Berry firmness, such as "hard" or "very soft".
+ """
+ __tablename__ = 'berry_firmness'
+ id = Column(Integer, primary_key=True, nullable=False,
+ info=dict(description="A unique ID for this firmness"))
+ name = Column(Unicode(10), nullable=False,
+ info=dict(description="The games' English label for this firmness level", official=True, format='plaintext'))
+
+class BerryFlavor(TableBase):
+ u"""A Berry flavor level.
+ """
+ __tablename__ = 'berry_flavors'
+ berry_id = Column(Integer, ForeignKey('berries.id'), primary_key=True, nullable=False, autoincrement=False,
+ info=dict(description="The ID of the berry"))
+ contest_type_id = Column(Integer, ForeignKey('contest_types.id'), primary_key=True, nullable=False, autoincrement=False,
+ info=dict(description="The ID of the flavor"))
+ flavor = Column(Integer, nullable=False,
+ info=dict(description="The level of the flavor in the berry"))
+
+class ContestCombo(TableBase):
+ u"""Combo of two moves in a Contest.
+ """
+ __tablename__ = 'contest_combos'
+ first_move_id = Column(Integer, ForeignKey('moves.id'), primary_key=True, nullable=False, autoincrement=False,
+ info=dict(description="The ID of the first move in the combo"))
+ second_move_id = Column(Integer, ForeignKey('moves.id'), primary_key=True, nullable=False, autoincrement=False,
+ info=dict(description="The ID of the second and final move in the combo"))