From 0d8c6dbc1e6d9cd92a40fa2b016ceb9663b6c221 Mon Sep 17 00:00:00 2001 From: tom-overton Date: Tue, 24 May 2022 00:03:06 -0700 Subject: FRLG: Don't consider certain useless items as non-bad --- .../sneed/pkrandom/constants/Gen3Constants.java | 27 ++++++++++++++++------ .../sneed/pkrandom/romhandlers/Gen3RomHandler.java | 2 +- 2 files changed, 21 insertions(+), 8 deletions(-) (limited to 'src/com/sneed/pkrandom') diff --git a/src/com/sneed/pkrandom/constants/Gen3Constants.java b/src/com/sneed/pkrandom/constants/Gen3Constants.java index c56a206..5c075c3 100644 --- a/src/com/sneed/pkrandom/constants/Gen3Constants.java +++ b/src/com/sneed/pkrandom/constants/Gen3Constants.java @@ -480,7 +480,7 @@ public class Gen3Constants { } } - public static ItemList allowedItems, nonBadItems; + public static ItemList allowedItems, nonBadItemsRSE, nonBadItemsFRLG; public static List regularShopItems, opShopItems; public static String getRunningShoesCheckPrefix(int romType) { @@ -518,12 +518,17 @@ public class Gen3Constants { // non-bad items // ban specific pokemon hold items, berries, apricorns, mail - nonBadItems = allowedItems.copy(); - nonBadItems.banSingles(Gen3Items.lightBall, Gen3Items.oranBerry, Gen3Items.soulDew); - nonBadItems.banRange(Gen3Items.orangeMail, 12); // mail - nonBadItems.banRange(Gen3Items.figyBerry, 33); // berries - nonBadItems.banRange(Gen3Items.luckyPunch, 4); // pokemon specific - nonBadItems.banRange(Gen3Items.redScarf, 5); // contest scarves + nonBadItemsRSE = allowedItems.copy(); + nonBadItemsRSE.banSingles(Gen3Items.lightBall, Gen3Items.oranBerry, Gen3Items.soulDew); + nonBadItemsRSE.banRange(Gen3Items.orangeMail, 12); // mail + nonBadItemsRSE.banRange(Gen3Items.figyBerry, 33); // berries + nonBadItemsRSE.banRange(Gen3Items.luckyPunch, 4); // pokemon specific + nonBadItemsRSE.banRange(Gen3Items.redScarf, 5); // contest scarves + + // FRLG-exclusive bad items + // Ban Shoal items and Shards, since they don't do anything + nonBadItemsFRLG = nonBadItemsRSE.copy(); + nonBadItemsFRLG.banRange(Gen3Items.shoalSalt, 6); regularShopItems = new ArrayList<>(); @@ -540,6 +545,14 @@ public class Gen3Constants { opShopItems.add(Gen3Items.luckyEgg); } + public static ItemList getNonBadItems(int romType) { + if (romType == Gen3Constants.RomType_FRLG) { + return nonBadItemsFRLG; + } else { + return nonBadItemsRSE; + } + } + public static void trainerTagsRS(List trs, int romType) { // Gym Trainers tag(trs, "GYM1", 0x140, 0x141); diff --git a/src/com/sneed/pkrandom/romhandlers/Gen3RomHandler.java b/src/com/sneed/pkrandom/romhandlers/Gen3RomHandler.java index de9cf1c..3997f63 100755 --- a/src/com/sneed/pkrandom/romhandlers/Gen3RomHandler.java +++ b/src/com/sneed/pkrandom/romhandlers/Gen3RomHandler.java @@ -482,7 +482,7 @@ public class Gen3RomHandler extends AbstractGBRomHandler { loadItemNames(); allowedItems = Gen3Constants.allowedItems.copy(); - nonBadItems = Gen3Constants.nonBadItems.copy(); + nonBadItems = Gen3Constants.getNonBadItems(romEntry.romType).copy(); actualCRC32 = FileFunctions.getCRC32(rom); } -- cgit v1.2.3