diff --git a/pokedex/data/csv/conquest_pokemon_evolution.csv b/pokedex/data/csv/conquest_pokemon_evolution.csv index 09d8fef..47b1f3c 100644 --- a/pokedex/data/csv/conquest_pokemon_evolution.csv +++ b/pokedex/data/csv/conquest_pokemon_evolution.csv @@ -6,8 +6,8 @@ evolved_species_id,required_stat_id,minimum_stat,minimum_link,kingdom_id,warrior 26,,,,,,83,0 39,,,50,,,,0 40,,,,,,81,0 -42,6,55,,,,,0 -53,6,96,,,,,0 +42,4,55,,,,,0 +53,4,96,,,,,0 64,2,83,,,,,0 65,,,55,,,,1 67,2,86,,,,,0 @@ -33,8 +33,8 @@ evolved_species_id,required_stat_id,minimum_stat,minimum_link,kingdom_id,warrior 212,,,,,,210,1 247,2,74,,,,,0 248,2,132,,,,,0 -253,6,58,,,,,0 -254,6,118,,,,,0 +253,4,58,,,,,0 +254,4,118,,,,,0 281,2,44,,,,,0 282,2,75,,,,,0 305,3,83,,,,,0 @@ -47,11 +47,11 @@ evolved_species_id,required_stat_id,minimum_stat,minimum_link,kingdom_id,warrior 365,1,195,,,,,0 375,3,64,,,,,0 376,2,111,,,,,0 -391,6,48,,,,,0 -392,6,102,,,,,0 +391,4,48,,,,,0 +392,4,102,,,,,0 394,2,51,,,,,0 395,2,102,,,,,0 -397,6,48,,,,,0 +397,4,48,,,,,0 398,2,92,,,,,0 400,2,39,,,,,0 404,2,35,,,,,0 @@ -64,15 +64,15 @@ evolved_species_id,required_stat_id,minimum_stat,minimum_link,kingdom_id,warrior 448,,,50,,,,0 452,3,90,,,,,0 454,2,81,,,,,0 -461,6,175,,,,303,0 +461,4,175,,,,303,0 464,,,,,,298,1 470,3,94,,5,,,0 471,2,91,,6,,,0 475,,,,,2,109,0 477,,,,,,302,1 478,,,,,1,109,0 -496,6,54,,,,,0 -497,6,104,,,,,0 +496,4,54,,,,,0 +497,4,104,,,,,0 499,2,41,,,,,0 500,2,115,,,,,0 502,2,54,,,,,0 @@ -81,7 +81,7 @@ evolved_species_id,required_stat_id,minimum_stat,minimum_link,kingdom_id,warrior 514,,,,,,82,0 516,,,,,,84,0 518,,,,,,81,0 -523,6,81,,,,,0 +523,4,81,,,,,0 525,3,59,,,,,0 526,,,60,,,,1 530,2,97,,,,,0 @@ -90,7 +90,7 @@ evolved_species_id,required_stat_id,minimum_stat,minimum_link,kingdom_id,warrior 541,3,60,,,,,0 542,,,65,,,,0 544,3,50,,,,,0 -545,6,57,,,,,0 +545,4,57,,,,,0 547,,,,,,80,0 549,,,,,,80,0 552,2,80,,,,,0 @@ -101,7 +101,7 @@ evolved_species_id,required_stat_id,minimum_stat,minimum_link,kingdom_id,warrior 573,,,,,,107,0 575,3,70,,,,,0 576,3,106,,,,,0 -596,6,84,,,,,0 +596,4,84,,,,,0 608,2,84,,,,,0 609,,,,,,108,0 611,2,113,,,,,0 diff --git a/pokedex/data/csv/conquest_stat_names.csv b/pokedex/data/csv/conquest_stat_names.csv new file mode 100644 index 0000000..6d24bd1 --- /dev/null +++ b/pokedex/data/csv/conquest_stat_names.csv @@ -0,0 +1,7 @@ +conquest_stat_id,local_language_id,name +1,9,HP +2,9,Attack +3,9,Defense +4,9,Speed +5,9,Range +6,9,Energy diff --git a/pokedex/data/csv/conquest_stats.csv b/pokedex/data/csv/conquest_stats.csv new file mode 100644 index 0000000..45a7397 --- /dev/null +++ b/pokedex/data/csv/conquest_stats.csv @@ -0,0 +1,7 @@ +id,identifier,is_base +1,hp,1 +2,attack,1 +3,defense,1 +4,speed,1 +5,range,0 +6,energy,0 diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 1b843ef..91c778b 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -256,7 +256,7 @@ class ConquestPokemonEvolution(TableBase): __tablename__ = 'conquest_pokemon_evolution' evolved_species_id = Column(Integer, ForeignKey('pokemon_species.id'), primary_key=True, nullable=False, info=dict(description=u"The ID of the post-evolution species.")) - required_stat_id = Column(Integer, ForeignKey('stats.id'), nullable=True, + required_stat_id = Column(Integer, ForeignKey('conquest_stats.id'), nullable=True, info=dict(description=u"The ID of the stat which minimum_stat applies to.")) minimum_stat = Column(Integer, nullable=True, info=dict(description=u"The minimum value the Pokémon must have in a particular stat.")) @@ -271,6 +271,24 @@ class ConquestPokemonEvolution(TableBase): recruiting_ko_required = Column(Boolean, nullable=False, server_default='False', info=dict(description=u"If true, the Pokémon must KO a Pokémon under the right conditions to recruit that Pokémon's warrior.")) +class ConquestStat(TableBase): + u"""A stat for Pokémon in Pokémon Conquest. + """ + __tablename__ = 'conquest_stats' + __singlename__ = 'conquest_stat' + id = Column(Integer, primary_key=True, autoincrement=True, + info=dict(desription=u'An ID for this stat.')) + identifier = Column(Unicode(7), nullable=False, + info=dict(description=u'A readable identifier for this stat.', format='identifier')) + is_base = Column(Boolean, nullable=False, + info=dict(description=u'True iff this is one of the main stats, calculated for individual Pokémon.')) + +create_translation_table('conquest_stat_names', ConquestStat, 'names', + relation_lazy='joined', + name=Column(Unicode(10), nullable=False, index=True, + info=dict(description='The name.', format='plaintext', official=True)) +) + class ConquestWarrior(TableBase): u"""A warrior in Pokémon Conquest. """