Skip to content

Commit

Permalink
Fix issue with non progressive missile expansions
Browse files Browse the repository at this point in the history
  • Loading branch information
hesto2 committed Nov 22, 2024
1 parent 2aba46d commit 08a6d91
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ItemPool.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def generate_item_pool(world: "MetroidPrimeWorld") -> List[MetroidPrimeItem]:
progressive_missiles = 8
for _ in range(progressive_missiles):
items.append(
world.create_item("Missile Expansion", ItemClassification.progression)
world.create_item(SuitUpgrade.Missile_Expansion.value, ItemClassification.progression)
)
items.append(
world.create_item(
Expand Down
4 changes: 3 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ def generate_early(self) -> None:
# Init starting inventory
starting_items = generate_start_inventory(self)
for item in starting_items:
self.multiworld.push_precollected(self.create_item(item))
self.multiworld.push_precollected(
self.create_item(item, ItemClassification.progression)
)

def create_regions(self) -> None:
boss_selection = int(self.options.final_bosses)
Expand Down
16 changes: 16 additions & 0 deletions test/TestStartingRoom.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,19 @@ def test_starting_room_is_not_landing_site_when_elevator_rando_is_enabled_and_mi
self.assertTrue(
self.world.options.starting_room_name.value != RoomName.Landing_Site.value
)


class TestStartRoomArboretum(MetroidPrimeTestBase):
run_default_tests = False # type: ignore
options = {
"starting_room_name": RoomName.Arboretum.value,
"elevator_randomization": True,
}

def test_starting_in_arboretum(self):
self.world.generate_early()
distribute_items_restrictive(self.multiworld)
self.assertBeatable(True)
self.assertTrue(
self.can_reach_location("Chozo Ruins: Watery Hall - Scan Puzzle")
)

0 comments on commit 08a6d91

Please sign in to comment.