mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Added encounter data for Diamond, Pearl, and Platinum.
Finally! Location order is the same as from the old dex, which was something like the game but ultimately arbitrary, so it's not any better now. This takes a very different approach to storage, rather than copying the game exactly and trying to fix everything in code. Comments coming shortly so other people can actually make use of this.
This commit is contained in:
parent
afa6c061b6
commit
9f6f210fa5
8 changed files with 11015 additions and 0 deletions
5
pokedex/data/csv/encounter_condition_groups.csv
Normal file
5
pokedex/data/csv/encounter_condition_groups.csv
Normal file
|
@ -0,0 +1,5 @@
|
|||
id,name
|
||||
4,Gen 3 game in slot 2
|
||||
3,PokéRadar
|
||||
2,Time of day
|
||||
1,Swarm
|
|
11
pokedex/data/csv/encounter_conditions.csv
Normal file
11
pokedex/data/csv/encounter_conditions.csv
Normal file
|
@ -0,0 +1,11 @@
|
|||
id,encounter_condition_group_id,name
|
||||
1,1,During a swarm
|
||||
10,4,Leaf Green
|
||||
9,4,Fire Red
|
||||
8,4,Emerald
|
||||
7,4,Sapphire
|
||||
6,4,Ruby
|
||||
5,3,Using PokéRadar
|
||||
4,2,Night
|
||||
3,2,Day
|
||||
2,2,Morning
|
|
27
pokedex/data/csv/encounter_type_slots.csv
Normal file
27
pokedex/data/csv/encounter_type_slots.csv
Normal file
|
@ -0,0 +1,27 @@
|
|||
id,encounter_type_id,encounter_condition_group_id,rarity
|
||||
1,1,1,20
|
||||
2,1,2,10
|
||||
3,1,,10
|
||||
5,1,4,4
|
||||
6,1,3,1
|
||||
4,1,3,5
|
||||
26,5,,1
|
||||
25,5,,4
|
||||
24,5,,5
|
||||
23,5,,30
|
||||
22,5,,60
|
||||
21,4,,1
|
||||
20,4,,4
|
||||
19,4,,5
|
||||
18,4,,30
|
||||
17,4,,60
|
||||
16,3,,1
|
||||
15,3,,4
|
||||
14,3,,5
|
||||
13,3,,30
|
||||
12,3,,60
|
||||
11,2,,1
|
||||
10,2,,4
|
||||
9,2,,5
|
||||
8,2,,30
|
||||
7,2,,60
|
|
6
pokedex/data/csv/encounter_types.csv
Normal file
6
pokedex/data/csv/encounter_types.csv
Normal file
|
@ -0,0 +1,6 @@
|
|||
id,name
|
||||
1,Walking in grass/caves
|
||||
2,Surfing
|
||||
3,Fishing with Old Rod
|
||||
4,Fishing with Good Rod
|
||||
5,Fishing with Super Rod
|
|
10679
pokedex/data/csv/encounters.csv
Normal file
10679
pokedex/data/csv/encounters.csv
Normal file
File diff suppressed because it is too large
Load diff
142
pokedex/data/csv/location_areas.csv
Normal file
142
pokedex/data/csv/location_areas.csv
Normal file
|
@ -0,0 +1,142 @@
|
|||
id,location_id,internal_id,name
|
||||
1,1,0,1F
|
||||
2,1,0,2F
|
||||
3,1,0,B1F a
|
||||
4,1,0,B1F b
|
||||
5,1,0,B1F c
|
||||
6,1,0,B2F a
|
||||
7,1,0,B2F b
|
||||
8,1,0,B2F c
|
||||
9,1,0,B3F a
|
||||
10,1,0,B3F b
|
||||
11,1,0,B3F c
|
||||
12,1,0,B3F d
|
||||
13,1,0,B3F e
|
||||
14,1,0,B4F a
|
||||
15,1,0,B4F b
|
||||
16,1,0,B4F c
|
||||
17,1,0,B4F d
|
||||
18,1,0,B5F
|
||||
19,2,0,
|
||||
20,3,0,
|
||||
21,4,0,
|
||||
22,5,0,
|
||||
23,5,0,entrance
|
||||
24,5,0,inside
|
||||
25,6,0,
|
||||
26,7,0,1F
|
||||
27,7,0,B1F
|
||||
28,7,0,B2F
|
||||
29,7,0,B3F
|
||||
30,7,0,B4F
|
||||
31,7,0,B5F
|
||||
32,8,0,1F
|
||||
33,8,0,B1F
|
||||
34,9,0,1F
|
||||
35,9,0,B1F
|
||||
36,10,0,1F
|
||||
37,10,0,B1F
|
||||
38,11,0,1F
|
||||
39,11,0,2F
|
||||
40,11,0,3F
|
||||
41,11,0,4F
|
||||
42,11,0,5F
|
||||
43,12,0,
|
||||
44,13,0,
|
||||
45,14,0,
|
||||
46,15,0,
|
||||
47,16,0,
|
||||
48,17,0,High-level (rooms 16-21)
|
||||
49,17,0,Low-level (rooms 4-9)
|
||||
50,17,0,Mid-level (most rooms)
|
||||
51,18,0,
|
||||
52,19,0,
|
||||
53,20,0,
|
||||
54,21,0,Floaroma City side
|
||||
55,21,0,Jubilife City side
|
||||
56,22,0,Eterna City side
|
||||
57,22,0,Floaroma City side
|
||||
58,23,0,
|
||||
59,24,0,
|
||||
60,25,0,
|
||||
61,26,0,
|
||||
62,27,0,Celestic City side
|
||||
63,27,0,Solaceon City side
|
||||
64,28,0,Celestic City side
|
||||
65,28,0,Eterna City side
|
||||
66,29,0,Hearthome City side
|
||||
67,29,0,Pastoria City side
|
||||
68,30,0,
|
||||
69,31,0,
|
||||
70,32,0,
|
||||
71,33,0,
|
||||
72,34,0,
|
||||
73,35,0,
|
||||
74,36,0,
|
||||
75,37,0,
|
||||
76,38,0,
|
||||
77,39,0,
|
||||
78,40,0,
|
||||
79,41,0,
|
||||
80,42,0,
|
||||
81,43,0,
|
||||
82,44,0,Area 1
|
||||
83,44,0,Area 2
|
||||
84,44,0,Area 3
|
||||
85,44,0,Area 4
|
||||
86,44,0,Area 5
|
||||
87,44,0,Area 6
|
||||
88,45,0,
|
||||
89,46,0,
|
||||
90,47,0,
|
||||
91,48,0,
|
||||
92,49,0,
|
||||
93,50,0,2F
|
||||
94,50,0,3F
|
||||
95,50,0,4F
|
||||
96,50,0,5F
|
||||
97,50,0,6F
|
||||
98,50,0,7F
|
||||
99,50,0,B1F
|
||||
100,50,0,blizzard
|
||||
101,50,0,cave
|
||||
102,50,0,Route 207
|
||||
103,50,0,Route 211
|
||||
104,50,0,Route 216
|
||||
105,50,0,snowfall
|
||||
106,51,0,1F
|
||||
107,51,0,2F
|
||||
108,51,0,B1F
|
||||
109,51,0,inside
|
||||
110,51,0,inside B1F
|
||||
111,51,0,inside exit
|
||||
112,52,0,
|
||||
113,53,0,
|
||||
114,54,0,
|
||||
115,54,0,expansion
|
||||
116,55,0,
|
||||
117,55,0,1F
|
||||
118,55,0,B1F left
|
||||
119,55,0,B1F right
|
||||
120,55,0,B2F left
|
||||
121,55,0,B2F right
|
||||
122,55,0,B3F
|
||||
123,56,0,
|
||||
124,57,0,2F
|
||||
125,57,0,2F left room
|
||||
126,57,0,2F leftmost room
|
||||
127,57,0,2F middle room
|
||||
128,57,0,2F private room
|
||||
129,57,0,2F right room
|
||||
130,57,0,2F rightmost room
|
||||
131,57,0,dining room
|
||||
132,57,0,entrance
|
||||
133,58,0,
|
||||
134,59,0,
|
||||
135,60,0,
|
||||
136,61,0,
|
||||
137,62,0,
|
||||
138,63,0,after
|
||||
139,63,0,before
|
||||
140,78,0,
|
||||
141,17,0,"Mid-level (rooms 1, 10-15)"
|
|
81
pokedex/data/csv/locations.csv
Normal file
81
pokedex/data/csv/locations.csv
Normal file
|
@ -0,0 +1,81 @@
|
|||
id,generation_id,name
|
||||
1,4,Solaceon Ruins
|
||||
2,4,Twinleaf Town
|
||||
3,4,Pastoria City
|
||||
4,4,Eterna Forest
|
||||
5,4,Stark Mountain
|
||||
6,4,Celestic Town
|
||||
7,4,Snowpoint Temple
|
||||
8,4,Oreburgh Mine
|
||||
9,4,Oreburgh Gate
|
||||
10,4,Wayward Cave
|
||||
11,4,Lost Tower
|
||||
12,4,Eterna City
|
||||
13,4,Pokemon League
|
||||
14,4,Sunyshore City
|
||||
15,4,Valley Windworks
|
||||
16,4,Resort Area
|
||||
17,4,Turnback Cave
|
||||
18,4,Route 201
|
||||
19,4,Route 202
|
||||
20,4,Route 203
|
||||
21,4,Route 204
|
||||
22,4,Route 205
|
||||
23,4,Route 206
|
||||
24,4,Route 207
|
||||
25,4,Route 208
|
||||
26,4,Route 209
|
||||
27,4,Route 210
|
||||
28,4,Route 211
|
||||
29,4,Route 212
|
||||
30,4,Route 213
|
||||
31,4,Route 214
|
||||
32,4,Route 215
|
||||
33,4,Route 216
|
||||
34,4,Route 217
|
||||
35,4,Route 218
|
||||
36,4,Route 219
|
||||
37,4,Route 221
|
||||
38,4,Route 222
|
||||
39,4,Route 224
|
||||
40,4,Route 225
|
||||
41,4,Route 227
|
||||
42,4,Route 228
|
||||
43,4,Route 229
|
||||
44,4,Safari Zone
|
||||
45,4,Route 220
|
||||
46,4,Route 223
|
||||
47,4,Route 226
|
||||
48,4,Route 230
|
||||
49,4,Fuego Ironworks
|
||||
50,4,Mt. Coronet
|
||||
51,4,Victory Road
|
||||
52,4,Ravaged Path
|
||||
53,4,Lake Acuity
|
||||
54,4,Ruins Maniac Cave
|
||||
55,4,Iron Island
|
||||
56,4,Ruins Maniac Tunnel
|
||||
57,4,Old Chateau
|
||||
58,4,Acuity Lakefront
|
||||
59,4,Valor Lakefront
|
||||
60,4,Spring Path
|
||||
61,4,Pokemon Mansion
|
||||
62,4,Lake Valor
|
||||
63,4,Lake Verity
|
||||
64,4,Sandgem Town
|
||||
65,4,Sandgem
|
||||
66,4,Jubilife City
|
||||
67,4,Oreburgh City
|
||||
68,4,Floaroma Town
|
||||
69,4,Hearthome City
|
||||
70,4,Snowpoint City
|
||||
71,4,Solaceon Town
|
||||
72,4,Fight Area
|
||||
73,4,Survival Area
|
||||
74,4,Fullmoon Island
|
||||
75,4,Newmoon Island
|
||||
76,4,Veilstone City
|
||||
77,4,Battle Tower
|
||||
78,4,Canalave City
|
||||
79,4,Event Route
|
||||
80,4,Flower Paradise
|
|
|
@ -27,6 +27,40 @@ class EggGroup(TableBase):
|
|||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
name = Column(Unicode(16), nullable=False)
|
||||
|
||||
class Encounter(TableBase):
|
||||
__tablename__ = 'encounters'
|
||||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
version_id = Column(Integer, ForeignKey('versions.id'), nullable=False, autoincrement=False)
|
||||
location_area_id = Column(Integer, ForeignKey('location_areas.id'), nullable=False, autoincrement=False)
|
||||
encounter_type_slot_id = Column(Integer, ForeignKey('encounter_type_slots.id'), nullable=False, autoincrement=False)
|
||||
encounter_condition_id = Column(Integer, ForeignKey('encounter_conditions.id'), nullable=True, autoincrement=False)
|
||||
pokemon_id = Column(Integer, ForeignKey('pokemon.id'), nullable=False, autoincrement=False)
|
||||
min_level = Column(Integer, nullable=False, autoincrement=False)
|
||||
max_level = Column(Integer, nullable=False, autoincrement=False)
|
||||
|
||||
class EncounterCondition(TableBase):
|
||||
__tablename__ = 'encounter_conditions'
|
||||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
encounter_condition_group_id = Column(Integer, ForeignKey('encounter_condition_groups.id'), primary_key=False, nullable=False, autoincrement=False)
|
||||
name = Column(Unicode(64), nullable=False)
|
||||
|
||||
class EncounterConditionGroup(TableBase):
|
||||
__tablename__ = 'encounter_condition_groups'
|
||||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
name = Column(Unicode(64), nullable=False)
|
||||
|
||||
class EncounterType(TableBase):
|
||||
__tablename__ = 'encounter_types'
|
||||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
name = Column(Unicode(64), nullable=False)
|
||||
|
||||
class EncounterTypeSlot(TableBase):
|
||||
__tablename__ = 'encounter_type_slots'
|
||||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
encounter_type_id = Column(Integer, ForeignKey('encounter_types.id'), primary_key=False, nullable=False, autoincrement=False)
|
||||
encounter_condition_group_id = Column(Integer, ForeignKey('encounter_condition_groups.id'), primary_key=False, nullable=True, autoincrement=False)
|
||||
rarity = Column(Integer, nullable=False, autoincrement=False)
|
||||
|
||||
class EvolutionChain(TableBase):
|
||||
__tablename__ = 'evolution_chains'
|
||||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
|
@ -57,6 +91,19 @@ class Language(TableBase):
|
|||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
name = Column(Unicode(16), nullable=False)
|
||||
|
||||
class Location(TableBase):
|
||||
__tablename__ = 'locations'
|
||||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
generation_id = Column(Integer, ForeignKey('generations.id'), nullable=False)
|
||||
name = Column(Unicode(64), nullable=False)
|
||||
|
||||
class LocationArea(TableBase):
|
||||
__tablename__ = 'location_areas'
|
||||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
location_id = Column(Integer, ForeignKey('locations.id'), nullable=False)
|
||||
internal_id = Column(Integer, nullable=False)
|
||||
name = Column(Unicode(64), nullable=True)
|
||||
|
||||
class MoveEffect(TableBase):
|
||||
__tablename__ = 'move_effects'
|
||||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
|
@ -190,7 +237,21 @@ class Version(TableBase):
|
|||
|
||||
|
||||
### Relations down here, to avoid ordering problems
|
||||
Encounter.pokemon = relation(Pokemon, backref='encounters')
|
||||
Encounter.version = relation(Version, backref='encounters')
|
||||
Encounter.location_area = relation(LocationArea, backref='encounters')
|
||||
Encounter.slot = relation(EncounterTypeSlot, backref='encounters')
|
||||
Encounter.condition = relation(EncounterCondition, backref='encounters')
|
||||
|
||||
EncounterCondition.group = relation(EncounterConditionGroup,
|
||||
backref='conditions')
|
||||
|
||||
EncounterTypeSlot.type = relation(EncounterType, backref='slots')
|
||||
|
||||
EvolutionChain.growth_rate = relation(GrowthRate, backref='evolution_chains')
|
||||
|
||||
LocationArea.location = relation(Location, backref='areas')
|
||||
|
||||
Pokemon.abilities = relation(Ability, secondary=PokemonAbility.__table__,
|
||||
order_by=PokemonAbility.slot,
|
||||
backref='pokemon')
|
||||
|
@ -226,3 +287,6 @@ Type.target_efficacies = relation(TypeEfficacy,
|
|||
primaryjoin=Type.id
|
||||
==TypeEfficacy.target_type_id,
|
||||
backref='target_type')
|
||||
|
||||
Version.generation = relation(Generation, secondary=VersionGroup.__table__,
|
||||
backref='versions')
|
||||
|
|
Loading…
Reference in a new issue