The Messenger: Hotfix item links filler gen (#3078)

This commit is contained in:
Aaron Wagener 2024-04-18 11:59:30 -05:00 committed by GitHub
parent 580c9c3943
commit 5711d2c309
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 26 additions and 20 deletions

View File

@ -1,6 +1,5 @@
import logging
from datetime import date
from typing import Any, ClassVar, Dict, List, Optional, TextIO
from typing import Any, ClassVar, Dict, List, Optional, Set, TextIO
from BaseClasses import CollectionState, Entrance, Item, ItemClassification, MultiWorld, Tutorial
from Options import Accessibility
@ -154,13 +153,12 @@ class MessengerWorld(World):
# TODO add a check for transition shuffle when that gets added back in
if not self.options.shuffle_portals and "Searing Crags Portal" not in self.starting_portals:
self.starting_portals.append("Searing Crags Portal")
if len(self.starting_portals) > 4:
portals_to_strip = [portal for portal in ["Riviere Turquoise Portal", "Sunken Shrine Portal"]
if portal in self.starting_portals]
self.starting_portals.remove(self.random.choice(portals_to_strip))
portals_to_strip = [portal for portal in ["Riviere Turquoise Portal", "Sunken Shrine Portal"]
if portal in self.starting_portals]
self.starting_portals.remove(self.random.choice(portals_to_strip))
self.filler = FILLER.copy()
if (not hasattr(self.options, "traps") and date.today() < date(2024, 4, 2)) or self.options.traps:
if self.options.traps:
self.filler.update(TRAPS)
self.plando_portals = []
@ -350,6 +348,17 @@ class MessengerWorld(World):
return ItemClassification.filler
@classmethod
def create_group(cls, multiworld: "MultiWorld", new_player_id: int, players: Set[int]) -> World:
group = super().create_group(multiworld, new_player_id, players)
assert isinstance(group, MessengerWorld)
group.filler = FILLER.copy()
group.options.traps.value = all(multiworld.worlds[player].options.traps for player in players)
if group.options.traps:
group.filler.update(TRAPS)
return group
def collect(self, state: "CollectionState", item: "Item") -> bool:
change = super().collect(state, item)
if change and "Time Shard" in item.name:

View File

@ -567,15 +567,6 @@ CONNECTIONS: Dict[str, Dict[str, List[str]]] = {
"Elemental Skylands - Earth Generator Shop",
],
"Earth Generator Shop": [
"Elemental Skylands - Fire Shmup",
],
"Fire Shmup": [
"Elemental Skylands - Fire Intro Shop",
],
"Fire Intro Shop": [
"Elemental Skylands - Fire Generator Shop",
],
"Fire Generator Shop": [
"Elemental Skylands - Water Shmup",
],
"Water Shmup": [
@ -585,6 +576,15 @@ CONNECTIONS: Dict[str, Dict[str, List[str]]] = {
"Elemental Skylands - Water Generator Shop",
],
"Water Generator Shop": [
"Elemental Skylands - Fire Shmup",
],
"Fire Shmup": [
"Elemental Skylands - Fire Intro Shop",
],
"Fire Intro Shop": [
"Elemental Skylands - Fire Generator Shop",
],
"Fire Generator Shop": [
"Elemental Skylands - Right",
],
"Right": [

View File

@ -1,5 +1,4 @@
from dataclasses import dataclass
from datetime import date
from typing import Dict
from schema import And, Optional, Or, Schema
@ -203,8 +202,6 @@ class MessengerOptions(DeathLinkMixin, PerGameCommonOptions):
notes_needed: NotesNeeded
total_seals: AmountSeals
percent_seals_required: RequiredSeals
traps: Traps
shop_price: ShopPrices
shop_price_plan: PlannedShopPrices
if date.today() > date(2024, 4, 1):
traps: Traps