Skip to content

Commit

Permalink
Update Rules.py
Browse files Browse the repository at this point in the history
Co-authored-by: Scipio Wright <[email protected]>
  • Loading branch information
gaithern and ScipioWright authored Apr 24, 2024
1 parent 885c399 commit 17d5135
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions worlds/kh1/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,13 @@ def has_postcards(state: CollectionState, player: int, postcards_required: int)
return postcards_available >= postcards_required

def has_puppies(state: CollectionState, player: int, puppies_required: int) -> bool:
puppies_available = 0
for i in range(1,100):
if state.has("Puppy " + str(i).rjust(2,"0"), player):
puppies_available = puppies_available + 1
for i in range(1,34):
if state.has("Puppies " + str(3*(i-1)+1).rjust(2, "0") + "-" + str(3*(i-1)+3).rjust(2, "0"), player):
puppies_available = puppies_available + 3
if state.has("All Puppies", player):
puppies_available = puppies_available + 99
return puppies_available >= puppies_required
return True
if state.has_group("Puppies TRP", player, -(puppies_required//-3)):
return True
if state.has_group("Puppies IND", player, puppies_required):
return True
return False

def has_torn_pages(state: CollectionState, player: int, pages_required: int) -> bool:
pages_available = 0
Expand Down

0 comments on commit 17d5135

Please sign in to comment.