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