Skip to content

Commit

Permalink
Universally Track Yhorm (ArchipelagoMW#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
Exempt-Medic authored Jun 11, 2024
1 parent d506136 commit 9e7cd1f
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions worlds/dark_souls_3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from collections import defaultdict
import json
from logging import warning
from typing import Callable, Dict, Set, List, Optional, TextIO, Union
from typing import Any, Callable, Dict, Set, List, Optional, TextIO, Union

from BaseClasses import CollectionState, MultiWorld, Region, Item, Location, LocationProgressType, Entrance, Tutorial, ItemClassification

Expand Down Expand Up @@ -93,8 +93,19 @@ def __init__(self, multiworld: MultiWorld, player: int):
def generate_early(self):
self.all_excluded_locations.update(self.options.exclude_locations.value)

# Inform Universal Tracker where Yhorm is being randomized to.
if hasattr(self.multiworld, "re_gen_passthrough"):
if "Dark Souls III" in self.multiworld.re_gen_passthrough:
if self.multiworld.re_gen_passthrough["Dark Souls III"]["options"]["randomize_enemies"]:
yhorm_data = self.multiworld.re_gen_passthrough["Dark Souls III"]["yhorm"]
for boss in all_bosses:
if yhorm_data.startswith(boss.name):
self.yhorm_location = boss
else:
self.yhorm_location = default_yhorm_location

# Randomize Yhorm manually so that we know where to place the Storm Ruler.
if self.options.randomize_enemies:
elif self.options.randomize_enemies:
self.yhorm_location = self.random.choice(
[boss for boss in all_bosses if self._allow_boss_for_yhorm(boss)])

Expand Down Expand Up @@ -1530,3 +1541,7 @@ def fill_slot_data(self) -> Dict[str, object]:
}

return slot_data

@staticmethod
def interpret_slot_data(slot_data: Dict[str, Any]) -> Dict[str, Any]:
return slot_data

0 comments on commit 9e7cd1f

Please sign in to comment.