No-Logic fix - don't try to spread crystal access if the current state is nothing
This commit is contained in:
@@ -450,17 +450,17 @@ class CollectionState(object):
|
|||||||
blocked.add(entrance.parent_region)
|
blocked.add(entrance.parent_region)
|
||||||
if color_type:
|
if color_type:
|
||||||
ccr[candidate] = color_type
|
ccr[candidate] = color_type
|
||||||
for ext in candidate.exits:
|
for ext in candidate.exits:
|
||||||
connect = ext.connected_region
|
connect = ext.connected_region
|
||||||
if connect in rrp and connect in ccr:
|
if connect in rrp and connect in ccr:
|
||||||
door = self.world.check_for_door(ext.name, player)
|
door = self.world.check_for_door(ext.name, player)
|
||||||
if door is not None and not door.blocked:
|
if door is not None and not door.blocked:
|
||||||
if ext.can_reach(self):
|
if ext.can_reach(self):
|
||||||
new_color = ccr[connect] | (ccr[candidate] & (door.crystal or CrystalBarrier.Either))
|
new_color = ccr[connect] | (ccr[candidate] & (door.crystal or CrystalBarrier.Either))
|
||||||
if new_color != ccr[connect]:
|
if new_color != ccr[connect]:
|
||||||
self.spread_crystal_access(candidate, new_color, rrp, ccr, player)
|
self.spread_crystal_access(candidate, new_color, rrp, ccr, player)
|
||||||
else:
|
else:
|
||||||
blocked.add(candidate)
|
blocked.add(candidate)
|
||||||
new_regions = len(rrp) > reachable_regions_count
|
new_regions = len(rrp) > reachable_regions_count
|
||||||
reachable_regions_count = len(rrp)
|
reachable_regions_count = len(rrp)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user