Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aquaria: Fixing no progression bug #4199

Merged
merged 1 commit into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions worlds/aquaria/Regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,79 +1152,79 @@ def __adjusting_manual_rules(self) -> None:
def __no_progression_hard_or_hidden_location(self) -> None:
self.multiworld.get_location("Energy Temple boss area, Fallen God Tooth",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference, each lambda lives in memory, so it would be more efficient to define this once and paste it across all relevant locations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean that lambdas are never collected? Like for the rest of the execution of the program?

self.multiworld.get_location("Mithalas boss area, beating Mithalan God",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Kelp Forest boss area, beating Drunian God",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Sun Temple boss area, beating Sun God",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Sunken City, bulb on top of the boss area",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Home Water, Nautilus Egg",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Energy Temple blaster room, Blaster Egg",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Mithalas City Castle, beating the Priests",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Mermog cave, Piranha Egg",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Octopus Cave, Dumbo Egg",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("King Jellyfish Cave, bulb in the right path from King Jelly",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("King Jellyfish Cave, Jellyfish Costume",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Final Boss area, bulb in the boss third form room",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Sun Worm path, first cliff bulb",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Sun Worm path, second cliff bulb",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("The Veil top right area, bulb at the top of the waterfall",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Bubble Cave, bulb in the left cave wall",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Bubble Cave, bulb in the right cave wall (behind the ice crystal)",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Bubble Cave, Verse Egg",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Kelp Forest bottom left area, bulb close to the spirit crystals",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Kelp Forest bottom left area, Walker Baby",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Sun Temple, Sun Key",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("The Body bottom area, Mutant Costume",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Sun Temple, bulb in the hidden room of the right part",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement
self.multiworld.get_location("Arnassi Ruins, Arnassi Armor",
self.player).item_rule = \
lambda item: item.classification != ItemClassification.progression
lambda item: not item.advancement

def adjusting_rules(self, options: AquariaOptions) -> None:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_unconfine_home_water_both_location_fillable(self) -> None:
for location in self.unfillable_locations:
for item_name in self.world.item_names:
item = self.get_item_by_name(item_name)
if item.classification == ItemClassification.progression:
if item.advancement:
self.assertFalse(
self.world.get_location(location).can_fill(self.multiworld.state, item, False),
"The location \"" + location + "\" can be filled with \"" + item_name + "\"")
Expand Down
Loading