localdex 0.1.19__py3-none-any.whl → 0.1.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- localdex/__init__.py +0 -4
- localdex/core.py +2 -185
- localdex/data/pokemon/aegislash.json +88 -0
- localdex/data/pokemon/basculegion.json +86 -0
- localdex/data/pokemon/basculin.json +105 -0
- localdex/data/pokemon/darmanitan.json +117 -0
- localdex/data/pokemon/deoxys.json +144 -0
- localdex/data/pokemon/dudunsparce.json +117 -0
- localdex/data/pokemon/eiscue.json +80 -0
- localdex/data/pokemon/enamorus.json +77 -0
- localdex/data/pokemon/giratina.json +123 -0
- localdex/data/pokemon/gourgeist.json +109 -0
- localdex/data/pokemon/indeedee.json +89 -0
- localdex/data/pokemon/keldeo.json +107 -0
- localdex/data/pokemon/landorus.json +105 -0
- localdex/data/pokemon/lycanroc.json +107 -0
- localdex/data/pokemon/maushold.json +80 -0
- localdex/data/pokemon/meloetta.json +131 -0
- localdex/data/pokemon/meowstic.json +122 -0
- localdex/data/pokemon/mimikyu.json +113 -0
- localdex/data/pokemon/minior.json +90 -0
- localdex/data/pokemon/morpeko.json +100 -0
- localdex/data/pokemon/nidoran.json +109 -0
- localdex/data/pokemon/oinkologne.json +78 -0
- localdex/data/pokemon/oricorio.json +91 -0
- localdex/data/pokemon/palafin.json +90 -0
- localdex/data/pokemon/pumpkaboo.json +105 -0
- localdex/data/pokemon/shaymin.json +101 -0
- localdex/data/pokemon/squawkabilly.json +79 -0
- localdex/data/pokemon/tatsugiri.json +65 -0
- localdex/data/pokemon/thundurus.json +116 -0
- localdex/data/pokemon/tornadus.json +107 -0
- localdex/data/pokemon/toxtricity.json +112 -0
- localdex/data/pokemon/urshifu.json +101 -0
- localdex/data/pokemon/wishiwashi.json +77 -0
- localdex/data/pokemon/wormadam.json +93 -0
- localdex/data/pokemon/zygarde.json +93 -0
- localdex/download_data.py +62 -0
- localdex/models/pokemon.py +8 -11
- {localdex-0.1.19.dist-info → localdex-0.1.22.dist-info}/METADATA +2 -170
- {localdex-0.1.19.dist-info → localdex-0.1.22.dist-info}/RECORD +44 -11
- localdex/random_battles.py +0 -251
- localdex/sprite_downloader.py +0 -932
- {localdex-0.1.19.dist-info → localdex-0.1.22.dist-info}/WHEEL +0 -0
- {localdex-0.1.19.dist-info → localdex-0.1.22.dist-info}/entry_points.txt +0 -0
- {localdex-0.1.19.dist-info → localdex-0.1.22.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,112 @@
|
|
1
|
+
{
|
2
|
+
"id": 849,
|
3
|
+
"name": "toxtricity",
|
4
|
+
"types": [
|
5
|
+
"electric",
|
6
|
+
"poison"
|
7
|
+
],
|
8
|
+
"baseStats": {
|
9
|
+
"hp": 75,
|
10
|
+
"attack": 98,
|
11
|
+
"defense": 70,
|
12
|
+
"special_attack": 114,
|
13
|
+
"special_defense": 70,
|
14
|
+
"speed": 75
|
15
|
+
},
|
16
|
+
"height": 1.6,
|
17
|
+
"weight": 40.0,
|
18
|
+
"abilities": {
|
19
|
+
"0": {
|
20
|
+
"name": "punk-rock"
|
21
|
+
},
|
22
|
+
"1": {
|
23
|
+
"name": "plus"
|
24
|
+
},
|
25
|
+
"H": {
|
26
|
+
"name": "technician"
|
27
|
+
}
|
28
|
+
},
|
29
|
+
"moves": [
|
30
|
+
"mega-punch",
|
31
|
+
"fire-punch",
|
32
|
+
"thunder-punch",
|
33
|
+
"mega-kick",
|
34
|
+
"take-down",
|
35
|
+
"leer",
|
36
|
+
"growl",
|
37
|
+
"acid",
|
38
|
+
"hyper-beam",
|
39
|
+
"thunder-shock",
|
40
|
+
"thunderbolt",
|
41
|
+
"thunder-wave",
|
42
|
+
"thunder",
|
43
|
+
"toxic",
|
44
|
+
"screech",
|
45
|
+
"metronome",
|
46
|
+
"swift",
|
47
|
+
"rest",
|
48
|
+
"substitute",
|
49
|
+
"thief",
|
50
|
+
"snore",
|
51
|
+
"flail",
|
52
|
+
"protect",
|
53
|
+
"scary-face",
|
54
|
+
"sludge-bomb",
|
55
|
+
"endure",
|
56
|
+
"charm",
|
57
|
+
"swagger",
|
58
|
+
"spark",
|
59
|
+
"attract",
|
60
|
+
"sleep-talk",
|
61
|
+
"encore",
|
62
|
+
"rain-dance",
|
63
|
+
"sunny-day",
|
64
|
+
"uproar",
|
65
|
+
"facade",
|
66
|
+
"charge",
|
67
|
+
"taunt",
|
68
|
+
"helping-hand",
|
69
|
+
"brick-break",
|
70
|
+
"endeavor",
|
71
|
+
"hyper-voice",
|
72
|
+
"metal-sound",
|
73
|
+
"poison-tail",
|
74
|
+
"shock-wave",
|
75
|
+
"payback",
|
76
|
+
"fling",
|
77
|
+
"toxic-spikes",
|
78
|
+
"poison-jab",
|
79
|
+
"drain-punch",
|
80
|
+
"giga-impact",
|
81
|
+
"thunder-fang",
|
82
|
+
"discharge",
|
83
|
+
"gunk-shot",
|
84
|
+
"charge-beam",
|
85
|
+
"venoshock",
|
86
|
+
"sludge-wave",
|
87
|
+
"electro-ball",
|
88
|
+
"acid-spray",
|
89
|
+
"round",
|
90
|
+
"stored-power",
|
91
|
+
"hex",
|
92
|
+
"shift-gear",
|
93
|
+
"volt-switch",
|
94
|
+
"electroweb",
|
95
|
+
"wild-charge",
|
96
|
+
"snarl",
|
97
|
+
"belch",
|
98
|
+
"noble-roar",
|
99
|
+
"boomburst",
|
100
|
+
"eerie-impulse",
|
101
|
+
"electric-terrain",
|
102
|
+
"nuzzle",
|
103
|
+
"throat-chop",
|
104
|
+
"tearful-look",
|
105
|
+
"overdrive",
|
106
|
+
"rising-voltage",
|
107
|
+
"tera-blast",
|
108
|
+
"trailblaze",
|
109
|
+
"psychic-noise"
|
110
|
+
],
|
111
|
+
"generation": 8
|
112
|
+
}
|
@@ -0,0 +1,101 @@
|
|
1
|
+
{
|
2
|
+
"id": 892,
|
3
|
+
"name": "urshifu",
|
4
|
+
"types": [
|
5
|
+
"fighting",
|
6
|
+
"dark"
|
7
|
+
],
|
8
|
+
"baseStats": {
|
9
|
+
"hp": 100,
|
10
|
+
"attack": 130,
|
11
|
+
"defense": 100,
|
12
|
+
"special_attack": 63,
|
13
|
+
"special_defense": 60,
|
14
|
+
"speed": 97
|
15
|
+
},
|
16
|
+
"height": 1.9,
|
17
|
+
"weight": 105.0,
|
18
|
+
"abilities": {
|
19
|
+
"0": {
|
20
|
+
"name": "unseen-fist"
|
21
|
+
}
|
22
|
+
},
|
23
|
+
"moves": [
|
24
|
+
"mega-punch",
|
25
|
+
"fire-punch",
|
26
|
+
"ice-punch",
|
27
|
+
"thunder-punch",
|
28
|
+
"swords-dance",
|
29
|
+
"mega-kick",
|
30
|
+
"headbutt",
|
31
|
+
"body-slam",
|
32
|
+
"take-down",
|
33
|
+
"double-edge",
|
34
|
+
"leer",
|
35
|
+
"roar",
|
36
|
+
"low-kick",
|
37
|
+
"counter",
|
38
|
+
"dig",
|
39
|
+
"focus-energy",
|
40
|
+
"swift",
|
41
|
+
"rest",
|
42
|
+
"rock-slide",
|
43
|
+
"substitute",
|
44
|
+
"snore",
|
45
|
+
"reversal",
|
46
|
+
"protect",
|
47
|
+
"scary-face",
|
48
|
+
"detect",
|
49
|
+
"endure",
|
50
|
+
"false-swipe",
|
51
|
+
"attract",
|
52
|
+
"sleep-talk",
|
53
|
+
"dynamic-punch",
|
54
|
+
"metal-claw",
|
55
|
+
"crunch",
|
56
|
+
"rock-smash",
|
57
|
+
"beat-up",
|
58
|
+
"facade",
|
59
|
+
"focus-punch",
|
60
|
+
"taunt",
|
61
|
+
"helping-hand",
|
62
|
+
"superpower",
|
63
|
+
"revenge",
|
64
|
+
"brick-break",
|
65
|
+
"rock-tomb",
|
66
|
+
"aerial-ace",
|
67
|
+
"iron-defense",
|
68
|
+
"bulk-up",
|
69
|
+
"u-turn",
|
70
|
+
"close-combat",
|
71
|
+
"payback",
|
72
|
+
"assurance",
|
73
|
+
"fling",
|
74
|
+
"sucker-punch",
|
75
|
+
"aura-sphere",
|
76
|
+
"poison-jab",
|
77
|
+
"dark-pulse",
|
78
|
+
"drain-punch",
|
79
|
+
"focus-blast",
|
80
|
+
"giga-impact",
|
81
|
+
"zen-headbutt",
|
82
|
+
"iron-head",
|
83
|
+
"stone-edge",
|
84
|
+
"low-sweep",
|
85
|
+
"foul-play",
|
86
|
+
"round",
|
87
|
+
"acrobatics",
|
88
|
+
"retaliate",
|
89
|
+
"work-up",
|
90
|
+
"snarl",
|
91
|
+
"darkest-lariat",
|
92
|
+
"throat-chop",
|
93
|
+
"body-press",
|
94
|
+
"lash-out",
|
95
|
+
"coaching",
|
96
|
+
"wicked-blow",
|
97
|
+
"tera-blast",
|
98
|
+
"trailblaze"
|
99
|
+
],
|
100
|
+
"generation": 8
|
101
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
{
|
2
|
+
"id": 746,
|
3
|
+
"name": "wishiwashi",
|
4
|
+
"types": [
|
5
|
+
"water"
|
6
|
+
],
|
7
|
+
"baseStats": {
|
8
|
+
"hp": 45,
|
9
|
+
"attack": 20,
|
10
|
+
"defense": 20,
|
11
|
+
"special_attack": 25,
|
12
|
+
"special_defense": 25,
|
13
|
+
"speed": 40
|
14
|
+
},
|
15
|
+
"height": 0.2,
|
16
|
+
"weight": 0.3,
|
17
|
+
"abilities": {
|
18
|
+
"0": {
|
19
|
+
"name": "schooling"
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"moves": [
|
23
|
+
"take-down",
|
24
|
+
"double-edge",
|
25
|
+
"growl",
|
26
|
+
"mist",
|
27
|
+
"water-gun",
|
28
|
+
"hydro-pump",
|
29
|
+
"surf",
|
30
|
+
"ice-beam",
|
31
|
+
"earthquake",
|
32
|
+
"toxic",
|
33
|
+
"double-team",
|
34
|
+
"waterfall",
|
35
|
+
"rest",
|
36
|
+
"substitute",
|
37
|
+
"snore",
|
38
|
+
"protect",
|
39
|
+
"feint-attack",
|
40
|
+
"endure",
|
41
|
+
"swagger",
|
42
|
+
"attract",
|
43
|
+
"sleep-talk",
|
44
|
+
"return",
|
45
|
+
"frustration",
|
46
|
+
"iron-tail",
|
47
|
+
"hidden-power",
|
48
|
+
"rain-dance",
|
49
|
+
"whirlpool",
|
50
|
+
"beat-up",
|
51
|
+
"uproar",
|
52
|
+
"hail",
|
53
|
+
"facade",
|
54
|
+
"helping-hand",
|
55
|
+
"endeavor",
|
56
|
+
"dive",
|
57
|
+
"muddy-water",
|
58
|
+
"mud-shot",
|
59
|
+
"covet",
|
60
|
+
"water-sport",
|
61
|
+
"water-pulse",
|
62
|
+
"brine",
|
63
|
+
"u-turn",
|
64
|
+
"aqua-ring",
|
65
|
+
"aqua-tail",
|
66
|
+
"soak",
|
67
|
+
"round",
|
68
|
+
"scald",
|
69
|
+
"bulldoze",
|
70
|
+
"confide",
|
71
|
+
"liquidation",
|
72
|
+
"tearful-look",
|
73
|
+
"scale-shot",
|
74
|
+
"flip-turn"
|
75
|
+
],
|
76
|
+
"generation": 7
|
77
|
+
}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
{
|
2
|
+
"id": 413,
|
3
|
+
"name": "wormadam",
|
4
|
+
"types": [
|
5
|
+
"bug",
|
6
|
+
"grass"
|
7
|
+
],
|
8
|
+
"baseStats": {
|
9
|
+
"hp": 60,
|
10
|
+
"attack": 59,
|
11
|
+
"defense": 85,
|
12
|
+
"special_attack": 79,
|
13
|
+
"special_defense": 105,
|
14
|
+
"speed": 36
|
15
|
+
},
|
16
|
+
"height": 0.5,
|
17
|
+
"weight": 6.5,
|
18
|
+
"abilities": {
|
19
|
+
"0": {
|
20
|
+
"name": "anticipation"
|
21
|
+
},
|
22
|
+
"H": {
|
23
|
+
"name": "overcoat"
|
24
|
+
}
|
25
|
+
},
|
26
|
+
"moves": [
|
27
|
+
"gust",
|
28
|
+
"tackle",
|
29
|
+
"psybeam",
|
30
|
+
"hyper-beam",
|
31
|
+
"growth",
|
32
|
+
"razor-leaf",
|
33
|
+
"solar-beam",
|
34
|
+
"string-shot",
|
35
|
+
"dig",
|
36
|
+
"toxic",
|
37
|
+
"confusion",
|
38
|
+
"psychic",
|
39
|
+
"double-team",
|
40
|
+
"dream-eater",
|
41
|
+
"flash",
|
42
|
+
"rest",
|
43
|
+
"substitute",
|
44
|
+
"thief",
|
45
|
+
"snore",
|
46
|
+
"flail",
|
47
|
+
"protect",
|
48
|
+
"giga-drain",
|
49
|
+
"endure",
|
50
|
+
"swagger",
|
51
|
+
"attract",
|
52
|
+
"sleep-talk",
|
53
|
+
"return",
|
54
|
+
"frustration",
|
55
|
+
"safeguard",
|
56
|
+
"synthesis",
|
57
|
+
"hidden-power",
|
58
|
+
"rain-dance",
|
59
|
+
"sunny-day",
|
60
|
+
"psych-up",
|
61
|
+
"shadow-ball",
|
62
|
+
"uproar",
|
63
|
+
"facade",
|
64
|
+
"endeavor",
|
65
|
+
"skill-swap",
|
66
|
+
"secret-power",
|
67
|
+
"silver-wind",
|
68
|
+
"signal-beam",
|
69
|
+
"bullet-seed",
|
70
|
+
"magical-leaf",
|
71
|
+
"natural-gift",
|
72
|
+
"worry-seed",
|
73
|
+
"sucker-punch",
|
74
|
+
"seed-bomb",
|
75
|
+
"bug-buzz",
|
76
|
+
"energy-ball",
|
77
|
+
"giga-impact",
|
78
|
+
"leaf-storm",
|
79
|
+
"captivate",
|
80
|
+
"grass-knot",
|
81
|
+
"bug-bite",
|
82
|
+
"venoshock",
|
83
|
+
"telekinesis",
|
84
|
+
"quiver-dance",
|
85
|
+
"round",
|
86
|
+
"ally-switch",
|
87
|
+
"struggle-bug",
|
88
|
+
"electroweb",
|
89
|
+
"confide",
|
90
|
+
"infestation"
|
91
|
+
],
|
92
|
+
"generation": 4
|
93
|
+
}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
{
|
2
|
+
"id": 10181,
|
3
|
+
"name": "zygarde",
|
4
|
+
"types": [
|
5
|
+
"dragon",
|
6
|
+
"ground"
|
7
|
+
],
|
8
|
+
"baseStats": {
|
9
|
+
"hp": 54,
|
10
|
+
"attack": 100,
|
11
|
+
"defense": 71,
|
12
|
+
"special_attack": 61,
|
13
|
+
"special_defense": 85,
|
14
|
+
"speed": 115
|
15
|
+
},
|
16
|
+
"height": 1.2,
|
17
|
+
"weight": 33.5,
|
18
|
+
"abilities": {
|
19
|
+
"0": {
|
20
|
+
"name": "aura-break"
|
21
|
+
}
|
22
|
+
},
|
23
|
+
"moves": [
|
24
|
+
"bind",
|
25
|
+
"body-slam",
|
26
|
+
"bite",
|
27
|
+
"hyper-beam",
|
28
|
+
"earthquake",
|
29
|
+
"dig",
|
30
|
+
"toxic",
|
31
|
+
"double-team",
|
32
|
+
"haze",
|
33
|
+
"swift",
|
34
|
+
"glare",
|
35
|
+
"rest",
|
36
|
+
"rock-slide",
|
37
|
+
"substitute",
|
38
|
+
"snore",
|
39
|
+
"reversal",
|
40
|
+
"spite",
|
41
|
+
"protect",
|
42
|
+
"outrage",
|
43
|
+
"sandstorm",
|
44
|
+
"endure",
|
45
|
+
"swagger",
|
46
|
+
"sleep-talk",
|
47
|
+
"return",
|
48
|
+
"frustration",
|
49
|
+
"safeguard",
|
50
|
+
"pain-split",
|
51
|
+
"dragon-breath",
|
52
|
+
"iron-tail",
|
53
|
+
"hidden-power",
|
54
|
+
"sunny-day",
|
55
|
+
"crunch",
|
56
|
+
"extreme-speed",
|
57
|
+
"facade",
|
58
|
+
"superpower",
|
59
|
+
"brick-break",
|
60
|
+
"camouflage",
|
61
|
+
"hyper-voice",
|
62
|
+
"block",
|
63
|
+
"dragon-dance",
|
64
|
+
"shock-wave",
|
65
|
+
"payback",
|
66
|
+
"dragon-pulse",
|
67
|
+
"focus-blast",
|
68
|
+
"earth-power",
|
69
|
+
"giga-impact",
|
70
|
+
"zen-headbutt",
|
71
|
+
"draco-meteor",
|
72
|
+
"stone-edge",
|
73
|
+
"grass-knot",
|
74
|
+
"sludge-wave",
|
75
|
+
"coil",
|
76
|
+
"round",
|
77
|
+
"retaliate",
|
78
|
+
"bulldoze",
|
79
|
+
"dragon-tail",
|
80
|
+
"confide",
|
81
|
+
"thousand-arrows",
|
82
|
+
"thousand-waves",
|
83
|
+
"lands-wrath",
|
84
|
+
"high-horsepower",
|
85
|
+
"core-enforcer",
|
86
|
+
"stomping-tantrum",
|
87
|
+
"breaking-swipe",
|
88
|
+
"scale-shot",
|
89
|
+
"skitter-smack",
|
90
|
+
"scorching-sands"
|
91
|
+
],
|
92
|
+
"generation": 9
|
93
|
+
}
|
localdex/download_data.py
CHANGED
@@ -17,6 +17,46 @@ import threading
|
|
17
17
|
|
18
18
|
from .exceptions import DataLoadError
|
19
19
|
|
20
|
+
# --- BEGIN BASE_FORM_SOURCE mapping (from list_dash_species.py) ---
|
21
|
+
BASE_FORM_SOURCE = {
|
22
|
+
"aegislash": "aegislash-shield",
|
23
|
+
"basculin": "basculin-red-striped",
|
24
|
+
"basculegion": "basculegion-male",
|
25
|
+
"darmanitan": "darmanitan-standard",
|
26
|
+
"deoxys": "deoxys-speed",
|
27
|
+
"dudunsparce": "dudunsparce-two-segment",
|
28
|
+
"eiscue": "eiscue-ice",
|
29
|
+
"enamorus": "enamorus-therian",
|
30
|
+
"giratina": "giratina-origin",
|
31
|
+
"gourgeist": "gourgeist-average",
|
32
|
+
"indeedee": "indeedee-male",
|
33
|
+
"keldeo": "keldeo-resolute",
|
34
|
+
"landorus": "landorus-therian",
|
35
|
+
"lycanroc": "lycanroc-midday",
|
36
|
+
"maushold": "maushold-family-of-three",
|
37
|
+
"meowstic": "meowstic-male",
|
38
|
+
"meloetta": "meloetta-aria",
|
39
|
+
"mimikyu": "mimikyu-disguised",
|
40
|
+
"minior": "minior-red-meteor",
|
41
|
+
"morpeko": "morpeko-full-belly",
|
42
|
+
"nidoran": "nidoran-f",
|
43
|
+
"oinkologne": "oinkologne-male",
|
44
|
+
"oricorio": "oricorio-baile",
|
45
|
+
"palafin": "palafin-zero",
|
46
|
+
"pumpkaboo": "pumpkaboo-average",
|
47
|
+
"shaymin": "shaymin-land",
|
48
|
+
"squawkabilly": "squawkabilly-white-plumage",
|
49
|
+
"tatsugiri": "tatsugiri-curly",
|
50
|
+
"thundurus": "thundurus-therian",
|
51
|
+
"toxtricity": "toxtricity-amped",
|
52
|
+
"tornadus": "tornadus-therian",
|
53
|
+
"urshifu": "urshifu-single-strike",
|
54
|
+
"wishiwashi": "wishiwashi-solo",
|
55
|
+
"wormadam": "wormadam-plant",
|
56
|
+
"zygarde": "zygarde-10",
|
57
|
+
}
|
58
|
+
# --- END BASE_FORM_SOURCE mapping ---
|
59
|
+
|
20
60
|
|
21
61
|
class DataDownloader:
|
22
62
|
"""
|
@@ -113,6 +153,28 @@ class DataDownloader:
|
|
113
153
|
futures = [executor.submit(download_and_save_pokemon, pokemon_info) for pokemon_info in pokemon_list]
|
114
154
|
for future in as_completed(futures):
|
115
155
|
future.result() # Wait for completion and handle any exceptions
|
156
|
+
|
157
|
+
# --- BEGIN: Add extra convenience mappings for base species ---
|
158
|
+
# For each base in BASE_FORM_SOURCE, if a file named after the base does not exist,
|
159
|
+
# copy the data from the mapped dash species file (if it exists). Avoid duplicates.
|
160
|
+
for base, dash_species in BASE_FORM_SOURCE.items():
|
161
|
+
base_file = self.pokemon_dir / f"{base}.json"
|
162
|
+
dash_file = self.pokemon_dir / f"{dash_species}.json"
|
163
|
+
if not base_file.exists() and dash_file.exists():
|
164
|
+
# Read dash species data
|
165
|
+
with open(dash_file, 'r', encoding='utf-8') as f:
|
166
|
+
dash_data = json.load(f)
|
167
|
+
# Set the name to the base name for the new file
|
168
|
+
dash_data["name"] = base
|
169
|
+
# Write to base file
|
170
|
+
with open(base_file, 'w', encoding='utf-8') as f:
|
171
|
+
json.dump(dash_data, f, indent=2, ensure_ascii=False)
|
172
|
+
print(f"[Convenience] Created {base}.json from {dash_species}.json")
|
173
|
+
elif base_file.exists():
|
174
|
+
print(f"[Convenience] {base}.json already exists, skipping.")
|
175
|
+
else:
|
176
|
+
print(f"[Convenience] Could not create {base}.json (source {dash_species}.json missing)")
|
177
|
+
# --- END: Add extra convenience mappings for base species ---
|
116
178
|
|
117
179
|
def download_move_data(self, limit: Optional[int] = None) -> None:
|
118
180
|
"""
|
localdex/models/pokemon.py
CHANGED
@@ -4,7 +4,7 @@ Pokemon data models.
|
|
4
4
|
This module contains the data structures for Pokemon and their base stats.
|
5
5
|
"""
|
6
6
|
|
7
|
-
from dataclasses import dataclass
|
7
|
+
from dataclasses import dataclass, field
|
8
8
|
from typing import Dict, List, Optional, Any
|
9
9
|
from .ability import Ability
|
10
10
|
from .move import Move
|
@@ -48,14 +48,14 @@ class Pokemon:
|
|
48
48
|
color: Optional[str] = None
|
49
49
|
|
50
50
|
# Abilities
|
51
|
-
abilities:
|
51
|
+
abilities: Dict[str, Ability] = field(default_factory=dict)
|
52
52
|
|
53
53
|
# Moves and learnsets
|
54
|
-
moves:
|
55
|
-
learnset:
|
54
|
+
moves: List[Move] = field(default_factory=list)
|
55
|
+
learnset: Dict[str, Any] = field(default_factory=dict)
|
56
56
|
|
57
57
|
# Evolution information
|
58
|
-
evolutions:
|
58
|
+
evolutions: List[str] = field(default_factory=list)
|
59
59
|
prevo: Optional[str] = None
|
60
60
|
evo_level: Optional[int] = None
|
61
61
|
evo_type: Optional[str] = None
|
@@ -63,8 +63,8 @@ class Pokemon:
|
|
63
63
|
evo_item: Optional[str] = None
|
64
64
|
|
65
65
|
# Breeding information
|
66
|
-
egg_groups:
|
67
|
-
gender_ratio:
|
66
|
+
egg_groups: List[str] = field(default_factory=list)
|
67
|
+
gender_ratio: Dict[str, float] = field(default_factory=dict)
|
68
68
|
|
69
69
|
# Game information
|
70
70
|
generation: Optional[int] = None
|
@@ -73,11 +73,8 @@ class Pokemon:
|
|
73
73
|
is_mythical: bool = False
|
74
74
|
is_ultra_beast: bool = False
|
75
75
|
|
76
|
-
# Competitive data
|
77
|
-
random_battle_sets: Optional[Dict[str, Any]] = None
|
78
|
-
|
79
76
|
# Additional metadata
|
80
|
-
metadata:
|
77
|
+
metadata: Dict[str, Any] = field(default_factory=dict)
|
81
78
|
|
82
79
|
def __post_init__(self):
|
83
80
|
"""Post-initialization processing."""
|