Crossed Dungeon generation work
--Introduced reachable_switches --Calculate total completion in equation resolution --Prioritized one-way connections over neutral/neutral_profitable sectored but not over dead-ends --Simplified finding good complex branching candidates - just re-used equations routine --Valid multi choice for global polarity when fixing parity --Added total dungeon charge as critieria when fixing parity --Pinball used for navigation in skull 2, marked appropriately (particularly with Ice Cross in Skull 2) --Equation resolution detects used benefits with unreached_doors benefits --Greedy equation finder not longer used destination/entrance sectors of the wrong split dungeon --Required connections don't overestimate benefits --Introduced the concept of crystal switches and doors blocked by blue barriers to equations
This commit is contained in:
@@ -1076,6 +1076,12 @@ class Polarity:
|
||||
result += abs(self.vector[i])
|
||||
return result
|
||||
|
||||
def __str__(self):
|
||||
return str(self.__unicode__())
|
||||
|
||||
def __unicode__(self):
|
||||
return f'{self.vector}'
|
||||
|
||||
|
||||
pol_idx = {
|
||||
Direction.North: (0, 'Pos'),
|
||||
@@ -1383,11 +1389,23 @@ class Sector(object):
|
||||
self.entrance_sector = True
|
||||
return self.entrance_sector
|
||||
|
||||
def get_start_regions(self):
|
||||
if self.is_entrance_sector():
|
||||
starts = []
|
||||
for region in self.regions:
|
||||
for ent in region.entrances:
|
||||
if ent.parent_region.type in [RegionType.LightWorld, RegionType.DarkWorld] or ent.parent_region.name == 'Sewer Drop':
|
||||
starts.append(region)
|
||||
return starts
|
||||
return None
|
||||
|
||||
def __str__(self):
|
||||
return str(self.__unicode__())
|
||||
|
||||
def __unicode__(self):
|
||||
return '%s' % next(iter(self.region_set()))
|
||||
if len(self.regions) > 0:
|
||||
return f'{self.regions[0].name}'
|
||||
return f'{next(iter(self.region_set()))}'
|
||||
|
||||
|
||||
class Boss(object):
|
||||
|
||||
Reference in New Issue
Block a user