mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Add support for starhunt and treasurehunt goals. Add timed difficulties.
This commit is contained in:
@@ -124,6 +124,7 @@ class World(object):
|
||||
prog_locations = [location for location in self.get_locations() if location.item is not None and location.item.advancement]
|
||||
|
||||
state = CollectionState(self)
|
||||
treasure_pieces_collected = 0
|
||||
while prog_locations:
|
||||
sphere = []
|
||||
# build up spheres of collection radius. Everything in each sphere is independent from each other in dependencies and only depends on lower spheres
|
||||
@@ -131,6 +132,10 @@ class World(object):
|
||||
if state.can_reach(location):
|
||||
if location.item.name == 'Triforce':
|
||||
return True
|
||||
elif location.item.name in ['Triforce Piece', 'Power Star']:
|
||||
treasure_pieces_collected += 1
|
||||
if self.goal in ['starhunt', 'triforcehunt'] and treasure_pieces_collected >= self.treasure_hunt_count:
|
||||
return True
|
||||
sphere.append(location)
|
||||
|
||||
if not sphere:
|
||||
|
Reference in New Issue
Block a user