Skip to content

Commit

Permalink
Add options for starting worlds, renamed locations
Browse files Browse the repository at this point in the history
  • Loading branch information
gaithern committed Mar 18, 2024
1 parent 2586d4e commit 540fc2d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
16 changes: 8 additions & 8 deletions worlds/khrecom/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,13 @@ def get_locations_by_category(category: str) -> Dict[str, KHRECOMLocationData]:
"Olympus Coliseum Room of Truth (Sleight Cross-slash)": KHRECOMLocationData("Progression", 269_2062),
"Olympus Coliseum Room of Truth (Sleight Omnislash)": KHRECOMLocationData("Progression", 269_2063),
"100 Acre Wood Veggie Panic (Sleight Cross-slash+)": KHRECOMLocationData("Progression", 269_2064),
"Starting Checks (Sleight Magic LV2)": KHRECOMLocationData("Progression", 269_2065),
"Starting Checks (Sleight Magic LV3)": KHRECOMLocationData("Progression", 269_2066),
"Pick Up Donald In Battle (Sleight Magic LV2)": KHRECOMLocationData("Progression", 269_2065),
"Pick Up Donald In Battle (Sleight Magic LV3)": KHRECOMLocationData("Progression", 269_2066),
"Twilight Town Room of Rewards (Sleight Stardust Blitz)": KHRECOMLocationData("Progression", 269_2067),
"Starting Checks (Sleight Goofy Tornado LV2)": KHRECOMLocationData("Progression", 269_2068),
"Starting Checks (Sleight Goofy Tornado LV3)": KHRECOMLocationData("Progression", 269_2069),
"Starting Checks (Sleight Goofy Smash)": KHRECOMLocationData("Progression", 269_2070),
"Starting Checks (Sleight Wild Crush)": KHRECOMLocationData("Progression", 269_2071),
"Pick Up Goofy In Battle (Sleight Goofy Tornado LV2)": KHRECOMLocationData("Progression", 269_2068),
"Pick Up Goofy In Battle (Sleight Goofy Tornado LV3)": KHRECOMLocationData("Progression", 269_2069),
"Pick Up Goofy In Battle (Sleight Goofy Smash)": KHRECOMLocationData("Progression", 269_2070),
"Pick Up Goofy In Battle (Sleight Wild Crush)": KHRECOMLocationData("Progression", 269_2071),
"Agrabah Ally (Sleight Sandstorm LV2)": KHRECOMLocationData("Progression", 269_2072),
"Agrabah Ally (Sleight Sandstorm LV3)": KHRECOMLocationData("Progression", 269_2073),
"Halloween Town Ally (Sleight Surprise! LV2)": KHRECOMLocationData("Progression", 269_2074),
Expand All @@ -301,8 +301,8 @@ def get_locations_by_category(category: str) -> Dict[str, KHRECOMLocationData]:
"Neverland Ally (Sleight Hummingbird LV3)": KHRECOMLocationData("Progression", 269_2079),
"Hollow Bastion Ally (Sleight Furious Volley LV2)": KHRECOMLocationData("Progression", 269_2080),
"Hollow Bastion Ally (Sleight Furious Volley LV3)": KHRECOMLocationData("Progression", 269_2081),
"Traverse Town Room of Beginnings (Sleight Lucky Bounty LV2)": KHRECOMLocationData("Progression", 269_2082),
"Traverse Town Room of Beginnings (Sleight Lucky Bounty LV3)": KHRECOMLocationData("Progression", 269_2083),
"Pick Up Pluto In Battle (Sleight Lucky Bounty LV2)": KHRECOMLocationData("Progression", 269_2082),
"Pick Up Pluto In Battle (Sleight Lucky Bounty LV3)": KHRECOMLocationData("Progression", 269_2083),

"Final Marluxia": KHRECOMLocationData("Progression", 269_9999),
}
Expand Down
7 changes: 7 additions & 0 deletions worlds/khrecom/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ class DaysLocations(Toggle):
"""
display_name = "Days Locations"

class StartingWorlds(Toggle):
"""
Toggle whether 3 world cards are guaranteed as part of your starting checks.
"""
display_name = "Starting Worlds"

class ChecksBehindLeon(Toggle):
"""
Toggle whether to include checks behind the Leon sleight tutorial. If left off, the player can safely skip that room.
Expand Down Expand Up @@ -73,3 +79,4 @@ class KHRECOMOptions(PerGameCommonOptions):
levels: ChecksBehindSleightsLevels
zeroes: Zeroes
attack_power: AttackPower
starting_worlds: StartingWorlds
4 changes: 2 additions & 2 deletions worlds/khrecom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def create_items(self):
starting_worlds = self.random.sample(list(starting_worlds.keys()),3)
i = 0
while i < 4:
if i < 3:
if i < 3 and self.options.starting_worlds:
self.multiworld.get_location(starting_locations[i], self.player).place_locked_item(self.create_item(starting_worlds[i]))
elif i == 3 and self.options.early_cure:
self.multiworld.get_location(starting_locations[i], self.player).place_locked_item(self.create_item("Card Set Cure"))
Expand All @@ -72,7 +72,7 @@ def create_items(self):
# Ignore filler, it will be added in a later stage.
if data.category not in ["World Unlocks", "Gold Map Cards", "Friend Cards", "Enemy Cards", "Sleights"]:
continue
if name not in starting_worlds:
if not self.options.starting_worlds or name not in starting_worlds:
item_pool += [self.create_item(name) for _ in range(0, quantity)]

# Fill any empty locations with filler items.
Expand Down

0 comments on commit 540fc2d

Please sign in to comment.