Skip to content

Commit

Permalink
Zillion: fix empty 1st Sphere (ArchipelagoMW#1770)
Browse files Browse the repository at this point in the history
There was a low probability that the Zillion 1st sphere could be empty.
caused this test failure: https://github.com/ArchipelagoMW/Archipelago/actions/runs/4791795268/jobs/8522615992
  • Loading branch information
beauxq authored Apr 26, 2023
1 parent 173513c commit 22ed7ff
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions worlds/zillion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ def create_regions(self) -> None:
self.my_locations = []

self.zz_system.randomizer.place_canister_gun_reqs()
# low probability that place_canister_gun_reqs() results in empty 1st sphere
# testing code to force low probability event:
# for zz_room_name in ["r01c2", "r02c0", "r02c7", "r03c5"]:
# for zz_loc in self.zz_system.randomizer.regions[zz_room_name].locations:
# zz_loc.req.gun = 2
if len(self.zz_system.randomizer.get_locations(Req(gun=1, jump=1))) == 0:
self.logger.info("Zillion avoided rare empty 1st sphere.")
for zz_loc in self.zz_system.randomizer.regions["r03c5"].locations:
zz_loc.req.gun = 1
assert len(self.zz_system.randomizer.get_locations(Req(gun=1, jump=1))) != 0

start = self.zz_system.randomizer.regions['start']

Expand Down

0 comments on commit 22ed7ff

Please sign in to comment.