The Messenger: Hotfix item links filler gen (#3078)
This commit is contained in:
parent
580c9c3943
commit
5711d2c309
|
@ -1,6 +1,5 @@
|
||||||
import logging
|
import logging
|
||||||
from datetime import date
|
from typing import Any, ClassVar, Dict, List, Optional, Set, TextIO
|
||||||
from typing import Any, ClassVar, Dict, List, Optional, TextIO
|
|
||||||
|
|
||||||
from BaseClasses import CollectionState, Entrance, Item, ItemClassification, MultiWorld, Tutorial
|
from BaseClasses import CollectionState, Entrance, Item, ItemClassification, MultiWorld, Tutorial
|
||||||
from Options import Accessibility
|
from Options import Accessibility
|
||||||
|
@ -154,13 +153,12 @@ class MessengerWorld(World):
|
||||||
# TODO add a check for transition shuffle when that gets added back in
|
# 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:
|
if not self.options.shuffle_portals and "Searing Crags Portal" not in self.starting_portals:
|
||||||
self.starting_portals.append("Searing Crags Portal")
|
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"]
|
||||||
portals_to_strip = [portal for portal in ["Riviere Turquoise Portal", "Sunken Shrine Portal"]
|
if portal in self.starting_portals]
|
||||||
if portal in self.starting_portals]
|
self.starting_portals.remove(self.random.choice(portals_to_strip))
|
||||||
self.starting_portals.remove(self.random.choice(portals_to_strip))
|
|
||||||
|
|
||||||
self.filler = FILLER.copy()
|
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.filler.update(TRAPS)
|
||||||
|
|
||||||
self.plando_portals = []
|
self.plando_portals = []
|
||||||
|
@ -350,6 +348,17 @@ class MessengerWorld(World):
|
||||||
|
|
||||||
return ItemClassification.filler
|
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:
|
def collect(self, state: "CollectionState", item: "Item") -> bool:
|
||||||
change = super().collect(state, item)
|
change = super().collect(state, item)
|
||||||
if change and "Time Shard" in item.name:
|
if change and "Time Shard" in item.name:
|
||||||
|
|
|
@ -567,15 +567,6 @@ CONNECTIONS: Dict[str, Dict[str, List[str]]] = {
|
||||||
"Elemental Skylands - Earth Generator Shop",
|
"Elemental Skylands - Earth Generator Shop",
|
||||||
],
|
],
|
||||||
"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",
|
"Elemental Skylands - Water Shmup",
|
||||||
],
|
],
|
||||||
"Water Shmup": [
|
"Water Shmup": [
|
||||||
|
@ -585,6 +576,15 @@ CONNECTIONS: Dict[str, Dict[str, List[str]]] = {
|
||||||
"Elemental Skylands - Water Generator Shop",
|
"Elemental Skylands - Water Generator Shop",
|
||||||
],
|
],
|
||||||
"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",
|
"Elemental Skylands - Right",
|
||||||
],
|
],
|
||||||
"Right": [
|
"Right": [
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from datetime import date
|
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
from schema import And, Optional, Or, Schema
|
from schema import And, Optional, Or, Schema
|
||||||
|
@ -203,8 +202,6 @@ class MessengerOptions(DeathLinkMixin, PerGameCommonOptions):
|
||||||
notes_needed: NotesNeeded
|
notes_needed: NotesNeeded
|
||||||
total_seals: AmountSeals
|
total_seals: AmountSeals
|
||||||
percent_seals_required: RequiredSeals
|
percent_seals_required: RequiredSeals
|
||||||
|
traps: Traps
|
||||||
shop_price: ShopPrices
|
shop_price: ShopPrices
|
||||||
shop_price_plan: PlannedShopPrices
|
shop_price_plan: PlannedShopPrices
|
||||||
|
|
||||||
if date.today() > date(2024, 4, 1):
|
|
||||||
traps: Traps
|
|
||||||
|
|
Loading…
Reference in New Issue