Aquaria: mega refactoring (#3810)

This PR is mainly refactoring. Here is what changed:
- Changing item names so that each words are capitalized (`Energy Form` instead of `Energy form`)
- Removing duplication of string literal by using:
  - Constants for items and locations,
  - Region's name attribute for entrances,
- Clarify some documentations,
- Adding some region to be more representative of the game and to remove listing of locations in the rules (prioritize entrance rules over individual location rules).

This is the other minor modifications that are not refactoring:
- Adding an early bind song option since that can be used to exit starting area.
- Changing Sun God to Lumerean God to be coherent with the other gods.
- Changing Home Water to Home Waters and Open Water to Open Waters to be coherent with the game.
- Removing a rules to have an attack to go in Mithalas Cathedral since you can to get some checks in it without an attack.
- Adding some options to slot data to be used with Poptracker.
- Fixing a little but still potentially logic breaking bug.
This commit is contained in:
Louis M
2024-12-08 20:18:00 -05:00
committed by GitHub
parent 1f712d9a87
commit 26f9720e69
26 changed files with 2125 additions and 1651 deletions

View File

@@ -5,12 +5,15 @@ Description: Unit test used to test accessibility of locations with and without
"""
from . import AquariaTestBase
from ..Items import ItemNames
from ..Locations import AquariaLocationNames
from ..Options import TurtleRandomizer
class LightAccessTest(AquariaTestBase):
"""Unit test used to test accessibility of locations with and without light"""
options = {
"turtle_randomizer": 1,
"turtle_randomizer": TurtleRandomizer.option_all,
"light_needed_to_get_to_dark_places": True,
}
@@ -19,52 +22,52 @@ class LightAccessTest(AquariaTestBase):
locations = [
# Since the `assertAccessDependency` sweep for events even if I tell it not to, those location cannot be
# tested.
# "Third secret",
# "Sun Temple, bulb in the top left part",
# "Sun Temple, bulb in the top right part",
# "Sun Temple, bulb at the top of the high dark room",
# "Sun Temple, Golden Gear",
# "Sun Worm path, first path bulb",
# "Sun Worm path, second path bulb",
# "Sun Worm path, first cliff bulb",
"Octopus Cave, Dumbo Egg",
"Kelp Forest bottom right area, Odd Container",
"Kelp Forest top right area, Black Pearl",
"Abyss left area, bulb in hidden path room",
"Abyss left area, bulb in the right part",
"Abyss left area, Glowing Seed",
"Abyss left area, Glowing Plant",
"Abyss left area, bulb in the bottom fish pass",
"Abyss right area, bulb behind the rock in the whale room",
"Abyss right area, bulb in the middle path",
"Abyss right area, bulb behind the rock in the middle path",
"Abyss right area, bulb in the left green room",
"Ice Cave, bulb in the room to the right",
"Ice Cave, first bulb in the top exit room",
"Ice Cave, second bulb in the top exit room",
"Ice Cave, third bulb in the top exit room",
"Ice Cave, bulb in the left room",
"Bubble Cave, bulb in the left cave wall",
"Bubble Cave, bulb in the right cave wall (behind the ice crystal)",
"Bubble Cave, Verse Egg",
"Beating Mantis Shrimp Prime",
"King Jellyfish Cave, bulb in the right path from King Jelly",
"King Jellyfish Cave, Jellyfish Costume",
"Beating King Jellyfish God Prime",
"The Whale, Verse Egg",
"First secret",
"Sunken City right area, crate close to the save crystal",
"Sunken City right area, crate in the left bottom room",
"Sunken City left area, crate in the little pipe room",
"Sunken City left area, crate close to the save crystal",
"Sunken City left area, crate before the bedroom",
"Sunken City left area, Girl Costume",
"Sunken City, bulb on top of the boss area",
"Sunken City cleared",
"Beating the Golem",
"Beating Octopus Prime",
"Final Boss area, bulb in the boss third form room",
"Objective complete",
# AquariaLocationNames.THIRD_SECRET,
# AquariaLocationNames.SUN_TEMPLE_BULB_IN_THE_TOP_LEFT_PART,
# AquariaLocationNames.SUN_TEMPLE_BULB_IN_THE_TOP_RIGHT_PART,
# AquariaLocationNames.SUN_TEMPLE_BULB_AT_THE_TOP_OF_THE_HIGH_DARK_ROOM,
# AquariaLocationNames.SUN_TEMPLE_GOLDEN_GEAR,
# AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_FIRST_PATH_BULB,
# AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_SECOND_PATH_BULB,
# AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_FIRST_CLIFF_BULB,
AquariaLocationNames.OCTOPUS_CAVE_DUMBO_EGG,
AquariaLocationNames.KELP_FOREST_BOTTOM_RIGHT_AREA_ODD_CONTAINER,
AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BLACK_PEARL,
AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_HIDDEN_PATH_ROOM,
AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_THE_RIGHT_PART,
AquariaLocationNames.ABYSS_LEFT_AREA_GLOWING_SEED,
AquariaLocationNames.ABYSS_LEFT_AREA_GLOWING_PLANT,
AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_THE_BOTTOM_FISH_PASS,
AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_BEHIND_THE_ROCK_IN_THE_WHALE_ROOM,
AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_IN_THE_MIDDLE_PATH,
AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_BEHIND_THE_ROCK_IN_THE_MIDDLE_PATH,
AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_IN_THE_LEFT_GREEN_ROOM,
AquariaLocationNames.ICE_CAVERN_BULB_IN_THE_ROOM_TO_THE_RIGHT,
AquariaLocationNames.ICE_CAVERN_FIRST_BULB_IN_THE_TOP_EXIT_ROOM,
AquariaLocationNames.ICE_CAVERN_SECOND_BULB_IN_THE_TOP_EXIT_ROOM,
AquariaLocationNames.ICE_CAVERN_THIRD_BULB_IN_THE_TOP_EXIT_ROOM,
AquariaLocationNames.ICE_CAVERN_BULB_IN_THE_LEFT_ROOM,
AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_LEFT_CAVE_WALL,
AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_RIGHT_CAVE_WALL_BEHIND_THE_ICE_CRYSTAL,
AquariaLocationNames.BUBBLE_CAVE_VERSE_EGG,
AquariaLocationNames.BEATING_MANTIS_SHRIMP_PRIME,
AquariaLocationNames.KING_JELLYFISH_CAVE_BULB_IN_THE_RIGHT_PATH_FROM_KING_JELLY,
AquariaLocationNames.KING_JELLYFISH_CAVE_JELLYFISH_COSTUME,
AquariaLocationNames.BEATING_KING_JELLYFISH_GOD_PRIME,
AquariaLocationNames.THE_WHALE_VERSE_EGG,
AquariaLocationNames.FIRST_SECRET,
AquariaLocationNames.SUNKEN_CITY_RIGHT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL,
AquariaLocationNames.SUNKEN_CITY_RIGHT_AREA_CRATE_IN_THE_LEFT_BOTTOM_ROOM,
AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_IN_THE_LITTLE_PIPE_ROOM,
AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL,
AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_BEFORE_THE_BEDROOM,
AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_GIRL_COSTUME,
AquariaLocationNames.SUNKEN_CITY_BULB_ON_TOP_OF_THE_BOSS_AREA,
AquariaLocationNames.SUNKEN_CITY_CLEARED,
AquariaLocationNames.BEATING_THE_GOLEM,
AquariaLocationNames.BEATING_OCTOPUS_PRIME,
AquariaLocationNames.FINAL_BOSS_AREA_BULB_IN_THE_BOSS_THIRD_FORM_ROOM,
AquariaLocationNames.OBJECTIVE_COMPLETE,
]
items = [["Sun form", "Baby Dumbo", "Has sun crystal"]]
items = [[ItemNames.SUN_FORM, ItemNames.BABY_DUMBO, ItemNames.HAS_SUN_CRYSTAL]]
self.assertAccessDependency(locations, items)