Repository navigation
SMZ3: Fix distribution of Super Metroid prizes - #5303
Merged
Merged
Conversation
Contributor
Author
|
Relevant upstream code: WorldState.cs:75-90 |
ScipioWright
approved these changes
Aug 8, 2025
ScipioWright
left a comment
Collaborator
There was a problem hiding this comment.
The math makes much more sense now (I'd prefer if it was just getting a random number then figuring out if it's within a range directly instead of subtracting each time but it's not worth changing it that much), and the other bug here was understandable.
lordlou
approved these changes
Aug 10, 2025
lordlou
left a comment
Contributor
There was a problem hiding this comment.
Oh this was indeed all wrong. Thanks for helping, much appreciated!
NewSoupVi
approved these changes
Sep 5, 2025
eternalcode0
pushed a commit
to eternalcode0/Archipelago
that referenced
this pull request
Dec 20, 2025
eternalcode0
pushed a commit
to eternalcode0/Archipelago
that referenced
this pull request
Dec 21, 2025
wcoldren
pushed a commit
to wcoldren/Archipelago
that referenced
this pull request
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this fixing or adding?
A combination of two bugs that seem to have been introduced when converting the upstream code to Python:
n - (12 + 15 + 15)wherenis between 0 and 35 is always less than 0)__init__, that copy (and the changes made to it afterwards by other parameters) would be tossed out, and the result would always be the default Distribution weights. This was masked by the above bug; fixing that one without fixing this one resulted in occasionally attempting to place three Red Crystals, two Green Pendants, etc.How was this tested?
Test generations showing Red Crystals and rarely, Pendants being placed on SM locations, where they were not before