mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Turn gender into a table.
This commit is contained in:
parent
543419afcd
commit
cd4dfcf4f4
4 changed files with 29 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
||||||
evolved_species_id,required_stat_id,minimum_stat,minimum_link,kingdom_id,warrior_gender,item_id,recruiting_ko_required
|
evolved_species_id,required_stat_id,minimum_stat,minimum_link,kingdom_id,warrior_gender_id,item_id,recruiting_ko_required
|
||||||
5,2,50,,,,,0
|
5,2,50,,,,,0
|
||||||
6,2,83,,,,,0
|
6,2,83,,,,,0
|
||||||
24,2,59,,,,,0
|
24,2,59,,,,,0
|
||||||
|
@ -68,9 +68,9 @@ evolved_species_id,required_stat_id,minimum_stat,minimum_link,kingdom_id,warrior
|
||||||
464,,,,,,298,1
|
464,,,,,,298,1
|
||||||
470,3,94,,5,,,0
|
470,3,94,,5,,,0
|
||||||
471,2,91,,6,,,0
|
471,2,91,,6,,,0
|
||||||
475,,,,,male,109,0
|
475,,,,,2,109,0
|
||||||
477,,,,,,302,1
|
477,,,,,,302,1
|
||||||
478,,,,,female,109,0
|
478,,,,,1,109,0
|
||||||
496,6,54,,,,,0
|
496,6,54,,,,,0
|
||||||
497,6,104,,,,,0
|
497,6,104,,,,,0
|
||||||
499,2,41,,,,,0
|
499,2,41,,,,,0
|
||||||
|
|
|
4
pokedex/data/csv/genders.csv
Normal file
4
pokedex/data/csv/genders.csv
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
id,identifier
|
||||||
|
1,female
|
||||||
|
2,male
|
||||||
|
3,genderless
|
|
|
@ -1,4 +1,4 @@
|
||||||
id,evolved_species_id,evolution_trigger_id,trigger_item_id,minimum_level,gender,location_id,held_item_id,time_of_day,known_move_id,minimum_happiness,minimum_beauty,relative_physical_stats,party_species_id,trade_species_id
|
id,evolved_species_id,evolution_trigger_id,trigger_item_id,minimum_level,gender_id,location_id,held_item_id,time_of_day,known_move_id,minimum_happiness,minimum_beauty,relative_physical_stats,party_species_id,trade_species_id
|
||||||
1,2,1,,16,,,,,,,,,,
|
1,2,1,,16,,,,,,,,,,
|
||||||
2,3,1,,32,,,,,,,,,,
|
2,3,1,,32,,,,,,,,,,
|
||||||
3,5,1,,16,,,,,,,,,,
|
3,5,1,,16,,,,,,,,,,
|
||||||
|
@ -205,9 +205,9 @@ id,evolved_species_id,evolution_trigger_id,trigger_item_id,minimum_level,gender,
|
||||||
204,407,3,107,,,,,,,,,,,
|
204,407,3,107,,,,,,,,,,,
|
||||||
205,409,1,,30,,,,,,,,,,
|
205,409,1,,30,,,,,,,,,,
|
||||||
206,411,1,,30,,,,,,,,,,
|
206,411,1,,30,,,,,,,,,,
|
||||||
207,413,1,,20,female,,,,,,,,,
|
207,413,1,,20,1,,,,,,,,,
|
||||||
208,414,1,,20,male,,,,,,,,,
|
208,414,1,,20,2,,,,,,,,,
|
||||||
209,416,1,,21,female,,,,,,,,,
|
209,416,1,,21,1,,,,,,,,,
|
||||||
210,419,1,,26,,,,,,,,,,
|
210,419,1,,26,,,,,,,,,,
|
||||||
211,421,1,,25,,,,,,,,,,
|
211,421,1,,25,,,,,,,,,,
|
||||||
212,423,1,,30,,,,,,,,,,
|
212,423,1,,30,,,,,,,,,,
|
||||||
|
@ -241,10 +241,10 @@ id,evolved_species_id,evolution_trigger_id,trigger_item_id,minimum_level,gender,
|
||||||
240,472,1,,,,,304,night,,,,,,
|
240,472,1,,,,,304,night,,,,,,
|
||||||
241,473,1,,,,,,,246,,,,,
|
241,473,1,,,,,,,246,,,,,
|
||||||
242,474,2,,,,,301,,,,,,,
|
242,474,2,,,,,301,,,,,,,
|
||||||
243,475,3,109,,male,,,,,,,,,
|
243,475,3,109,,2,,,,,,,,,
|
||||||
244,476,1,,,,10,,,,,,,,
|
244,476,1,,,,10,,,,,,,,
|
||||||
245,477,2,,,,,302,,,,,,,
|
245,477,2,,,,,302,,,,,,,
|
||||||
246,478,3,109,,female,,,,,,,,,
|
246,478,3,109,,1,,,,,,,,,
|
||||||
247,496,1,,17,,,,,,,,,,
|
247,496,1,,17,,,,,,,,,,
|
||||||
248,497,1,,36,,,,,,,,,,
|
248,497,1,,36,,,,,,,,,,
|
||||||
249,499,1,,17,,,,,,,,,,
|
249,499,1,,17,,,,,,,,,,
|
||||||
|
|
|
|
@ -252,8 +252,8 @@ class ConquestPokemonEvolution(TableBase):
|
||||||
info=dict(description=u"The minimum link percentage the Pokémon must have with its warrior."))
|
info=dict(description=u"The minimum link percentage the Pokémon must have with its warrior."))
|
||||||
kingdom_id = Column(Integer, ForeignKey('conquest_kingdoms.id'), nullable=True,
|
kingdom_id = Column(Integer, ForeignKey('conquest_kingdoms.id'), nullable=True,
|
||||||
info=dict(description=u"The ID of the kingdom in which this Pokémon must complete an action after meeting all other requirements."))
|
info=dict(description=u"The ID of the kingdom in which this Pokémon must complete an action after meeting all other requirements."))
|
||||||
warrior_gender = Column(Enum('male', 'female', name='conquest_warrior_gender'), nullable=True,
|
warrior_gender_id = Column(Integer, ForeignKey('genders.id'), nullable=True,
|
||||||
info=dict(description=u"The required gender for the Pokémon's warrior."))
|
info=dict(description=u"The ID of the gender the Pokémon's warrior must be."))
|
||||||
item_id = Column(Integer, ForeignKey('items.id'), nullable=True,
|
item_id = Column(Integer, ForeignKey('items.id'), nullable=True,
|
||||||
info=dict(description=u"The ID of the item the Pokémon's warrior must have equipped."))
|
info=dict(description=u"The ID of the item the Pokémon's warrior must have equipped."))
|
||||||
recruiting_ko_required = Column(Boolean, nullable=False, server_default='False',
|
recruiting_ko_required = Column(Boolean, nullable=False, server_default='False',
|
||||||
|
@ -480,6 +480,16 @@ class Experience(TableBase):
|
||||||
experience = Column(Integer, nullable=False,
|
experience = Column(Integer, nullable=False,
|
||||||
info=dict(description="The number of EXP points needed to get to that level"))
|
info=dict(description="The number of EXP points needed to get to that level"))
|
||||||
|
|
||||||
|
class Gender(TableBase):
|
||||||
|
u"""A gender.
|
||||||
|
"""
|
||||||
|
__tablename__ = 'genders'
|
||||||
|
__singlename__ = 'gender'
|
||||||
|
id = Column(Integer, primary_key=True, nullable=False, autoincrement=True,
|
||||||
|
info=dict(description='An ID for this gender.'))
|
||||||
|
identifier = Column(Unicode(10), nullable=False,
|
||||||
|
info=dict(description='A readable identifier for this gender.'))
|
||||||
|
|
||||||
class Generation(TableBase):
|
class Generation(TableBase):
|
||||||
u"""A Generation of the Pokémon franchise
|
u"""A Generation of the Pokémon franchise
|
||||||
"""
|
"""
|
||||||
|
@ -1268,8 +1278,8 @@ class PokemonEvolution(TableBase):
|
||||||
info=dict(description=u"The ID of the item that must be used on the Pokémon."))
|
info=dict(description=u"The ID of the item that must be used on the Pokémon."))
|
||||||
minimum_level = Column(Integer, nullable=True,
|
minimum_level = Column(Integer, nullable=True,
|
||||||
info=dict(description=u"The minimum level for the Pokémon."))
|
info=dict(description=u"The minimum level for the Pokémon."))
|
||||||
gender = Column(Enum('male', 'female', name='pokemon_evolution_gender'), nullable=True,
|
gender_id = Column(Integer, ForeignKey('genders.id'), nullable=True,
|
||||||
info=dict(description=u"The Pokémon's required gender, or None if gender doesn't matter"))
|
info=dict(description=u"The ID of the Pokémon's required gender, or None if gender doesn't matter"))
|
||||||
location_id = Column(Integer, ForeignKey('locations.id'), nullable=True,
|
location_id = Column(Integer, ForeignKey('locations.id'), nullable=True,
|
||||||
info=dict(description=u"The ID of the location the evolution must be triggered at."))
|
info=dict(description=u"The ID of the location the evolution must be triggered at."))
|
||||||
held_item_id = Column(Integer, ForeignKey('items.id'), nullable=True,
|
held_item_id = Column(Integer, ForeignKey('items.id'), nullable=True,
|
||||||
|
@ -2070,6 +2080,8 @@ PokemonEvolution.party_species = relationship(PokemonSpecies,
|
||||||
backref='triggered_evolutions')
|
backref='triggered_evolutions')
|
||||||
PokemonEvolution.trade_species = relationship(PokemonSpecies,
|
PokemonEvolution.trade_species = relationship(PokemonSpecies,
|
||||||
primaryjoin=PokemonEvolution.trade_species_id==PokemonSpecies.id)
|
primaryjoin=PokemonEvolution.trade_species_id==PokemonSpecies.id)
|
||||||
|
PokemonEvolution.gender = relationship(Gender,
|
||||||
|
backref='required_for_evolutions')
|
||||||
|
|
||||||
PokemonForm.pokemon = relationship(Pokemon,
|
PokemonForm.pokemon = relationship(Pokemon,
|
||||||
primaryjoin=PokemonForm.pokemon_id==Pokemon.id,
|
primaryjoin=PokemonForm.pokemon_id==Pokemon.id,
|
||||||
|
|
Loading…
Reference in a new issue