@Override
	public void setMovesLearnt(Map<Pokemon, List<MoveLearnt>> movesets) {
		int baseOffset = romEntry.getValue("PokemonMovesets");
		for (int i = 1; i <= 411; i++) {
			int offsToPtr = baseOffset + (i - 1) * 4;
			int moveDataLoc = readPointer(offsToPtr);
			if (i >= 252 && i <= 276) {
				continue;
			}
			Pokemon pkmn = pokes[poke3GIndexToNum(i)];
			List<MoveLearnt> moves = movesets.get(pkmn);
			int mloc = moveDataLoc;
			while ((rom[mloc] & 0xFF) != 0xFF || (rom[mloc + 1] & 0xFF) != 0xFF) {
				mloc += 2;
			}
			int currentMoveCount = (mloc - moveDataLoc);
			int newMoveCount = moves.size();
			int looplimit = Math.min(currentMoveCount, newMoveCount);
			for (int mv = 0; mv < looplimit; mv++) {
				MoveLearnt ml = moves.get(mv);
				rom[moveDataLoc] = (byte) (ml.move & 0xFF);
				int levelPart = (ml.level << 1) & 0xFE;
				if (ml.move > 255) {
					levelPart++;
				}
				rom[moveDataLoc + 1] = (byte) levelPart;
				moveDataLoc += 2;
			}
			if (looplimit < currentMoveCount) {
				// need a new terminator
				rom[moveDataLoc] = (byte) 0xFF;
				rom[moveDataLoc + 1] = (byte) 0xFF;
			}
		}

	}