@Override
	public void randomizeMoveTutorCompatibility(boolean preferSameType) {
		if (!this.hasMoveTutors()) {
			return;
		}
		// Get current compatibility
		Map<Pokemon, boolean[]> compat = this.getMoveTutorCompatibility();
		List<Integer> mts = this.getMoveTutorMoves();
		List<Move> moveData = this.getMoves();
		for (Map.Entry<Pokemon, boolean[]> compatEntry : compat.entrySet()) {
			Pokemon pkmn = compatEntry.getKey();
			boolean[] flags = compatEntry.getValue();
			for (int i = 1; i <= mts.size(); i++) {
				int move = mts.get(i - 1);
				Move mv = moveData.get(move);
				double probability = 0.5;
				if (preferSameType) {
					if (pkmn.primaryType.equals(mv.type)
							|| (pkmn.secondaryType != null && pkmn.secondaryType
									.equals(mv.type))) {
						probability = 0.9;
					} else if (mv.type != null && mv.type.equals(Type.NORMAL)) {
						probability = 0.5;
					} else {
						probability = 0.25;
					}
				}
				flags[i] = (RandomSource.random() < probability);
			}
		}

		// Set the new compatibility
		this.setMoveTutorCompatibility(compat);

	}