diff options
author | tom-overton <tom.overton@outlook.com> | 2022-05-24 00:03:06 -0700 |
---|---|---|
committer | rafa_99 <raroma09@gmail.com> | 2022-05-24 12:01:37 +0100 |
commit | 0d8c6dbc1e6d9cd92a40fa2b016ceb9663b6c221 (patch) | |
tree | d88d84c52008f6ff09d0a9d4ba58caac94798f3a /src/com/sneed/pkrandom | |
parent | 2cd3c0ad9b4a375b53b003d07e2227bd91e2bc08 (diff) |
FRLG: Don't consider certain useless items as non-bad
Diffstat (limited to 'src/com/sneed/pkrandom')
-rw-r--r-- | src/com/sneed/pkrandom/constants/Gen3Constants.java | 27 | ||||
-rwxr-xr-x | src/com/sneed/pkrandom/romhandlers/Gen3RomHandler.java | 2 |
2 files changed, 21 insertions, 8 deletions
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<Integer> 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<Trainer> 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); } |