The Messenger: Add Shop Rando (#1834)

* add shop shuffle options and items

* add logic for the shop slots

* write cost tests

* start on shop item logic

* make strike and second wind early items

* some cleanup

* remove 5 shards

* double cost requirement for really expensive items and raise the rates

* add test for shop shuffle with minimum other locations

* put power seal in front of shards

* rename locations and items

* update rules, regions, and shop

* update tests and misc fixes

* minor cleanup

* implement money wrench and figurines

* clean out now unneeded info from slot_data

* docs update and fix a failure when not shuffling shops

* remove shop shuffle option

* Finish out shop rules

* make seals generation easier to read and fix tests

* rule adjustments

* oop

* adjust the prices to be a bit more generous

* add max price to slot data for tracker

* update the hard rules a bit

* remove unnecessary test

* update data_version

* bump version and remove info for fixed issues

* remove now unneeded assert

* review updates

* minor bug fix

* add a test for minimum locations shop costing

* minor optimizations and cleanup

* remove whitespace
This commit is contained in:
Aaron Wagener
2023-06-27 18:39:52 -05:00
committed by GitHub
parent 8c2584f872
commit 332eab9569
13 changed files with 712 additions and 393 deletions

View File

@@ -11,35 +11,33 @@ class HardLogicTest(MessengerTestBase):
"""Test the locations that still require wingsuit or rope dart."""
locations = [
# tower of time
"Tower of Time Seal - Time Waster Seal", "Tower of Time Seal - Lantern Climb",
"Tower of Time Seal - Time Waster", "Tower of Time Seal - Lantern Climb",
"Tower of Time Seal - Arcane Orbs",
# ninja village
"Candle", "Astral Seed", "Ninja Village Seal - Tree House", "Astral Tea Leaves",
"Ninja Village - Candle", "Ninja Village - Astral Seed", "Ninja Village Seal - Tree House",
# autumn hills
"Climbing Claws", "Key of Hope", "Leaf Golem",
"Autumn Hills - Climbing Claws", "Autumn Hills - Key of Hope", "Autumn Hills - Leaf Golem",
"Autumn Hills Seal - Trip Saws", "Autumn Hills Seal - Double Swing Saws",
"Autumn Hills Seal - Spike Ball Swing", "Autumn Hills Seal - Spike Ball Darts",
# forlorn temple
"Demon King Crown",
"Forlorn Temple - Demon King",
"Forlorn Temple Seal - Rocket Maze", "Forlorn Temple Seal - Rocket Sunset",
# catacombs
"Necro", "Ruxxtin's Amulet", "Ruxxtin",
"Catacombs - Necro", "Catacombs - Ruxxtin's Amulet", "Catacombs - Ruxxtin",
"Catacombs Seal - Triple Spike Crushers", "Catacombs Seal - Crusher Gauntlet", "Catacombs Seal - Dirty Pond",
# bamboo creek
"Claustro",
"Bamboo Creek - Claustro",
"Bamboo Creek Seal - Spike Crushers and Doors", "Bamboo Creek Seal - Spike Ball Pits",
"Bamboo Creek Seal - Spike Crushers and Doors v2",
# howling grotto
"Emerald Golem", "Howling Grotto Seal - Crushing Pits", "Howling Grotto Seal - Crushing Pits",
# glacial peak
"Glacial Peak Seal - Ice Climbers",
"Howling Grotto - Emerald Golem", "Howling Grotto Seal - Crushing Pits", "Howling Grotto Seal - Crushing Pits",
# searing crags
"Searing Crags - Astral Tea Leaves",
# cloud ruins
"Acro", "Cloud Ruins Seal - Ghost Pit",
"Cloud Ruins - Acro", "Cloud Ruins Seal - Ghost Pit",
"Cloud Ruins Seal - Toothbrush Alley", "Cloud Ruins Seal - Saw Pit", "Cloud Ruins Seal - Money Farm Room",
# underworld
"Underworld Seal - Rising Fanta", "Underworld Seal - Sharp and Windy Climb",
# riviere turquoise
"Fairy Bottle", "Riviere Turquoise Seal - Flower Power",
# elemental skylands
"Elemental Skylands Seal - Air",
# phantom
@@ -52,15 +50,15 @@ class HardLogicTest(MessengerTestBase):
"""Windmill Shuriken isn't progression on normal difficulty, so test it's marked correctly and required."""
self.assertEqual(ItemClassification.progression, self.get_item_by_name("Windmill Shuriken").classification)
windmill_locs = [
"Key of Strength",
"Key of Symbiosis",
"Searing Crags - Key of Strength",
"Elemental Skylands - Key of Symbiosis",
"Underworld Seal - Fireball Wave",
]
for loc in windmill_locs:
with self.subTest("can't reach location with nothing", location=loc):
self.assertFalse(self.can_reach_location(loc))
items = self.get_items_by_name(["Windmill Shuriken", "Ninja Tabi", "Fairy Bottle"])
items = self.get_items_by_name(["Windmill Shuriken", "Lightfoot Tabi", "Magic Firefly"])
self.collect(items)
for loc in windmill_locs:
with self.subTest("can reach with Windmill", location=loc):
@@ -77,13 +75,6 @@ class HardLogicTest(MessengerTestBase):
self.assertTrue(self.can_reach_location(special_loc))
class ChallengingLogicTest(MessengerTestBase):
options = {
"shuffle_seals": "false",
"logic_level": "challenging",
}
class NoLogicTest(MessengerTestBase):
options = {
"logic_level": "oob",
@@ -92,17 +83,14 @@ class NoLogicTest(MessengerTestBase):
def testAccess(self) -> None:
"""Test the locations with rules still require things."""
all_locations = [
"Claustro", "Key of Strength", "Key of Symbiosis", "Key of Love", "Pyro", "Key of Chaos", "Key of Courage",
"Autumn Hills Seal - Spike Ball Darts", "Ninja Village Seal - Tree House", "Underworld Seal - Fireball Wave",
"Tower of Time Seal - Time Waster Seal", "Rescue Phantom", "Elemental Skylands Seal - Air",
"Elemental Skylands Seal - Water", "Elemental Skylands Seal - Fire",
"Bamboo Creek - Claustro", "Searing Crags - Key of Strength", "Elemental Skylands - Key of Symbiosis",
"Sunken Shrine - Key of Love", "Searing Crags - Pyro", "Underworld - Key of Chaos",
"Corrupted Future - Key of Courage", "Autumn Hills Seal - Spike Ball Darts",
"Ninja Village Seal - Tree House", "Underworld Seal - Fireball Wave", "Tower of Time Seal - Time Waster",
"Rescue Phantom", "Elemental Skylands Seal - Air", "Elemental Skylands Seal - Water",
"Elemental Skylands Seal - Fire",
]
for loc in all_locations:
with self.subTest("Default unreachables", location=loc):
self.assertFalse(self.can_reach_location(loc))
def testNoLogic(self) -> None:
"""Test some funny locations to make sure they aren't reachable, but we can still win"""
self.assertEqual(self.can_reach_location("Pyro"), False)
self.assertEqual(self.can_reach_location("Rescue Phantom"), False)
self.assertBeatable(True)