Skip to content

Commit 65cc7a7

Browse files
alwaysintrebleAustinSumigray
authored andcommitted
The Messenger: Hotfix item links filler gen (ArchipelagoMW#3078)
1 parent 14d61bb commit 65cc7a7

File tree

3 files changed

+26
-20
lines changed

3 files changed

+26
-20
lines changed

worlds/messenger/__init__.py

+16-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import logging
2-
from datetime import date
3-
from typing import Any, ClassVar, Dict, List, Optional, TextIO
2+
from typing import Any, ClassVar, Dict, List, Optional, Set, TextIO
43

54
from BaseClasses import CollectionState, Entrance, Item, ItemClassification, MultiWorld, Tutorial
65
from Options import Accessibility
@@ -154,13 +153,12 @@ def generate_early(self) -> None:
154153
# TODO add a check for transition shuffle when that gets added back in
155154
if not self.options.shuffle_portals and "Searing Crags Portal" not in self.starting_portals:
156155
self.starting_portals.append("Searing Crags Portal")
157-
if len(self.starting_portals) > 4:
158-
portals_to_strip = [portal for portal in ["Riviere Turquoise Portal", "Sunken Shrine Portal"]
159-
if portal in self.starting_portals]
160-
self.starting_portals.remove(self.random.choice(portals_to_strip))
156+
portals_to_strip = [portal for portal in ["Riviere Turquoise Portal", "Sunken Shrine Portal"]
157+
if portal in self.starting_portals]
158+
self.starting_portals.remove(self.random.choice(portals_to_strip))
161159

162160
self.filler = FILLER.copy()
163-
if (not hasattr(self.options, "traps") and date.today() < date(2024, 4, 2)) or self.options.traps:
161+
if self.options.traps:
164162
self.filler.update(TRAPS)
165163

166164
self.plando_portals = []
@@ -350,6 +348,17 @@ def get_item_classification(self, name: str) -> ItemClassification:
350348

351349
return ItemClassification.filler
352350

351+
@classmethod
352+
def create_group(cls, multiworld: "MultiWorld", new_player_id: int, players: Set[int]) -> World:
353+
group = super().create_group(multiworld, new_player_id, players)
354+
assert isinstance(group, MessengerWorld)
355+
356+
group.filler = FILLER.copy()
357+
group.options.traps.value = all(multiworld.worlds[player].options.traps for player in players)
358+
if group.options.traps:
359+
group.filler.update(TRAPS)
360+
return group
361+
353362
def collect(self, state: "CollectionState", item: "Item") -> bool:
354363
change = super().collect(state, item)
355364
if change and "Time Shard" in item.name:

worlds/messenger/connections.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -567,15 +567,6 @@
567567
"Elemental Skylands - Earth Generator Shop",
568568
],
569569
"Earth Generator Shop": [
570-
"Elemental Skylands - Fire Shmup",
571-
],
572-
"Fire Shmup": [
573-
"Elemental Skylands - Fire Intro Shop",
574-
],
575-
"Fire Intro Shop": [
576-
"Elemental Skylands - Fire Generator Shop",
577-
],
578-
"Fire Generator Shop": [
579570
"Elemental Skylands - Water Shmup",
580571
],
581572
"Water Shmup": [
@@ -585,6 +576,15 @@
585576
"Elemental Skylands - Water Generator Shop",
586577
],
587578
"Water Generator Shop": [
579+
"Elemental Skylands - Fire Shmup",
580+
],
581+
"Fire Shmup": [
582+
"Elemental Skylands - Fire Intro Shop",
583+
],
584+
"Fire Intro Shop": [
585+
"Elemental Skylands - Fire Generator Shop",
586+
],
587+
"Fire Generator Shop": [
588588
"Elemental Skylands - Right",
589589
],
590590
"Right": [

worlds/messenger/options.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from dataclasses import dataclass
2-
from datetime import date
32
from typing import Dict
43

54
from schema import And, Optional, Or, Schema
@@ -203,8 +202,6 @@ class MessengerOptions(DeathLinkMixin, PerGameCommonOptions):
203202
notes_needed: NotesNeeded
204203
total_seals: AmountSeals
205204
percent_seals_required: RequiredSeals
205+
traps: Traps
206206
shop_price: ShopPrices
207207
shop_price_plan: PlannedShopPrices
208-
209-
if date.today() > date(2024, 4, 1):
210-
traps: Traps

0 commit comments

Comments
 (0)