Fixed foods and cash foods being applied simultaneously #3250
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.
Pull Request Prelude
Changes Proposed
Fixes stat foods and stat cash foods being applied simultaneously and stacked one in top of the other. Also, only cash foods can overwrite normal foods (and not the other way around) according to @Kenpachi2k13 in this old PR #2741
In addition, being the lesser evil, in this PR cash foods will overwrite the same type of food if the level is also the same. However, according to this comment in the aforementioned PR, cash foods should only overwrite stat foods if the effect is stronger, not equal. Please, let me know if I should respect the quoted behavior and not let foods be overwriten by foods of equal level.
Issues addressed:
#2489