+ __singlename__ = 'ability'
+ id = Column(Integer, primary_key=True, nullable=False,
+ info=dict(description="A numeric 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="ID of the generation this ability was introduced in", detail=True))
+ effect = Column(markdown.MarkdownColumn(5120), nullable=False,
+ info=dict(description="Detailed description of this ability's effect", format='markdown'))
+ short_effect = Column(markdown.MarkdownColumn(255), nullable=False,
+ info=dict(description="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="A numeric ID"))
+ version_group_id = Column(Integer, ForeignKey('version_groups.id'), primary_key=True, nullable=False, autoincrement=False,
+ info=dict(description="The versions this flavor text is shown in"))
+ 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="ID of the ability"))
+ language_id = Column(Integer, ForeignKey('languages.id'), primary_key=True, nullable=False, autoincrement=False,
+ info=dict(description="ID of the language"))
+ name = Column(Unicode(16), nullable=False,
+ info=dict(description="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="A numeric ID"))
+ item_id = Column(Integer, ForeignKey('items.id'), nullable=False,
+ info=dict(description="ID of the Item this Berry corresponds to"))
+ firmness_id = Column(Integer, ForeignKey('berry_firmness.id'), nullable=False,
+ info=dict(description="ID of this berry's firmness"))
+ natural_gift_power = Column(Integer, nullable=True,
+ info=dict(description="Power of Natural Gift when that move is used with this Berry"))
+ natural_gift_type_id = Column(Integer, ForeignKey('types.id'), nullable=True,
+ info=dict(description="ID of the Type that Natural Gift will have when used with this Berry"))
+ size = Column(Integer, nullable=False,
+ info=dict(description=u"Size of this Berry, in millimeters"))
+ max_harvest = Column(Integer, nullable=False,
+ info=dict(description="Maximum number of these berries that can grow on one tree"))
+ growth_time = Column(Integer, nullable=False,
+ info=dict(description="Time it takes the tree to grow one stage, in hours. Multiply by four to get overall time."))
+ soil_dryness = Column(Integer, nullable=False,
+ info=dict(description="The speed of soil drying the tree causes")) # XXX: What's this exactly? I'm not a good farmer
+ smoothness = Column(Integer, nullable=False,
+ info=dict(description="Smoothness of this Berry, a culinary attribute. Higher is better."))
+
+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 numeric ID"))
+ name = Column(Unicode(10), nullable=False,
+ info=dict(description="English name of the 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="ID of the berry"))
+ contest_type_id = Column(Integer, ForeignKey('contest_types.id'), primary_key=True, nullable=False, autoincrement=False,
+ info=dict(description="ID of the flavor"))
+ flavor = Column(Integer, nullable=False,
+ info=dict(description="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="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="ID of the second and final move in the combo"))