summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAjarmar <axel.jarmar@gmail.com>2022-04-26 23:28:20 +0200
committerAjarmar <axel.jarmar@gmail.com>2022-04-29 23:47:24 +0200
commitf2f27779d1a9f578476068edfeb31912005978e6 (patch)
tree86ee5757db1f98ee8575fc67b3dd9c65a313c571
parent3bf85549633c647f4d20c505af25ad0ab845f333 (diff)
refactor trainer pokemon randomization
-rw-r--r--src/com/dabomstew/pkrandom/Randomizer.java5
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java363
-rwxr-xr-xsrc/com/dabomstew/pkrandom/romhandlers/RomHandler.java2
3 files changed, 95 insertions, 275 deletions
diff --git a/src/com/dabomstew/pkrandom/Randomizer.java b/src/com/dabomstew/pkrandom/Randomizer.java
index 07b627d..380c015 100644
--- a/src/com/dabomstew/pkrandom/Randomizer.java
+++ b/src/com/dabomstew/pkrandom/Randomizer.java
@@ -336,11 +336,8 @@ public class Randomizer {
case RANDOM:
case DISTRIBUTED:
case MAINPLAYTHROUGH:
- romHandler.randomizeTrainerPokes(settings);
- trainersChanged = true;
- break;
case TYPE_THEMED:
- romHandler.typeThemeTrainerPokes(settings);
+ romHandler.randomizeTrainerPokes(settings);
trainersChanged = true;
break;
default:
diff --git a/src/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java
index 3a40648..21eab34 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/AbstractRomHandler.java
@@ -1547,204 +1547,6 @@ public abstract class AbstractRomHandler implements RomHandler {
return crashThreshold;
}
- @Override
- public void randomizeTrainerPokes(Settings settings) {
- boolean usePowerLevels = settings.isTrainersUsePokemonOfSimilarStrength();
- boolean noLegendaries = settings.isTrainersBlockLegendaries();
- boolean noEarlyWonderGuard = settings.isTrainersBlockEarlyWonderGuard();
- int levelModifier = settings.isTrainersLevelModified() ? settings.getTrainersLevelModifier() : 0;
- boolean distributionSetting = settings.getTrainersMod() == Settings.TrainersMod.DISTRIBUTED;
- boolean mainPlaythroughSetting = settings.getTrainersMod() == Settings.TrainersMod.MAINPLAYTHROUGH;
- boolean includeFormes = settings.isAllowTrainerAlternateFormes();
- boolean banIrregularAltFormes = settings.isBanIrregularAltFormes();
- boolean swapMegaEvos = settings.isSwapTrainerMegaEvos();
- boolean shinyChance = settings.isShinyChance();
- boolean abilitiesAreRandomized = settings.getAbilitiesMod() == Settings.AbilitiesMod.RANDOMIZE;
- int eliteFourUniquePokemonNumber = settings.getEliteFourUniquePokemonNumber();
- boolean forceFullyEvolved = settings.isTrainersForceFullyEvolved();
- int forceFullyEvolvedLevel = settings.getTrainersForceFullyEvolvedLevel();
- boolean forceChallengeMode = (settings.getCurrentMiscTweaks() & MiscTweak.FORCE_CHALLENGE_MODE.getValue()) > 0;
- boolean rivalCarriesStarter = settings.isRivalCarriesStarterThroughout();
- List<Pokemon> starterList = getStarters().subList(0,3);
-
- checkPokemonRestrictions();
- List<Trainer> currentTrainers = this.getTrainers();
- // Randomize the order trainers are randomized in.
- // Leads to less predictable results for various modifiers.
- // Need to keep the original ordering around for saving though.
-
- List<Trainer> scrambledTrainers = new ArrayList<>(currentTrainers);
- Collections.shuffle(scrambledTrainers, this.random);
-
- // Set up Pokemon pool
- cachedAllList = noLegendaries ? new ArrayList<>(noLegendaryList) : new ArrayList<>(
- mainPokemonList);
- if (includeFormes) {
- cachedAllList = noLegendaries ? new ArrayList<>(noLegendaryListInclFormes) : new ArrayList<>(
- mainPokemonListInclFormes);
- }
- cachedAllList =
- cachedAllList
- .stream()
- .filter(pk -> !pk.actuallyCosmetic)
- .collect(Collectors.toList());
- List<Pokemon> banned = this.getBannedFormesForTrainerPokemon();
- if (!abilitiesAreRandomized) {
- List<Pokemon> abilityDependentFormes = getAbilityDependentFormes();
- banned.addAll(abilityDependentFormes);
- }
- if (banIrregularAltFormes) {
- banned.addAll(getIrregularFormes());
- }
- cachedAllList.removeAll(banned);
-
- // Elite Four Unique Pokemon related
- boolean eliteFourUniquePokemon = eliteFourUniquePokemonNumber > 0;
- List<Pokemon> illegalList = new ArrayList<>();
- List<Pokemon> bannedFromUniqueList = new ArrayList<>();
- boolean illegalEvoChains = false;
- List<Integer> eliteFourIndices = getEliteFourTrainers(forceChallengeMode);
- if (eliteFourUniquePokemon) {
- // Sort Elite Four Trainers to the start of the list
- scrambledTrainers.sort((t1, t2) ->
- Boolean.compare(eliteFourIndices.contains(currentTrainers.indexOf(t2)+1),eliteFourIndices.contains(currentTrainers.indexOf(t1)+1)));
- illegalEvoChains = forceFullyEvolved;
- if (rivalCarriesStarter) {
- for (Pokemon starter: starterList) {
- // If rival/friend carries starter, the starters cannot be set as unique
- bannedFromUniqueList.add(starter);
- setEvoChainAsIllegal(starter, bannedFromUniqueList, true);
-
- // If the final boss is a rival/friend, the fully evolved starters will be unique
- if (hasRivalFinalBattle()) {
- cachedAllList.removeAll(getFinalEvos(starter));
- if (illegalEvoChains) {
- illegalList.add(starter);
- setEvoChainAsIllegal(starter, illegalList, true);
- }
- }
- }
- }
- }
-
- List<Integer> mainPlaythroughTrainers = getMainPlaythroughTrainers();
-
- // Randomize Trainer Pokemon
- // The result after this is done will not be final if "Force Fully Evolved" or "Rival Carries Starter"
- // are used, as they are applied later
- for (Trainer t : scrambledTrainers) {
- applyLevelModifierToTrainerPokemon(t, levelModifier);
- if (t.tag != null && t.tag.equals("IRIVAL")) {
- // This is the first rival in Yellow. His Pokemon is used to determine the non-player
- // starter, so we can't change it here. Just skip it
- continue;
- }
-
- int trainerIndex = currentTrainers.indexOf(t) + 1;
-
- List<TrainerPokemon> trainerPokemonList = new ArrayList<>(t.pokemon);
-
- // Elite Four Unique Pokemon related
- boolean eliteFourTrackPokemon = false;
- boolean eliteFourRival = false;
- if (eliteFourUniquePokemon && eliteFourIndices.contains(trainerIndex)) {
- eliteFourTrackPokemon = true;
- Collections.reverse(trainerPokemonList);
- trainerPokemonList.sort((tp1, tp2) -> Integer.compare(tp2.level, tp1.level));
- if (rivalCarriesStarter && (t.tag.contains("RIVAL") || t.tag.contains("FRIEND"))) {
- eliteFourRival = true;
- }
- }
-
- for (TrainerPokemon tp : trainerPokemonList) {
- boolean swapThisMegaEvo = swapMegaEvos && tp.canMegaEvolve();
- boolean wgAllowed = (!noEarlyWonderGuard) || tp.level >= 20;
- boolean eliteFourSetUniquePokemon =
- eliteFourTrackPokemon && eliteFourUniquePokemonNumber > trainerPokemonList.indexOf(tp);
- boolean willForceEvolve = forceFullyEvolved && tp.level >= forceFullyEvolvedLevel;
-
- Pokemon oldPK = tp.pokemon;
- if (tp.forme > 0) {
- oldPK = getAltFormeOfPokemon(oldPK, tp.forme);
- }
-
- bannedList = new ArrayList<>();
- bannedList.addAll(usedAsUniqueList);
- if (illegalEvoChains && willForceEvolve) {
- bannedList.addAll(illegalList);
- }
- if (eliteFourSetUniquePokemon) {
- bannedList.addAll(bannedFromUniqueList);
- }
-
- Pokemon newPK = pickReplacement(
- oldPK,
- usePowerLevels,
- null,
- noLegendaries,
- wgAllowed,
- distributionSetting || (mainPlaythroughSetting && mainPlaythroughTrainers.contains(t.offset)),
- swapThisMegaEvo,
- abilitiesAreRandomized,
- includeFormes,
- banIrregularAltFormes
- );
-
- // Chosen Pokemon is locked in past here
- if (distributionSetting || (mainPlaythroughSetting && mainPlaythroughTrainers.contains(t.offset))) {
- setPlacementHistory(newPK);
- }
- tp.absolutePokeNumber = newPK.number;
- tp.pokemon = newPK;
- setFormeForTrainerPokemon(tp, newPK);
- tp.abilitySlot = getRandomAbilitySlot(newPK);
- tp.resetMoves = true;
-
- if (!eliteFourRival) {
- if (eliteFourSetUniquePokemon) {
- List<Pokemon> actualPKList;
- if (willForceEvolve) {
- actualPKList = getFinalEvos(newPK);
- } else {
- actualPKList = new ArrayList<>();
- actualPKList.add(newPK);
- }
- for (Pokemon actualPK: actualPKList) {
- usedAsUniqueList.add(actualPK);
- if (illegalEvoChains) {
- setEvoChainAsIllegal(actualPK, illegalList, willForceEvolve);
- }
- }
- }
- if (eliteFourTrackPokemon) {
- bannedFromUniqueList.add(newPK);
- if (illegalEvoChains) {
- setEvoChainAsIllegal(newPK, bannedFromUniqueList, willForceEvolve);
- }
- }
- } else {
- eliteFourRival = false;
- }
-
- if (swapThisMegaEvo) {
- tp.heldItem = newPK
- .megaEvolutionsFrom
- .get(this.random.nextInt(newPK.megaEvolutionsFrom.size()))
- .argument;
- }
-
- if (shinyChance) {
- if (this.random.nextInt(256) == 0) {
- tp.IVs |= (1 << 30);
- }
- }
- }
- }
-
- // Save it all up
- this.setTrainers(currentTrainers, false);
- }
-
private void setEvoChainAsIllegal(Pokemon newPK, List<Pokemon> illegalList, boolean willForceEvolve) {
// set pre-evos as illegal
setIllegalPreEvos(newPK, illegalList);
@@ -1814,12 +1616,15 @@ public abstract class AbstractRomHandler implements RomHandler {
}
@Override
- public void typeThemeTrainerPokes(Settings settings) {
+ public void randomizeTrainerPokes(Settings settings) {
boolean usePowerLevels = settings.isTrainersUsePokemonOfSimilarStrength();
boolean weightByFrequency = settings.isTrainersMatchTypingDistribution();
boolean noLegendaries = settings.isTrainersBlockLegendaries();
boolean noEarlyWonderGuard = settings.isTrainersBlockEarlyWonderGuard();
int levelModifier = settings.isTrainersLevelModified() ? settings.getTrainersLevelModifier() : 0;
+ boolean isTypeThemed = settings.getTrainersMod() == Settings.TrainersMod.TYPE_THEMED;
+ boolean distributionSetting = settings.getTrainersMod() == Settings.TrainersMod.DISTRIBUTED;
+ boolean mainPlaythroughSetting = settings.getTrainersMod() == Settings.TrainersMod.MAINPLAYTHROUGH;
boolean includeFormes = settings.isAllowTrainerAlternateFormes();
boolean banIrregularAltFormes = settings.isBanIrregularAltFormes();
boolean swapMegaEvos = settings.isSwapTrainerMegaEvos();
@@ -1830,10 +1635,10 @@ public abstract class AbstractRomHandler implements RomHandler {
int forceFullyEvolvedLevel = settings.getTrainersForceFullyEvolvedLevel();
boolean forceChallengeMode = (settings.getCurrentMiscTweaks() & MiscTweak.FORCE_CHALLENGE_MODE.getValue()) > 0;
boolean rivalCarriesStarter = settings.isRivalCarriesStarterThroughout();
- List<Pokemon> starterList = getStarters().subList(0,3);
checkPokemonRestrictions();
- List<Trainer> currentTrainers = this.getTrainers();
+
+ // Set up Pokemon pool
cachedReplacementLists = new TreeMap<>();
cachedAllList = noLegendaries ? new ArrayList<>(noLegendaryList) : new ArrayList<>(
mainPokemonList);
@@ -1849,8 +1654,6 @@ public abstract class AbstractRomHandler implements RomHandler {
.stream()
.filter(pk -> !pk.actuallyCosmetic)
.collect(Collectors.toList());
- typeWeightings = new TreeMap<>();
- totalTypeWeighting = 0;
List<Pokemon> banned = this.getBannedFormesForTrainerPokemon();
if (!abilitiesAreRandomized) {
@@ -1862,69 +1665,76 @@ public abstract class AbstractRomHandler implements RomHandler {
}
cachedAllList.removeAll(banned);
- // Construct groupings for types
- // Anything starting with GYM or ELITE or CHAMPION is a group
- Map<String, List<Trainer>> groups = new TreeMap<>();
+ List<Trainer> currentTrainers = this.getTrainers();
+
+ // Type Themed related
Map<Trainer, Type> trainerTypes = new TreeMap<>();
- for (Trainer t : currentTrainers) {
- if (t.tag != null && t.tag.equals("IRIVAL")) {
- // This is the first rival in Yellow. His Pokemon is used to determine the non-player
- // starter, so we can't change it here. Just skip it.
- continue;
- }
- String group = t.tag == null ? "" : t.tag;
- if (group.contains("-")) {
- group = group.substring(0, group.indexOf('-'));
- }
- if (group.startsWith("GYM") || group.startsWith("ELITE") || group.startsWith("CHAMPION")
- || group.startsWith("THEMED")) {
- // Yep this is a group
- if (!groups.containsKey(group)) {
- groups.put(group, new ArrayList<>());
+ Set<Type> usedUberTypes = new TreeSet<>();
+ if (isTypeThemed) {
+ typeWeightings = new TreeMap<>();
+ totalTypeWeighting = 0;
+ // Construct groupings for types
+ // Anything starting with GYM or ELITE or CHAMPION is a group
+ Map<String, List<Trainer>> groups = new TreeMap<>();
+ for (Trainer t : currentTrainers) {
+ if (t.tag != null && t.tag.equals("IRIVAL")) {
+ // This is the first rival in Yellow. His Pokemon is used to determine the non-player
+ // starter, so we can't change it here. Just skip it.
+ continue;
+ }
+ String group = t.tag == null ? "" : t.tag;
+ if (group.contains("-")) {
+ group = group.substring(0, group.indexOf('-'));
}
- groups.get(group).add(t);
- } else if (group.startsWith("GIO")) {
- // Giovanni has same grouping as his gym, gym 8
- if (!groups.containsKey("GYM8")) {
- groups.put("GYM8", new ArrayList<>());
+ if (group.startsWith("GYM") || group.startsWith("ELITE") || group.startsWith("CHAMPION")
+ || group.startsWith("THEMED")) {
+ // Yep this is a group
+ if (!groups.containsKey(group)) {
+ groups.put(group, new ArrayList<>());
+ }
+ groups.get(group).add(t);
+ } else if (group.startsWith("GIO")) {
+ // Giovanni has same grouping as his gym, gym 8
+ if (!groups.containsKey("GYM8")) {
+ groups.put("GYM8", new ArrayList<>());
+ }
+ groups.get("GYM8").add(t);
}
- groups.get("GYM8").add(t);
}
- }
- // Give a type to each group
- // Gym & elite types have to be unique
- // So do uber types, including the type we pick for champion
- Set<Type> usedGymTypes = new TreeSet<>();
- Set<Type> usedEliteTypes = new TreeSet<>();
- Set<Type> usedUberTypes = new TreeSet<>();
- for (String group : groups.keySet()) {
- List<Trainer> trainersInGroup = groups.get(group);
- // Shuffle ordering within group to promote randomness
- Collections.shuffle(trainersInGroup, random);
- Type typeForGroup = pickType(weightByFrequency, noLegendaries, includeFormes);
- if (group.startsWith("GYM")) {
- while (usedGymTypes.contains(typeForGroup)) {
- typeForGroup = pickType(weightByFrequency, noLegendaries, includeFormes);
+ // Give a type to each group
+ // Gym & elite types have to be unique
+ // So do uber types, including the type we pick for champion
+ Set<Type> usedGymTypes = new TreeSet<>();
+ Set<Type> usedEliteTypes = new TreeSet<>();
+ for (String group : groups.keySet()) {
+ List<Trainer> trainersInGroup = groups.get(group);
+ // Shuffle ordering within group to promote randomness
+ Collections.shuffle(trainersInGroup, random);
+ Type typeForGroup = pickType(weightByFrequency, noLegendaries, includeFormes);
+ if (group.startsWith("GYM")) {
+ while (usedGymTypes.contains(typeForGroup)) {
+ typeForGroup = pickType(weightByFrequency, noLegendaries, includeFormes);
+ }
+ usedGymTypes.add(typeForGroup);
}
- usedGymTypes.add(typeForGroup);
- }
- if (group.startsWith("ELITE")) {
- while (usedEliteTypes.contains(typeForGroup)) {
- typeForGroup = pickType(weightByFrequency, noLegendaries, includeFormes);
+ if (group.startsWith("ELITE")) {
+ while (usedEliteTypes.contains(typeForGroup)) {
+ typeForGroup = pickType(weightByFrequency, noLegendaries, includeFormes);
+ }
+ usedEliteTypes.add(typeForGroup);
+ }
+ if (group.equals("CHAMPION")) {
+ usedUberTypes.add(typeForGroup);
}
- usedEliteTypes.add(typeForGroup);
- }
- if (group.equals("CHAMPION")) {
- usedUberTypes.add(typeForGroup);
- }
- for (Trainer t : trainersInGroup) {
- trainerTypes.put(t, typeForGroup);
+ for (Trainer t : trainersInGroup) {
+ trainerTypes.put(t, typeForGroup);
+ }
}
}
- // New: randomize the order trainers are randomized in.
+ // Randomize the order trainers are randomized in.
// Leads to less predictable results for various modifiers.
// Need to keep the original ordering around for saving though.
List<Trainer> scrambledTrainers = new ArrayList<>(currentTrainers);
@@ -1932,7 +1742,7 @@ public abstract class AbstractRomHandler implements RomHandler {
// Elite Four Unique Pokemon related
boolean eliteFourUniquePokemon = eliteFourUniquePokemonNumber > 0;
- List<Pokemon> illegalList = new ArrayList<>();
+ List<Pokemon> illegalIfEvolvedList = new ArrayList<>();
List<Pokemon> bannedFromUniqueList = new ArrayList<>();
boolean illegalEvoChains = false;
List<Integer> eliteFourIndices = getEliteFourTrainers(forceChallengeMode);
@@ -1942,6 +1752,7 @@ public abstract class AbstractRomHandler implements RomHandler {
Boolean.compare(eliteFourIndices.contains(currentTrainers.indexOf(t2)+1),eliteFourIndices.contains(currentTrainers.indexOf(t1)+1)));
illegalEvoChains = forceFullyEvolved;
if (rivalCarriesStarter) {
+ List<Pokemon> starterList = getStarters().subList(0,3);
for (Pokemon starter: starterList) {
// If rival/friend carries starter, the starters cannot be set as unique
bannedFromUniqueList.add(starter);
@@ -1951,15 +1762,19 @@ public abstract class AbstractRomHandler implements RomHandler {
if (hasRivalFinalBattle()) {
cachedAllList.removeAll(getFinalEvos(starter));
if (illegalEvoChains) {
- illegalList.add(starter);
- setEvoChainAsIllegal(starter, illegalList, true);
+ illegalIfEvolvedList.add(starter);
+ setEvoChainAsIllegal(starter, illegalIfEvolvedList, true);
}
}
}
}
}
- // Give a type to each unassigned trainer
+ List<Integer> mainPlaythroughTrainers = getMainPlaythroughTrainers();
+
+ // Randomize Trainer Pokemon
+ // The result after this is done will not be final if "Force Fully Evolved" or "Rival Carries Starter"
+ // are used, as they are applied later
for (Trainer t : scrambledTrainers) {
applyLevelModifierToTrainerPokemon(t, levelModifier);
if (t.tag != null && t.tag.equals("IRIVAL")) {
@@ -1968,8 +1783,9 @@ public abstract class AbstractRomHandler implements RomHandler {
continue;
}
+ // If type themed, give a type to each unassigned trainer
Type typeForTrainer = trainerTypes.get(t);
- if (typeForTrainer == null) {
+ if (typeForTrainer == null && isTypeThemed) {
typeForTrainer = pickType(weightByFrequency, noLegendaries, includeFormes);
// Ubers: can't have the same type as each other
if (t.tag != null && t.tag.equals("UBER")) {
@@ -1989,6 +1805,9 @@ public abstract class AbstractRomHandler implements RomHandler {
boolean eliteFourRival = false;
if (eliteFourUniquePokemon && eliteFourIndices.contains(trainerIndex)) {
eliteFourTrackPokemon = true;
+
+ // Sort Pokemon list back to front, and then put highest level Pokemon first
+ // (Only while randomizing, does not affect order in game)
Collections.reverse(trainerPokemonList);
trainerPokemonList.sort((tp1, tp2) -> Integer.compare(tp2.level, tp1.level));
if (rivalCarriesStarter && (t.tag.contains("RIVAL") || t.tag.contains("FRIEND"))) {
@@ -2011,20 +1830,19 @@ public abstract class AbstractRomHandler implements RomHandler {
bannedList = new ArrayList<>();
bannedList.addAll(usedAsUniqueList);
if (illegalEvoChains && willForceEvolve) {
- bannedList.addAll(illegalList);
+ bannedList.addAll(illegalIfEvolvedList);
}
if (eliteFourSetUniquePokemon) {
bannedList.addAll(bannedFromUniqueList);
}
- Pokemon newPK =
- pickReplacement(
+ Pokemon newPK = pickTrainerPokeReplacement(
oldPK,
usePowerLevels,
typeForTrainer,
noLegendaries,
wgAllowed,
- false,
+ distributionSetting || (mainPlaythroughSetting && mainPlaythroughTrainers.contains(t.offset)),
swapThisMegaEvo,
abilitiesAreRandomized,
includeFormes,
@@ -2032,6 +1850,9 @@ public abstract class AbstractRomHandler implements RomHandler {
);
// Chosen Pokemon is locked in past here
+ if (distributionSetting || (mainPlaythroughSetting && mainPlaythroughTrainers.contains(t.offset))) {
+ setPlacementHistory(newPK);
+ }
tp.absolutePokeNumber = newPK.number;
tp.pokemon = newPK;
setFormeForTrainerPokemon(tp, newPK);
@@ -2047,10 +1868,11 @@ public abstract class AbstractRomHandler implements RomHandler {
actualPKList = new ArrayList<>();
actualPKList.add(newPK);
}
+ // If the unique Pokemon will evolve, we have to set all its potential evolutions as unique
for (Pokemon actualPK: actualPKList) {
usedAsUniqueList.add(actualPK);
if (illegalEvoChains) {
- setEvoChainAsIllegal(actualPK, illegalList, willForceEvolve);
+ setEvoChainAsIllegal(actualPK, illegalIfEvolvedList, willForceEvolve);
}
}
}
@@ -2061,6 +1883,8 @@ public abstract class AbstractRomHandler implements RomHandler {
}
}
} else {
+ // If the champion is a rival, the first Pokemon will be skipped - it's already
+ // set as unique since it's a starter
eliteFourRival = false;
}
@@ -6220,9 +6044,11 @@ public abstract class AbstractRomHandler implements RomHandler {
private List<Pokemon> usedAsUniqueList = new ArrayList<>();
- private Pokemon pickReplacement(Pokemon current, boolean usePowerLevels, Type type, boolean noLegendaries,
- boolean wonderGuardAllowed, boolean usePlacementHistory, boolean swapMegaEvos,
- boolean abilitiesAreRandomized, boolean allowAltFormes, boolean banIrregularAltFormes) {
+ private Pokemon pickTrainerPokeReplacement(Pokemon current, boolean usePowerLevels, Type type,
+ boolean noLegendaries, boolean wonderGuardAllowed,
+ boolean usePlacementHistory, boolean swapMegaEvos,
+ boolean abilitiesAreRandomized, boolean allowAltFormes,
+ boolean banIrregularAltFormes) {
List<Pokemon> pickFrom;
List<Pokemon> withoutBannedPokemon;
@@ -6250,7 +6076,6 @@ public abstract class AbstractRomHandler implements RomHandler {
} else if (type != null && cachedReplacementLists != null) {
// "Type Themed" settings
if (!cachedReplacementLists.containsKey(type)) {
-// System.out.println(current.name + " using cachedReplacementLists");
List<Pokemon> pokemonOfType = allowAltFormes ? pokemonOfTypeInclFormes(type, noLegendaries) :
pokemonOfType(type, noLegendaries);
pokemonOfType.removeAll(this.getBannedFormesForPlayerPokemon());
diff --git a/src/com/dabomstew/pkrandom/romhandlers/RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/RomHandler.java
index 2fc9bc8..9fca35b 100755
--- a/src/com/dabomstew/pkrandom/romhandlers/RomHandler.java
+++ b/src/com/dabomstew/pkrandom/romhandlers/RomHandler.java
@@ -249,8 +249,6 @@ public interface RomHandler {
void randomizeTrainerPokes(Settings settings);
- void typeThemeTrainerPokes(Settings settings);
-
void randomizeTrainerHeldItems(Settings settings);
List<Integer> getSensibleHeldItemsFor(TrainerPokemon tp, boolean consumableOnly, List<Move> moves, Map<Integer, List<MoveLearnt>> movesets);