Added natures table.

This commit is contained in:
Eevee 2010-03-22 22:29:28 -07:00
parent df59b538d7
commit b367e70b49
2 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,26 @@
id,name,decreased_stat_id,increased_stat_id
1,Hardy,2,2
2,Bold,2,3
3,Modest,2,4
4,Calm,2,5
5,Timid,2,6
6,Lonely,3,2
7,Docile,3,3
8,Mild,3,4
9,Gentle,3,5
10,Hasty,3,6
11,Adamant,4,2
12,Impish,4,3
13,Bashful,4,4
14,Careful,4,5
15,Rash,4,5
16,Jolly,4,6
17,Naughty,5,2
18,Lax,5,3
19,Quirky,5,5
20,Naive,5,6
21,Brave,6,2
22,Relaxed,6,3
23,Quiet,6,4
24,Sassy,6,5
25,Serious,6,6
1 id name decreased_stat_id increased_stat_id
2 1 Hardy 2 2
3 2 Bold 2 3
4 3 Modest 2 4
5 4 Calm 2 5
6 5 Timid 2 6
7 6 Lonely 3 2
8 7 Docile 3 3
9 8 Mild 3 4
10 9 Gentle 3 5
11 10 Hasty 3 6
12 11 Adamant 4 2
13 12 Impish 4 3
14 13 Bashful 4 4
15 14 Careful 4 5
16 15 Rash 4 5
17 16 Jolly 4 6
18 17 Naughty 5 2
19 18 Lax 5 3
20 19 Quirky 5 5
21 20 Naive 5 6
22 21 Brave 6 2
23 22 Relaxed 6 3
24 23 Quiet 6 4
25 24 Sassy 6 5
26 25 Serious 6 6

View file

@ -265,6 +265,13 @@ class Move(TableBase):
contest_effect_id = Column(Integer, ForeignKey('contest_effects.id'), nullable=True)
super_contest_effect_id = Column(Integer, ForeignKey('super_contest_effects.id'), nullable=False)
class Nature(TableBase):
__tablename__ = 'natures'
id = Column(Integer, primary_key=True, nullable=False)
name = Column(Unicode(8), nullable=False)
decreased_stat_id = Column(Integer, ForeignKey('stats.id'), nullable=False)
increased_stat_id = Column(Integer, ForeignKey('stats.id'), nullable=False)
class Pokedex(TableBase):
__tablename__ = 'pokedexes'
id = Column(Integer, primary_key=True, nullable=False)
@ -556,6 +563,11 @@ MoveFlavorText.generation = relation(Generation)
MoveName.language = relation(Language)
Nature.decreased_stat = relation(Stat, primaryjoin=Nature.decreased_stat_id==Stat.id,
backref='decreasing_natures')
Nature.increased_stat = relation(Stat, primaryjoin=Nature.increased_stat_id==Stat.id,
backref='increasing_natures')
Pokedex.version_groups = relation(VersionGroup, secondary=PokedexVersionGroup.__table__)
Pokemon.abilities = relation(Ability, secondary=PokemonAbility.__table__,