SMZ3: update to upstream version 11.3.1 and item link fix (#1950)
This commit is contained in:
parent
81b956408e
commit
5f2c226b43
|
@ -84,6 +84,7 @@ class DropPrize(Enum):
|
||||||
class Patch:
|
class Patch:
|
||||||
Major = 11
|
Major = 11
|
||||||
Minor = 3
|
Minor = 3
|
||||||
|
Patch = 1
|
||||||
allWorlds: List[World]
|
allWorlds: List[World]
|
||||||
myWorld: World
|
myWorld: World
|
||||||
seedGuid: str
|
seedGuid: str
|
||||||
|
@ -615,7 +616,7 @@ class Patch:
|
||||||
"H" if self.myWorld.Config.SMLogic == Config.SMLogic.Hard else \
|
"H" if self.myWorld.Config.SMLogic == Config.SMLogic.Hard else \
|
||||||
"X"
|
"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(0x00FFC0), bytearray(self.title, 'utf8')))
|
||||||
self.patches.append((Snes(0x80FFC0), bytearray(self.title, 'utf8')))
|
self.patches.append((Snes(0x80FFC0), bytearray(self.title, 'utf8')))
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ class GanonsTower(Z3Region):
|
||||||
def CanEnter(self, items: Progression):
|
def CanEnter(self, items: Progression):
|
||||||
return items.MoonPearl and self.world.CanEnter("Dark World Death Mountain East", items) and \
|
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.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
|
# added for AP completion_condition when TowerCrystals is lower than GanonCrystals
|
||||||
def CanComplete(self, items: Progression):
|
def CanComplete(self, items: Progression):
|
||||||
|
@ -144,7 +144,8 @@ class GanonsTower(Z3Region):
|
||||||
|
|
||||||
def CanFill(self, item: Item):
|
def CanFill(self, item: Item):
|
||||||
if (self.Config.Multiworld):
|
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
|
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())):
|
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
|
return False
|
||||||
|
|
|
@ -200,13 +200,13 @@ class SMZ3World(World):
|
||||||
|
|
||||||
self.local_random = random.Random(self.multiworld.random.randint(0, 1000))
|
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 = 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 = []
|
self.smz3DungeonItems = []
|
||||||
SMZ3World.location_names = frozenset(self.smz3World.locationLookup.keys())
|
SMZ3World.location_names = frozenset(self.smz3World.locationLookup.keys())
|
||||||
|
|
||||||
self.multiworld.state.smz3state[self.player] = TotalSMZ3Item.Progression([])
|
self.multiworld.state.smz3state[self.player] = TotalSMZ3Item.Progression([])
|
||||||
|
|
||||||
def generate_basic(self):
|
def create_items(self):
|
||||||
self.smz3World.Setup(WorldState.Generate(self.config, self.multiworld.random))
|
|
||||||
self.dungeon = TotalSMZ3Item.Item.CreateDungeonPool(self.smz3World)
|
self.dungeon = TotalSMZ3Item.Item.CreateDungeonPool(self.smz3World)
|
||||||
self.dungeon.reverse()
|
self.dungeon.reverse()
|
||||||
self.progression = TotalSMZ3Item.Item.CreateProgressionPool(self.smz3World)
|
self.progression = TotalSMZ3Item.Item.CreateProgressionPool(self.smz3World)
|
||||||
|
@ -487,7 +487,7 @@ class SMZ3World(World):
|
||||||
ItemClassification.progression if SMZ3World.isProgression(TotalSMZ3Item.ItemType[name]) else ItemClassification.filler,
|
ItemClassification.progression if SMZ3World.isProgression(TotalSMZ3Item.ItemType[name]) else ItemClassification.filler,
|
||||||
TotalSMZ3Item.ItemType[name], self.item_name_to_id[name],
|
TotalSMZ3Item.ItemType[name], self.item_name_to_id[name],
|
||||||
self.player,
|
self.player,
|
||||||
TotalSMZ3Item.Item(TotalSMZ3Item.ItemType[name], self))
|
TotalSMZ3Item.Item(TotalSMZ3Item.ItemType[name], getattr(self, "smz3World", None)))
|
||||||
|
|
||||||
def pre_fill(self):
|
def pre_fill(self):
|
||||||
from Fill import fill_restrictive
|
from Fill import fill_restrictive
|
||||||
|
|
Loading…
Reference in New Issue