mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Added natures table.
This commit is contained in:
parent
df59b538d7
commit
b367e70b49
2 changed files with 38 additions and 0 deletions
26
pokedex/data/csv/natures.csv
Normal file
26
pokedex/data/csv/natures.csv
Normal 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
|
|
|
@ -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__,
|
||||
|
|
Loading…
Reference in a new issue