SM: 20221101 update (#1479)

This adds support to most of Varia's 20221101 update. Notably, added Options for:
- Objectives
- Tourian
- RelaxedRoundRobinCF

As well as previously unsupported Options:
- EscapeRando
- RemoveEscapeEnemies
- HideItems
This commit is contained in:
lordlou
2023-04-09 18:35:46 -04:00
committed by GitHub
parent 0bc5a3bc8d
commit 6059b5ef66
78 changed files with 3214 additions and 24689 deletions

View File

@@ -14,11 +14,9 @@ class Restrictions(object):
self.suitsRestrictions = settings.restrictions['Suits']
self.scavLocs = None
self.scavIsVanilla = False
self.scavEscape = False
self.restrictionDictChecker = None
if self.split == 'Scavenger':
self.scavIsVanilla = settings.restrictions['ScavengerParams']['vanillaItems']
self.scavEscape = settings.restrictions['ScavengerParams']['escape']
# checker function chain used by canPlaceAtLocation
self.checkers = self.getCheckers()
self.static = {}
@@ -84,7 +82,7 @@ class Restrictions(object):
self.checkers.append(self.restrictionDictChecker)
def isLocMajor(self, loc):
return not loc.isBoss() and (self.split == "Full" or loc.isClass(self.split))
return (not loc.isBoss() and self.split == "Full") or loc.isClass(self.split)
def isLocMinor(self, loc):
return not loc.isBoss() and (self.split == "Full" or not loc.isClass(self.split))
@@ -93,7 +91,7 @@ class Restrictions(object):
if self.split == "Full":
return True
elif self.split == 'Scavenger':
return not self.isItemMinor(item)
return not self.isItemMinor(item) or item.Type == "Ridley"
else:
return item.Class == self.split
@@ -135,7 +133,7 @@ class Restrictions(object):
def getCheckers(self):
checkers = []
self.log.debug("add bosses restriction")
checkers.append(lambda item, loc, cont: (item.Category != 'Boss' and not loc.isBoss()) or (item.Category == 'Boss' and item.Name == loc.Name))
checkers.append(lambda item, loc, cont: (item.Category not in ['Boss', 'MiniBoss'] and not loc.isBoss()) or (item.Category in ['Boss', 'MiniBoss'] and item.Type == loc.BossItemType))
if self.split != 'Full':
if self.split != 'Scavenger':
self.log.debug("add majorsSplit restriction")