Skip to content

Commit ca18121

Browse files
authored
Stardew Valley: Fix generation fail with SVE and entrance rando when Wizard Tower is in place of Sprite Spring (#2970)
1 parent 1d45125 commit ca18121

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

worlds/stardew_valley/data/villagers_data.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
class Villager:
1414
name: str
1515
bachelor: bool
16-
locations: Tuple[str]
16+
locations: Tuple[str, ...]
1717
birthday: str
18-
gifts: Tuple[str]
18+
gifts: Tuple[str, ...]
1919
available: bool
2020
mod_name: str
2121

@@ -366,10 +366,11 @@ def villager(name: str, bachelor: bool, locations: Tuple[str, ...], birthday: st
366366
return npc
367367

368368

369-
def make_bachelor(mod_name: str, npc: Villager):
369+
def adapt_wizard_to_sve(mod_name: str, npc: Villager):
370370
if npc.mod_name:
371371
mod_name = npc.mod_name
372-
return Villager(npc.name, True, npc.locations, npc.birthday, npc.gifts, npc.available, mod_name)
372+
# The wizard leaves his tower on sunday, for like 1 hour... Good enough to meet him!
373+
return Villager(npc.name, True, npc.locations + forest, npc.birthday, npc.gifts, npc.available, mod_name)
373374

374375

375376
def register_villager_modification(mod_name: str, npc: Villager, modification_function):
@@ -452,7 +453,7 @@ def register_villager_modification(mod_name: str, npc: Villager, modification_fu
452453

453454
# Modified villagers; not included in all villagers
454455

455-
register_villager_modification(ModNames.sve, wizard, make_bachelor)
456+
register_villager_modification(ModNames.sve, wizard, adapt_wizard_to_sve)
456457

457458
all_villagers_by_name: Dict[str, Villager] = {villager.name: villager for villager in all_villagers}
458459
all_villagers_by_mod: Dict[str, List[Villager]] = {}

worlds/stardew_valley/logic/logic.py

+1
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ def can_succeed_luau_soup(self) -> StardewRule:
546546
def can_succeed_grange_display(self) -> StardewRule:
547547
if self.options.festival_locations != FestivalLocations.option_hard:
548548
return True_()
549+
549550
animal_rule = self.animal.has_animal(Generic.any)
550551
artisan_rule = self.artisan.can_keg(Generic.any) | self.artisan.can_preserves_jar(Generic.any)
551552
cooking_rule = self.money.can_spend_at(Region.saloon, 220) # Salads at the bar are good enough

0 commit comments

Comments
 (0)