Sm unbeatable seed fix (#514)
This commit is contained in:
parent
b2e65a19a2
commit
e147495fb9
|
@ -5,7 +5,7 @@ import copy
|
|||
import os
|
||||
import threading
|
||||
import base64
|
||||
from typing import Set, List
|
||||
from typing import Set, List, TextIO
|
||||
|
||||
logger = logging.getLogger("Super Metroid")
|
||||
|
||||
|
@ -68,6 +68,12 @@ class SMWeb(WebWorld):
|
|||
|
||||
|
||||
class SMWorld(World):
|
||||
"""
|
||||
This is Very Adaptive Randomizer of Items and Areas for Super Metroid (VARIA SM). It supports
|
||||
a wide range of options to randomize Item locations, required skills and even the connections
|
||||
between the main Areas!
|
||||
"""
|
||||
|
||||
game: str = "Super Metroid"
|
||||
topology_present = True
|
||||
data_version = 1
|
||||
|
@ -565,6 +571,20 @@ class SMWorld(World):
|
|||
if location.game == location.item.game == "Super Metroid" and location.item.type == "Nothing":
|
||||
location.address = location.item.code = None
|
||||
|
||||
def write_spoiler(self, spoiler_handle: TextIO):
|
||||
if self.world.area_randomization[self.player].value != 0:
|
||||
spoiler_handle.write('\n\nArea Transitions:\n\n')
|
||||
spoiler_handle.write('\n'.join(['%s%s %s %s' % (f'{self.world.get_player_name(self.player)}: '
|
||||
if self.world.players > 1 else '', src.Name,
|
||||
'<=>',
|
||||
dest.Name) for src, dest in self.variaRando.randoExec.areaGraph.InterAreaTransitions if not src.Boss]))
|
||||
|
||||
if self.world.boss_randomization[self.player].value != 0:
|
||||
spoiler_handle.write('\n\nBoss Transitions:\n\n')
|
||||
spoiler_handle.write('\n'.join(['%s%s %s %s' % (f'{self.world.get_player_name(self.player)}: '
|
||||
if self.world.players > 1 else '', src.Name,
|
||||
'<=>',
|
||||
dest.Name) for src, dest in self.variaRando.randoExec.areaGraph.InterAreaTransitions if src.Boss]))
|
||||
|
||||
def create_locations(self, player: int):
|
||||
for name, id in locations_lookup_name_to_id.items():
|
||||
|
|
|
@ -254,8 +254,7 @@ class DoorsManager():
|
|||
|
||||
@staticmethod
|
||||
def setDoorsColor(player=0):
|
||||
if player not in DoorsManager.doorsDict.keys():
|
||||
DoorsManager.doorsDict[player] = copy.deepcopy(DoorsManager.doors)
|
||||
DoorsManager.doorsDict[player] = copy.deepcopy(DoorsManager.doors)
|
||||
currentDoors = DoorsManager.doorsDict[player]
|
||||
|
||||
# depending on loaded patches, force some doors to blue, excluding them from randomization
|
||||
|
|
Loading…
Reference in New Issue