Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Messenger: fix missing money wrench rule #4041

Merged
merged 2 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions worlds/messenger/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ def __init__(self, world: "MessengerWorld") -> None:
}

self.location_rules = {
# hq
"Money Wrench": self.can_shop,
# ninja village
"Ninja Village Seal - Tree House":
self.has_dart,
Expand Down
13 changes: 13 additions & 0 deletions worlds/messenger/test/test_shop.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from typing import Dict

from BaseClasses import CollectionState
from . import MessengerTestBase
from ..shop import SHOP_ITEMS, FIGURINES

Expand Down Expand Up @@ -89,3 +90,15 @@ def test_costs(self) -> None:

self.assertTrue(loc in FIGURINES)
self.assertEqual(len(figures), len(FIGURINES))

max_cost_state = CollectionState(self.multiworld)
self.assertFalse(self.world.get_location("Money Wrench").can_reach(max_cost_state))
prog_shards = []
for item in self.multiworld.itempool:
if "Time Shard " in item.name:
value = int(item.name.strip("Time Shard ()"))
if value >= 100:
prog_shards.append(item)
for shard in prog_shards:
max_cost_state.collect(shard, True)
self.assertTrue(self.world.get_location("Money Wrench").can_reach(max_cost_state))
Loading