mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Added Pokédexes to replace dex numbers' generations.
This deals with Gen IV having two Sinnoh dexes and a Johto dex.
This commit is contained in:
parent
15bd2a89e2
commit
3b88a83fff
4 changed files with 1403 additions and 671 deletions
13
pokedex/data/csv/pokedex_version_groups.csv
Normal file
13
pokedex/data/csv/pokedex_version_groups.csv
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
pokedex_id,version_group_id
|
||||||
|
2,1
|
||||||
|
2,2
|
||||||
|
2,7
|
||||||
|
3,3
|
||||||
|
3,4
|
||||||
|
4,5
|
||||||
|
4,6
|
||||||
|
5,8
|
||||||
|
6,9
|
||||||
|
7,10
|
||||||
|
8,1
|
||||||
|
8,2
|
|
9
pokedex/data/csv/pokedexes.csv
Normal file
9
pokedex/data/csv/pokedexes.csv
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
id,name,description
|
||||||
|
1,National,
|
||||||
|
2,Kanto,
|
||||||
|
3,New,Gold/Silver/Crystal Johto dex
|
||||||
|
4,Hoenn,
|
||||||
|
5,Sinnoh,Diamond/Pearl Sinnoh dex
|
||||||
|
6,Sinnoh,Platinum Sinnoh dex: extended version of Diamond and Pearl's
|
||||||
|
7,Johto,"Heart Gold/Soul Silver Johto dex: Gold, Silver, and Crystal's Johto dex with five added Generation-IV evolutions of Generation-I and Generation-II Pokémon"
|
||||||
|
8,Internal ID,IDs used internally in Generation I
|
|
File diff suppressed because it is too large
Load diff
|
@ -264,6 +264,17 @@ class Move(TableBase):
|
||||||
contest_effect_id = Column(Integer, ForeignKey('contest_effects.id'), nullable=True)
|
contest_effect_id = Column(Integer, ForeignKey('contest_effects.id'), nullable=True)
|
||||||
super_contest_effect_id = Column(Integer, ForeignKey('super_contest_effects.id'), nullable=False)
|
super_contest_effect_id = Column(Integer, ForeignKey('super_contest_effects.id'), nullable=False)
|
||||||
|
|
||||||
|
class Pokedex(TableBase):
|
||||||
|
__tablename__ = 'pokedexes'
|
||||||
|
id = Column(Integer, primary_key=True, nullable=False)
|
||||||
|
name = Column(Unicode(16), nullable=False)
|
||||||
|
description = Column(Unicode(512))
|
||||||
|
|
||||||
|
class PokedexVersionGroup(TableBase):
|
||||||
|
__tablename__ = 'pokedex_version_groups'
|
||||||
|
pokedex_id = Column(Integer, ForeignKey('pokedexes.id'), primary_key=True, nullable=False, autoincrement=False)
|
||||||
|
version_group_id = Column(Integer, ForeignKey('version_groups.id'), primary_key=True, nullable=False, autoincrement=False)
|
||||||
|
|
||||||
class Pokemon(TableBase):
|
class Pokemon(TableBase):
|
||||||
"""The core to this whole mess.
|
"""The core to this whole mess.
|
||||||
|
|
||||||
|
@ -339,7 +350,7 @@ class PokemonAbility(TableBase):
|
||||||
class PokemonDexNumber(TableBase):
|
class PokemonDexNumber(TableBase):
|
||||||
__tablename__ = 'pokemon_dex_numbers'
|
__tablename__ = 'pokemon_dex_numbers'
|
||||||
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False)
|
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), primary_key=True, nullable=False, autoincrement=False)
|
||||||
generation_id = Column(Integer, ForeignKey('generations.id'), primary_key=True, nullable=False, autoincrement=False)
|
pokedex_id = Column(Integer, ForeignKey('pokedexes.id'), primary_key=True, nullable=False, autoincrement=False)
|
||||||
pokedex_number = Column(Integer, nullable=False)
|
pokedex_number = Column(Integer, nullable=False)
|
||||||
|
|
||||||
class PokemonEggGroup(TableBase):
|
class PokemonEggGroup(TableBase):
|
||||||
|
@ -533,6 +544,8 @@ MoveFlavorText.generation = relation(Generation)
|
||||||
|
|
||||||
MoveName.language = relation(Language)
|
MoveName.language = relation(Language)
|
||||||
|
|
||||||
|
Pokedex.version_groups = relation(VersionGroup, secondary=PokedexVersionGroup.__table__)
|
||||||
|
|
||||||
Pokemon.abilities = relation(Ability, secondary=PokemonAbility.__table__,
|
Pokemon.abilities = relation(Ability, secondary=PokemonAbility.__table__,
|
||||||
order_by=PokemonAbility.slot,
|
order_by=PokemonAbility.slot,
|
||||||
backref='pokemon')
|
backref='pokemon')
|
||||||
|
@ -556,7 +569,7 @@ Pokemon.shape = relation(PokemonShape, backref='pokemon')
|
||||||
Pokemon.stats = relation(PokemonStat, backref='pokemon')
|
Pokemon.stats = relation(PokemonStat, backref='pokemon')
|
||||||
Pokemon.types = relation(Type, secondary=PokemonType.__table__)
|
Pokemon.types = relation(Type, secondary=PokemonType.__table__)
|
||||||
|
|
||||||
PokemonDexNumber.generation = relation(Generation)
|
PokemonDexNumber.pokedex = relation(Pokedex)
|
||||||
|
|
||||||
PokemonFlavorText.version = relation(Version)
|
PokemonFlavorText.version = relation(Version)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue