shithub: pse

Download patch

ref: cbdeb8387a30444a50f0f8561e0249cd0dc9b3cb
parent: 01aa306241cded28cf14e20744138a7551a9ff4d
author: Jacob Moody <[email protected]>
date: Mon May 15 23:21:42 EDT 2023

view: fix species translation and some more data fields

--- a/dex.c
+++ b/dex.c
@@ -153,6 +153,7 @@
 	[148] "dragonite",
 	[149] "mewtwo",
 	[150] "mew",
+
 	[151] "chikorita",
 	[152] "bayleef",
 	[153] "meganium",
@@ -253,6 +254,7 @@
 	[248] "lugia",
 	[249] "ho-oh",
 	[250] "celebi",
+
 	[251] "treecko",
 	[252] "grovyle",
 	[253] "sceptile",
@@ -892,4 +894,1065 @@
 	[887] "zacian",
 	[888] "zamazenta",
 	[889] "eternatus",
+};
+
+char *movenametab[] = {
+	[0] nil,
+	[1] "Pound",
+	[2] "Karate Chop",
+	[3] "Double Slap",
+	[4] "Comet Punch",
+	[5] "Mega Punch",
+	[6] "Pay Day",
+	[7] "Fire Punch",
+	[8] "Ice Punch",
+	[9] "Thunder Punch",
+	[10] "Scratch",
+	[11] "Vise Grip",
+	[12] "Guillotine",
+	[13] "Razor Wind",
+	[14] "Swords Dance",
+	[15] "Cut",
+	[16] "Gust",
+	[17] "Wing Attack",
+	[18] "Whirlwind",
+	[19] "Fly",
+	[20] "Bind",
+	[21] "Slam",
+	[22] "Vine Whip",
+	[23] "Stomp",
+	[24] "Double Kick",
+	[25] "Mega Kick",
+	[26] "Jump Kick",
+	[27] "Rolling Kick",
+	[28] "Sand Attack",
+	[29] "Headbutt",
+	[30] "Horn Attack",
+	[31] "Fury Attack",
+	[32] "Horn Drill",
+	[33] "Tackle",
+	[34] "Body Slam",
+	[35] "Wrap",
+	[36] "Take Down",
+	[37] "Thrash",
+	[38] "Double-Edge",
+	[39] "Tail Whip",
+	[40] "Poison Sting",
+	[41] "Twineedle",
+	[42] "Pin Missile",
+	[43] "Leer",
+	[44] "Bite",
+	[45] "Growl",
+	[46] "Roar",
+	[47] "Sing",
+	[48] "Supersonic",
+	[49] "Sonic Boom",
+	[50] "Disable",
+	[51] "Acid",
+	[52] "Ember",
+	[53] "Flamethrower",
+	[54] "Mist",
+	[55] "Water Gun",
+	[56] "Hydro Pump",
+	[57] "Surf",
+	[58] "Ice Beam",
+	[59] "Blizzard",
+	[60] "Psybeam",
+	[61] "Bubble Beam",
+	[62] "Aurora Beam",
+	[63] "Hyper Beam",
+	[64] "Peck",
+	[65] "Drill Peck",
+	[66] "Submission",
+	[67] "Low Kick",
+	[68] "Counter",
+	[69] "Seismic Toss",
+	[70] "Strength",
+	[71] "Absorb",
+	[72] "Mega Drain",
+	[73] "Leech Seed",
+	[74] "Growth",
+	[75] "Razor Leaf",
+	[76] "Solar Beam",
+	[77] "Poison Powder",
+	[78] "Stun Spore",
+	[79] "Sleep Powder",
+	[80] "Petal Dance",
+	[81] "String Shot",
+	[82] "Dragon Rage",
+	[83] "Fire Spin",
+	[84] "Thunder Shock",
+	[85] "Thunderbolt",
+	[86] "Thunder Wave",
+	[87] "Thunder",
+	[88] "Rock Throw",
+	[89] "Earthquake",
+	[90] "Fissure",
+	[91] "Dig",
+	[92] "Toxic",
+	[93] "Confusion",
+	[94] "Psychic",
+	[95] "Hypnosis",
+	[96] "Meditate",
+	[97] "Agility",
+	[98] "Quick Attack",
+	[99] "Rage",
+	[100] "Teleport",
+	[101] "Night Shade",
+	[102] "Mimic",
+	[103] "Screech",
+	[104] "Double Team",
+	[105] "Recover",
+	[106] "Harden",
+	[107] "Minimize",
+	[108] "Smokescreen",
+	[109] "Confuse Ray",
+	[110] "Withdraw",
+	[111] "Defense Curl",
+	[112] "Barrier",
+	[113] "Light Screen",
+	[114] "Haze",
+	[115] "Reflect",
+	[116] "Focus Energy",
+	[117] "Bide",
+	[118] "Metronome",
+	[119] "Mirror Move",
+	[120] "Self-Destruct",
+	[121] "Egg Bomb",
+	[122] "Lick",
+	[123] "Smog",
+	[124] "Sludge",
+	[125] "Bone Club",
+	[126] "Fire Blast",
+	[127] "Waterfall",
+	[128] "Clamp",
+	[129] "Swift",
+	[130] "Skull Bash",
+	[131] "Spike Cannon",
+	[132] "Constrict",
+	[133] "Amnesia",
+	[134] "Kinesis",
+	[135] "Soft-Boiled",
+	[136] "High Jump Kick",
+	[137] "Glare",
+	[138] "Dream Eater",
+	[139] "Poison Gas",
+	[140] "Barrage",
+	[141] "Leech Life",
+	[142] "Lovely Kiss",
+	[143] "Sky Attack",
+	[144] "Transform",
+	[145] "Bubble",
+	[146] "Dizzy Punch",
+	[147] "Spore",
+	[148] "Flash",
+	[149] "Psywave",
+	[150] "Splash",
+	[151] "Acid Armor",
+	[152] "Crabhammer",
+	[153] "Explosion",
+	[154] "Fury Swipes",
+	[155] "Bonemerang",
+	[156] "Rest",
+	[157] "Rock Slide",
+	[158] "Hyper Fang",
+	[159] "Sharpen",
+	[160] "Conversion",
+	[161] "Tri Attack",
+	[162] "Super Fang",
+	[163] "Slash",
+	[164] "Substitute",
+	[165] "Struggle",
+	[166] "Sketch",
+	[167] "Triple Kick",
+	[168] "Thief",
+	[169] "Spider Web",
+	[170] "Mind Reader",
+	[171] "Nightmare",
+	[172] "Flame Wheel",
+	[173] "Snore",
+	[174] "Curse",
+	[175] "Flail",
+	[176] "Conversion",
+	[177] "Aeroblast",
+	[178] "Cotton Spore",
+	[179] "Reversal",
+	[180] "Spite",
+	[181] "Powder Snow",
+	[182] "Protect",
+	[183] "Mach Punch",
+	[184] "Scary Face",
+	[185] "Feint Attack",
+	[186] "Sweet Kiss",
+	[187] "Belly Drum",
+	[188] "Sludge Bomb",
+	[189] "Mud-Slap",
+	[190] "Octazooka",
+	[191] "Spikes",
+	[192] "Zap Cannon",
+	[193] "Foresight",
+	[194] "Destiny Bond",
+	[195] "Perish Song",
+	[196] "Icy Wind",
+	[197] "Detect",
+	[198] "Bone Rush",
+	[199] "Lock-On",
+	[200] "Outrage",
+	[201] "Sandstorm",
+	[202] "Giga Drain",
+	[203] "Endure",
+	[204] "Charm",
+	[205] "Rollout",
+	[206] "False Swipe",
+	[207] "Swagger",
+	[208] "Milk Drink",
+	[209] "Spark",
+	[210] "Fury Cutter",
+	[211] "Steel Wing",
+	[212] "Mean Look",
+	[213] "Attract",
+	[214] "Sleep Talk",
+	[215] "Heal Bell",
+	[216] "Return",
+	[217] "Present",
+	[218] "Frustration",
+	[219] "Safeguard",
+	[220] "Pain Split",
+	[221] "Sacred Fire",
+	[222] "Magnitude",
+	[223] "Dynamic Punch",
+	[224] "Megahorn",
+	[225] "Dragon Breath",
+	[226] "Baton Pass",
+	[227] "Encore",
+	[228] "Pursuit",
+	[229] "Rapid Spin",
+	[230] "Sweet Scent",
+	[231] "Iron Tail",
+	[232] "Metal Claw",
+	[233] "Vital Throw",
+	[234] "Morning Sun",
+	[235] "Synthesis",
+	[236] "Moonlight",
+	[237] "Hidden Power",
+	[238] "Cross Chop",
+	[239] "Twister",
+	[240] "Rain Dance",
+	[241] "Sunny Day",
+	[242] "Crunch",
+	[243] "Mirror Coat",
+	[244] "Psych Up",
+	[245] "Extreme Speed",
+	[246] "Ancient Power",
+	[247] "Shadow Ball",
+	[248] "Future Sight",
+	[249] "Rock Smash",
+	[250] "Whirlpool",
+	[251] "Beat Up",
+	[252] "Fake Out",
+	[253] "Uproar",
+	[254] "Stockpile",
+	[255] "Spit Up",
+	[256] "Swallow",
+	[257] "Heat Wave",
+	[258] "Hail",
+	[259] "Torment",
+	[260] "Flatter",
+	[261] "Will-O-Wisp",
+	[262] "Memento",
+	[263] "Facade",
+	[264] "Focus Punch",
+	[265] "Smelling Salts",
+	[266] "Follow Me",
+	[267] "Nature Power",
+	[268] "Charge",
+	[269] "Taunt",
+	[270] "Helping Hand",
+	[271] "Trick",
+	[272] "Role Play",
+	[273] "Wish",
+	[274] "Assist",
+	[275] "Ingrain",
+	[276] "Superpower",
+	[277] "Magic Coat",
+	[278] "Recycle",
+	[279] "Revenge",
+	[280] "Brick Break",
+	[281] "Yawn",
+	[282] "Knock Off",
+	[283] "Endeavor",
+	[284] "Eruption",
+	[285] "Skill Swap",
+	[286] "Imprison",
+	[287] "Refresh",
+	[288] "Grudge",
+	[289] "Snatch",
+	[290] "Secret Power",
+	[291] "Dive",
+	[292] "Arm Thrust",
+	[293] "Camouflage",
+	[294] "Tail Glow",
+	[295] "Luster Purge",
+	[296] "Mist Ball",
+	[297] "Feather Dance",
+	[298] "Teeter Dance",
+	[299] "Blaze Kick",
+	[300] "Mud Sport",
+	[301] "Ice Ball",
+	[302] "Needle Arm",
+	[303] "Slack Off",
+	[304] "Hyper Voice",
+	[305] "Poison Fang",
+	[306] "Crush Claw",
+	[307] "Blast Burn",
+	[308] "Hydro Cannon",
+	[309] "Meteor Mash",
+	[310] "Astonish",
+	[311] "Weather Ball",
+	[312] "Aromatherapy",
+	[313] "Fake Tears",
+	[314] "Air Cutter",
+	[315] "Overheat",
+	[316] "Odor Sleuth",
+	[317] "Rock Tomb",
+	[318] "Silver Wind",
+	[319] "Metal Sound",
+	[320] "Grass Whistle",
+	[321] "Tickle",
+	[322] "Cosmic Power",
+	[323] "Water Spout",
+	[324] "Signal Beam",
+	[325] "Shadow Punch",
+	[326] "Extrasensory",
+	[327] "Sky Uppercut",
+	[328] "Sand Tomb",
+	[329] "Sheer Cold",
+	[330] "Muddy Water",
+	[331] "Bullet Seed",
+	[332] "Aerial Ace",
+	[333] "Icicle Spear",
+	[334] "Iron Defense",
+	[335] "Block",
+	[336] "Howl",
+	[337] "Dragon Claw",
+	[338] "Frenzy Plant",
+	[339] "Bulk Up",
+	[340] "Bounce",
+	[341] "Mud Shot",
+	[342] "Poison Tail",
+	[343] "Covet",
+	[344] "Volt Tackle",
+	[345] "Magical Leaf",
+	[346] "Water Sport",
+	[347] "Calm Mind",
+	[348] "Leaf Blade",
+	[349] "Dragon Dance",
+	[350] "Rock Blast",
+	[351] "Shock Wave",
+	[352] "Water Pulse",
+	[353] "Doom Desire",
+	[354] "Psycho Boost",
+	[355] "Roost",
+	[356] "Gravity",
+	[357] "Miracle Eye",
+	[358] "Wake-Up Slap",
+	[359] "Hammer Arm",
+	[360] "Gyro Ball",
+	[361] "Healing Wish",
+	[362] "Brine",
+	[363] "Natural Gift",
+	[364] "Feint",
+	[365] "Pluck",
+	[366] "Tailwind",
+	[367] "Acupressure",
+	[368] "Metal Burst",
+	[369] "U-turn",
+	[370] "Close Combat",
+	[371] "Payback",
+	[372] "Assurance",
+	[373] "Embargo",
+	[374] "Fling",
+	[375] "Psycho Shift",
+	[376] "Trump Card",
+	[377] "Heal Block",
+	[378] "Wring Out",
+	[379] "Power Trick",
+	[380] "Gastro Acid",
+	[381] "Lucky Chant",
+	[382] "Me First",
+	[383] "Copycat",
+	[384] "Power Swap",
+	[385] "Guard Swap",
+	[386] "Punishment",
+	[387] "Last Resort",
+	[388] "Worry Seed",
+	[389] "Sucker Punch",
+	[390] "Toxic Spikes",
+	[391] "Heart Swap",
+	[392] "Aqua Ring",
+	[393] "Magnet Rise",
+	[394] "Flare Blitz",
+	[395] "Force Palm",
+	[396] "Aura Sphere",
+	[397] "Rock Polish",
+	[398] "Poison Jab",
+	[399] "Dark Pulse",
+	[400] "Night Slash",
+	[401] "Aqua Tail",
+	[402] "Seed Bomb",
+	[403] "Air Slash",
+	[404] "X-Scissor",
+	[405] "Bug Buzz",
+	[406] "Dragon Pulse",
+	[407] "Dragon Rush",
+	[408] "Power Gem",
+	[409] "Drain Punch",
+	[410] "Vacuum Wave",
+	[411] "Focus Blast",
+	[412] "Energy Ball",
+	[413] "Brave Bird",
+	[414] "Earth Power",
+	[415] "Switcheroo",
+	[416] "Giga Impact",
+	[417] "Nasty Plot",
+	[418] "Bullet Punch",
+	[419] "Avalanche",
+	[420] "Ice Shard",
+	[421] "Shadow Claw",
+	[422] "Thunder Fang",
+	[423] "Ice Fang",
+	[424] "Fire Fang",
+	[425] "Shadow Sneak",
+	[426] "Mud Bomb",
+	[427] "Psycho Cut",
+	[428] "Zen Headbutt",
+	[429] "Mirror Shot",
+	[430] "Flash Cannon",
+	[431] "Rock Climb",
+	[432] "Defog",
+	[433] "Trick Room",
+	[434] "Draco Meteor",
+	[435] "Discharge",
+	[436] "Lava Plume",
+	[437] "Leaf Storm",
+	[438] "Power Whip",
+	[439] "Rock Wrecker",
+	[440] "Cross Poison",
+	[441] "Gunk Shot",
+	[442] "Iron Head",
+	[443] "Magnet Bomb",
+	[444] "Stone Edge",
+	[445] "Captivate",
+	[446] "Stealth Rock",
+	[447] "Grass Knot",
+	[448] "Chatter",
+	[449] "Judgment",
+	[450] "Bug Bite",
+	[451] "Charge Beam",
+	[452] "Wood Hammer",
+	[453] "Aqua Jet",
+	[454] "Attack Order",
+	[455] "Defend Order",
+	[456] "Heal Order",
+	[457] "Head Smash",
+	[458] "Double Hit",
+	[459] "Roar of Time",
+	[460] "Spacial Rend",
+	[461] "Lunar Dance",
+	[462] "Crush Grip",
+	[463] "Magma Storm",
+	[464] "Dark Void",
+	[465] "Seed Flare",
+	[466] "Ominous Wind",
+	[467] "Shadow Force",
+	[468] "Hone Claws",
+	[469] "Wide Guard",
+	[470] "Guard Split",
+	[471] "Power Split",
+	[472] "Wonder Room",
+	[473] "Psyshock",
+	[474] "Venoshock",
+	[475] "Autotomize",
+	[476] "Rage Powder",
+	[477] "Telekinesis",
+	[478] "Magic Room",
+	[479] "Smack Down",
+	[480] "Storm Throw",
+	[481] "Flame Burst",
+	[482] "Sludge Wave",
+	[483] "Quiver Dance",
+	[484] "Heavy Slam",
+	[485] "Synchronoise",
+	[486] "Electro Ball",
+	[487] "Soak",
+	[488] "Flame Charge",
+	[489] "Coil",
+	[490] "Low Sweep",
+	[491] "Acid Spray",
+	[492] "Foul Play",
+	[493] "Simple Beam",
+	[494] "Entrainment",
+	[495] "After You",
+	[496] "Round",
+	[497] "Echoed Voice",
+	[498] "Chip Away",
+	[499] "Clear Smog",
+	[500] "Stored Power",
+	[501] "Quick Guard",
+	[502] "Ally Switch",
+	[503] "Scald",
+	[504] "Shell Smash",
+	[505] "Heal Pulse",
+	[506] "Hex",
+	[507] "Sky Drop",
+	[508] "Shift Gear",
+	[509] "Circle Throw",
+	[510] "Incinerate",
+	[511] "Quash",
+	[512] "Acrobatics",
+	[513] "Reflect Type",
+	[514] "Retaliate",
+	[515] "Final Gambit",
+	[516] "Bestow",
+	[517] "Inferno",
+	[518] "Water Pledge",
+	[519] "Fire Pledge",
+	[520] "Grass Pledge",
+	[521] "Volt Switch",
+	[522] "Struggle Bug",
+	[523] "Bulldoze",
+	[524] "Frost Breath",
+	[525] "Dragon Tail",
+	[526] "Work Up",
+	[527] "Electroweb",
+	[528] "Wild Charge",
+	[529] "Drill Run",
+	[530] "Dual Chop",
+	[531] "Heart Stamp",
+	[532] "Horn Leech",
+	[533] "Sacred Sword",
+	[534] "Razor Shell",
+	[535] "Heat Crash",
+	[536] "Leaf Tornado",
+	[537] "Steamroller",
+	[538] "Cotton Guard",
+	[539] "Night Daze",
+	[540] "Psystrike",
+	[541] "Tail Slap",
+	[542] "Hurricane",
+	[543] "Head Charge",
+	[544] "Gear Grind",
+	[545] "Searing Shot",
+	[546] "Techno Blast",
+	[547] "Relic Song",
+	[548] "Secret Sword",
+	[549] "Glaciate",
+	[550] "Bolt Strike",
+	[551] "Blue Flare",
+	[552] "Fiery Dance",
+	[553] "Freeze Shock",
+	[554] "Ice Burn",
+	[555] "Snarl",
+	[556] "Icicle Crash",
+	[557] "V-create",
+	[558] "Fusion Flare",
+	[559] "Fusion Bolt",
+	[560] "Flying Press",
+	[561] "Mat Block",
+	[562] "Belch",
+	[563] "Rototiller",
+	[564] "Sticky Web",
+	[565] "Fell Stinger",
+	[566] "Phantom Force",
+	[567] "Trick-or-Treat",
+	[568] "Noble Roar",
+	[569] "Ion Deluge",
+	[570] "Parabolic Charge",
+	[571] "Forest's Curse",
+	[572] "Petal Blizzard",
+	[573] "Freeze-Dry",
+	[574] "Disarming Voice",
+	[575] "Parting Shot",
+	[576] "Topsy-Turvy",
+	[577] "Draining Kiss",
+	[578] "Crafty Shield",
+	[579] "Flower Shield",
+	[580] "Grassy Terrain",
+	[581] "Misty Terrain",
+	[582] "Electrify",
+	[583] "Play Rough",
+	[584] "Fairy Wind",
+	[585] "Moonblast",
+	[586] "Boomburst",
+	[587] "Fairy Lock",
+	[588] "King's Shield",
+	[589] "Play Nice",
+	[590] "Confide",
+	[591] "Diamond Storm",
+	[592] "Steam Eruption",
+	[593] "Hyperspace Hole",
+	[594] "Water Shuriken",
+	[595] "Mystical Fire",
+	[596] "Spiky Shield",
+	[597] "Aromatic Mist",
+	[598] "Eerie Impulse",
+	[599] "Venom Drench",
+	[600] "Powder",
+	[601] "Geomancy",
+	[602] "Magnetic Flux",
+	[603] "Happy Hour",
+	[604] "Electric Terrain",
+	[605] "Dazzling Gleam",
+	[606] "Celebrate",
+	[607] "Hold Hands",
+	[608] "Baby-Doll Eyes",
+	[609] "Nuzzle",
+	[610] "Hold Back",
+	[611] "Infestation",
+	[612] "Power-Up Punch",
+	[613] "Oblivion Wing",
+	[614] "Thousand Arrows",
+	[615] "Thousand Waves",
+	[616] "Land's Wrath",
+	[617] "Light of Ruin",
+	[618] "Origin Pulse",
+	[619] "Precipice Blades",
+	[620] "Dragon Ascent",
+	[621] "Hyperspace Fury",
+	[622] "Breakneck Blitz",
+	[623] "Breakneck Blitz",
+	[624] "All-Out Pummeling",
+	[625] "All-Out Pummeling",
+	[626] "Supersonic Skystrike",
+	[627] "Supersonic Skystrike",
+	[628] "Acid Downpour",
+	[629] "Acid Downpour",
+	[630] "Tectonic Rage",
+	[631] "Tectonic Rage",
+	[632] "Continental Crush",
+	[633] "Continental Crush",
+	[634] "Savage Spin-Out",
+	[635] "Savage Spin-Out",
+	[636] "Never-Ending Nightmare",
+	[637] "Never-Ending Nightmare",
+	[638] "Corkscrew Crash",
+	[639] "Corkscrew Crash",
+};
+
+
+int gen3speciestab[] = {
+	[0] 0,
+	[1] 1,
+	[2] 2,
+	[3] 3,
+	[4] 4,
+	[5] 5,
+	[6] 6,
+	[7] 7,
+	[8] 8,
+	[9] 9,
+	[10] 10,
+	[11] 11,
+	[12] 12,
+	[13] 13,
+	[14] 14,
+	[15] 15,
+	[16] 16,
+	[17] 17,
+	[18] 18,
+	[19] 19,
+	[20] 20,
+	[21] 21,
+	[22] 22,
+	[23] 23,
+	[24] 24,
+	[25] 25,
+	[26] 26,
+	[27] 27,
+	[28] 28,
+	[29] 29,
+	[30] 30,
+	[31] 31,
+	[32] 32,
+	[33] 33,
+	[34] 34,
+	[35] 35,
+	[36] 36,
+	[37] 37,
+	[38] 38,
+	[39] 39,
+	[40] 40,
+	[41] 41,
+	[42] 42,
+	[43] 43,
+	[44] 44,
+	[45] 45,
+	[46] 46,
+	[47] 47,
+	[48] 48,
+	[49] 49,
+	[50] 50,
+	[51] 51,
+	[52] 52,
+	[53] 53,
+	[54] 54,
+	[55] 55,
+	[56] 56,
+	[57] 57,
+	[58] 58,
+	[59] 59,
+	[60] 60,
+	[61] 61,
+	[62] 62,
+	[63] 63,
+	[64] 64,
+	[65] 65,
+	[66] 66,
+	[67] 67,
+	[68] 68,
+	[69] 69,
+	[70] 70,
+	[71] 71,
+	[72] 72,
+	[73] 73,
+	[74] 74,
+	[75] 75,
+	[76] 76,
+	[77] 77,
+	[78] 78,
+	[79] 79,
+	[80] 80,
+	[81] 81,
+	[82] 82,
+	[83] 83,
+	[84] 84,
+	[85] 85,
+	[86] 86,
+	[87] 87,
+	[88] 88,
+	[89] 89,
+	[90] 90,
+	[91] 91,
+	[92] 92,
+	[93] 93,
+	[94] 94,
+	[95] 95,
+	[96] 96,
+	[97] 97,
+	[98] 98,
+	[99] 99,
+	[100] 100,
+	[101] 101,
+	[102] 102,
+	[103] 103,
+	[104] 104,
+	[105] 105,
+	[106] 106,
+	[107] 107,
+	[108] 108,
+	[109] 109,
+	[110] 110,
+	[111] 111,
+	[112] 112,
+	[113] 113,
+	[114] 114,
+	[115] 115,
+	[116] 116,
+	[117] 117,
+	[118] 118,
+	[119] 119,
+	[120] 120,
+	[121] 121,
+	[122] 122,
+	[123] 123,
+	[124] 124,
+	[125] 125,
+	[126] 126,
+	[127] 127,
+	[128] 128,
+	[129] 129,
+	[130] 130,
+	[131] 131,
+	[132] 132,
+	[133] 133,
+	[134] 134,
+	[135] 135,
+	[136] 136,
+	[137] 137,
+	[138] 138,
+	[139] 139,
+	[140] 140,
+	[141] 141,
+	[142] 142,
+	[143] 143,
+	[144] 144,
+	[145] 145,
+	[146] 146,
+	[147] 147,
+	[148] 148,
+	[149] 149,
+	[150] 150,
+	[151] 151,
+	[152] 152,
+	[153] 153,
+	[154] 154,
+	[155] 155,
+	[156] 156,
+	[157] 157,
+	[158] 158,
+	[159] 159,
+	[160] 160,
+	[161] 161,
+	[162] 162,
+	[163] 163,
+	[164] 164,
+	[165] 165,
+	[166] 166,
+	[167] 167,
+	[168] 168,
+	[169] 169,
+	[170] 170,
+	[171] 171,
+	[172] 172,
+	[173] 173,
+	[174] 174,
+	[175] 175,
+	[176] 176,
+	[177] 177,
+	[178] 178,
+	[179] 179,
+	[180] 180,
+	[181] 181,
+	[182] 182,
+	[183] 183,
+	[184] 184,
+	[185] 185,
+	[186] 186,
+	[187] 187,
+	[188] 188,
+	[189] 189,
+	[190] 190,
+	[191] 191,
+	[192] 192,
+	[193] 193,
+	[194] 194,
+	[195] 195,
+	[196] 196,
+	[197] 197,
+	[198] 198,
+	[199] 199,
+	[200] 200,
+	[201] 201,
+	[202] 202,
+	[203] 203,
+	[204] 204,
+	[205] 205,
+	[206] 206,
+	[207] 207,
+	[208] 208,
+	[209] 209,
+	[210] 210,
+	[211] 211,
+	[212] 212,
+	[213] 213,
+	[214] 214,
+	[215] 215,
+	[216] 216,
+	[217] 217,
+	[218] 218,
+	[219] 219,
+	[220] 220,
+	[221] 221,
+	[222] 222,
+	[223] 223,
+	[224] 224,
+	[225] 225,
+	[226] 226,
+	[227] 227,
+	[228] 228,
+	[229] 229,
+	[230] 230,
+	[231] 231,
+	[232] 232,
+	[233] 233,
+	[234] 234,
+	[235] 235,
+	[236] 236,
+	[237] 237,
+	[238] 238,
+	[239] 239,
+	[240] 240,
+	[241] 241,
+	[242] 242,
+	[243] 243,
+	[244] 244,
+	[245] 245,
+	[246] 246,
+	[247] 247,
+	[248] 248,
+	[249] 249,
+	[250] 250,
+	[251] 251,
+
+	[252] -1,
+	[253] -1,
+	[254] -1,
+	[255] -1,
+	[256] -1,
+	[257] -1,
+	[258] -1,
+	[259] -1,
+	[260] -1,
+	[261] -1,
+	[262] -1,
+	[263] -1,
+	[264] -1,
+	[265] -1,
+	[266] -1,
+	[267] -1,
+	[268] -1,
+	[269] -1,
+	[270] -1,
+	[271] -1,
+	[272] -1,
+	[273] -1,
+	[274] -1,
+	[275] -1,
+	[276] -1,
+
+	[277] 277-25,
+	[278] 278-25,
+	[279] 279-25,
+	[280] 280-25,
+	[281] 281-25,
+	[282] 282-25,
+	[283] 283-25,
+	[284] 284-25,
+	[285] 285-25,
+	[286] 286-25,
+	[287] 287-25,
+	[288] 288-25,
+	[289] 289-25,
+	[290] 290-25,
+	[291] 291-25,
+	[292] 292-25,
+	[293] 293-25,
+	[294] 294-25,
+	[295] 295-25,
+	[296] 296-25,
+	[297] 297-25,
+	[298] 298-25,
+	[299] 299-25,
+	[300] 300-25,
+	[301] 290,
+	[302] 291,
+	[303] 292,
+	[304] 276,
+	[305] 277,
+	[306] 285,
+	[307] 286,
+	[308] 327,
+	[309] 278,
+	[310] 279,
+	[311] 283,
+	[312] 284,
+	[313] 320,
+	[314] 321,
+	[315] 300,
+	[316] 301,
+	[317] 352,
+	[318] 343,
+	[319] 344,
+	[320] 299,
+	[321] 324,
+	[322] 302,
+	[323] 339,
+	[324] 340,
+	[325] 370,
+	[326] 341,
+	[327] 342,
+	[328] 349,
+	[329] 350,
+	[330] 318,
+	[331] 319,
+	[332] 328,
+	[333] 329,
+	[334] 330,
+	[335] 296,
+	[336] 297,
+	[337] 309,
+	[338] 310,
+	[339] 322,
+	[340] 323,
+	[341] 363,
+	[342] 364,
+	[343] 365,
+	[344] 331,
+	[345] 332,
+	[346] 361,
+	[347] 362,
+	[348] 337,
+	[349] 338,
+	[350] 298,
+	[351] 325,
+	[352] 326,
+	[353] 311,
+	[354] 312,
+	[355] 303,
+	[356] 307,
+	[357] 308,
+	[358] 333,
+	[359] 334,
+	[360] 360,
+	[361] 355,
+	[362] 356,
+	[363] 315,
+	[364] 287,
+	[365] 288,
+	[366] 289,
+	[367] 316,
+	[368] 317,
+	[369] 357,
+	[370] 293,
+	[371] 294,
+	[372] 295,
+	[373] 366,
+	[374] 367,
+	[375] 368,
+	[376] 359,
+	[377] 353,
+	[378] 354,
+	[379] 336,
+	[380] 335,
+	[381] 369,
+	[382] 304,
+	[383] 305,
+	[384] 306,
+	[385] 351,
+	[386] 313,
+	[387] 314,
+	[388] 345,
+	[389] 346,
+	[390] 347,
+	[391] 348,
+	[392] 280,
+	[393] 281,
+	[394] 282,
+	[395] 371,
+	[396] 372,
+	[397] 373,
+	[398] 374,
+	[399] 375,
+	[400] 376,
+	[401] 377,
+	[402] 378,
+	[403] 379,
+	[404] 382,
+	[405] 383,
+	[406] 384,
+	[407] 380,
+	[408] 381,
+	[409] 385,
+	[410] 386,
+	[411] 358,
 };
--- a/gen3.c
+++ b/gen3.c
@@ -75,6 +75,27 @@
 }
 
 void
+getgen3iv(Gen3iv *dst, u32int src)
+{
+	dst->hp = (src & 0x1f);
+	src >>= 5;
+	dst->atk = (src & 0x1f);
+	src >>= 5;
+	dst->def = (src & 0x1f);
+	src >>= 5;
+	dst->spe = (src & 0x1f);
+	src >>= 5;
+	dst->spatk = (src & 0x1f);
+	src >>= 5;
+	dst->spdef = (src & 0x1f);
+	src >>= 5;
+
+	dst->egg = (src & 0x1);
+	src >>= 1;
+	dst->ability = (src & 0x1);
+}
+
+void
 getgen3(int fd, Gen3 *save)
 {
 	int i, j;
@@ -115,4 +136,13 @@
 	}
 
 	getpc(&save->pc, save->pcbuf);
+}
+
+extern int gen3speciestab[];
+
+int
+getgen3dex(u16int species)
+{
+
+	return gen3speciestab[species]-1;
 }
--- a/gen3.h
+++ b/gen3.h
@@ -40,6 +40,20 @@
 	uchar pcbuf[3968*8 + 2000];
 };
 
+typedef struct Gen3iv Gen3iv;
+struct Gen3iv {
+	uchar hp;
+	uchar atk;
+	uchar def;
+	uchar spe;
+	uchar spatk;
+	uchar spdef;
+	uchar egg;
+	uchar ability;
+};
+
 void gen3pkstr(uchar *d, uchar *s, int n);
 void getgen3(int fd, Gen3 *save);
 void decryptpokemon(Pokedat *dst, Pokemon *src);
+void getgen3iv(Gen3iv *dst, u32int src);
+int getgen3dex(u16int species);
--- a/view.c
+++ b/view.c
@@ -28,7 +28,10 @@
 Point spwd;
 Image *background, *light;
 
+Image *spritecache[1024];
+
 extern char *dexfiletab[];
+extern char *movenametab[];
 
 static void
 chbox(int x)
@@ -48,6 +51,7 @@
 	Image *image;
 	Rectangle r, r2;
 	Pokedat pd;
+	Gen3iv iv;
 	int i;
 	int fd;
 
@@ -74,10 +78,8 @@
 		if(gen3.pc.box[currentbox*30 + i].otid == 0)
 			continue;
 		decryptpokemon(&pd, gen3.pc.box + currentbox*30 + i);
-		if(pd.g.species > 251)
-			pd.g.species -= 0x19;
 		//fprint(2, "%d %s\n", pd.g.species, dexfiletab[pd.g.species]);
-		snprint(path, sizeof path, "/sys/games/lib/pokesprite/regular/%s.png", dexfiletab[pd.g.species-1]);
+		snprint(path, sizeof path, "/sys/games/lib/pokesprite/regular/%s.png", dexfiletab[getgen3dex(pd.g.species)]);
 		r2.min.x = r.min.x + (i%6) * spwd.x;
 		r2.min.y = r.min.y + (i/6) * spwd.y;
 		r2.max.x = r2.min.x + spwd.x;
@@ -86,18 +88,20 @@
 		if(gen3.pc.box + currentbox*30 + i == currentpk)
 			draw(screen, r2, light, nil, ZP);
 
-		//fprint(2, "opening %s\n", path);
-		fd = open(path, OREAD);
-		if(fd < 0){
-			fprint(2, "could not open %s\n", path);
-			continue;
+		image = spritecache[pd.g.species-1];
+		if(image == nil){
+			fd = open(path, OREAD);
+			if(fd < 0){
+				fprint(2, "could not open %s\n", path);
+				continue;
+			}
+			image = readimage(display, fd, 0);
+			close(fd);
+			if(image == nil)
+				continue;
 		}
-		image = readimage(display, fd, 0);
-		close(fd);
-		if(image == nil)
-			continue;
 		draw(screen, r2, image, nil, ZP);
-		freeimage(image);
+		spritecache[pd.g.species-1] = image;
 	}
 
 	decryptpokemon(&pd, currentpk);
@@ -110,11 +114,20 @@
 	snprint(path, sizeof path, "Exp: %d", pd.g.exp);
 	string(screen, r.min, display->black, ZP, display->defaultfont, path);
 	r.min.y += display->defaultfont->height;
-	snprint(path, sizeof path, "Move 1: %d  Move 2: %d  Move 3: %d  Move 4: %d", pd.a.move1, pd.a.move2, pd.a.move3, pd.a.move4);
+	snprint(path, sizeof path, "Move 1: %s  Move 2: %s", movenametab[pd.a.move1], movenametab[pd.a.move2]);
 	string(screen, r.min, display->black, ZP, display->defaultfont, path);
 	r.min.y += display->defaultfont->height;
 
-	snprint(path, sizeof path, "HP: %d  Atk: %d  Def: %d  SpA: %d  SpD: %d  Spe: %d", pd.e.hp, pd.e.atk, pd.e.def, pd.e.spatk, pd.e.spdef, pd.e.spd);
+	snprint(path, sizeof path, "Move 3: %s  Move 4: %s", movenametab[pd.a.move3], movenametab[pd.a.move4]);
+	string(screen, r.min, display->black, ZP, display->defaultfont, path);
+	r.min.y += display->defaultfont->height;
+
+	snprint(path, sizeof path, "[EV] HP: %d  Atk: %d  Def: %d  SpA: %d  SpD: %d  Spe: %d", pd.e.hp, pd.e.atk, pd.e.def, pd.e.spatk, pd.e.spdef, pd.e.spd);
+	string(screen, r.min, display->black, ZP, display->defaultfont, path);
+	r.min.y += display->defaultfont->height;
+
+	getgen3iv(&iv, pd.m.iv);
+	snprint(path, sizeof path, "[IV] HP: %d  Atk: %d  Def: %d  SpA: %d  SpD: %d  Spe: %d", iv.hp, iv.atk, iv.def, iv.spatk, iv.spdef, iv.spe);
 	string(screen, r.min, display->black, ZP, display->defaultfont, path);
 	r.min.y += display->defaultfont->height;