Skip to content

Commit

Permalink
world needs to default to 0 because i don't send the goal. remove set…
Browse files Browse the repository at this point in the history
…ifying stuff
  • Loading branch information
alwaysintreble committed Nov 16, 2023
1 parent c66529f commit a272333
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion worlds/messenger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class MessengerWorld(World):
web = MessengerWeb()

total_seals: int = 0
required_seals: int = 1
required_seals: int = 0
total_shards: int = 0
shop_prices: Dict[str, int]
figurine_prices: Dict[str, int]
Expand Down
7 changes: 4 additions & 3 deletions worlds/messenger/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def __init__(self, world: "MessengerWorld") -> None:
maximum_price = (world.multiworld.get_location("The Shop - Demon's Bane", self.player).cost +
world.multiworld.get_location("The Shop - Focused Power Sense", self.player).cost)
self.maximum_price = min(maximum_price, world.total_shards)
self.required_seals = max(1, world.required_seals)

self.region_rules = {
"Ninja Village": self.has_wingsuit,
Expand All @@ -39,7 +40,7 @@ def __init__(self, world: "MessengerWorld") -> None:
"Forlorn Temple": lambda state: state.has_all({"Wingsuit", *PHOBEKINS}, self.player) and self.can_dboost(state),
"Glacial Peak": self.has_vertical,
"Elemental Skylands": lambda state: state.has("Magic Firefly", self.player) and self.has_wingsuit(state),
"Music Box": lambda state: (state.has_all(set(NOTES), self.player)
"Music Box": lambda state: (state.has_all(NOTES, self.player)
or self.has_enough_seals(state)) and self.has_dart(state),
"The Craftsman's Corner": lambda state: state.has("Money Wrench", self.player) and self.can_shop(state),
}
Expand Down Expand Up @@ -113,7 +114,7 @@ def has_vertical(self, state: CollectionState) -> bool:
return self.has_wingsuit(state) or self.has_dart(state)

def has_enough_seals(self, state: CollectionState) -> bool:
return state.has("Power Seal", self.player, self.world.required_seals)
return state.has("Power Seal", self.player, self.required_seals)

def can_destroy_projectiles(self, state: CollectionState) -> bool:
return state.has("Strike of the Ninja", self.player)
Expand Down Expand Up @@ -160,7 +161,7 @@ def __init__(self, world: "MessengerWorld") -> None:
"Catacombs": self.has_vertical,
"Bamboo Creek": self.has_vertical,
"Riviere Turquoise": self.true,
"Forlorn Temple": lambda state: self.has_vertical(state) and state.has_all(set(PHOBEKINS), self.player),
"Forlorn Temple": lambda state: self.has_vertical(state) and state.has_all(PHOBEKINS, self.player),
"Searing Crags Upper": lambda state: self.can_destroy_projectiles(state) or self.has_windmill(state)
or self.has_vertical(state),
"Glacial Peak": lambda state: self.can_destroy_projectiles(state) or self.has_windmill(state)
Expand Down

0 comments on commit a272333

Please sign in to comment.