Merge branch 'pal-park'

This commit is contained in:
Andrew Ekstedt 2012-06-02 00:52:58 -07:00
commit 50630ab376
5 changed files with 613 additions and 0 deletions

View file

@ -0,0 +1,494 @@
species_id,area_id,base_score,rate
1,2,50,30
2,2,80,10
3,2,90,3
4,2,50,30
5,2,80,10
6,2,90,3
7,4,50,30
8,4,80,10
9,4,90,3
10,1,30,50
11,1,50,30
12,1,70,20
13,1,30,50
14,1,50,30
15,1,70,20
16,2,30,50
17,2,50,30
18,2,70,20
19,2,30,50
20,2,50,30
21,2,30,50
22,2,50,30
23,1,30,50
24,1,50,30
25,1,80,10
26,1,90,3
27,3,50,30
28,3,70,20
29,2,30,50
30,2,50,30
31,2,70,20
32,2,30,50
33,2,50,30
34,2,70,20
35,3,80,10
36,3,90,3
37,2,70,20
38,2,80,10
39,2,80,10
40,2,90,3
41,3,30,50
42,3,50,30
43,1,30,50
44,1,50,30
45,1,70,20
46,1,30,50
47,1,50,30
48,1,30,50
49,1,50,30
50,3,30,50
51,3,50,30
52,2,50,30
53,2,70,20
54,4,50,30
55,4,70,20
56,3,50,30
57,3,70,20
58,2,70,20
59,2,80,10
60,4,50,30
61,4,80,10
62,4,90,3
63,2,50,30
64,2,80,10
65,2,90,3
66,3,50,30
67,3,80,10
68,3,90,3
69,1,30,50
70,1,50,30
71,1,70,20
72,5,30,50
73,5,50,30
74,3,30,50
75,3,50,30
76,3,70,20
77,2,50,30
78,2,70,20
79,4,50,30
80,4,70,20
81,3,50,30
82,3,70,20
83,2,70,20
84,2,50,30
85,2,70,20
86,5,50,30
87,5,70,20
88,2,50,30
89,2,70,20
90,5,50,30
91,5,70,20
92,1,50,30
93,1,80,10
94,1,90,3
95,3,80,10
96,1,50,30
97,1,70,20
98,5,50,30
99,5,70,20
100,2,50,30
101,2,70,20
102,1,50,30
103,1,70,20
104,3,50,30
105,3,70,20
106,3,80,10
107,3,80,10
108,2,70,20
109,3,50,30
110,3,70,20
111,3,50,30
112,3,70,20
113,2,90,3
114,1,50,30
115,2,70,20
116,5,50,30
117,5,70,20
118,4,50,30
119,4,70,20
120,5,50,30
121,5,70,20
122,2,70,20
123,2,70,20
124,2,70,20
125,3,70,20
126,3,70,20
127,1,70,20
128,2,70,20
129,4,30,50
130,4,90,3
131,5,90,3
132,2,70,20
133,2,90,3
134,2,90,3
135,2,90,3
136,2,90,3
137,2,80,10
138,5,50,30
139,5,70,20
140,5,50,30
141,5,70,20
142,3,70,20
143,2,80,10
144,3,90,3
145,3,90,3
146,3,90,3
147,4,70,20
148,4,80,10
149,3,90,3
150,2,90,3
151,1,100,1
152,2,50,30
153,2,80,10
154,2,90,3
155,2,50,30
156,2,80,10
157,2,90,3
158,4,50,30
159,4,80,10
160,3,90,3
161,2,30,50
162,2,50,30
163,1,30,50
164,1,50,30
165,2,30,50
166,2,50,30
167,2,30,50
168,2,50,30
169,3,90,3
170,5,50,30
171,5,70,20
172,2,80,10
173,2,80,10
174,2,80,10
175,2,80,10
176,2,90,3
177,1,50,30
178,1,70,20
179,2,50,30
180,2,70,20
181,2,80,10
182,1,80,10
183,4,50,30
184,4,70,20
185,3,70,20
186,4,80,10
187,2,50,30
188,2,70,20
189,2,80,10
190,1,70,20
191,2,50,30
192,2,70,20
193,2,80,10
194,4,50,30
195,4,70,20
196,2,90,3
197,2,90,3
198,1,70,20
199,4,80,10
200,1,70,20
201,1,70,20
202,2,80,10
203,2,70,20
204,1,50,30
205,1,70,20
206,1,90,3
207,3,50,30
208,3,90,3
209,2,50,30
210,2,70,20
211,5,80,10
212,2,90,3
213,5,80,10
214,1,80,10
215,3,50,30
216,1,50,30
217,1,70,20
218,3,50,30
219,3,70,20
220,3,50,30
221,3,70,20
222,5,70,20
223,5,50,30
224,5,70,20
225,3,70,20
226,5,70,20
227,3,70,20
228,3,50,30
229,3,70,20
230,5,80,10
231,3,50,30
232,3,70,20
233,2,80,10
234,2,50,30
235,2,80,10
236,3,80,10
237,3,80,10
238,2,80,10
239,3,80,10
240,3,80,10
241,2,70,20
242,2,90,3
243,3,90,3
244,3,90,3
245,3,90,3
246,3,70,20
247,3,80,10
248,3,90,3
249,3,90,3
250,3,90,3
251,1,100,1
252,1,50,30
253,1,80,10
254,1,90,3
255,2,50,30
256,2,80,10
257,2,90,3
258,4,50,30
259,4,80,10
260,4,90,3
261,2,30,50
262,2,50,30
263,2,30,50
264,2,50,30
265,1,30,50
266,1,50,30
267,1,70,20
268,1,50,30
269,1,70,20
270,4,30,50
271,4,50,30
272,4,80,10
273,1,30,50
274,1,50,30
275,1,80,10
276,2,30,50
277,2,50,30
278,5,30,50
279,5,50,30
280,2,50,30
281,2,70,20
282,2,80,10
283,4,50,30
284,4,70,20
285,1,50,30
286,1,70,20
287,1,50,30
288,1,70,20
289,1,80,10
290,1,50,30
291,1,70,20
292,1,80,10
293,3,50,30
294,3,70,20
295,3,80,10
296,3,50,30
297,3,70,20
298,4,80,10
299,3,70,20
300,2,50,30
301,2,70,20
302,3,70,20
303,3,70,20
304,3,50,30
305,3,70,20
306,3,80,10
307,3,50,30
308,3,70,20
309,2,50,30
310,2,70,20
311,2,90,3
312,2,90,3
313,3,70,20
314,3,70,20
315,2,70,20
316,1,50,30
317,1,70,20
318,5,50,30
319,5,70,20
320,5,50,30
321,5,80,10
322,3,50,30
323,3,70,20
324,3,70,20
325,2,50,30
326,2,70,20
327,2,50,30
328,3,50,30
329,3,70,20
330,3,80,10
331,3,50,30
332,3,70,20
333,2,50,30
334,2,80,10
335,2,70,20
336,1,70,20
337,3,70,20
338,3,70,20
339,4,50,30
340,4,70,20
341,4,50,30
342,4,70,20
343,3,50,30
344,3,70,20
345,5,70,20
346,5,80,10
347,5,70,20
348,5,80,10
349,5,70,20
350,5,90,3
351,2,80,10
352,1,70,20
353,1,50,30
354,1,70,20
355,1,50,30
356,1,70,20
357,1,70,20
358,3,80,10
359,3,80,10
360,2,80,10
361,3,50,30
362,3,70,20
363,5,50,30
364,5,70,20
365,5,80,10
366,5,50,30
367,5,80,10
368,5,80,10
369,5,80,10
370,5,50,30
371,3,50,30
372,3,70,20
373,3,80,10
374,3,70,20
375,3,80,10
376,3,90,3
377,3,90,3
378,3,90,3
379,3,90,3
380,2,90,3
381,2,90,3
382,5,90,3
383,3,90,3
384,2,90,3
385,3,100,1
386,3,100,1
387,1,50,30
388,1,80,10
389,1,90,3
390,2,50,30
391,2,80,10
392,2,90,3
393,4,50,30
394,4,80,10
395,4,90,3
396,2,30,50
397,2,50,30
398,2,70,20
399,2,30,50
400,2,50,30
401,1,50,30
402,1,70,20
403,2,50,30
404,2,70,20
405,2,80,10
406,2,80,10
407,2,80,10
408,3,70,20
409,3,80,10
410,3,70,20
411,3,80,10
412,1,50,30
413,1,70,20
414,1,70,20
415,1,50,30
416,1,70,20
417,1,50,30
418,1,70,20
419,3,70,20
420,3,80,10
421,2,90,3
422,5,50,30
423,5,70,20
424,4,50,30
425,4,70,20
426,1,80,10
427,2,50,30
428,2,70,20
429,1,80,10
430,1,80,10
431,2,50,30
432,2,70,20
433,2,70,20
434,3,80,10
435,3,50,30
436,3,70,20
437,3,80,10
438,2,90,3
439,2,90,3
440,2,50,30
441,2,70,20
442,2,80,10
443,3,50,30
444,3,70,20
445,4,50,30
446,4,70,20
447,2,70,20
448,2,50,30
449,2,70,20
450,5,80,10
451,5,50,30
452,5,70,20
453,1,90,3
454,3,50,30
455,3,70,20
456,3,80,10
457,3,90,3
458,3,90,3
459,3,50,30
460,3,70,20
461,3,80,10
462,3,80,10
463,2,80,10
464,3,80,10
465,1,80,10
466,3,80,10
467,3,80,10
468,2,80,10
469,2,80,10
470,2,90,3
471,2,90,3
472,3,80,10
473,3,80,10
474,2,80,10
475,2,80,10
476,3,80,10
477,1,80,10
478,3,80,10
479,2,90,3
480,2,90,3
481,2,90,3
482,2,90,3
483,3,90,3
484,3,90,3
485,3,90,3
486,3,90,3
487,3,90,3
488,1,90,3
489,5,90,3
490,5,100,1
491,3,100,1
492,2,100,1
493,3,100,1
1 species_id area_id base_score rate
2 1 2 50 30
3 2 2 80 10
4 3 2 90 3
5 4 2 50 30
6 5 2 80 10
7 6 2 90 3
8 7 4 50 30
9 8 4 80 10
10 9 4 90 3
11 10 1 30 50
12 11 1 50 30
13 12 1 70 20
14 13 1 30 50
15 14 1 50 30
16 15 1 70 20
17 16 2 30 50
18 17 2 50 30
19 18 2 70 20
20 19 2 30 50
21 20 2 50 30
22 21 2 30 50
23 22 2 50 30
24 23 1 30 50
25 24 1 50 30
26 25 1 80 10
27 26 1 90 3
28 27 3 50 30
29 28 3 70 20
30 29 2 30 50
31 30 2 50 30
32 31 2 70 20
33 32 2 30 50
34 33 2 50 30
35 34 2 70 20
36 35 3 80 10
37 36 3 90 3
38 37 2 70 20
39 38 2 80 10
40 39 2 80 10
41 40 2 90 3
42 41 3 30 50
43 42 3 50 30
44 43 1 30 50
45 44 1 50 30
46 45 1 70 20
47 46 1 30 50
48 47 1 50 30
49 48 1 30 50
50 49 1 50 30
51 50 3 30 50
52 51 3 50 30
53 52 2 50 30
54 53 2 70 20
55 54 4 50 30
56 55 4 70 20
57 56 3 50 30
58 57 3 70 20
59 58 2 70 20
60 59 2 80 10
61 60 4 50 30
62 61 4 80 10
63 62 4 90 3
64 63 2 50 30
65 64 2 80 10
66 65 2 90 3
67 66 3 50 30
68 67 3 80 10
69 68 3 90 3
70 69 1 30 50
71 70 1 50 30
72 71 1 70 20
73 72 5 30 50
74 73 5 50 30
75 74 3 30 50
76 75 3 50 30
77 76 3 70 20
78 77 2 50 30
79 78 2 70 20
80 79 4 50 30
81 80 4 70 20
82 81 3 50 30
83 82 3 70 20
84 83 2 70 20
85 84 2 50 30
86 85 2 70 20
87 86 5 50 30
88 87 5 70 20
89 88 2 50 30
90 89 2 70 20
91 90 5 50 30
92 91 5 70 20
93 92 1 50 30
94 93 1 80 10
95 94 1 90 3
96 95 3 80 10
97 96 1 50 30
98 97 1 70 20
99 98 5 50 30
100 99 5 70 20
101 100 2 50 30
102 101 2 70 20
103 102 1 50 30
104 103 1 70 20
105 104 3 50 30
106 105 3 70 20
107 106 3 80 10
108 107 3 80 10
109 108 2 70 20
110 109 3 50 30
111 110 3 70 20
112 111 3 50 30
113 112 3 70 20
114 113 2 90 3
115 114 1 50 30
116 115 2 70 20
117 116 5 50 30
118 117 5 70 20
119 118 4 50 30
120 119 4 70 20
121 120 5 50 30
122 121 5 70 20
123 122 2 70 20
124 123 2 70 20
125 124 2 70 20
126 125 3 70 20
127 126 3 70 20
128 127 1 70 20
129 128 2 70 20
130 129 4 30 50
131 130 4 90 3
132 131 5 90 3
133 132 2 70 20
134 133 2 90 3
135 134 2 90 3
136 135 2 90 3
137 136 2 90 3
138 137 2 80 10
139 138 5 50 30
140 139 5 70 20
141 140 5 50 30
142 141 5 70 20
143 142 3 70 20
144 143 2 80 10
145 144 3 90 3
146 145 3 90 3
147 146 3 90 3
148 147 4 70 20
149 148 4 80 10
150 149 3 90 3
151 150 2 90 3
152 151 1 100 1
153 152 2 50 30
154 153 2 80 10
155 154 2 90 3
156 155 2 50 30
157 156 2 80 10
158 157 2 90 3
159 158 4 50 30
160 159 4 80 10
161 160 3 90 3
162 161 2 30 50
163 162 2 50 30
164 163 1 30 50
165 164 1 50 30
166 165 2 30 50
167 166 2 50 30
168 167 2 30 50
169 168 2 50 30
170 169 3 90 3
171 170 5 50 30
172 171 5 70 20
173 172 2 80 10
174 173 2 80 10
175 174 2 80 10
176 175 2 80 10
177 176 2 90 3
178 177 1 50 30
179 178 1 70 20
180 179 2 50 30
181 180 2 70 20
182 181 2 80 10
183 182 1 80 10
184 183 4 50 30
185 184 4 70 20
186 185 3 70 20
187 186 4 80 10
188 187 2 50 30
189 188 2 70 20
190 189 2 80 10
191 190 1 70 20
192 191 2 50 30
193 192 2 70 20
194 193 2 80 10
195 194 4 50 30
196 195 4 70 20
197 196 2 90 3
198 197 2 90 3
199 198 1 70 20
200 199 4 80 10
201 200 1 70 20
202 201 1 70 20
203 202 2 80 10
204 203 2 70 20
205 204 1 50 30
206 205 1 70 20
207 206 1 90 3
208 207 3 50 30
209 208 3 90 3
210 209 2 50 30
211 210 2 70 20
212 211 5 80 10
213 212 2 90 3
214 213 5 80 10
215 214 1 80 10
216 215 3 50 30
217 216 1 50 30
218 217 1 70 20
219 218 3 50 30
220 219 3 70 20
221 220 3 50 30
222 221 3 70 20
223 222 5 70 20
224 223 5 50 30
225 224 5 70 20
226 225 3 70 20
227 226 5 70 20
228 227 3 70 20
229 228 3 50 30
230 229 3 70 20
231 230 5 80 10
232 231 3 50 30
233 232 3 70 20
234 233 2 80 10
235 234 2 50 30
236 235 2 80 10
237 236 3 80 10
238 237 3 80 10
239 238 2 80 10
240 239 3 80 10
241 240 3 80 10
242 241 2 70 20
243 242 2 90 3
244 243 3 90 3
245 244 3 90 3
246 245 3 90 3
247 246 3 70 20
248 247 3 80 10
249 248 3 90 3
250 249 3 90 3
251 250 3 90 3
252 251 1 100 1
253 252 1 50 30
254 253 1 80 10
255 254 1 90 3
256 255 2 50 30
257 256 2 80 10
258 257 2 90 3
259 258 4 50 30
260 259 4 80 10
261 260 4 90 3
262 261 2 30 50
263 262 2 50 30
264 263 2 30 50
265 264 2 50 30
266 265 1 30 50
267 266 1 50 30
268 267 1 70 20
269 268 1 50 30
270 269 1 70 20
271 270 4 30 50
272 271 4 50 30
273 272 4 80 10
274 273 1 30 50
275 274 1 50 30
276 275 1 80 10
277 276 2 30 50
278 277 2 50 30
279 278 5 30 50
280 279 5 50 30
281 280 2 50 30
282 281 2 70 20
283 282 2 80 10
284 283 4 50 30
285 284 4 70 20
286 285 1 50 30
287 286 1 70 20
288 287 1 50 30
289 288 1 70 20
290 289 1 80 10
291 290 1 50 30
292 291 1 70 20
293 292 1 80 10
294 293 3 50 30
295 294 3 70 20
296 295 3 80 10
297 296 3 50 30
298 297 3 70 20
299 298 4 80 10
300 299 3 70 20
301 300 2 50 30
302 301 2 70 20
303 302 3 70 20
304 303 3 70 20
305 304 3 50 30
306 305 3 70 20
307 306 3 80 10
308 307 3 50 30
309 308 3 70 20
310 309 2 50 30
311 310 2 70 20
312 311 2 90 3
313 312 2 90 3
314 313 3 70 20
315 314 3 70 20
316 315 2 70 20
317 316 1 50 30
318 317 1 70 20
319 318 5 50 30
320 319 5 70 20
321 320 5 50 30
322 321 5 80 10
323 322 3 50 30
324 323 3 70 20
325 324 3 70 20
326 325 2 50 30
327 326 2 70 20
328 327 2 50 30
329 328 3 50 30
330 329 3 70 20
331 330 3 80 10
332 331 3 50 30
333 332 3 70 20
334 333 2 50 30
335 334 2 80 10
336 335 2 70 20
337 336 1 70 20
338 337 3 70 20
339 338 3 70 20
340 339 4 50 30
341 340 4 70 20
342 341 4 50 30
343 342 4 70 20
344 343 3 50 30
345 344 3 70 20
346 345 5 70 20
347 346 5 80 10
348 347 5 70 20
349 348 5 80 10
350 349 5 70 20
351 350 5 90 3
352 351 2 80 10
353 352 1 70 20
354 353 1 50 30
355 354 1 70 20
356 355 1 50 30
357 356 1 70 20
358 357 1 70 20
359 358 3 80 10
360 359 3 80 10
361 360 2 80 10
362 361 3 50 30
363 362 3 70 20
364 363 5 50 30
365 364 5 70 20
366 365 5 80 10
367 366 5 50 30
368 367 5 80 10
369 368 5 80 10
370 369 5 80 10
371 370 5 50 30
372 371 3 50 30
373 372 3 70 20
374 373 3 80 10
375 374 3 70 20
376 375 3 80 10
377 376 3 90 3
378 377 3 90 3
379 378 3 90 3
380 379 3 90 3
381 380 2 90 3
382 381 2 90 3
383 382 5 90 3
384 383 3 90 3
385 384 2 90 3
386 385 3 100 1
387 386 3 100 1
388 387 1 50 30
389 388 1 80 10
390 389 1 90 3
391 390 2 50 30
392 391 2 80 10
393 392 2 90 3
394 393 4 50 30
395 394 4 80 10
396 395 4 90 3
397 396 2 30 50
398 397 2 50 30
399 398 2 70 20
400 399 2 30 50
401 400 2 50 30
402 401 1 50 30
403 402 1 70 20
404 403 2 50 30
405 404 2 70 20
406 405 2 80 10
407 406 2 80 10
408 407 2 80 10
409 408 3 70 20
410 409 3 80 10
411 410 3 70 20
412 411 3 80 10
413 412 1 50 30
414 413 1 70 20
415 414 1 70 20
416 415 1 50 30
417 416 1 70 20
418 417 1 50 30
419 418 1 70 20
420 419 3 70 20
421 420 3 80 10
422 421 2 90 3
423 422 5 50 30
424 423 5 70 20
425 424 4 50 30
426 425 4 70 20
427 426 1 80 10
428 427 2 50 30
429 428 2 70 20
430 429 1 80 10
431 430 1 80 10
432 431 2 50 30
433 432 2 70 20
434 433 2 70 20
435 434 3 80 10
436 435 3 50 30
437 436 3 70 20
438 437 3 80 10
439 438 2 90 3
440 439 2 90 3
441 440 2 50 30
442 441 2 70 20
443 442 2 80 10
444 443 3 50 30
445 444 3 70 20
446 445 4 50 30
447 446 4 70 20
448 447 2 70 20
449 448 2 50 30
450 449 2 70 20
451 450 5 80 10
452 451 5 50 30
453 452 5 70 20
454 453 1 90 3
455 454 3 50 30
456 455 3 70 20
457 456 3 80 10
458 457 3 90 3
459 458 3 90 3
460 459 3 50 30
461 460 3 70 20
462 461 3 80 10
463 462 3 80 10
464 463 2 80 10
465 464 3 80 10
466 465 1 80 10
467 466 3 80 10
468 467 3 80 10
469 468 2 80 10
470 469 2 80 10
471 470 2 90 3
472 471 2 90 3
473 472 3 80 10
474 473 3 80 10
475 474 2 80 10
476 475 2 80 10
477 476 3 80 10
478 477 1 80 10
479 478 3 80 10
480 479 2 90 3
481 480 2 90 3
482 481 2 90 3
483 482 2 90 3
484 483 3 90 3
485 484 3 90 3
486 485 3 90 3
487 486 3 90 3
488 487 3 90 3
489 488 1 90 3
490 489 5 90 3
491 490 5 100 1
492 491 3 100 1
493 492 2 100 1
494 493 3 100 1

View file

@ -0,0 +1,6 @@
pal_park_area_id,local_language_id,name
1,9,Forest
2,9,Field
3,9,Mountain
4,9,Pond
5,9,Sea
1 pal_park_area_id local_language_id name
2 1 9 Forest
3 2 9 Field
4 3 9 Mountain
5 4 9 Pond
6 5 9 Sea

View file

@ -0,0 +1,6 @@
id,identifier
1,forest
2,field
3,mountain
4,pond
5,sea
1 id identifier
2 1 forest
3 2 field
4 3 mountain
5 4 pond
6 5 sea

View file

@ -1020,6 +1020,39 @@ class NaturePokeathlonStat(TableBase):
max_change = Column(Integer, nullable=False,
info=dict(description="Maximum change"))
class PalPark(TableBase):
u"""Pal Park encounter info
"""
__tablename__ = 'pal_park'
__singlename__ = 'pal_park'
species_id = Column(Integer, ForeignKey('pokemon_species.id'), primary_key=True,
info=dict(description="ID of the Pokémon species this data pertains to"))
area_id = Column(Integer, ForeignKey('pal_park_areas.id'), nullable=False,
info=dict(description="The area in which this Pokémon can be found"))
base_score = Column(Integer, nullable=False,
info=dict(description="Value used in calculating the player's score in a Pal Park run"))
rate = Column(Integer, nullable=False,
info=dict(description="Base rate for encountering this Pokémon"))
class PalParkArea(TableBase):
u"""Pal Park areas enum
"""
__tablename__ = 'pal_park_areas'
__singlename__ = 'pal_park_area'
id = Column(Integer, primary_key=True, nullable=False,
info=dict(description="A numeric ID"))
identifier = Column(Unicode(8), nullable=False,
info=dict(description="An identifier"))
create_translation_table('pal_park_area_names', PalParkArea, 'names',
name = Column(Unicode(8), nullable=False, index=True,
info=dict(description="The name", format='plaintext', official=False)),
)
class PokeathlonStat(TableBase):
u"""A Pokéathlon stat, such as "Stamina" or "Jump".
"""
@ -1904,6 +1937,10 @@ NaturePokeathlonStat.pokeathlon_stat = relationship(PokeathlonStat,
backref='nature_effects')
PalPark.area = relationship(PalParkArea,
innerjoin=True, lazy='joined')
Pokedex.region = relationship(Region,
innerjoin=True,
backref='pokedexes')
@ -2090,6 +2127,9 @@ PokemonSpecies.generation = relationship(Generation,
PokemonSpecies.shape = relationship(PokemonShape,
innerjoin=True,
backref='species')
PokemonSpecies.pal_park = relationship(PalPark,
uselist=False,
backref='species')
PokemonSpeciesFlavorText.version = relationship(Version, innerjoin=True, lazy='joined')
PokemonSpeciesFlavorText.language = relationship(Language, innerjoin=True, lazy='joined')

67
scripts/palpark.py Executable file
View file

@ -0,0 +1,67 @@
#!/usr/bin/env python2
"""Dump /arc/ppark.narc.
This is an unmaintained one-shot script, only included in the repo for
reference.
"""
import sys
from struct import pack, unpack
import binascii
import pokedex.db
from pokedex.db.tables import PalPark
types = [
'',
'grass',
'fire',
'water',
'bug',
'normal',
'poison',
'electric',
'ground',
'fighting',
'psychic',
'rock',
'ghost',
'ice',
'steel',
'dragon',
'dark',
'flying',
]
areas = {
1: 'forest',
2: 'mountain',
3: 'field',
0x200: 'pond',
0x400: 'sea',
}
session = pokedex.db.connect()()
with open(sys.argv[1], "rb") as f:
f.seek(0x3C)
for i in range(0xb8e // 6):
data = f.read(6)
area, score, rate, t1, t2 = unpack("<HBBBB", data)
print(i+1, binascii.hexlify(data).decode(),
areas[area], score, rate, types[t1], types[t2])
obj = PalPark()
obj.species_id = i+1
obj.area = areas[area]
obj.base_score = score
obj.rate = rate
session.add(obj)
session.commit()