Turn gender into a table.

This commit is contained in:
Lynn "Zhorken" Vaughan 2012-07-23 20:40:49 -04:00
parent 543419afcd
commit cd4dfcf4f4
4 changed files with 29 additions and 13 deletions

View file

@ -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

1 evolved_species_id required_stat_id minimum_stat minimum_link kingdom_id warrior_gender warrior_gender_id item_id recruiting_ko_required
2 5 2 50 0
3 6 2 83 0
4 24 2 59 0
68 464 298 1
69 470 3 94 5 0
70 471 2 91 6 0
71 475 male 2 109 0
72 477 302 1
73 478 female 1 109 0
74 496 6 54 0
75 497 6 104 0
76 499 2 41 0

View file

@ -0,0 +1,4 @@
id,identifier
1,female
2,male
3,genderless
1 id identifier
2 1 female
3 2 male
4 3 genderless

View file

@ -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,,,,,,,,,,

1 id evolved_species_id evolution_trigger_id trigger_item_id minimum_level gender 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
2 1 2 1 16
3 2 3 1 32
4 3 5 1 16
205 204 407 3 107
206 205 409 1 30
207 206 411 1 30
208 207 413 1 20 female 1
209 208 414 1 20 male 2
210 209 416 1 21 female 1
211 210 419 1 26
212 211 421 1 25
213 212 423 1 30
241 240 472 1 304 night
242 241 473 1 246
243 242 474 2 301
244 243 475 3 109 male 2
245 244 476 1 10
246 245 477 2 302
247 246 478 3 109 female 1
248 247 496 1 17
249 248 497 1 36
250 249 499 1 17

View file

@ -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,