"""
__tablename__ = 'abilities'
__singlename__ = 'ability'
id = Column(Integer, primary_key=True, nullable=False,
"""
__tablename__ = 'abilities'
__singlename__ = 'ability'
id = Column(Integer, primary_key=True, nullable=False,
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,
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,
"""
__tablename__ = 'ability_flavor_text'
ability_id = Column(Integer, ForeignKey('abilities.id'), primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'ability_flavor_text'
ability_id = Column(Integer, ForeignKey('abilities.id'), primary_key=True, nullable=False, autoincrement=False,
version_group_id = Column(Integer, ForeignKey('version_groups.id'), primary_key=True, nullable=False, autoincrement=False,
version_group_id = Column(Integer, ForeignKey('version_groups.id'), primary_key=True, nullable=False, autoincrement=False,
flavor_text = Column(Unicode(64), nullable=False,
info=dict(description="The actual flavor text", official=True, format='gametext'))
flavor_text = Column(Unicode(64), nullable=False,
info=dict(description="The actual flavor text", official=True, format='gametext'))
"""
__tablename__ = 'ability_names'
ability_id = Column(Integer, ForeignKey('abilities.id'), primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'ability_names'
ability_id = Column(Integer, ForeignKey('abilities.id'), primary_key=True, nullable=False, autoincrement=False,
language_id = Column(Integer, ForeignKey('languages.id'), primary_key=True, nullable=False, autoincrement=False,
language_id = Column(Integer, ForeignKey('languages.id'), primary_key=True, nullable=False, autoincrement=False,
- info=dict(description="ID of the language", official=True, foreign=True, format='plaintext'))
+ info=dict(description="The ID of the language", official=True, foreign=True, format='plaintext'))
"""
__tablename__ = 'berries'
id = Column(Integer, primary_key=True, nullable=False,
"""
__tablename__ = 'berries'
id = Column(Integer, primary_key=True, nullable=False,
item_id = Column(Integer, ForeignKey('items.id'), nullable=False,
item_id = Column(Integer, ForeignKey('items.id'), nullable=False,
firmness_id = Column(Integer, ForeignKey('berry_firmness.id'), nullable=False,
firmness_id = Column(Integer, ForeignKey('berry_firmness.id'), nullable=False,
natural_gift_type_id = Column(Integer, ForeignKey('types.id'), nullable=True,
natural_gift_type_id = Column(Integer, ForeignKey('types.id'), nullable=True,
class BerryFirmness(TableBase):
u"""A Berry firmness, such as "hard" or "very soft".
"""
__tablename__ = 'berry_firmness'
id = Column(Integer, primary_key=True, nullable=False,
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="English name of the firmness level", official=True, format='plaintext'))
+ 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,
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,
contest_type_id = Column(Integer, ForeignKey('contest_types.id'), primary_key=True, nullable=False, autoincrement=False,
contest_type_id = Column(Integer, ForeignKey('contest_types.id'), primary_key=True, nullable=False, autoincrement=False,
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,
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,
second_move_id = Column(Integer, ForeignKey('moves.id'), primary_key=True, nullable=False, autoincrement=False,
second_move_id = Column(Integer, ForeignKey('moves.id'), primary_key=True, nullable=False, autoincrement=False,
class ContestEffect(TableBase):
u"""Effect of a move when used in a Contest.
"""
__tablename__ = 'contest_effects'
id = Column(Integer, primary_key=True, nullable=False,
class ContestEffect(TableBase):
u"""Effect of a move when used in a Contest.
"""
__tablename__ = 'contest_effects'
id = Column(Integer, primary_key=True, nullable=False,
appeal = Column(SmallInteger, nullable=False,
info=dict(description="The base number of hearts the user of this move gets"))
jam = Column(SmallInteger, nullable=False,
info=dict(description="The base number of hearts the user's opponent loses"))
flavor_text = Column(Unicode(64), nullable=False,
appeal = Column(SmallInteger, nullable=False,
info=dict(description="The base number of hearts the user of this move gets"))
jam = Column(SmallInteger, nullable=False,
info=dict(description="The base number of hearts the user's opponent loses"))
flavor_text = Column(Unicode(64), nullable=False,
- info=dict(description="English in-game description of this effect", official=True, format='gametext'))
+ info=dict(description="The English in-game description of this effect", official=True, format='gametext'))
"""
__tablename__ = 'contest_types'
id = Column(Integer, primary_key=True, nullable=False,
"""
__tablename__ = 'contest_types'
id = Column(Integer, primary_key=True, nullable=False,
name = Column(Unicode(6), nullable=False,
info=dict(description="The English name of the Contest type", official=True, format='identifier'))
flavor = Column(Unicode(6), nullable=False,
name = Column(Unicode(6), nullable=False,
info=dict(description="The English name of the Contest type", official=True, format='identifier'))
flavor = Column(Unicode(6), nullable=False,
"""
__tablename__ = 'egg_groups'
id = Column(Integer, primary_key=True, nullable=False,
"""
__tablename__ = 'egg_groups'
id = Column(Integer, primary_key=True, nullable=False,
- info=dict(description=u'The English "official" name. One NPC in Stadium uses these names; they are pretty bad.', official=True, format='identifier'))
+ info=dict(description=u"The English name of this egg group, from Earl's Pokémon Academy in Pokémon Stadium 2. "
+ u"And no, these haven't officially been used anywhere else.", official=True, format='identifier'))
__tablename__ = 'encounters'
id = Column(Integer, primary_key=True, nullable=False,
__tablename__ = 'encounters'
id = Column(Integer, primary_key=True, nullable=False,
version_id = Column(Integer, ForeignKey('versions.id'), nullable=False, autoincrement=False,
version_id = Column(Integer, ForeignKey('versions.id'), nullable=False, autoincrement=False,
location_area_id = Column(Integer, ForeignKey('location_areas.id'), nullable=False, autoincrement=False,
location_area_id = Column(Integer, ForeignKey('location_areas.id'), nullable=False, autoincrement=False,
encounter_slot_id = Column(Integer, ForeignKey('encounter_slots.id'), nullable=False, autoincrement=False,
info=dict(description="The ID of the encounter slot, which determines terrain and rarity"))
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), nullable=False, autoincrement=False,
encounter_slot_id = Column(Integer, ForeignKey('encounter_slots.id'), nullable=False, autoincrement=False,
info=dict(description="The ID of the encounter slot, which determines terrain and rarity"))
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), nullable=False, autoincrement=False,
info=dict(description=u"The maxmum level of the encountered Pokémon"))
class EncounterCondition(TableBase):
info=dict(description=u"The maxmum level of the encountered Pokémon"))
class EncounterCondition(TableBase):
"""
__tablename__ = 'encounter_conditions'
id = Column(Integer, primary_key=True, nullable=False,
"""
__tablename__ = 'encounter_conditions'
id = Column(Integer, primary_key=True, nullable=False,
class EncounterConditionValue(TableBase):
u"""A possible state for a condition; for example, the state of 'swarm' could be 'swarm' or 'no swarm'.
class EncounterConditionValue(TableBase):
u"""A possible state for a condition; for example, the state of 'swarm' could be 'swarm' or 'no swarm'.
encounter_condition_id = Column(Integer, ForeignKey('encounter_conditions.id'), primary_key=False, nullable=False, autoincrement=False,
info=dict(description="The ID of the encounter condition this is a value of"))
name = Column(Unicode(64), nullable=False,
encounter_condition_id = Column(Integer, ForeignKey('encounter_conditions.id'), primary_key=False, nullable=False, autoincrement=False,
info=dict(description="The ID of the encounter condition this is a value of"))
name = Column(Unicode(64), nullable=False,
class EncounterConditionValueMap(TableBase):
u"""Maps encounters to the specific conditions under which they occur.
"""
__tablename__ = 'encounter_condition_value_map'
encounter_id = Column(Integer, ForeignKey('encounters.id'), primary_key=True, nullable=False, autoincrement=False,
class EncounterConditionValueMap(TableBase):
u"""Maps encounters to the specific conditions under which they occur.
"""
__tablename__ = 'encounter_condition_value_map'
encounter_id = Column(Integer, ForeignKey('encounters.id'), primary_key=True, nullable=False, autoincrement=False,
encounter_condition_value_id = Column(Integer, ForeignKey('encounter_condition_values.id'), primary_key=True, nullable=False, autoincrement=False,
encounter_condition_value_id = Column(Integer, ForeignKey('encounter_condition_values.id'), primary_key=True, nullable=False, autoincrement=False,
class EncounterTerrain(TableBase):
u"""A way the player can enter a wild encounter, e.g., surfing, fishing, or walking through tall grass.
class EncounterTerrain(TableBase):
u"""A way the player can enter a wild encounter, e.g., surfing, fishing, or walking through tall grass.
__tablename__ = 'encounter_terrain'
id = Column(Integer, primary_key=True, nullable=False,
__tablename__ = 'encounter_terrain'
id = Column(Integer, primary_key=True, nullable=False,
class EncounterSlot(TableBase):
u"""An abstract "slot" within a terrain, associated with both some set of conditions and a rarity.
class EncounterSlot(TableBase):
u"""An abstract "slot" within a terrain, associated with both some set of conditions and a rarity.
__tablename__ = 'encounter_slots'
id = Column(Integer, primary_key=True, nullable=False,
__tablename__ = 'encounter_slots'
id = Column(Integer, primary_key=True, nullable=False,
version_group_id = Column(Integer, ForeignKey('version_groups.id'), nullable=False, autoincrement=False,
version_group_id = Column(Integer, ForeignKey('version_groups.id'), nullable=False, autoincrement=False,
encounter_terrain_id = Column(Integer, ForeignKey('encounter_terrain.id'), primary_key=False, nullable=False, autoincrement=False,
info=dict(description="The ID of the terrain"))
slot = Column(Integer, nullable=True,
encounter_terrain_id = Column(Integer, ForeignKey('encounter_terrain.id'), primary_key=False, nullable=False, autoincrement=False,
info=dict(description="The ID of the terrain"))
slot = Column(Integer, nullable=True,
"""
__tablename__ = 'evolution_chains'
id = Column(Integer, primary_key=True, nullable=False,
"""
__tablename__ = 'evolution_chains'
id = Column(Integer, primary_key=True, nullable=False,
info=dict(description="The number of EXP points needed to get to that level"))
class Generation(TableBase):
info=dict(description="The number of EXP points needed to get to that level"))
class Generation(TableBase):
"""
__tablename__ = 'generations'
id = Column(Integer, primary_key=True, nullable=False,
"""
__tablename__ = 'generations'
id = Column(Integer, primary_key=True, nullable=False,
main_region_id = Column(Integer, ForeignKey('regions.id'),
info=dict(description="ID of the region this generation's main games take place in"))
canonical_pokedex_id = Column(Integer, ForeignKey('pokedexes.id'),
main_region_id = Column(Integer, ForeignKey('regions.id'),
info=dict(description="ID of the region this generation's main games take place in"))
canonical_pokedex_id = Column(Integer, ForeignKey('pokedexes.id'),
name = Column(Unicode(16), nullable=False,
info=dict(description=u'An English name of this generation, such as "Generation IV"', format='plaintext'))
class GrowthRate(TableBase):
name = Column(Unicode(16), nullable=False,
info=dict(description=u'An English name of this generation, such as "Generation IV"', format='plaintext'))
class GrowthRate(TableBase):
"""
__tablename__ = 'growth_rates'
id = Column(Integer, primary_key=True, nullable=False,
"""
__tablename__ = 'growth_rates'
id = Column(Integer, primary_key=True, nullable=False,
info=dict(description=u"Power of the move Fling when used with this item."))
fling_effect_id = Column(Integer, ForeignKey('item_fling_effects.id'), nullable=True,
info=dict(description=u"ID of the fling-effect of the move Fling when used with this item. Note that these are different from move effects."))
info=dict(description=u"Power of the move Fling when used with this item."))
fling_effect_id = Column(Integer, ForeignKey('item_fling_effects.id'), nullable=True,
info=dict(description=u"ID of the fling-effect of the move Fling when used with this item. Note that these are different from move effects."))
effect = Column(markdown.MarkdownColumn(5120), nullable=False,
info=dict(description=u"Detailed English description of the item's effect.", format='markdown'))
effect = Column(markdown.MarkdownColumn(5120), nullable=False,
info=dict(description=u"Detailed English description of the item's effect.", format='markdown'))
"""
__tablename__ = 'machines'
machine_number = Column(Integer, primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'machines'
machine_number = Column(Integer, primary_key=True, nullable=False, autoincrement=False,
- u"""Damage class of a move, i.e. "Physical", "Special, or "None".
+ u"""Any of the damage classes moves can have, i.e. physical, special, or non-damaging.
"""
__tablename__ = 'move_damage_classes'
id = Column(Integer, primary_key=True, nullable=False,
"""
__tablename__ = 'move_damage_classes'
id = Column(Integer, primary_key=True, nullable=False,
a particular battl style in Battle Palace or Battle Tent
"""
__tablename__ = 'nature_battle_style_preferences'
nature_id = Column(Integer, ForeignKey('natures.id'), primary_key=True, nullable=False,
a particular battl style in Battle Palace or Battle Tent
"""
__tablename__ = 'nature_battle_style_preferences'
nature_id = Column(Integer, ForeignKey('natures.id'), primary_key=True, nullable=False,
move_battle_style_id = Column(Integer, ForeignKey('move_battle_styles.id'), primary_key=True, nullable=False,
info=dict(description="ID of the battle style"))
low_hp_preference = Column(Integer, nullable=False,
move_battle_style_id = Column(Integer, ForeignKey('move_battle_styles.id'), primary_key=True, nullable=False,
info=dict(description="ID of the battle style"))
low_hp_preference = Column(Integer, nullable=False,
info=dict(description="The English name of the stat", official=True, format='plaintext'))
class Pokedex(TableBase):
info=dict(description="The English name of the stat", official=True, format='plaintext'))
class Pokedex(TableBase):
"""
__tablename__ = 'pokedexes'
id = Column(Integer, primary_key=True, nullable=False,
info=dict(description="A numeric ID"))
region_id = Column(Integer, ForeignKey('regions.id'), nullable=True,
"""
__tablename__ = 'pokedexes'
id = Column(Integer, primary_key=True, nullable=False,
info=dict(description="A numeric ID"))
region_id = Column(Integer, ForeignKey('regions.id'), nullable=True,
evolution_chain_id = Column(Integer, ForeignKey('evolution_chains.id'),
info=dict(description=u"ID of the species' evolution chain (a.k.a. family)"))
height = Column(Integer, nullable=False,
evolution_chain_id = Column(Integer, ForeignKey('evolution_chains.id'),
info=dict(description=u"ID of the species' evolution chain (a.k.a. family)"))
height = Column(Integer, nullable=False,
species = Column(Unicode(16), nullable=False,
info=dict(description=u'The short English flavor text, such as "Seed" or "Lizard"; usually affixed with the word "Pokémon"',
official=True, format='plaintext'))
color_id = Column(Integer, ForeignKey('pokemon_colors.id'), nullable=False,
species = Column(Unicode(16), nullable=False,
info=dict(description=u'The short English flavor text, such as "Seed" or "Lizard"; usually affixed with the word "Pokémon"',
official=True, format='plaintext'))
color_id = Column(Integer, ForeignKey('pokemon_colors.id'), nullable=False,
pokemon_shape_id = Column(Integer, ForeignKey('pokemon_shapes.id'), nullable=True,
pokemon_shape_id = Column(Integer, ForeignKey('pokemon_shapes.id'), nullable=True,
habitat_id = Column(Integer, ForeignKey('pokemon_habitats.id'), nullable=True,
habitat_id = Column(Integer, ForeignKey('pokemon_habitats.id'), nullable=True,
capture_rate = Column(Integer, nullable=False,
info=dict(description=u"The base capture rate; up to 255"))
base_experience = Column(Integer, nullable=False,
capture_rate = Column(Integer, nullable=False,
info=dict(description=u"The base capture rate; up to 255"))
base_experience = Column(Integer, nullable=False,
base_happiness = Column(Integer, nullable=False,
info=dict(description=u"The tameness when caught by a normal ball"))
is_baby = Column(Boolean, nullable=False,
base_happiness = Column(Integer, nullable=False,
info=dict(description=u"The tameness when caught by a normal ball"))
is_baby = Column(Boolean, nullable=False,
- info=dict(description=u"Initial hatch counter: one must walk 255 × (hatch_counter + 1) steps before this pokémon's egg hatches, unless utilizing bonuses like Flame Body's"))
- has_gen4_fem_sprite = Column(Boolean, nullable=False,
- info=dict(description=u"Set iff the species' female front sprite is different from the male's in generation IV"))
- has_gen4_fem_back_sprite = Column(Boolean, nullable=False,
- info=dict(description=u"Set iff the species' female back sprite is different from the male's in generation IV"))
+ info=dict(description=u"Initial hatch counter: one must walk 255 × (hatch_counter + 1) steps before this Pokémon's egg hatches, unless utilizing bonuses like Flame Body's"))
+ has_gender_differences = Column(Boolean, nullable=False,
+ info=dict(description=u"Set iff the species exhibits enough sexual dimorphism to have separate sets of sprites in Gen IV and beyond."))
+ order = Column(Integer, nullable=False, index=True,
+ info=dict(description=u"Order for sorting. Almost national order, except families and forms are grouped together."))
"""
__tablename__ = 'pokemon_abilities'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'pokemon_abilities'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
ability_id = Column(Integer, ForeignKey('abilities.id'), nullable=False,
info=dict(description=u"ID of the ability"))
# XXX having both a method and a slot is kind of gross. "slot" is a
ability_id = Column(Integer, ForeignKey('abilities.id'), nullable=False,
info=dict(description=u"ID of the ability"))
# XXX having both a method and a slot is kind of gross. "slot" is a
info=dict(description=u"The ability slot, i.e. 1 or 2 for gen. IV"))
class PokemonColor(TableBase):
info=dict(description=u"The ability slot, i.e. 1 or 2 for gen. IV"))
class PokemonColor(TableBase):
"""
__tablename__ = 'pokemon_colors'
id = Column(Integer, primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'pokemon_colors'
id = Column(Integer, primary_key=True, nullable=False, autoincrement=False,
name = Column(Unicode(6), nullable=False,
info=dict(description=u"The English name of the color", official=True, format='identifier'))
name = Column(Unicode(6), nullable=False,
info=dict(description=u"The English name of the color", official=True, format='identifier'))
"""
__tablename__ = 'pokemon_dex_numbers'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'pokemon_dex_numbers'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
pokedex_id = Column(Integer, ForeignKey('pokedexes.id'), primary_key=True, nullable=False, autoincrement=False,
pokedex_id = Column(Integer, ForeignKey('pokedexes.id'), primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'pokemon_egg_groups'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'pokemon_egg_groups'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
egg_group_id = Column(Integer, ForeignKey('egg_groups.id'), primary_key=True, nullable=False, autoincrement=False,
info=dict(description=u"ID of the egg group"))
class PokemonEvolution(TableBase):
egg_group_id = Column(Integer, ForeignKey('egg_groups.id'), primary_key=True, nullable=False, autoincrement=False,
info=dict(description=u"ID of the egg group"))
class PokemonEvolution(TableBase):
- u"""Specifies what causes a particular pokémon to evolve into another species.
+ u"""A required action ("trigger") and the conditions under which the trigger
+ must occur to cause a Pokémon to evolve.
+
+ Any condition may be null if it does not apply for a particular Pokémon.
"""
__tablename__ = 'pokemon_evolution'
from_pokemon_id = Column(Integer, ForeignKey('pokemon.id'), nullable=False,
"""
__tablename__ = 'pokemon_evolution'
from_pokemon_id = Column(Integer, ForeignKey('pokemon.id'), nullable=False,
to_pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
to_pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
evolution_trigger_id = Column(Integer, ForeignKey('evolution_triggers.id'), nullable=False,
evolution_trigger_id = Column(Integer, ForeignKey('evolution_triggers.id'), nullable=False,
trigger_item_id = Column(Integer, ForeignKey('items.id'), nullable=True,
trigger_item_id = Column(Integer, ForeignKey('items.id'), nullable=True,
gender = Column(Enum('male', 'female', name='pokemon_evolution_gender'), nullable=True,
gender = Column(Enum('male', 'female', name='pokemon_evolution_gender'), nullable=True,
location_id = Column(Integer, ForeignKey('locations.id'), nullable=True,
location_id = Column(Integer, ForeignKey('locations.id'), nullable=True,
held_item_id = Column(Integer, ForeignKey('items.id'), nullable=True,
held_item_id = Column(Integer, ForeignKey('items.id'), nullable=True,
time_of_day = Column(Enum('morning', 'day', 'night', name='pokemon_evolution_time_of_day'), nullable=True,
time_of_day = Column(Enum('morning', 'day', 'night', name='pokemon_evolution_time_of_day'), nullable=True,
known_move_id = Column(Integer, ForeignKey('moves.id'), nullable=True,
known_move_id = Column(Integer, ForeignKey('moves.id'), nullable=True,
party_pokemon_id = Column(Integer, ForeignKey('pokemon.id'), nullable=True,
party_pokemon_id = Column(Integer, ForeignKey('pokemon.id'), nullable=True,
- info=dict(description=u"ID of a pokémon that must be present in the party, or None if there's no such condition"))
+ info=dict(description=u"The ID of the Pokémon that must be present in the party."))
+ trade_pokemon_id = Column(Integer, ForeignKey('pokemon.id'), nullable=True,
+ info=dict(description=u"The ID of the Pokémon for which this Pokémon must be traded."))
"""
__tablename__ = 'pokemon_flavor_text'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'pokemon_flavor_text'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
version_id = Column(Integer, ForeignKey('versions.id'), primary_key=True, nullable=False, autoincrement=False,
info=dict(description=u"ID of the version that has this flavor text"))
flavor_text = Column(Unicode(255), nullable=False,
version_id = Column(Integer, ForeignKey('versions.id'), primary_key=True, nullable=False, autoincrement=False,
info=dict(description=u"ID of the version that has this flavor text"))
flavor_text = Column(Unicode(255), nullable=False,
info=dict(description=u'The maximum value for this stat for this Pokémon form.'))
class PokemonHabitat(TableBase):
info=dict(description=u'The maximum value for this stat for this Pokémon form.'))
class PokemonHabitat(TableBase):
"""
__tablename__ = 'pokemon_habitats'
id = Column(Integer, primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'pokemon_habitats'
id = Column(Integer, primary_key=True, nullable=False, autoincrement=False,
info=dict(description=u"The English name of the habitat", official=True, format='plaintext'))
class PokemonInternalID(TableBase):
info=dict(description=u"The English name of the habitat", official=True, format='plaintext'))
class PokemonInternalID(TableBase):
"""
__tablename__ = 'pokemon_internal_ids'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, autoincrement=False, nullable=False,
"""
__tablename__ = 'pokemon_internal_ids'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, autoincrement=False, nullable=False,
generation_id = Column(Integer, ForeignKey('generations.id'), primary_key=True, autoincrement=False, nullable=False,
info=dict(description=u"Database ID of the generation"))
internal_id = Column(Integer, nullable=False,
generation_id = Column(Integer, ForeignKey('generations.id'), primary_key=True, autoincrement=False, nullable=False,
info=dict(description=u"Database ID of the generation"))
internal_id = Column(Integer, nullable=False,
"""
__tablename__ = 'pokemon_items'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'pokemon_items'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
version_id = Column(Integer, ForeignKey('versions.id'), primary_key=True, nullable=False, autoincrement=False,
info=dict(description=u"ID of the version this applies to"))
item_id = Column(Integer, ForeignKey('items.id'), primary_key=True, nullable=False, autoincrement=False,
info=dict(description=u"ID of the item"))
rarity = Column(Integer, nullable=False,
version_id = Column(Integer, ForeignKey('versions.id'), primary_key=True, nullable=False, autoincrement=False,
info=dict(description=u"ID of the version this applies to"))
item_id = Column(Integer, ForeignKey('items.id'), primary_key=True, nullable=False, autoincrement=False,
info=dict(description=u"ID of the item"))
rarity = Column(Integer, nullable=False,
"""
__tablename__ = 'pokemon_moves'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), nullable=False, index=True,
"""
__tablename__ = 'pokemon_moves'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), nullable=False, index=True,
version_group_id = Column(Integer, ForeignKey('version_groups.id'), nullable=False, index=True,
info=dict(description=u"ID of the version group this applies to"))
move_id = Column(Integer, ForeignKey('moves.id'), nullable=False, index=True,
version_group_id = Column(Integer, ForeignKey('version_groups.id'), nullable=False, index=True,
info=dict(description=u"ID of the version group this applies to"))
move_id = Column(Integer, ForeignKey('moves.id'), nullable=False, index=True,
info=dict(description=u"A detailed description of how the method works", format='plaintext'))
class PokemonName(TableBase):
info=dict(description=u"A detailed description of how the method works", format='plaintext'))
class PokemonName(TableBase):
"""
__tablename__ = 'pokemon_names'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'pokemon_names'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
language_id = Column(Integer, ForeignKey('languages.id'), primary_key=True, nullable=False, autoincrement=False,
info=dict(description=u"ID of the language"))
name = Column(Unicode(16), nullable=False,
language_id = Column(Integer, ForeignKey('languages.id'), primary_key=True, nullable=False, autoincrement=False,
info=dict(description=u"ID of the language"))
name = Column(Unicode(16), nullable=False,
"""
__tablename__ = 'pokemon_shapes'
id = Column(Integer, primary_key=True, nullable=False,
"""
__tablename__ = 'pokemon_shapes'
id = Column(Integer, primary_key=True, nullable=False,
info=dict(description=u"A splendiferous, technically English, name of the body shape", format='plaintext'))
class PokemonStat(TableBase):
info=dict(description=u"A splendiferous, technically English, name of the body shape", format='plaintext'))
class PokemonStat(TableBase):
"""
__tablename__ = 'pokemon_stats'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'pokemon_stats'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
stat_id = Column(Integer, ForeignKey('stats.id'), primary_key=True, nullable=False, autoincrement=False,
info=dict(description=u"ID of the stat"))
base_stat = Column(Integer, nullable=False,
info=dict(description=u"The base stat"))
effort = Column(Integer, nullable=False,
stat_id = Column(Integer, ForeignKey('stats.id'), primary_key=True, nullable=False, autoincrement=False,
info=dict(description=u"ID of the stat"))
base_stat = Column(Integer, nullable=False,
info=dict(description=u"The base stat"))
effort = Column(Integer, nullable=False,
"""
__tablename__ = 'pokemon_types'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'pokemon_types'
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False,
type_id = Column(Integer, ForeignKey('types.id'), nullable=False,
info=dict(description=u"ID of the type"))
slot = Column(Integer, primary_key=True, nullable=False, autoincrement=False,
type_id = Column(Integer, ForeignKey('types.id'), nullable=False,
info=dict(description=u"ID of the type"))
slot = Column(Integer, primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'super_contest_combos'
first_move_id = Column(Integer, ForeignKey('moves.id'), primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'super_contest_combos'
first_move_id = Column(Integer, ForeignKey('moves.id'), primary_key=True, nullable=False, autoincrement=False,
second_move_id = Column(Integer, ForeignKey('moves.id'), primary_key=True, nullable=False, autoincrement=False,
second_move_id = Column(Integer, ForeignKey('moves.id'), primary_key=True, nullable=False, autoincrement=False,
class SuperContestEffect(TableBase):
u"""An effect a move can have when used in the Super Contest
"""
__tablename__ = 'super_contest_effects'
id = Column(Integer, primary_key=True, nullable=False,
class SuperContestEffect(TableBase):
u"""An effect a move can have when used in the Super Contest
"""
__tablename__ = 'super_contest_effects'
id = Column(Integer, primary_key=True, nullable=False,
"""
__tablename__ = 'type_efficacy'
damage_type_id = Column(Integer, ForeignKey('types.id'), primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'type_efficacy'
damage_type_id = Column(Integer, ForeignKey('types.id'), primary_key=True, nullable=False, autoincrement=False,
target_type_id = Column(Integer, ForeignKey('types.id'), primary_key=True, nullable=False, autoincrement=False,
target_type_id = Column(Integer, ForeignKey('types.id'), primary_key=True, nullable=False, autoincrement=False,
__tablename__ = 'types'
__singlename__ = 'type'
id = Column(Integer, primary_key=True, nullable=False,
__tablename__ = 'types'
__singlename__ = 'type'
id = Column(Integer, primary_key=True, nullable=False,
generation_id = Column(Integer, ForeignKey('generations.id'), nullable=False,
generation_id = Column(Integer, ForeignKey('generations.id'), nullable=False,
damage_class_id = Column(Integer, ForeignKey('move_damage_classes.id'), nullable=False,
damage_class_id = Column(Integer, ForeignKey('move_damage_classes.id'), nullable=False,
__tablename__ = 'type_names'
type_id = Column(Integer, ForeignKey('types.id'), primary_key=True, nullable=False, autoincrement=False,
__tablename__ = 'type_names'
type_id = Column(Integer, ForeignKey('types.id'), primary_key=True, nullable=False, autoincrement=False,
language_id = Column(Integer, ForeignKey('languages.id'), primary_key=True, nullable=False, autoincrement=False,
language_id = Column(Integer, ForeignKey('languages.id'), primary_key=True, nullable=False, autoincrement=False,
"""
__tablename__ = 'version_groups'
id = Column(Integer, primary_key=True, nullable=False,
"""
__tablename__ = 'version_groups'
id = Column(Integer, primary_key=True, nullable=False,
generation_id = Column(Integer, ForeignKey('generations.id'), nullable=False,
generation_id = Column(Integer, ForeignKey('generations.id'), nullable=False,
pokedex_id = Column(Integer, ForeignKey('pokedexes.id'), nullable=False,
pokedex_id = Column(Integer, ForeignKey('pokedexes.id'), nullable=False,
__tablename__ = 'version_group_regions'
version_group_id = Column(Integer, ForeignKey('version_groups.id'), primary_key=True, nullable=False,
__tablename__ = 'version_group_regions'
version_group_id = Column(Integer, ForeignKey('version_groups.id'), primary_key=True, nullable=False,
region_id = Column(Integer, ForeignKey('regions.id'), primary_key=True, nullable=False,
region_id = Column(Integer, ForeignKey('regions.id'), primary_key=True, nullable=False,
__tablename__ = 'versions'
id = Column(Integer, primary_key=True, nullable=False,
__tablename__ = 'versions'
id = Column(Integer, primary_key=True, nullable=False,
version_group_id = Column(Integer, ForeignKey('version_groups.id'), nullable=False,
version_group_id = Column(Integer, ForeignKey('version_groups.id'), nullable=False,
- info=dict(description=u'The English name of the game, without the "Pokémon" prefix', official=True, format='plaintext'))
+ info=dict(description=u'The English "version" name for this game, e.g. "Red", without the rest of the title.', official=True, format='plaintext'))
Ability.flavor_text = relation(AbilityFlavorText, order_by=AbilityFlavorText.version_group_id, backref='ability')
Ability.foreign_names = relation(AbilityName, backref='ability')
Ability.generation = relation(Generation, backref='abilities')
Ability.flavor_text = relation(AbilityFlavorText, order_by=AbilityFlavorText.version_group_id, backref='ability')
Ability.foreign_names = relation(AbilityName, backref='ability')
Ability.generation = relation(Generation, backref='abilities')
+Ability.all_pokemon = relation(Pokemon,
+ secondary=PokemonAbility.__table__,
+ back_populates='all_abilities',
+)
Ability.pokemon = relation(Pokemon,
secondary=PokemonAbility.__table__,
Ability.pokemon = relation(Pokemon,
secondary=PokemonAbility.__table__,
+ primaryjoin=and_(
+ PokemonAbility.ability_id == Ability.id,
+ PokemonAbility.is_dream == False
+ ),
+ back_populates='abilities',
+)
+Ability.dream_pokemon = relation(Pokemon,
+ secondary=PokemonAbility.__table__,
+ primaryjoin=and_(
+ PokemonAbility.ability_id == Ability.id,
+ PokemonAbility.is_dream == True
+ ),
+ back_populates='dream_ability',
EvolutionChain.growth_rate = relation(GrowthRate, backref='evolution_chains')
EvolutionChain.baby_trigger_item = relation(Item, backref='evolution_chains')
EvolutionChain.growth_rate = relation(GrowthRate, backref='evolution_chains')
EvolutionChain.baby_trigger_item = relation(Item, backref='evolution_chains')
Move.short_effect = markdown.MoveEffectProperty('short_effect')
MoveChangelog.changed_in = relation(VersionGroup, backref='move_changelog')
Move.short_effect = markdown.MoveEffectProperty('short_effect')
MoveChangelog.changed_in = relation(VersionGroup, backref='move_changelog')
+MoveChangelog.move_effect = relation(MoveEffect, backref='move_changelog')
+MoveChangelog.type = relation(Type, backref='move_changelog')
+
+MoveChangelog.effect = markdown.MoveEffectProperty('effect')
+MoveChangelog.short_effect = markdown.MoveEffectProperty('short_effect')
MoveEffect.category_map = relation(MoveEffectCategoryMap)
MoveEffect.categories = association_proxy('category_map', 'category')
MoveEffect.category_map = relation(MoveEffectCategoryMap)
MoveEffect.categories = association_proxy('category_map', 'category')
Pokemon.dex_numbers = relation(PokemonDexNumber, order_by=PokemonDexNumber.pokedex_id.asc(), backref='pokemon')
Pokemon.egg_groups = relation(EggGroup, secondary=PokemonEggGroup.__table__,
order_by=PokemonEggGroup.egg_group_id,
Pokemon.dex_numbers = relation(PokemonDexNumber, order_by=PokemonDexNumber.pokedex_id.asc(), backref='pokemon')
Pokemon.egg_groups = relation(EggGroup, secondary=PokemonEggGroup.__table__,
order_by=PokemonEggGroup.egg_group_id,
- backref='pokemon')
-Pokemon.evolution_chain = relation(EvolutionChain, backref='pokemon')
+ backref=backref('pokemon', order_by=Pokemon.order))
+Pokemon.evolution_chain = relation(EvolutionChain, back_populates='pokemon')
Pokemon.child_pokemon = relation(Pokemon,
primaryjoin=Pokemon.id==PokemonEvolution.from_pokemon_id,
secondary=PokemonEvolution.__table__,
Pokemon.child_pokemon = relation(Pokemon,
primaryjoin=Pokemon.id==PokemonEvolution.from_pokemon_id,
secondary=PokemonEvolution.__table__,
Pokemon.generation = relation(Generation, backref='pokemon')
Pokemon.shape = relation(PokemonShape, backref='pokemon')
Pokemon.stats = relation(PokemonStat, backref='pokemon', order_by=PokemonStat.stat_id.asc())
Pokemon.generation = relation(Generation, backref='pokemon')
Pokemon.shape = relation(PokemonShape, backref='pokemon')
Pokemon.stats = relation(PokemonStat, backref='pokemon', order_by=PokemonStat.stat_id.asc())
-Pokemon.types = relation(Type, secondary=PokemonType.__table__, order_by=PokemonType.slot.asc(), backref='pokemon')
+Pokemon.types = relation(Type, secondary=PokemonType.__table__,
+ order_by=PokemonType.slot.asc(),
+ back_populates='pokemon')
primaryjoin=PokemonEvolution.party_pokemon_id==Pokemon.id,
backref='triggered_evolutions',
)
primaryjoin=PokemonEvolution.party_pokemon_id==Pokemon.id,
backref='triggered_evolutions',
)
PokemonMove.move = relation(Move, backref='pokemon_moves')
PokemonMove.method = relation(PokemonMoveMethod)
PokemonMove.move = relation(Move, backref='pokemon_moves')
PokemonMove.method = relation(PokemonMoveMethod)
Type.generation = relation(Generation, backref='types')
Type.damage_class = relation(MoveDamageClass, backref='types')
Type.foreign_names = relation(TypeName, backref='type')
Type.generation = relation(Generation, backref='types')
Type.damage_class = relation(MoveDamageClass, backref='types')
Type.foreign_names = relation(TypeName, backref='type')
+Type.pokemon = relation(Pokemon, secondary=PokemonType.__table__,
+ order_by=Pokemon.order,
+ back_populates='types')