Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zillion: use useful item classification #4179

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

beauxq
Copy link
Collaborator

@beauxq beauxq commented Nov 12, 2024

What is this fixing or adding?

Use the useful item classification. (wasn't using any before)

How was this tested?

play through a game

@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Nov 12, 2024
@Exempt-Medic Exempt-Medic added the is: enhancement Issues requesting new features or pull requests implementing new features. label Nov 12, 2024
"Champ": 9999,
"JJ": 9999,
"Win": 9999,
"Empty": 0,
Copy link
Collaborator

@Exempt-Medic Exempt-Medic Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are Empty and Bread included if the default is already 0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The values are here so that it's more clear when reading this code what happens with Empty and Bread.
If this "Empty": 0, weren't here, it would take a little more mental energy for the reader to figure out what happens with it.

The default is just a safety in case something changes in the future.

""" make the item useful if the number in the item pool is below this number """


def get_classification(name: str, zz_item: ZzItem, item_counts: Counter[str]) -> IC:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this not accounting for extra items such as from start_inventory, item_plando, and item_links is intended / expected?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I admit I didn't think of those when writing this.

But thinking about it now, I think it's not worth the added complexity for something that won't make very much of a difference.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it's not worth changing, especially since this'll only ever make items Useful when they shouldn't be, and not the reverse.

Copy link
Collaborator

@Exempt-Medic Exempt-Medic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM. Comments were addressed. Tested some generations and tested the new codepaths by adding printed messages and hosting and releasing one game to check actual item classifications as well. Multiclassification items (including Win) worked just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants