Stardew Valley: Fix two logic bugs with the wizard on Entrance Randomizer (#2192)

* - Added a rule to vault bundles that require access to the wizard
- Fixed the region required to meet the wizard

* - Updated the location count in a test due to a previous coffee bean bugfix that added a location
This commit is contained in:
agilbert1412
2023-09-17 14:20:18 -04:00
committed by GitHub
parent b24037e9d9
commit d5d13a6d4d
3 changed files with 7 additions and 5 deletions

View File

@@ -1166,14 +1166,15 @@ class StardewLogic:
def can_complete_bundle(self, bundle_requirements: List[BundleItem], number_required: int) -> StardewRule:
item_rules = []
highest_quality_yet = 0
can_speak_junimo = self.can_reach_region(Region.wizard_tower)
for bundle_item in bundle_requirements:
if bundle_item.item.item_id == -1:
return self.can_spend_money(bundle_item.amount)
return can_speak_junimo & self.can_spend_money(bundle_item.amount)
else:
item_rules.append(bundle_item.item.name)
if bundle_item.quality > highest_quality_yet:
highest_quality_yet = bundle_item.quality
return self.can_reach_region(Region.wizard_tower) & self.has(item_rules, number_required) & self.can_grow_gold_quality(highest_quality_yet)
return can_speak_junimo & self.has(item_rules, number_required) & self.can_grow_gold_quality(highest_quality_yet)
def can_grow_gold_quality(self, quality: int) -> StardewRule:
if quality <= 0: