@@ -323,8 +323,7 @@ void placeVanillaItems(WorldPool& worlds)
323323// Determine which items are major items. A major item is any item required
324324// for access to any progression location and/or game beatability. This function
325325// is called multiple times during the fill algorithm as the items required for
326- // beatability may change depending on which items are placed in race mode locations
327- // and/or plandomized
326+ // beatability may change depending on which items are placed in boss locations and/or plandomized
328327void determineMajorItems (WorldPool& worlds, ItemPool& itemPool, LocationPool& allLocations)
329328{
330329 LOG_TO_DEBUG (" Determining Major Items" );
@@ -405,7 +404,7 @@ static FillError randomizeOwnDungeon(WorldPool& worlds, ItemPool& itemPool)
405404 {
406405 // Filter to only the dungeons locations which are progression locations
407406 // If dungeons are not progression locations, or if race mode is on
408- // and this isn't a race mode dungeon, then take all locations in
407+ // and this isn't a required dungeon, then take all locations in
409408 // the dungeon since none of them are progression anyway
410409 auto worldLocations = world.getLocations ();
411410 auto dungeonLocations = filterFromPool (worldLocations, [&dungeon = dungeon, &settings = settings](const Location* loc){
@@ -586,66 +585,67 @@ static FillError handleDungeonItems(WorldPool& worlds, ItemPool& itemPool)
586585 return FillError::NONE;
587586}
588587
589- static void generateRaceModeItems (const LocationPool& raceModeLocations , ItemPool& raceModeItems , ItemPool& itemsToChooseFrom, ItemPool& mainItemPool)
588+ static void generateBossItems (const LocationPool& bossLocations , ItemPool& chosenItems , ItemPool& itemsToChooseFrom, ItemPool& mainItemPool)
590589{
591590 shufflePool (itemsToChooseFrom);
592- while (!itemsToChooseFrom.empty () && raceModeItems .size () < raceModeLocations .size ())
591+ while (!itemsToChooseFrom.empty () && chosenItems .size () < bossLocations .size ())
593592 {
594- raceModeItems .push_back (popRandomElement (itemsToChooseFrom));
593+ chosenItems .push_back (popRandomElement (itemsToChooseFrom));
595594 }
596595 // Add back any unused elements
597596 addElementsToPool (mainItemPool, itemsToChooseFrom);
598597}
599598
600599// Place progression items in specific locations at the end of dungeons to require the player
601600// to beat those dungeons.
602- static FillError placeRaceModeItems (WorldPool& worlds, ItemPool& itemPool, LocationPool& allLocations)
601+ static FillError placeBossItems (WorldPool& worlds, ItemPool& itemPool, LocationPool& allLocations)
603602{
604- LocationPool raceModeLocations ;
605- ItemPool raceModeItems ;
603+ LocationPool bossLocations ;
604+ ItemPool bossItems ;
606605 for (auto & world : worlds)
607606 {
608607 if (world.getSettings ().required_boss_items ) {
609608 for (auto & [name, dungeon] : world.dungeons )
610609 {
611610 if (dungeon.isRequiredDungeon )
612611 {
613- auto raceModeLocation = dungeon.raceModeLocation ;
612+ auto bossLocation = dungeon.bossLocation ;
614613 // If this location already has an item placed at it, then skip it
615- if (raceModeLocation ->currentItem .getGameItemId () != GameItem::INVALID)
614+ if (bossLocation ->currentItem .getGameItemId () != GameItem::INVALID)
616615 {
617616 continue ;
618617 }
619- raceModeLocations .push_back (raceModeLocation );
618+ bossLocations .push_back (bossLocation );
620619 }
621620 }
622621 }
623622 }
624623
625624 // Build up the list of boss items with major items.
626625 auto majorItems = filterAndEraseFromPool (itemPool, [](const Item& item){return item.isMajorItem ();});
627- generateRaceModeItems (raceModeLocations, raceModeItems , majorItems, itemPool);
626+ generateBossItems (bossLocations, bossItems , majorItems, itemPool);
628627
629- // logItemPool("raceModeItems ", raceModeItems );
628+ logItemPool (" Boss Items " , bossItems );
630629
631- if (raceModeItems .size () < raceModeLocations .size ())
630+ if (bossItems .size () < bossLocations .size ())
632631 {
633- Utility::platformLog (" WARNING: Not enough major items to place at race mode locations." );
632+ Utility::platformLog (" WARNING: Not enough major items to place at boss locations." );
634633 }
635634
636- // Then place the items in the race mode locations
635+ // Then place the items in the boss locations
637636 FillError err;
638- FILL_ERROR_CHECK (assumedFill (worlds, raceModeItems , itemPool, raceModeLocations ));
637+ FILL_ERROR_CHECK (assumedFill (worlds, bossItems , itemPool, bossLocations ));
639638
640- // Set race mode locations which had items placed at them as having expected items
641- for (auto raceModeLoc : raceModeLocations )
639+ // Set boss locations which had items placed at them as having expected items
640+ for (auto loc : bossLocations )
642641 {
643- raceModeLoc ->hasExpectedItem = true ;
642+ loc ->hasExpectedItem = true ;
644643 }
645644
646645 // Recalculate major items since new items may now be required depending on
647- // what items were placed at race mode locations
646+ // what items were placed at boss locations
648647 determineMajorItems (worlds, itemPool, allLocations);
648+
649649 return FillError::NONE;
650650}
651651
@@ -734,10 +734,10 @@ FillError fill(WorldPool& worlds)
734734
735735 determineMajorItems (worlds, itemPool, allLocations);
736736 FILL_ERROR_CHECK (placeNonProgressLocationPlandomizerItems (worlds, itemPool));
737- // Handle dungeon items and race mode dungeons first if necessary. Generally
737+ // Handle dungeon and/or boss items first if necessary. Generally
738738 // we need to place items that go into more restrictive location pools first before
739739 // we can place other items.
740- FILL_ERROR_CHECK (placeRaceModeItems (worlds, itemPool, allLocations));
740+ FILL_ERROR_CHECK (placeBossItems (worlds, itemPool, allLocations));
741741 FILL_ERROR_CHECK (handleDungeonItems (worlds, itemPool));
742742
743743 // Recalculate major items again since new items may now be required depending on
0 commit comments