@@ -1281,63 +1281,60 @@ def bigocto_location(self) -> Optional[Location]:
12811281 if self .cached_bigocto_location is not ...:
12821282 return self .cached_bigocto_location
12831283 # Find an item location behind the Jabu boss door by searching regions breadth-first without going back into Jabu proper
1284- if self .settings .logic_rules == 'advanced' :
1285- location = self .get_location ('Barinade' )
1286- else :
1287- jabu_reward_regions = {self .get_entrance ('Jabu Jabus Belly Before Boss -> Barinade Boss Room' ).connected_region }
1288- already_checked = set ()
1289- location = None
1290- while jabu_reward_regions :
1291- locations = [
1292- loc
1293- for region in jabu_reward_regions
1294- if region is not None and region .locations is not None
1295- for loc in region .locations
1296- if not loc .locked
1297- and loc .has_item ()
1298- and not loc .item .event
1299- and (loc .type != "Shop" or loc .name in self .shop_prices ) # ignore regular shop items (but keep special deals)
1300- ]
1301- if locations :
1302- # Location types later in the list will be preferred over earlier ones or ones not in the list.
1303- # This ensures that if the region behind the boss door is a boss arena, the medallion or stone will be used.
1304- priority_types = (
1305- "Wonderitem" ,
1306- "Freestanding" ,
1307- "ActorOverride" ,
1308- "RupeeTower" ,
1309- "Pot" ,
1310- "Crate" ,
1311- "FlyingPot" ,
1312- "SmallCrate" ,
1313- "Beehive" ,
1314- "SilverRupee" ,
1315- "GS Token" ,
1316- "GrottoScrub" ,
1317- "Scrub" ,
1318- "Shop" ,
1319- "MaskShop" ,
1320- "NPC" ,
1321- "Collectable" ,
1322- "Chest" ,
1323- "Cutscene" ,
1324- "Song" ,
1325- "BossHeart" ,
1326- "Boss" ,
1327- )
1328- best_type = max ((location .type for location in locations ), key = lambda type : priority_types .index (type ) if type in priority_types else - 1 )
1329- location = random .choice (list (filter (lambda loc : loc .type == best_type , locations )))
1330- break
1331- already_checked |= jabu_reward_regions
1332- jabu_reward_regions = {
1333- exit .connected_region
1334- for region in jabu_reward_regions
1335- if region is not None
1336- for exit in region .exits
1337- if exit .connected_region is not None
1338- and (exit .connected_region .dungeon is None or exit .connected_region .dungeon .name != 'Jabu Jabus Belly' )
1339- and exit .connected_region .name not in already_checked
1340- }
1284+ jabu_reward_regions = {self .get_entrance ('Jabu Jabus Belly Before Boss -> Barinade Boss Room' ).connected_region }
1285+ already_checked = set ()
1286+ location = None
1287+ while jabu_reward_regions :
1288+ locations = [
1289+ loc
1290+ for region in jabu_reward_regions
1291+ if region is not None and region .locations is not None
1292+ for loc in region .locations
1293+ if not loc .locked
1294+ and loc .has_item ()
1295+ and not loc .item .event
1296+ and (loc .type != "Shop" or loc .name in self .shop_prices ) # ignore regular shop items (but keep special deals)
1297+ ]
1298+ if locations :
1299+ # Location types later in the list will be preferred over earlier ones or ones not in the list.
1300+ # This ensures that if the region behind the boss door is a boss arena, the medallion or stone will be used.
1301+ priority_types = (
1302+ "Wonderitem" ,
1303+ "Freestanding" ,
1304+ "ActorOverride" ,
1305+ "RupeeTower" ,
1306+ "Pot" ,
1307+ "Crate" ,
1308+ "FlyingPot" ,
1309+ "SmallCrate" ,
1310+ "Beehive" ,
1311+ "SilverRupee" ,
1312+ "GS Token" ,
1313+ "GrottoScrub" ,
1314+ "Scrub" ,
1315+ "Shop" ,
1316+ "MaskShop" ,
1317+ "NPC" ,
1318+ "Collectable" ,
1319+ "Chest" ,
1320+ "Cutscene" ,
1321+ "Song" ,
1322+ "BossHeart" ,
1323+ "Boss" ,
1324+ )
1325+ best_type = max ((location .type for location in locations ), key = lambda type : priority_types .index (type ) if type in priority_types else - 1 )
1326+ location = random .choice (list (filter (lambda loc : loc .type == best_type , locations )))
1327+ break
1328+ already_checked |= jabu_reward_regions
1329+ jabu_reward_regions = {
1330+ exit .connected_region
1331+ for region in jabu_reward_regions
1332+ if region is not None
1333+ for exit in region .exits
1334+ if exit .connected_region is not None
1335+ and (exit .connected_region .dungeon is None or exit .connected_region .dungeon .name != 'Jabu Jabus Belly' )
1336+ and exit .connected_region .name not in already_checked
1337+ }
13411338 self .cached_bigocto_location = location
13421339 return location
13431340
0 commit comments