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

The Messenger: strip generated filler items for a sufficiently small pool #1907

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

alwaysintreble
Copy link
Collaborator

What is this fixing or adding?

I added a unit test that tests the shop costs with the minimum amount of generated locations. With the settings in that test only 6 items can possibly be currency and if none of those have a value over 100, then all of the shop locations are immediately accessible. There's still settings where a player can have even 0 possible currency items but that's their own fault, which is fine. This change is primarily so the unit test doesn't fail by slicing the filler dictionary before filler is created if the amount of items that still need to be generated is sufficiently small.

How was this tested?

Ran the unit test about 100 times. There's still a very slim chance it can fail if the random object generates 6 "Time Shard (50)". Only way to fully prevent that is to slice the dictionary an additional value. Will do if requested, but would prefer not to.

If this makes graphical changes, please attach screenshots.

@ThePhar ThePhar added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Jun 28, 2023
@ThePhar
Copy link
Member

ThePhar commented Jun 29, 2023

How slim are we talking? Cause I hate to be that guy, but I would prefer if the unit test didn't fail randomly at all.

@ThePhar ThePhar merged commit 3fba94f into ArchipelagoMW:main Jun 29, 2023
@alwaysintreble alwaysintreble deleted the guarantee_currency branch July 19, 2023 21:46
FlySniper pushed a commit to FlySniper/Archipelago that referenced this pull request Nov 14, 2023
…pool (ArchipelagoMW#1907)

* The Messenger: strip generated filler items for a sufficiently small remaining item pool

* rewrite the test for the small chance there's no large currency shards
Jouramie pushed a commit to Jouramie/Archipelago that referenced this pull request Feb 28, 2024
…pool (ArchipelagoMW#1907)

* The Messenger: strip generated filler items for a sufficiently small remaining item pool

* rewrite the test for the small chance there's no large currency shards
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants