|
1 | 1 | 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 |
4 | 3 |
|
5 | 4 | from BaseClasses import CollectionState, Entrance, Item, ItemClassification, MultiWorld, Tutorial
|
6 | 5 | from Options import Accessibility
|
@@ -154,13 +153,12 @@ def generate_early(self) -> None:
|
154 | 153 | # TODO add a check for transition shuffle when that gets added back in
|
155 | 154 | if not self.options.shuffle_portals and "Searing Crags Portal" not in self.starting_portals:
|
156 | 155 | 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)) |
161 | 159 |
|
162 | 160 | 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: |
164 | 162 | self.filler.update(TRAPS)
|
165 | 163 |
|
166 | 164 | self.plando_portals = []
|
@@ -350,6 +348,17 @@ def get_item_classification(self, name: str) -> ItemClassification:
|
350 | 348 |
|
351 | 349 | return ItemClassification.filler
|
352 | 350 |
|
| 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 | + |
353 | 362 | def collect(self, state: "CollectionState", item: "Item") -> bool:
|
354 | 363 | change = super().collect(state, item)
|
355 | 364 | if change and "Time Shard" in item.name:
|
|
0 commit comments