@Override
	public void setMovesLearnt(Map<Pokemon, List<MoveLearnt>> movesets) {
		int pointersOffset = romEntry.getValue("PokemonMovesetsTableOffset");
		int pokeStatsOffset = romEntry.getValue("PokemonStatsOffset");
		int pkmnCount = romEntry.getValue("InternalPokemonCount");
		for (int i = 1; i <= pkmnCount; i++) {
			int pointer = readWord(pointersOffset + (i - 1) * 2);
			int realPointer = calculateOffset(bankOf(pointersOffset), pointer);
			if (pokeRBYToNumTable[i] != 0) {
				Pokemon pkmn = pokes[pokeRBYToNumTable[i]];
				List<MoveLearnt> ourMoves = movesets.get(pkmn);
				int statsOffset = 0;
				if (pokeRBYToNumTable[i] == 151 && !romEntry.isYellow) {
					// Mewww
					statsOffset = romEntry.getValue("MewStatsOffset");
				} else {
					statsOffset = (pokeRBYToNumTable[i] - 1) * 0x1C
							+ pokeStatsOffset;
				}
				int movenum = 0;
				while (movenum < 4 && ourMoves.size() > movenum
						&& ourMoves.get(movenum).level == 1) {
					rom[statsOffset + 0x0F + movenum] = (byte) moveNumToRomTable[ourMoves
							.get(movenum).move];
					movenum++;
				}
				// Write out the rest of zeroes
				for (int mn = movenum; mn < 4; mn++) {
					rom[statsOffset + 0x0F + mn] = 0;
				}
				// Skip over evolution data
				while (rom[realPointer] != 0) {
					if (rom[realPointer] == 1) {
						realPointer += 3;
					} else if (rom[realPointer] == 2) {
						realPointer += 4;
					} else if (rom[realPointer] == 3) {
						realPointer += 3;
					}
				}
				realPointer++;
				while (rom[realPointer] != 0 && movenum < ourMoves.size()) {
					rom[realPointer] = (byte) ourMoves.get(movenum).level;
					rom[realPointer + 1] = (byte) moveNumToRomTable[ourMoves
							.get(movenum).move];
					realPointer += 2;
					movenum++;
				}
				// Make sure we finish off the moveset
				rom[realPointer] = 0;
			}
		}
	}