mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Added move categories. #41
This commit is contained in:
parent
570f34554e
commit
11c0bb01fd
3 changed files with 456 additions and 0 deletions
38
pokedex/data/csv/move_effect_categories.csv
Normal file
38
pokedex/data/csv/move_effect_categories.csv
Normal file
|
@ -0,0 +1,38 @@
|
|||
id,name,can_affect_user
|
||||
1,Regular damage,1
|
||||
2,Power varies,1
|
||||
3,Special damage,1
|
||||
4,Double damage,1
|
||||
5,Faints,1
|
||||
6,Critical,0
|
||||
7,Ignores type,0
|
||||
8,Ignores accuracy modifiers,0
|
||||
9,Meta (move uses another move, damage based on other damage),0
|
||||
10,Multiple turns/hits,0
|
||||
11,Charge or recovery turn,0
|
||||
12,Heals HP,1
|
||||
13,Cures status,1
|
||||
14,Protection,1
|
||||
15,Attack up,1
|
||||
16,Attack down,1
|
||||
17,Defense up,1
|
||||
18,Defense down,1
|
||||
19,Special Attack up,1
|
||||
20,Special Attack down,1
|
||||
21,Special Defense up,1
|
||||
22,Special Defense down,1
|
||||
23,Speed up,1
|
||||
24,Speed down,1
|
||||
25,Accuracy up,1
|
||||
26,Accuracy down,1
|
||||
27,Evasion up,1
|
||||
28,Evasion down,1
|
||||
29,Sleep,1
|
||||
30,Burn,1
|
||||
31,Paralysis,1
|
||||
32,Freeze,1
|
||||
33,Poison,1
|
||||
34,Confusion,1
|
||||
35,Flinch,1
|
||||
36,Trap,1
|
||||
37,Weather,0
|
|
402
pokedex/data/csv/move_effect_category_map.csv
Normal file
402
pokedex/data/csv/move_effect_category_map.csv
Normal file
|
@ -0,0 +1,402 @@
|
|||
move_effect_id,move_effect_category_id,affects_user
|
||||
1,1,0
|
||||
2,29,0
|
||||
3,1,0
|
||||
3,33,0
|
||||
4,1,0
|
||||
4,12,1
|
||||
5,1,0
|
||||
5,30,0
|
||||
6,1,0
|
||||
6,32,0
|
||||
7,1,0
|
||||
7,31,0
|
||||
8,1,0
|
||||
8,5,1
|
||||
9,1,0
|
||||
9,12,1
|
||||
10,9,0
|
||||
11,15,1
|
||||
12,17,1
|
||||
14,19,1
|
||||
17,27,1
|
||||
18,1,0
|
||||
18,8,0
|
||||
19,16,0
|
||||
20,18,0
|
||||
21,24,0
|
||||
24,26,0
|
||||
25,28,0
|
||||
26,13,1
|
||||
27,10,0
|
||||
27,3,0
|
||||
28,1,0
|
||||
28,10,0
|
||||
28,34,1
|
||||
30,1,0
|
||||
30,10,0
|
||||
32,1,0
|
||||
32,35,0
|
||||
33,12,1
|
||||
34,33,0
|
||||
35,1,0
|
||||
36,14,1
|
||||
37,1,0
|
||||
37,30,0
|
||||
37,31,0
|
||||
37,32,0
|
||||
38,29,1
|
||||
38,12,1
|
||||
38,13,1
|
||||
39,5,0
|
||||
39,8,0
|
||||
40,1,0
|
||||
40,6,0
|
||||
40,11,0
|
||||
41,3,0
|
||||
42,3,0
|
||||
43,1,0
|
||||
43,10,0
|
||||
43,36,0
|
||||
44,1,0
|
||||
44,6,0
|
||||
45,1,0
|
||||
45,10,0
|
||||
46,1,0
|
||||
46,3,1
|
||||
47,14,1
|
||||
49,1,0
|
||||
49,3,1
|
||||
50,34,0
|
||||
51,15,1
|
||||
52,17,1
|
||||
53,23,1
|
||||
54,19,1
|
||||
55,21,1
|
||||
58,9,0
|
||||
59,16,0
|
||||
60,18,0
|
||||
61,24,0
|
||||
63,22,0
|
||||
66,14,1
|
||||
67,33,0
|
||||
68,31,0
|
||||
69,1,0
|
||||
69,16,0
|
||||
70,1,0
|
||||
70,18,0
|
||||
71,1,0
|
||||
71,24,0
|
||||
72,1,0
|
||||
72,20,0
|
||||
73,1,0
|
||||
73,22,0
|
||||
74,1,0
|
||||
74,26,0
|
||||
76,1,0
|
||||
76,11,0
|
||||
76,35,0
|
||||
77,1,0
|
||||
77,34,0
|
||||
78,1,0
|
||||
78,10,0
|
||||
78,33,0
|
||||
79,1,0
|
||||
79,8,0
|
||||
80,3,1
|
||||
80,14,1
|
||||
81,1,0
|
||||
81,11,0
|
||||
82,1,0
|
||||
82,15,1
|
||||
83,9,0
|
||||
84,9,0
|
||||
85,3,0
|
||||
85,12,1
|
||||
88,3,0
|
||||
88,7,0
|
||||
89,3,0
|
||||
89,7,0
|
||||
90,3,0
|
||||
92,3,0
|
||||
92,3,1
|
||||
92,12,0
|
||||
92,12,1
|
||||
93,1,0
|
||||
93,35,0
|
||||
94,14,0
|
||||
96,9,0
|
||||
98,9,0
|
||||
99,5,0
|
||||
100,1,0
|
||||
100,2,0
|
||||
102,1,0
|
||||
102,14,0
|
||||
103,13,1
|
||||
104,1,0
|
||||
105,1,0
|
||||
105,2,0
|
||||
105,10,0
|
||||
106,1,0
|
||||
107,36,0
|
||||
107,8,0
|
||||
108,3,0
|
||||
108,10,0
|
||||
109,27,1
|
||||
110,3,1
|
||||
110,3,0
|
||||
110,10,0
|
||||
110,24,1
|
||||
110,15,1
|
||||
110,17,1
|
||||
112,14,1
|
||||
114,28,0
|
||||
114,27,0
|
||||
114,8,0
|
||||
115,5,0
|
||||
115,5,1
|
||||
115,10,0
|
||||
116,37,0
|
||||
117,14,1
|
||||
118,1,0
|
||||
118,2,0
|
||||
119,15,0
|
||||
119,34,0
|
||||
120,1,0
|
||||
120,2,0
|
||||
122,1,0
|
||||
122,2,0
|
||||
123,1,0
|
||||
123,2,0
|
||||
123,12,0
|
||||
124,1,0
|
||||
124,2,0
|
||||
125,14,1
|
||||
126,1,0
|
||||
126,30,0
|
||||
127,1,0
|
||||
127,2,0
|
||||
129,1,0
|
||||
129,4,0
|
||||
130,1,0
|
||||
130,13,1
|
||||
131,3,0
|
||||
133,12,1
|
||||
136,1,0
|
||||
136,2,0
|
||||
137,37,0
|
||||
138,37,0
|
||||
139,1,0
|
||||
139,17,1
|
||||
140,1,0
|
||||
140,15,1
|
||||
141,1,0
|
||||
141,15,1
|
||||
141,17,1
|
||||
141,19,1
|
||||
141,21,1
|
||||
141,23,1
|
||||
143,3,1
|
||||
143,15,1
|
||||
145,3,0
|
||||
146,1,0
|
||||
146,17,1
|
||||
146,11,0
|
||||
147,1,0
|
||||
147,35,0
|
||||
148,1,0
|
||||
149,1,0
|
||||
149,7,0
|
||||
149,10,0
|
||||
150,1,0
|
||||
151,1,0
|
||||
151,35,0
|
||||
152,1,0
|
||||
152,11,0
|
||||
153,1,0
|
||||
153,31,0
|
||||
155,1,0
|
||||
155,10,0
|
||||
155,7,0
|
||||
156,1,0
|
||||
156,11,0
|
||||
157,17,1
|
||||
159,1,0
|
||||
159,35,0
|
||||
160,1,0
|
||||
160,10,0
|
||||
161,17,1
|
||||
161,21,1
|
||||
162,1,0
|
||||
162,2,0
|
||||
163,12,1
|
||||
165,37,0
|
||||
167,19,0
|
||||
167,34,0
|
||||
168,30,0
|
||||
169,16,0
|
||||
169,20,0
|
||||
169,5,1
|
||||
170,1,0
|
||||
170,4,0
|
||||
171,1,0
|
||||
172,1,0
|
||||
172,4,0
|
||||
172,13,0
|
||||
173,14,1
|
||||
174,9,0
|
||||
175,21,1
|
||||
179,8,0
|
||||
180,12,1
|
||||
181,9,0
|
||||
182,36,1
|
||||
182,12,1
|
||||
183,1,0
|
||||
183,16,1
|
||||
183,18,1
|
||||
186,1,0
|
||||
186,4,0
|
||||
187,1,0
|
||||
188,29,0
|
||||
189,1,0
|
||||
190,3,0
|
||||
191,1,0
|
||||
191,2,0
|
||||
192,8,0
|
||||
194,13,1
|
||||
196,9,0
|
||||
197,1,0
|
||||
197,2,0
|
||||
198,1,0
|
||||
198,35,0
|
||||
198,31,0
|
||||
198,16,0
|
||||
198,26,0
|
||||
198,29,0
|
||||
198,32,0
|
||||
199,1,0
|
||||
199,3,1
|
||||
200,34,0
|
||||
201,1,0
|
||||
201,6,0
|
||||
201,30,0
|
||||
203,1,0
|
||||
203,33,0
|
||||
204,1,0
|
||||
204,4,0
|
||||
205,1,0
|
||||
205,20,1
|
||||
206,16,0
|
||||
206,18,0
|
||||
207,20,0
|
||||
207,22,0
|
||||
208,1,0
|
||||
209,15,1
|
||||
209,17,1
|
||||
210,1,0
|
||||
210,6,0
|
||||
210,33,0
|
||||
212,19,1
|
||||
212,21,1
|
||||
213,15,1
|
||||
213,23,1
|
||||
215,12,1
|
||||
217,28,0
|
||||
217,8,0
|
||||
218,1,0
|
||||
218,4,0
|
||||
218,13,0
|
||||
219,1,0
|
||||
219,24,1
|
||||
220,1,0
|
||||
220,2,0
|
||||
221,5,1
|
||||
221,12,1
|
||||
221,13,1
|
||||
222,1,0
|
||||
222,4,0
|
||||
223,1,0
|
||||
223,2,0
|
||||
224,1,0
|
||||
225,1,0
|
||||
225,4,0
|
||||
226,23,1
|
||||
227,15,1
|
||||
227,17,1
|
||||
227,19,1
|
||||
227,21,1
|
||||
227,23,1
|
||||
228,3,0
|
||||
229,1,0
|
||||
230,1,0
|
||||
230,18,1
|
||||
230,22,1
|
||||
231,1,0
|
||||
231,2,0
|
||||
232,1,0
|
||||
232,2,0
|
||||
234,1,0
|
||||
234,2,0
|
||||
235,13,1
|
||||
236,1,0
|
||||
236,2,0
|
||||
238,1,0
|
||||
238,2,0
|
||||
239,15,1
|
||||
239,16,1
|
||||
239,17,1
|
||||
239,18,1
|
||||
242,9,0
|
||||
243,9,0
|
||||
246,1,0
|
||||
246,2,0
|
||||
247,1,0
|
||||
249,1,0
|
||||
252,12,1
|
||||
254,1,0
|
||||
254,3,1
|
||||
254,30,0
|
||||
255,1,0
|
||||
255,3,1
|
||||
255,7,0
|
||||
256,1,0
|
||||
256,11,0
|
||||
257,1,0
|
||||
257,11,0
|
||||
258,1,0
|
||||
259,28,0
|
||||
261,1,0
|
||||
261,32,0
|
||||
262,1,0
|
||||
262,10,0
|
||||
262,36,0
|
||||
262,4,0
|
||||
263,1,0
|
||||
263,3,1
|
||||
263,31,0
|
||||
264,1,0
|
||||
264,11,0
|
||||
266,20,0
|
||||
268,1,0
|
||||
268,34,0
|
||||
269,1,0
|
||||
270,1,0
|
||||
270,3,1
|
||||
271,3,1
|
||||
271,12,1
|
||||
271,13,1
|
||||
272,1,0
|
||||
272,22,0
|
||||
273,1,0
|
||||
273,11,0
|
||||
274,1,0
|
||||
274,30,0
|
||||
274,35,0
|
||||
275,1,0
|
||||
275,32,0
|
||||
275,35,0
|
||||
276,1,0
|
||||
276,31,0
|
||||
276,35,0
|
||||
277,1,0
|
||||
277,19,1
|
|
|
@ -179,6 +179,18 @@ class Machine(TableBase):
|
|||
version_group_id = Column(Integer, ForeignKey('version_groups.id'), primary_key=True, nullable=False, autoincrement=False)
|
||||
move_id = Column(Integer, ForeignKey('moves.id'), nullable=False)
|
||||
|
||||
class MoveEffectCategory(TableBase):
|
||||
__tablename__ = 'move_effect_categories'
|
||||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
name = Column(Unicode(64), nullable=False)
|
||||
can_affect_user = Column(Boolean, nullable=False)
|
||||
|
||||
class MoveEffectCategoryMap(TableBase):
|
||||
__tablename__ = 'move_effect_category_map'
|
||||
move_effect_id = Column(Integer, ForeignKey('move_effects.id'), primary_key=True, nullable=False)
|
||||
move_effect_category_id = Column(Integer, ForeignKey('move_effect_categories.id'), primary_key=True, nullable=False)
|
||||
affects_user = Column(Boolean, primary_key=True, nullable=False)
|
||||
|
||||
class MoveDamageClass(TableBase):
|
||||
__tablename__ = 'move_damage_classes'
|
||||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
|
@ -474,6 +486,10 @@ Move.effect = rst.MoveEffectProperty('effect')
|
|||
Move.priority = association_proxy('move_effect', 'priority')
|
||||
Move.short_effect = rst.MoveEffectProperty('short_effect')
|
||||
|
||||
MoveEffect.category_map = relation(MoveEffectCategoryMap)
|
||||
MoveEffect.categories = association_proxy('category_map', 'category')
|
||||
MoveEffectCategoryMap.category = relation(MoveEffectCategory)
|
||||
|
||||
MoveFlag.flag = relation(MoveFlagType)
|
||||
|
||||
MoveFlavorText.generation = relation(Generation)
|
||||
|
|
Loading…
Reference in a new issue