SMZ3: Fix forced fill behaviors (GT junk fill, initial Super/PB front fill) (#5361)

* SMZ3: Make GT fill behave like upstream SMZ3 multiworld GT fill

This means: All items local, 50% guaranteed filler, followed by possible
useful items, never progression.

* Fix item links

* SMZ3: Ensure in all cases, we remove the right item from the pool

Previously front fill would cause erratic errors on frozen, with the
cause immediately revealed by, on source, tripping the assert that was
added in #5109

* SMZ3: Truly, *properly* fix GT junk fill

After hours of diving deep into the upstream SMZ3 randomizer, it finally
behaves identically to how it does there
This commit is contained in:
Kaito Sinclaire
2025-10-02 17:05:29 -07:00
committed by GitHub
parent 6d7abb3780
commit 83cfb803a7
3 changed files with 33 additions and 36 deletions

View File

@@ -145,8 +145,12 @@ class GanonsTower(Z3Region):
def CanFill(self, item: Item):
if (self.Config.Multiworld):
# changed for AP becuase upstream only uses CanFill for filling progression-related items
# note that item.Progression does not include all items with progression classification
# 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)):
if (item.World is not None and item.World != self.world and (item.Progression or item.IsDungeonItem() or item.IsKeycard() or item.IsSmMap())):
return False
if (item.World is not None and item.World == self.world and 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