Add new 4 heart logic for spike cave and misery mire

This commit is contained in:
Kevin Cathcart
2018-01-06 13:39:22 -05:00
parent a0c892ab98
commit 9846f924d2
3 changed files with 35 additions and 4 deletions

View File

@@ -368,6 +368,19 @@ class CollectionState(object):
def bottle_count(self):
return len([pritem for pritem in self.prog_items if pritem.startswith('Bottle')])
def has_hearts(self, count):
# Warning: This oncly considers items that are marked as advancement items
return self.heart_count() >= count
def heart_count(self):
# Warning: This oncly considers items that are marked as advancement items
return (
self.item_count('Boss Heart Container')
+ self.item_count('Sanctuary Heart Container')
+ self.item_count('Piece of Heart') // 4
+ 3 # starting hearts
)
def can_lift_heavy_rocks(self):
return self.has('Titans Mitts')