Landstalker: Several small fixes (#4675)

* Landstalker: Fixed duplicate entrance names when using the "No teleport tree requirements" option

* Landstalker: Fixed more cases of duplicate entrance names when using "Shuffle Trees" with open trees

* Landstalker: Fixed endgame locations being present in "Reach Kazalt" goal

* Landstalker: Fixed Lithograph hint pointing at the wrong player

* Landstalker: Updated docs to remove the link to Steam since game got delisted

* Landstalker: Fixed high value hint_count rarely failing at generation

* Landstalker: Fixed dynamic shop prices being potentially invalid in case of a progression balancing (changes by ExemptMedic)
This commit is contained in:
Dinopony
2025-03-10 16:35:58 +01:00
committed by GitHub
parent dd55409209
commit be550ff6fb
3 changed files with 8 additions and 15 deletions

View File

@@ -131,7 +131,7 @@ def generate_random_hints(world: "LandstalkerWorld"):
hint_texts = list(set(hint_texts))
random.shuffle(hint_texts)
hint_count = world.options.hint_count.value
hint_count = min(world.options.hint_count.value, len(hint_texts))
del hint_texts[hint_count:]
hint_source_names = [source["description"] for source in HINT_SOURCES_JSON if

View File

@@ -39,7 +39,7 @@ class LandstalkerWorld(World):
item_name_to_id = build_item_name_to_id_table()
location_name_to_id = build_location_name_to_id_table()
cached_spheres: List[Set[Location]]
cached_spheres: List[Set[Location]] = []
def __init__(self, multiworld, player):
super().__init__(multiworld, player)
@@ -48,9 +48,11 @@ class LandstalkerWorld(World):
self.dark_region_ids = []
self.teleport_tree_pairs = []
self.jewel_items = []
self.cached_spheres = []
def fill_slot_data(self) -> dict:
if not LandstalkerWorld.cached_spheres:
LandstalkerWorld.cached_spheres = list(self.multiworld.get_spheres())
# Generate hints.
self.adjust_shop_prices()
hints = Hints.generate_random_hints(self)
@@ -232,18 +234,9 @@ class LandstalkerWorld(World):
else:
return 4
@classmethod
def stage_post_fill(cls, multiworld: MultiWorld):
# Cache spheres for hint calculation after fill completes.
cached_spheres = list(multiworld.get_spheres())
for world in multiworld.get_game_worlds(cls.game):
world.cached_spheres = cached_spheres
@classmethod
def stage_modify_multidata(cls, multiworld: MultiWorld, *_):
# Clean up all references in cached spheres after generation completes.
for world in multiworld.get_game_worlds(cls.game):
world.cached_spheres = []
LandstalkerWorld.cached_spheres = []
def adjust_shop_prices(self):
# Calculate prices for items in shops once all items have their final position
@@ -254,7 +247,7 @@ class LandstalkerWorld(World):
global_price_factor = self.options.shop_prices_factor / 100.0
spheres = self.cached_spheres
spheres = LandstalkerWorld.cached_spheres
sphere_count = len(spheres)
for sphere_id, sphere in enumerate(spheres):
location: LandstalkerLocation # after conditional, we guarantee it's this kind of location.

View File

@@ -6,7 +6,7 @@
- A compatible emulator to run the game
- [RetroArch](https://retroarch.com?page=platforms) with the Genesis Plus GX core
- [Bizhawk 2.9.1 (x64)](https://tasvideos.org/BizHawk/ReleaseHistory) with the Genesis Plus GX core
- Your legally obtained Landstalker US ROM file (which can be acquired on [Steam](https://store.steampowered.com/app/71118/Landstalker_The_Treasures_of_King_Nole/))
- A Landstalker US ROM file dumped from the original cartridge
## Installation Instructions