Core: Fill fix local logic conflict (#1271)

This commit is contained in:
Fabian Dill
2022-11-28 07:03:09 +01:00
committed by GitHub
parent cde2a6e754
commit 1288f15e45
5 changed files with 51 additions and 34 deletions

View File

@@ -195,6 +195,14 @@ class ALTTPWorld(World):
world.difficulty_requirements[player] = difficulties[world.difficulty[player]]
# enforce pre-defined local items.
if world.goal[player] in ["localtriforcehunt", "localganontriforcehunt"]:
world.local_items[player].value.add('Triforce Piece')
# Not possible to place crystals outside boss prizes yet (might as well make it consistent with pendants too).
world.non_local_items[player].value -= item_name_groups['Pendants']
world.non_local_items[player].value -= item_name_groups['Crystals']
def create_regions(self):
player = self.player
world = self.multiworld

View File

@@ -1,9 +1,13 @@
import typing
from Options import Choice, Range, DeathLink
from Options import Choice, Range, DeathLink, DefaultOnToggle
from .Creatures import all_creatures, Definitions
class EarlySeaglide(DefaultOnToggle):
"""Make sure 2 of the Seaglide Fragments are available in or near the Safe Shallows (Sphere 1 Locations)."""
class ItemPool(Choice):
"""Valuable item pool leaves all filler items in their vanilla locations and
creates random duplicates of important items into freed spots."""
@@ -75,6 +79,7 @@ class SubnauticaDeathLink(DeathLink):
options = {
"early_seaglide": EarlySeaglide,
"item_pool": ItemPool,
"goal": Goal,
"creature_scans": CreatureScans,

View File

@@ -47,7 +47,8 @@ class SubnauticaWorld(World):
creatures_to_scan: List[str]
def generate_early(self) -> None:
self.multiworld.local_early_items[self.player]["Seaglide Fragment"] = 2
if self.multiworld.early_seaglide:
self.multiworld.local_early_items[self.player]["Seaglide Fragment"] = 2
scan_option: Options.AggressiveScanLogic = self.multiworld.creature_scan_logic[self.player]
creature_pool = scan_option.get_pool()