mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
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:
@@ -32,11 +32,11 @@ class RandoSettings(object):
|
||||
def isPlandoRando(self):
|
||||
return self.PlandoOptions is not None
|
||||
|
||||
def getItemManager(self, smbm, nLocs):
|
||||
def getItemManager(self, smbm, nLocs, bossesItems):
|
||||
if not self.isPlandoRando():
|
||||
return ItemManager(self.restrictions['MajorMinor'], self.qty, smbm, nLocs, self.maxDiff)
|
||||
return ItemManager(self.restrictions['MajorMinor'], self.qty, smbm, nLocs, bossesItems, self.maxDiff)
|
||||
else:
|
||||
return ItemManager('Plando', self.qty, smbm, nLocs, self.maxDiff)
|
||||
return ItemManager('Plando', self.qty, smbm, nLocs, bossesItems, self.maxDiff)
|
||||
|
||||
def getExcludeItems(self, locations):
|
||||
if not self.isPlandoRando():
|
||||
@@ -67,7 +67,11 @@ class RandoSettings(object):
|
||||
|
||||
# Holds settings and utiliy functions related to graph layout
|
||||
class GraphSettings(object):
|
||||
def __init__(self, startAP, areaRando, lightAreaRando, bossRando, escapeRando, minimizerN, dotFile, doorsColorsRando, allowGreyDoors, plandoRandoTransitions):
|
||||
def __init__(self, player, startAP, areaRando, lightAreaRando,
|
||||
bossRando, escapeRando, minimizerN, dotFile,
|
||||
doorsColorsRando, allowGreyDoors, tourian,
|
||||
plandoRandoTransitions):
|
||||
self.player = player
|
||||
self.startAP = startAP
|
||||
self.areaRando = areaRando
|
||||
self.lightAreaRando = lightAreaRando
|
||||
@@ -77,6 +81,7 @@ class GraphSettings(object):
|
||||
self.dotFile = dotFile
|
||||
self.doorsColorsRando = doorsColorsRando
|
||||
self.allowGreyDoors = allowGreyDoors
|
||||
self.tourian = tourian
|
||||
self.plandoRandoTransitions = plandoRandoTransitions
|
||||
|
||||
def isMinimizer(self):
|
||||
@@ -122,10 +127,16 @@ class ProgSpeedParameters(object):
|
||||
elif progSpeed == 'fastest':
|
||||
return 0.33
|
||||
return 0
|
||||
|
||||
# chozo/slowest can make seed generation fail often, not much
|
||||
# of a gameplay difference between slow/slowest in Chozo anyway,
|
||||
# so we merge slow and slowest for some params
|
||||
def isSlow(self, progSpeed):
|
||||
return progSpeed == "slow" or (progSpeed == "slowest" and self.restrictions.split == "Chozo")
|
||||
|
||||
def getItemLimit(self, progSpeed):
|
||||
itemLimit = self.nLocs
|
||||
if progSpeed == 'slow':
|
||||
if self.isSlow(progSpeed):
|
||||
itemLimit = int(self.nLocs*0.209) # 21 for 105
|
||||
elif progSpeed == 'medium':
|
||||
itemLimit = int(self.nLocs*0.095) # 9 for 105
|
||||
@@ -143,7 +154,7 @@ class ProgSpeedParameters(object):
|
||||
|
||||
def getLocLimit(self, progSpeed):
|
||||
locLimit = -1
|
||||
if progSpeed == 'slow':
|
||||
if self.isSlow(progSpeed):
|
||||
locLimit = 1
|
||||
elif progSpeed == 'medium':
|
||||
locLimit = 2
|
||||
@@ -158,12 +169,12 @@ class ProgSpeedParameters(object):
|
||||
if self.restrictions.isLateDoors():
|
||||
progTypes += ['Wave','Spazer','Plasma']
|
||||
progTypes.append('Charge')
|
||||
if progSpeed == 'slowest':
|
||||
if progSpeed == 'slowest' and self.restrictions.split != "Chozo":
|
||||
return progTypes
|
||||
else:
|
||||
progTypes.remove('HiJump')
|
||||
progTypes.remove('Charge')
|
||||
if progSpeed == 'slow':
|
||||
if self.isSlow(progSpeed):
|
||||
return progTypes
|
||||
else:
|
||||
progTypes.remove('Bomb')
|
||||
|
||||
Reference in New Issue
Block a user