Skip to content

Commit

Permalink
Fix the new select_drop code for REAL this time.
Browse files Browse the repository at this point in the history
  • Loading branch information
LiquidCat64 committed Dec 2, 2024
1 parent 76a882a commit fe26316
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions worlds/cvcotm/aesthetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class OtherGameAppearancesInfo(TypedDict):
52, # Heart High

19, # Stylish Suit
20, # Nightsuit
20, # Night Suit
13, # Silk Robe
14, # Rainbow Robe
4, # Chainmail
Expand Down Expand Up @@ -658,10 +658,10 @@ def select_drop(world: "CVCotMWorld", drop_list: List[int], drops_placed: List[i
Calling this with exclusive_drop param being True will force the number of the chosen item really high to ensure it
will never be picked again."""

eligible_items = [0] * NUMBER_ITEMS

drops_from_start_index = drops_placed[start_index:] # Cut list from start_index
# Take the list of placed item drops beginning from the starting index.
drops_from_start_index = drops_placed[start_index:]

# Determine the lowest drop counts and the indices with that drop count.
lowest_number = min(drops_from_start_index)
indices_with_lowest_number = [index for index, placed in enumerate(drops_from_start_index) if
placed == lowest_number]
Expand All @@ -676,8 +676,8 @@ def select_drop(world: "CVCotMWorld", drop_list: List[int], drops_placed: List[i
else:
drops_placed[random_index] += 1

# Return the item ID
return drop_list[eligible_items[random_index]]
# Return the in-game item ID of the chosen item.
return drop_list[random_index]


def get_start_inventory_data(world: "CVCotMWorld") -> Tuple[Dict[int, bytes], bool]:
Expand Down

0 comments on commit fe26316

Please sign in to comment.