Skip to content

Commit 80fed1c

Browse files
authored
Stardew Valley: Fixed potential softlock with walnut purchases if Entrance Randomizer locks access to the field office (ArchipelagoMW#2261)
* - Added logic rules for reaching, then completing, the field office in order to be allowed to spend significant amounts of walnuts * - Revert moving a method for some reason
1 parent b9ce205 commit 80fed1c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

worlds/stardew_valley/logic.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1536,6 +1536,7 @@ def has_walnut(self, number: int) -> StardewRule:
15361536
reach_west = self.can_reach_region(Region.island_west)
15371537
reach_hut = self.can_reach_region(Region.leo_hut)
15381538
reach_southeast = self.can_reach_region(Region.island_south_east)
1539+
reach_field_office = self.can_reach_region(Region.field_office)
15391540
reach_pirate_cove = self.can_reach_region(Region.pirate_cove)
15401541
reach_outside_areas = And(reach_south, reach_north, reach_west, reach_hut)
15411542
reach_volcano_regions = [self.can_reach_region(Region.volcano),
@@ -1544,12 +1545,12 @@ def has_walnut(self, number: int) -> StardewRule:
15441545
self.can_reach_region(Region.volcano_floor_10)]
15451546
reach_volcano = Or(reach_volcano_regions)
15461547
reach_all_volcano = And(reach_volcano_regions)
1547-
reach_walnut_regions = [reach_south, reach_north, reach_west, reach_volcano]
1548+
reach_walnut_regions = [reach_south, reach_north, reach_west, reach_volcano, reach_field_office]
15481549
reach_caves = And(self.can_reach_region(Region.qi_walnut_room), self.can_reach_region(Region.dig_site),
15491550
self.can_reach_region(Region.gourmand_frog_cave),
15501551
self.can_reach_region(Region.colored_crystals_cave),
15511552
self.can_reach_region(Region.shipwreck), self.has(Weapon.any_slingshot))
1552-
reach_entire_island = And(reach_outside_areas, reach_all_volcano,
1553+
reach_entire_island = And(reach_outside_areas, reach_field_office, reach_all_volcano,
15531554
reach_caves, reach_southeast, reach_pirate_cove)
15541555
if number <= 5:
15551556
return Or(reach_south, reach_north, reach_west, reach_volcano)
@@ -1563,7 +1564,8 @@ def has_walnut(self, number: int) -> StardewRule:
15631564
return reach_entire_island
15641565
gems = [Mineral.amethyst, Mineral.aquamarine, Mineral.emerald, Mineral.ruby, Mineral.topaz]
15651566
return reach_entire_island & self.has(Fruit.banana) & self.has(gems) & self.can_mine_perfectly() & \
1566-
self.can_fish_perfectly() & self.has(Craftable.flute_block) & self.has(Seed.melon) & self.has(Seed.wheat) & self.has(Seed.garlic)
1567+
self.can_fish_perfectly() & self.has(Craftable.flute_block) & self.has(Seed.melon) & self.has(Seed.wheat) & self.has(Seed.garlic) & \
1568+
self.can_complete_field_office()
15671569

15681570
def has_everything(self, all_progression_items: Set[str]) -> StardewRule:
15691571
all_regions = [region.name for region in vanilla_regions]

0 commit comments

Comments
 (0)