Switch back to single-character identifier prefixes

This commit is contained in:
Eevee (Lexy Munroe) 2017-06-18 00:16:31 -07:00
parent a08095f326
commit ffd888011e

View file

@ -101,364 +101,364 @@ GAME_RELEASE_MD5SUM_INDEX = {
GROWTH_RATES = {
0: 'growth-rate.medium',
3: 'growth-rate.medium-slow',
4: 'growth-rate.fast',
5: 'growth-rate.slow',
0: 'gr.medium',
3: 'gr.medium-slow',
4: 'gr.fast',
5: 'gr.slow',
}
EVOLUTION_TRIGGERS = {
1: 'evolution-trigger.level-up',
2: 'evolution-trigger.use-item',
3: 'evolution-trigger.trade',
1: 'ev.level-up',
2: 'ev.use-item',
3: 'ev.trade',
}
# TODO these are loci, not enums, so hardcoding all their identifiers here
# makes me nonspecifically uncomfortable
POKEMON_IDENTIFIERS = {
1: 'pokemon.bulbasaur',
2: 'pokemon.ivysaur',
3: 'pokemon.venusaur',
4: 'pokemon.charmander',
5: 'pokemon.charmeleon',
6: 'pokemon.charizard',
7: 'pokemon.squirtle',
8: 'pokemon.wartortle',
9: 'pokemon.blastoise',
10: 'pokemon.caterpie',
11: 'pokemon.metapod',
12: 'pokemon.butterfree',
13: 'pokemon.weedle',
14: 'pokemon.kakuna',
15: 'pokemon.beedrill',
16: 'pokemon.pidgey',
17: 'pokemon.pidgeotto',
18: 'pokemon.pidgeot',
19: 'pokemon.rattata',
20: 'pokemon.raticate',
21: 'pokemon.spearow',
22: 'pokemon.fearow',
23: 'pokemon.ekans',
24: 'pokemon.arbok',
25: 'pokemon.pikachu',
26: 'pokemon.raichu',
27: 'pokemon.sandshrew',
28: 'pokemon.sandslash',
29: 'pokemon.nidoran-f',
30: 'pokemon.nidorina',
31: 'pokemon.nidoqueen',
32: 'pokemon.nidoran-m',
33: 'pokemon.nidorino',
34: 'pokemon.nidoking',
35: 'pokemon.clefairy',
36: 'pokemon.clefable',
37: 'pokemon.vulpix',
38: 'pokemon.ninetales',
39: 'pokemon.jigglypuff',
40: 'pokemon.wigglytuff',
41: 'pokemon.zubat',
42: 'pokemon.golbat',
43: 'pokemon.oddish',
44: 'pokemon.gloom',
45: 'pokemon.vileplume',
46: 'pokemon.paras',
47: 'pokemon.parasect',
48: 'pokemon.venonat',
49: 'pokemon.venomoth',
50: 'pokemon.diglett',
51: 'pokemon.dugtrio',
52: 'pokemon.meowth',
53: 'pokemon.persian',
54: 'pokemon.psyduck',
55: 'pokemon.golduck',
56: 'pokemon.mankey',
57: 'pokemon.primeape',
58: 'pokemon.growlithe',
59: 'pokemon.arcanine',
60: 'pokemon.poliwag',
61: 'pokemon.poliwhirl',
62: 'pokemon.poliwrath',
63: 'pokemon.abra',
64: 'pokemon.kadabra',
65: 'pokemon.alakazam',
66: 'pokemon.machop',
67: 'pokemon.machoke',
68: 'pokemon.machamp',
69: 'pokemon.bellsprout',
70: 'pokemon.weepinbell',
71: 'pokemon.victreebel',
72: 'pokemon.tentacool',
73: 'pokemon.tentacruel',
74: 'pokemon.geodude',
75: 'pokemon.graveler',
76: 'pokemon.golem',
77: 'pokemon.ponyta',
78: 'pokemon.rapidash',
79: 'pokemon.slowpoke',
80: 'pokemon.slowbro',
81: 'pokemon.magnemite',
82: 'pokemon.magneton',
83: 'pokemon.farfetchd',
84: 'pokemon.doduo',
85: 'pokemon.dodrio',
86: 'pokemon.seel',
87: 'pokemon.dewgong',
88: 'pokemon.grimer',
89: 'pokemon.muk',
90: 'pokemon.shellder',
91: 'pokemon.cloyster',
92: 'pokemon.gastly',
93: 'pokemon.haunter',
94: 'pokemon.gengar',
95: 'pokemon.onix',
96: 'pokemon.drowzee',
97: 'pokemon.hypno',
98: 'pokemon.krabby',
99: 'pokemon.kingler',
100: 'pokemon.voltorb',
101: 'pokemon.electrode',
102: 'pokemon.exeggcute',
103: 'pokemon.exeggutor',
104: 'pokemon.cubone',
105: 'pokemon.marowak',
106: 'pokemon.hitmonlee',
107: 'pokemon.hitmonchan',
108: 'pokemon.lickitung',
109: 'pokemon.koffing',
110: 'pokemon.weezing',
111: 'pokemon.rhyhorn',
112: 'pokemon.rhydon',
113: 'pokemon.chansey',
114: 'pokemon.tangela',
115: 'pokemon.kangaskhan',
116: 'pokemon.horsea',
117: 'pokemon.seadra',
118: 'pokemon.goldeen',
119: 'pokemon.seaking',
120: 'pokemon.staryu',
121: 'pokemon.starmie',
122: 'pokemon.mr-mime',
123: 'pokemon.scyther',
124: 'pokemon.jynx',
125: 'pokemon.electabuzz',
126: 'pokemon.magmar',
127: 'pokemon.pinsir',
128: 'pokemon.tauros',
129: 'pokemon.magikarp',
130: 'pokemon.gyarados',
131: 'pokemon.lapras',
132: 'pokemon.ditto',
133: 'pokemon.eevee',
134: 'pokemon.vaporeon',
135: 'pokemon.jolteon',
136: 'pokemon.flareon',
137: 'pokemon.porygon',
138: 'pokemon.omanyte',
139: 'pokemon.omastar',
140: 'pokemon.kabuto',
141: 'pokemon.kabutops',
142: 'pokemon.aerodactyl',
143: 'pokemon.snorlax',
144: 'pokemon.articuno',
145: 'pokemon.zapdos',
146: 'pokemon.moltres',
147: 'pokemon.dratini',
148: 'pokemon.dragonair',
149: 'pokemon.dragonite',
150: 'pokemon.mewtwo',
151: 'pokemon.mew',
1: 'p.bulbasaur',
2: 'p.ivysaur',
3: 'p.venusaur',
4: 'p.charmander',
5: 'p.charmeleon',
6: 'p.charizard',
7: 'p.squirtle',
8: 'p.wartortle',
9: 'p.blastoise',
10: 'p.caterpie',
11: 'p.metapod',
12: 'p.butterfree',
13: 'p.weedle',
14: 'p.kakuna',
15: 'p.beedrill',
16: 'p.pidgey',
17: 'p.pidgeotto',
18: 'p.pidgeot',
19: 'p.rattata',
20: 'p.raticate',
21: 'p.spearow',
22: 'p.fearow',
23: 'p.ekans',
24: 'p.arbok',
25: 'p.pikachu',
26: 'p.raichu',
27: 'p.sandshrew',
28: 'p.sandslash',
29: 'p.nidoran-f',
30: 'p.nidorina',
31: 'p.nidoqueen',
32: 'p.nidoran-m',
33: 'p.nidorino',
34: 'p.nidoking',
35: 'p.clefairy',
36: 'p.clefable',
37: 'p.vulpix',
38: 'p.ninetales',
39: 'p.jigglypuff',
40: 'p.wigglytuff',
41: 'p.zubat',
42: 'p.golbat',
43: 'p.oddish',
44: 'p.gloom',
45: 'p.vileplume',
46: 'p.paras',
47: 'p.parasect',
48: 'p.venonat',
49: 'p.venomoth',
50: 'p.diglett',
51: 'p.dugtrio',
52: 'p.meowth',
53: 'p.persian',
54: 'p.psyduck',
55: 'p.golduck',
56: 'p.mankey',
57: 'p.primeape',
58: 'p.growlithe',
59: 'p.arcanine',
60: 'p.poliwag',
61: 'p.poliwhirl',
62: 'p.poliwrath',
63: 'p.abra',
64: 'p.kadabra',
65: 'p.alakazam',
66: 'p.machop',
67: 'p.machoke',
68: 'p.machamp',
69: 'p.bellsprout',
70: 'p.weepinbell',
71: 'p.victreebel',
72: 'p.tentacool',
73: 'p.tentacruel',
74: 'p.geodude',
75: 'p.graveler',
76: 'p.golem',
77: 'p.ponyta',
78: 'p.rapidash',
79: 'p.slowpoke',
80: 'p.slowbro',
81: 'p.magnemite',
82: 'p.magneton',
83: 'p.farfetchd',
84: 'p.doduo',
85: 'p.dodrio',
86: 'p.seel',
87: 'p.dewgong',
88: 'p.grimer',
89: 'p.muk',
90: 'p.shellder',
91: 'p.cloyster',
92: 'p.gastly',
93: 'p.haunter',
94: 'p.gengar',
95: 'p.onix',
96: 'p.drowzee',
97: 'p.hypno',
98: 'p.krabby',
99: 'p.kingler',
100: 'p.voltorb',
101: 'p.electrode',
102: 'p.exeggcute',
103: 'p.exeggutor',
104: 'p.cubone',
105: 'p.marowak',
106: 'p.hitmonlee',
107: 'p.hitmonchan',
108: 'p.lickitung',
109: 'p.koffing',
110: 'p.weezing',
111: 'p.rhyhorn',
112: 'p.rhydon',
113: 'p.chansey',
114: 'p.tangela',
115: 'p.kangaskhan',
116: 'p.horsea',
117: 'p.seadra',
118: 'p.goldeen',
119: 'p.seaking',
120: 'p.staryu',
121: 'p.starmie',
122: 'p.mr-mime',
123: 'p.scyther',
124: 'p.jynx',
125: 'p.electabuzz',
126: 'p.magmar',
127: 'p.pinsir',
128: 'p.tauros',
129: 'p.magikarp',
130: 'p.gyarados',
131: 'p.lapras',
132: 'p.ditto',
133: 'p.eevee',
134: 'p.vaporeon',
135: 'p.jolteon',
136: 'p.flareon',
137: 'p.porygon',
138: 'p.omanyte',
139: 'p.omastar',
140: 'p.kabuto',
141: 'p.kabutops',
142: 'p.aerodactyl',
143: 'p.snorlax',
144: 'p.articuno',
145: 'p.zapdos',
146: 'p.moltres',
147: 'p.dratini',
148: 'p.dragonair',
149: 'p.dragonite',
150: 'p.mewtwo',
151: 'p.mew',
}
TYPE_IDENTIFIERS = {
0: 'type.normal',
1: 'type.fighting',
2: 'type.flying',
3: 'type.poison',
4: 'type.ground',
5: 'type.rock',
#6: 'type.bird',
7: 'type.bug',
8: 'type.ghost',
9: 'type.steel',
20: 'type.fire',
21: 'type.water',
22: 'type.grass',
23: 'type.electric',
24: 'type.psychic',
25: 'type.ice',
26: 'type.dragon',
27: 'type.dark',
0: 't.normal',
1: 't.fighting',
2: 't.flying',
3: 't.poison',
4: 't.ground',
5: 't.rock',
#6: 't.bird',
7: 't.bug',
8: 't.ghost',
9: 't.steel',
20: 't.fire',
21: 't.water',
22: 't.grass',
23: 't.electric',
24: 't.psychic',
25: 't.ice',
26: 't.dragon',
27: 't.dark',
}
MOVE_IDENTIFIERS = {
# TODO stupid hack for initial moveset
0: '--',
1: 'move.pound',
2: 'move.karate-chop',
3: 'move.double-slap',
4: 'move.comet-punch',
5: 'move.mega-punch',
6: 'move.pay-day',
7: 'move.fire-punch',
8: 'move.ice-punch',
9: 'move.thunder-punch',
10: 'move.scratch',
11: 'move.vice-grip',
12: 'move.guillotine',
13: 'move.razor-wind',
14: 'move.swords-dance',
15: 'move.cut',
16: 'move.gust',
17: 'move.wing-attack',
18: 'move.whirlwind',
19: 'move.fly',
20: 'move.bind',
21: 'move.slam',
22: 'move.vine-whip',
23: 'move.stomp',
24: 'move.double-kick',
25: 'move.mega-kick',
26: 'move.jump-kick',
27: 'move.rolling-kick',
28: 'move.sand-attack',
29: 'move.headbutt',
30: 'move.horn-attack',
31: 'move.fury-attack',
32: 'move.horn-drill',
33: 'move.tackle',
34: 'move.body-slam',
35: 'move.wrap',
36: 'move.take-down',
37: 'move.thrash',
38: 'move.double-edge',
39: 'move.tail-whip',
40: 'move.poison-sting',
41: 'move.twineedle',
42: 'move.pin-missile',
43: 'move.leer',
44: 'move.bite',
45: 'move.growl',
46: 'move.roar',
47: 'move.sing',
48: 'move.supersonic',
49: 'move.sonic-boom',
50: 'move.disable',
51: 'move.acid',
52: 'move.ember',
53: 'move.flamethrower',
54: 'move.mist',
55: 'move.water-gun',
56: 'move.hydro-pump',
57: 'move.surf',
58: 'move.ice-beam',
59: 'move.blizzard',
60: 'move.psybeam',
61: 'move.bubble-beam',
62: 'move.aurora-beam',
63: 'move.hyper-beam',
64: 'move.peck',
65: 'move.drill-peck',
66: 'move.submission',
67: 'move.low-kick',
68: 'move.counter',
69: 'move.seismic-toss',
70: 'move.strength',
71: 'move.absorb',
72: 'move.mega-drain',
73: 'move.leech-seed',
74: 'move.growth',
75: 'move.razor-leaf',
76: 'move.solar-beam',
77: 'move.poison-powder',
78: 'move.stun-spore',
79: 'move.sleep-powder',
80: 'move.petal-dance',
81: 'move.string-shot',
82: 'move.dragon-rage',
83: 'move.fire-spin',
84: 'move.thunder-shock',
85: 'move.thunderbolt',
86: 'move.thunder-wave',
87: 'move.thunder',
88: 'move.rock-throw',
89: 'move.earthquake',
90: 'move.fissure',
91: 'move.dig',
92: 'move.toxic',
93: 'move.confusion',
94: 'move.psychic',
95: 'move.hypnosis',
96: 'move.meditate',
97: 'move.agility',
98: 'move.quick-attack',
99: 'move.rage',
100: 'move.teleport',
101: 'move.night-shade',
102: 'move.mimic',
103: 'move.screech',
104: 'move.double-team',
105: 'move.recover',
106: 'move.harden',
107: 'move.minimize',
108: 'move.smokescreen',
109: 'move.confuse-ray',
110: 'move.withdraw',
111: 'move.defense-curl',
112: 'move.barrier',
113: 'move.light-screen',
114: 'move.haze',
115: 'move.reflect',
116: 'move.focus-energy',
117: 'move.bide',
118: 'move.metronome',
119: 'move.mirror-move',
120: 'move.self-destruct',
121: 'move.egg-bomb',
122: 'move.lick',
123: 'move.smog',
124: 'move.sludge',
125: 'move.bone-club',
126: 'move.fire-blast',
127: 'move.waterfall',
128: 'move.clamp',
129: 'move.swift',
130: 'move.skull-bash',
131: 'move.spike-cannon',
132: 'move.constrict',
133: 'move.amnesia',
134: 'move.kinesis',
135: 'move.soft-boiled',
136: 'move.high-jump-kick',
137: 'move.glare',
138: 'move.dream-eater',
139: 'move.poison-gas',
140: 'move.barrage',
141: 'move.leech-life',
142: 'move.lovely-kiss',
143: 'move.sky-attack',
144: 'move.transform',
145: 'move.bubble',
146: 'move.dizzy-punch',
147: 'move.spore',
148: 'move.flash',
149: 'move.psywave',
150: 'move.splash',
151: 'move.acid-armor',
152: 'move.crabhammer',
153: 'move.explosion',
154: 'move.fury-swipes',
155: 'move.bonemerang',
156: 'move.rest',
157: 'move.rock-slide',
158: 'move.hyper-fang',
159: 'move.sharpen',
160: 'move.conversion',
161: 'move.tri-attack',
162: 'move.super-fang',
163: 'move.slash',
164: 'move.substitute',
165: 'move.struggle',
1: 'm.pound',
2: 'm.karate-chop',
3: 'm.double-slap',
4: 'm.comet-punch',
5: 'm.mega-punch',
6: 'm.pay-day',
7: 'm.fire-punch',
8: 'm.ice-punch',
9: 'm.thunder-punch',
10: 'm.scratch',
11: 'm.vice-grip',
12: 'm.guillotine',
13: 'm.razor-wind',
14: 'm.swords-dance',
15: 'm.cut',
16: 'm.gust',
17: 'm.wing-attack',
18: 'm.whirlwind',
19: 'm.fly',
20: 'm.bind',
21: 'm.slam',
22: 'm.vine-whip',
23: 'm.stomp',
24: 'm.double-kick',
25: 'm.mega-kick',
26: 'm.jump-kick',
27: 'm.rolling-kick',
28: 'm.sand-attack',
29: 'm.headbutt',
30: 'm.horn-attack',
31: 'm.fury-attack',
32: 'm.horn-drill',
33: 'm.tackle',
34: 'm.body-slam',
35: 'm.wrap',
36: 'm.take-down',
37: 'm.thrash',
38: 'm.double-edge',
39: 'm.tail-whip',
40: 'm.poison-sting',
41: 'm.twineedle',
42: 'm.pin-missile',
43: 'm.leer',
44: 'm.bite',
45: 'm.growl',
46: 'm.roar',
47: 'm.sing',
48: 'm.supersonic',
49: 'm.sonic-boom',
50: 'm.disable',
51: 'm.acid',
52: 'm.ember',
53: 'm.flamethrower',
54: 'm.mist',
55: 'm.water-gun',
56: 'm.hydro-pump',
57: 'm.surf',
58: 'm.ice-beam',
59: 'm.blizzard',
60: 'm.psybeam',
61: 'm.bubble-beam',
62: 'm.aurora-beam',
63: 'm.hyper-beam',
64: 'm.peck',
65: 'm.drill-peck',
66: 'm.submission',
67: 'm.low-kick',
68: 'm.counter',
69: 'm.seismic-toss',
70: 'm.strength',
71: 'm.absorb',
72: 'm.mega-drain',
73: 'm.leech-seed',
74: 'm.growth',
75: 'm.razor-leaf',
76: 'm.solar-beam',
77: 'm.poison-powder',
78: 'm.stun-spore',
79: 'm.sleep-powder',
80: 'm.petal-dance',
81: 'm.string-shot',
82: 'm.dragon-rage',
83: 'm.fire-spin',
84: 'm.thunder-shock',
85: 'm.thunderbolt',
86: 'm.thunder-wave',
87: 'm.thunder',
88: 'm.rock-throw',
89: 'm.earthquake',
90: 'm.fissure',
91: 'm.dig',
92: 'm.toxic',
93: 'm.confusion',
94: 'm.psychic',
95: 'm.hypnosis',
96: 'm.meditate',
97: 'm.agility',
98: 'm.quick-attack',
99: 'm.rage',
100: 'm.teleport',
101: 'm.night-shade',
102: 'm.mimic',
103: 'm.screech',
104: 'm.double-team',
105: 'm.recover',
106: 'm.harden',
107: 'm.minimize',
108: 'm.smokescreen',
109: 'm.confuse-ray',
110: 'm.withdraw',
111: 'm.defense-curl',
112: 'm.barrier',
113: 'm.light-screen',
114: 'm.haze',
115: 'm.reflect',
116: 'm.focus-energy',
117: 'm.bide',
118: 'm.metronome',
119: 'm.mirror-move',
120: 'm.self-destruct',
121: 'm.egg-bomb',
122: 'm.lick',
123: 'm.smog',
124: 'm.sludge',
125: 'm.bone-club',
126: 'm.fire-blast',
127: 'm.waterfall',
128: 'm.clamp',
129: 'm.swift',
130: 'm.skull-bash',
131: 'm.spike-cannon',
132: 'm.constrict',
133: 'm.amnesia',
134: 'm.kinesis',
135: 'm.soft-boiled',
136: 'm.high-jump-kick',
137: 'm.glare',
138: 'm.dream-eater',
139: 'm.poison-gas',
140: 'm.barrage',
141: 'm.leech-life',
142: 'm.lovely-kiss',
143: 'm.sky-attack',
144: 'm.transform',
145: 'm.bubble',
146: 'm.dizzy-punch',
147: 'm.spore',
148: 'm.flash',
149: 'm.psywave',
150: 'm.splash',
151: 'm.acid-armor',
152: 'm.crabhammer',
153: 'm.explosion',
154: 'm.fury-swipes',
155: 'm.bonemerang',
156: 'm.rest',
157: 'm.rock-slide',
158: 'm.hyper-fang',
159: 'm.sharpen',
160: 'm.conversion',
161: 'm.tri-attack',
162: 'm.super-fang',
163: 'm.slash',
164: 'm.substitute',
165: 'm.struggle',
}
@ -886,17 +886,17 @@ evos_moves_struct = Struct(
'evo_trigger' / IdentEnum(Byte, EVOLUTION_TRIGGERS),
'evo_arguments' / Embedded(Switch(
lambda ctx: ctx.evo_trigger, {
'evolution-trigger.level-up': Struct(
'ev.level-up': Struct(
'evo_level' / Byte,
),
'evolution-trigger.use-item': Struct(
'ev.use-item': Struct(
# TODO item enum too wow!
'evo_item' / Byte,
# TODO ??? always seems to be 1
'evo_level' / Byte,
),
# TODO ??? always seems to be 1 here too
'evolution-trigger.trade': Struct(
'ev.trade': Struct(
'evo_level' / Byte,
),
},