Skip to content

Commit

Permalink
Added Chronicles win condition
Browse files Browse the repository at this point in the history
  • Loading branch information
gaithern committed Jan 5, 2024
1 parent b108409 commit ef8ae48
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
7 changes: 7 additions & 0 deletions worlds/kh1/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ class Atlantica(Toggle):
"""
display_name = "Atlantica"

class Chronicles(Toggle):
"""
Toggle whether the win condition should be placed behind a random chronicle. Better for fast games.
"""
display_name = "Chronicles"

kh1_options: Dict[str, type(Option)] = {
"sephiroth": Sephiroth,
"atlantica": Atlantica,
"chronicles": Chronicles,
}
16 changes: 14 additions & 2 deletions worlds/kh1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,20 @@ def create_items(self):
while i < 100:
self.multiworld.get_location(level_up_locations[i], self.player).place_locked_item(self.create_item(level_up_item_pool[i]))
i = i + 1
if self.get_setting("sephiroth"):
self.multiworld.get_location("Ansem's Secret Report 12", self.player).place_locked_item(self.create_item("Victory"))
if self.get_setting("sephiroth") or self.get_setting("chronicles"):
possible_win_locations = []
if self.get_setting("sephiroth"):
possible_win_locations.append("Ansem's Secret Report 12")
if self.get_setting("chronicles"):
possible_win_locations.append("Chronicles Wonderland")
possible_win_locations.append("Chronicles Olympus Coliseum")
possible_win_locations.append("Chronicles Deep Jungle")
possible_win_locations.append("Chronicles Agrabah")
possible_win_locations.append("Chronicles Monstro")
if self.get_setting("atlantica"):
possible_win_locations.append("Chronicles Atlantica")
possible_win_locations.append("Chronicles Halloween Town")
self.multiworld.get_location(random.choice(possible_win_locations), self.player).place_locked_item(self.create_item("Victory"))
else:
self.multiworld.get_location("End of the World Final Rest Chest", self.player).place_locked_item(self.create_item("Victory"))
total_locations = len(self.multiworld.get_unfilled_locations(self.player))
Expand Down

0 comments on commit ef8ae48

Please sign in to comment.