summaryrefslogtreecommitdiff
path: root/src/com/sneed/pkrandom/romhandlers
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/sneed/pkrandom/romhandlers')
-rwxr-xr-xsrc/com/sneed/pkrandom/romhandlers/AbstractRomHandler.java5
-rwxr-xr-xsrc/com/sneed/pkrandom/romhandlers/Gen5RomHandler.java1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/com/sneed/pkrandom/romhandlers/AbstractRomHandler.java b/src/com/sneed/pkrandom/romhandlers/AbstractRomHandler.java
index 4f289e9..f3471db 100755
--- a/src/com/sneed/pkrandom/romhandlers/AbstractRomHandler.java
+++ b/src/com/sneed/pkrandom/romhandlers/AbstractRomHandler.java
@@ -1962,6 +1962,11 @@ public abstract class AbstractRomHandler implements RomHandler {
} else {
for (TrainerPokemon tp : t.pokemon) {
randomizeHeldItem(tp, settings, moves, movesets);
+ if (t.requiresUniqueHeldItems) {
+ while (!t.pokemonHaveUniqueHeldItems()) {
+ randomizeHeldItem(tp, settings, moves, movesets);
+ }
+ }
}
}
}
diff --git a/src/com/sneed/pkrandom/romhandlers/Gen5RomHandler.java b/src/com/sneed/pkrandom/romhandlers/Gen5RomHandler.java
index 2743583..26a3aee 100755
--- a/src/com/sneed/pkrandom/romhandlers/Gen5RomHandler.java
+++ b/src/com/sneed/pkrandom/romhandlers/Gen5RomHandler.java
@@ -1468,6 +1468,7 @@ public class Gen5RomHandler extends AbstractDSRomHandler {
tr.poketype = 3; // have held items and custom moves
int nameAndClassIndex = Gen5Constants.bw2DriftveilTrainerOffsets.get(trno);
tr.fullDisplayName = tclasses.get(Gen5Constants.normalTrainerClassLength + nameAndClassIndex) + " " + tnames.get(Gen5Constants.normalTrainerNameLength + nameAndClassIndex);
+ tr.requiresUniqueHeldItems = true;
int pokemonNum = 6;
if (trno < 2) {
pokemonNum = 3;