Fix: Medi-Goron not selling the correct item #2206
Merged
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.
Medigoron has two functions that hand out the proper sale item: the main choice func, and then a second func that gets called every frame until the rupees are ready to be taken. This second func also contains the same item give logic, but since the main function already set the randomizer inf flag, it then gives out the giants knife.
I adjusted the two functions to not set the randomizer inf flag until the rupees are ready to be taken, this should fix both scenarios of the item being handed out.
I also noticed that medi-goron would repeatedly sell giants knifes even if you have a non-broken knife, and would also prioritize fixing a broken knife over the randomizer item. I rearranged the logic so that he will always prefer to give you the randomizer item, then properly handle broken/non-broken knife prompts.
Fixes #2205
Build Artifacts