The Messenger: fix rules for two glacial peak locations (#2234)

* The Messenger: fix rules for two glacial peak locations
This commit is contained in:
Aaron Wagener 2023-09-30 05:35:07 -05:00 committed by GitHub
parent 5bf3de45f4
commit fe6096464c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 5 deletions

View File

@ -182,8 +182,10 @@ class MessengerHardRules(MessengerRules):
"Searing Crags Seal - Raining Rocks": lambda state: self.has_vertical(state) or self.can_destroy_projectiles(state), "Searing Crags Seal - Raining Rocks": lambda state: self.has_vertical(state) or self.can_destroy_projectiles(state),
"Searing Crags Seal - Rhythm Rocks": lambda state: self.has_vertical(state) or self.can_destroy_projectiles(state), "Searing Crags Seal - Rhythm Rocks": lambda state: self.has_vertical(state) or self.can_destroy_projectiles(state),
"Searing Crags - Power Thistle": lambda state: self.has_vertical(state) or self.can_destroy_projectiles(state), "Searing Crags - Power Thistle": lambda state: self.has_vertical(state) or self.can_destroy_projectiles(state),
"Glacial Peak Seal - Ice Climbers": self.has_vertical, "Glacial Peak Seal - Ice Climbers": lambda state: self.has_vertical(state) or self.can_dboost(state),
"Glacial Peak Seal - Projectile Spike Pit": self.true, "Glacial Peak Seal - Projectile Spike Pit": self.true,
"Glacial Peak Seal - Glacial Air Swag": lambda state: self.has_windmill(state) or self.has_vertical(state),
"Glacial Peak Mega Shard": lambda state: self.has_windmill(state) or self.has_vertical(state),
"Cloud Ruins Seal - Ghost Pit": self.true, "Cloud Ruins Seal - Ghost Pit": self.true,
"Bamboo Creek - Claustro": self.has_wingsuit, "Bamboo Creek - Claustro": self.has_wingsuit,
"Tower of Time Seal - Lantern Climb": self.has_wingsuit, "Tower of Time Seal - Lantern Climb": self.has_wingsuit,
@ -201,10 +203,7 @@ class MessengerHardRules(MessengerRules):
"Elemental Skylands - Key of Symbiosis": lambda state: self.has_windmill(state) or self.can_dboost(state), "Elemental Skylands - Key of Symbiosis": lambda state: self.has_windmill(state) or self.can_dboost(state),
"Autumn Hills Seal - Spike Ball Darts": lambda state: (self.has_dart(state) and self.has_windmill(state)) "Autumn Hills Seal - Spike Ball Darts": lambda state: (self.has_dart(state) and self.has_windmill(state))
or self.has_wingsuit(state), or self.has_wingsuit(state),
"Glacial Peak Seal - Glacial Air Swag": self.has_windmill, "Underworld Seal - Fireball Wave": self.has_windmill,
"Glacial Peak Seal - Ice Climbers": lambda state: self.has_wingsuit(state) or self.can_dboost(state),
"Underworld Seal - Fireball Wave": lambda state: state.has_all({"Lightfoot Tabi", "Windmill Shuriken"},
self.player),
} }
def has_windmill(self, state: CollectionState) -> bool: def has_windmill(self, state: CollectionState) -> bool:

View File

@ -1,3 +1,5 @@
from typing import Iterable, List
from BaseClasses import ItemClassification from BaseClasses import ItemClassification
from . import MessengerTestBase from . import MessengerTestBase
@ -5,6 +7,7 @@ from . import MessengerTestBase
class HardLogicTest(MessengerTestBase): class HardLogicTest(MessengerTestBase):
options = { options = {
"logic_level": "hard", "logic_level": "hard",
"shuffle_shards": "true",
} }
def testVertical(self) -> None: def testVertical(self) -> None:
@ -19,16 +22,20 @@ class HardLogicTest(MessengerTestBase):
"Autumn Hills - Climbing Claws", "Autumn Hills - Key of Hope", "Autumn Hills - 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 - Trip Saws", "Autumn Hills Seal - Double Swing Saws",
"Autumn Hills Seal - Spike Ball Swing", "Autumn Hills Seal - Spike Ball Darts", "Autumn Hills Seal - Spike Ball Swing", "Autumn Hills Seal - Spike Ball Darts",
"Autumn Hills Mega Shard", "Hidden Entrance Mega Shard",
# forlorn temple # forlorn temple
"Forlorn Temple - Demon King", "Forlorn Temple - Demon King",
"Forlorn Temple Seal - Rocket Maze", "Forlorn Temple Seal - Rocket Sunset", "Forlorn Temple Seal - Rocket Maze", "Forlorn Temple Seal - Rocket Sunset",
"Sunny Day Mega Shard", "Down Under Mega Shard",
# catacombs # catacombs
"Catacombs - Necro", "Catacombs - Ruxxtin's Amulet", "Catacombs - Ruxxtin", "Catacombs - Necro", "Catacombs - Ruxxtin's Amulet", "Catacombs - Ruxxtin",
"Catacombs Seal - Triple Spike Crushers", "Catacombs Seal - Crusher Gauntlet", "Catacombs Seal - Dirty Pond", "Catacombs Seal - Triple Spike Crushers", "Catacombs Seal - Crusher Gauntlet", "Catacombs Seal - Dirty Pond",
"Catacombs Mega Shard",
# bamboo creek # bamboo creek
"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", "Bamboo Creek Seal - Spike Ball Pits",
"Bamboo Creek Seal - Spike Crushers and Doors v2", "Bamboo Creek Seal - Spike Crushers and Doors v2",
"Above Entrance Mega Shard", "Abandoned Mega Shard", "Time Loop Mega Shard",
# howling grotto # howling grotto
"Howling Grotto - Emerald Golem", "Howling Grotto Seal - Crushing Pits", "Howling Grotto Seal - Crushing Pits", "Howling Grotto - Emerald Golem", "Howling Grotto Seal - Crushing Pits", "Howling Grotto Seal - Crushing Pits",
# searing crags # searing crags
@ -36,6 +43,7 @@ class HardLogicTest(MessengerTestBase):
# cloud ruins # cloud ruins
"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", "Cloud Ruins Seal - Toothbrush Alley", "Cloud Ruins Seal - Saw Pit", "Cloud Ruins Seal - Money Farm Room",
"Cloud Entrance Mega Shard", "Time Warp Mega Shard", "Money Farm Room Mega Shard 1", "Money Farm Room Mega Shard 2",
# underworld # underworld
"Underworld Seal - Rising Fanta", "Underworld Seal - Sharp and Windy Climb", "Underworld Seal - Rising Fanta", "Underworld Seal - Sharp and Windy Climb",
# elemental skylands # elemental skylands
@ -73,6 +81,18 @@ class HardLogicTest(MessengerTestBase):
item = self.get_item_by_name("Rope Dart") item = self.get_item_by_name("Rope Dart")
self.collect(item) self.collect(item)
self.assertTrue(self.can_reach_location(special_loc)) self.assertTrue(self.can_reach_location(special_loc))
def testGlacial(self) -> None:
"""Test Glacial Peak locations."""
self.assertAccessDependency(["Glacial Peak Seal - Ice Climbers"],
[["Second Wind", "Meditation"], ["Rope Dart"], ["Wingsuit"]],
True)
self.assertAccessDependency(["Glacial Peak Seal - Projectile Spike Pit"],
[["Strike of the Ninja"], ["Windmill Shuriken"], ["Rope Dart"], ["Wingsuit"]],
True)
self.assertAccessDependency(["Glacial Peak Seal - Glacial Air Swag", "Glacial Peak Mega Shard"],
[["Windmill Shuriken"], ["Wingsuit"], ["Rope Dart"]],
True)
class NoLogicTest(MessengerTestBase): class NoLogicTest(MessengerTestBase):