diff --git a/worlds/smz3/TotalSMZ3/Patch.py b/worlds/smz3/TotalSMZ3/Patch.py index bb23b0b97bf6..049b200c46b0 100644 --- a/worlds/smz3/TotalSMZ3/Patch.py +++ b/worlds/smz3/TotalSMZ3/Patch.py @@ -84,6 +84,7 @@ class DropPrize(Enum): class Patch: Major = 11 Minor = 3 + Patch = 1 allWorlds: List[World] myWorld: World seedGuid: str @@ -615,7 +616,7 @@ def WriteGameTitle(self): "H" if self.myWorld.Config.SMLogic == Config.SMLogic.Hard else \ "X" - self.title = f"ZSM{Patch.Major}{Patch.Minor}{z3Glitch}{smGlitch}{self.myWorld.Id}{self.seed:08x}".ljust(21)[:21] + self.title = f"ZSM{Patch.Major}{Patch.Minor}{Patch.Patch}{z3Glitch}{smGlitch}{self.myWorld.Id}{self.seed:08x}".ljust(21)[:21] self.patches.append((Snes(0x00FFC0), bytearray(self.title, 'utf8'))) self.patches.append((Snes(0x80FFC0), bytearray(self.title, 'utf8'))) diff --git a/worlds/smz3/TotalSMZ3/Regions/Zelda/GanonsTower.py b/worlds/smz3/TotalSMZ3/Regions/Zelda/GanonsTower.py index fe81069164c5..42933b9f2fd5 100644 --- a/worlds/smz3/TotalSMZ3/Regions/Zelda/GanonsTower.py +++ b/worlds/smz3/TotalSMZ3/Regions/Zelda/GanonsTower.py @@ -136,7 +136,7 @@ def CanBeatMoldorm(self, items: Progression): def CanEnter(self, items: Progression): return items.MoonPearl and self.world.CanEnter("Dark World Death Mountain East", items) and \ self.world.CanAcquireAtLeast(self.world.TowerCrystals, items, RewardType.AnyCrystal) and \ - self.world.CanAcquireAtLeast(self.world.TourianBossTokens * (self.world.TowerCrystals / 7), items, RewardType.AnyBossToken) + self.world.CanAcquireAtLeast((self.world.TourianBossTokens * self.world.TowerCrystals) / 7, items, RewardType.AnyBossToken) # added for AP completion_condition when TowerCrystals is lower than GanonCrystals def CanComplete(self, items: Progression): @@ -144,7 +144,8 @@ def CanComplete(self, items: Progression): def CanFill(self, item: Item): if (self.Config.Multiworld): - if (item.World != self.world or item.Progression): + # item.World will be None for item created by create_item for item links + if (item.World is not None and (item.World != self.world or item.Progression)): return False if (self.Config.Keysanity and not ((item.Type == ItemType.BigKeyGT or item.Type == ItemType.KeyGT) and item.World == self.world) and (item.IsKey() or item.IsBigKey() or item.IsKeycard())): return False diff --git a/worlds/smz3/__init__.py b/worlds/smz3/__init__.py index 969ad9dfccaa..79ba17db82b1 100644 --- a/worlds/smz3/__init__.py +++ b/worlds/smz3/__init__.py @@ -200,13 +200,13 @@ def generate_early(self): self.local_random = random.Random(self.multiworld.random.randint(0, 1000)) self.smz3World = TotalSMZ3World(self.config, self.multiworld.get_player_name(self.player), self.player, self.multiworld.seed_name) + self.smz3World.Setup(WorldState.Generate(self.config, self.multiworld.random)) self.smz3DungeonItems = [] SMZ3World.location_names = frozenset(self.smz3World.locationLookup.keys()) self.multiworld.state.smz3state[self.player] = TotalSMZ3Item.Progression([]) - def generate_basic(self): - self.smz3World.Setup(WorldState.Generate(self.config, self.multiworld.random)) + def create_items(self): self.dungeon = TotalSMZ3Item.Item.CreateDungeonPool(self.smz3World) self.dungeon.reverse() self.progression = TotalSMZ3Item.Item.CreateProgressionPool(self.smz3World) @@ -487,7 +487,7 @@ def create_item(self, name: str) -> Item: ItemClassification.progression if SMZ3World.isProgression(TotalSMZ3Item.ItemType[name]) else ItemClassification.filler, TotalSMZ3Item.ItemType[name], self.item_name_to_id[name], self.player, - TotalSMZ3Item.Item(TotalSMZ3Item.ItemType[name], self)) + TotalSMZ3Item.Item(TotalSMZ3Item.ItemType[name], getattr(self, "smz3World", None))) def pre_fill(self): from Fill import fill_restrictive