Skip to content

Commit

Permalink
The Messenger: fix rules for two glacial peak locations (ArchipelagoM…
Browse files Browse the repository at this point in the history
…W#2234)

* The Messenger: fix rules for two glacial peak locations
  • Loading branch information
alwaysintreble authored Sep 30, 2023
1 parent 5bf3de4 commit fe60964
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
9 changes: 4 additions & 5 deletions worlds/messenger/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,10 @@ def __init__(self, world: MessengerWorld) -> None:
"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 - 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 - 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,
"Bamboo Creek - Claustro": self.has_wingsuit,
"Tower of Time Seal - Lantern Climb": self.has_wingsuit,
Expand All @@ -201,10 +203,7 @@ def __init__(self, world: MessengerWorld) -> None:
"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))
or self.has_wingsuit(state),
"Glacial Peak Seal - Glacial Air Swag": 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),
"Underworld Seal - Fireball Wave": self.has_windmill,
}

def has_windmill(self, state: CollectionState) -> bool:
Expand Down
20 changes: 20 additions & 0 deletions worlds/messenger/test/TestLogic.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from typing import Iterable, List

from BaseClasses import ItemClassification
from . import MessengerTestBase


class HardLogicTest(MessengerTestBase):
options = {
"logic_level": "hard",
"shuffle_shards": "true",
}

def testVertical(self) -> None:
Expand All @@ -19,23 +22,28 @@ def testVertical(self) -> None:
"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",
"Autumn Hills Mega Shard", "Hidden Entrance Mega Shard",
# forlorn temple
"Forlorn Temple - Demon King",
"Forlorn Temple Seal - Rocket Maze", "Forlorn Temple Seal - Rocket Sunset",
"Sunny Day Mega Shard", "Down Under Mega Shard",
# catacombs
"Catacombs - Necro", "Catacombs - Ruxxtin's Amulet", "Catacombs - Ruxxtin",
"Catacombs Seal - Triple Spike Crushers", "Catacombs Seal - Crusher Gauntlet", "Catacombs Seal - Dirty Pond",
"Catacombs Mega Shard",
# bamboo creek
"Bamboo Creek - Claustro",
"Bamboo Creek Seal - Spike Crushers and Doors", "Bamboo Creek Seal - Spike Ball Pits",
"Bamboo Creek Seal - Spike Crushers and Doors v2",
"Above Entrance Mega Shard", "Abandoned Mega Shard", "Time Loop Mega Shard",
# howling grotto
"Howling Grotto - Emerald Golem", "Howling Grotto Seal - Crushing Pits", "Howling Grotto Seal - Crushing Pits",
# searing crags
"Searing Crags - Astral Tea Leaves",
# cloud ruins
"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 Entrance Mega Shard", "Time Warp Mega Shard", "Money Farm Room Mega Shard 1", "Money Farm Room Mega Shard 2",
# underworld
"Underworld Seal - Rising Fanta", "Underworld Seal - Sharp and Windy Climb",
# elemental skylands
Expand Down Expand Up @@ -73,6 +81,18 @@ def testWindmill(self) -> None:
item = self.get_item_by_name("Rope Dart")
self.collect(item)
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):
Expand Down

0 comments on commit fe60964

Please sign in to comment.