Add ganon triforce hunt (#117)

* Add ganon triforce hunt

* Add self to license

* Correction of help message for Local Ganon Triforce Hunt.

* if 'triforcehunt in world.goal[player]:
This commit is contained in:
CaitSith2
2020-06-26 07:18:53 -07:00
committed by GitHub
parent 46038830c3
commit 545bb8023c
11 changed files with 44 additions and 20 deletions

View File

@@ -518,6 +518,9 @@ class CollectionState(object):
def item_count(self, item, player: int) -> int:
return self.prog_items[item, player]
def has_triforce_pieces(self, count: int, player: int) -> bool:
return self.item_count('Triforce Piece', player) + self.item_count('Power Star', player) >= count
def has_crystals(self, count: int, player: int) -> bool:
crystals = ['Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7']
return len([crystal for crystal in crystals if self.has(crystal, player)]) >= count