Stardew Valley: Added missing logic rules for dating and marriage #2160
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?
When playing on friendsanity marriage, for some values of heart size, "milestone" hearts can end up being skipped. For example, with heart size 3, the hearts are 3-6-9-12-14, which skips 8 and 10, which are the milestones for dating and marriage.
In order to "earn" heart 9, you need to have 8 hearts and give a bouquet to the NPC to date them. Under the current logic, only heart 6 would be required for heart 9 to be in logic, as the design was "previous heart only". This is a problem, because at 6 hearts, you cannot date the villager, and therefore you cannot "earn" hearts past the 8th one.
This fixes the problem. Any heart earned past 8 requires dating, so 8 minimum received, and any past 10 requires marriage, so 10 minimum received. Taking the same example, in order to "earn" heart 9, you would now need to receive heart 9, in order to give a bouquet.
How was this tested?
Created a new unit test that finds that specific bug before fixing it, then fixed it and ran all of the tests