Fix VIT/INT from status changes not benefiting from bMaxHPrate/bMaxSP… - #3429
Open
MrKeiKun wants to merge 1 commit into
Open
Fix VIT/INT from status changes not benefiting from bMaxHPrate/bMaxSP…#3429MrKeiKun wants to merge 1 commit into
MrKeiKun wants to merge 1 commit into
Conversation
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.
Pull Request Prelude
Changes Proposed
VIT/INT granted by equipment and VIT/INT granted by status changes (e.g.
SC_FOOD_VIT,SC_FOOD_INT_CASH) were going through different code paths when recalculating MaxHP/MaxSP, causing them to be worth different amounts of HP/SPwhenever
bMaxHPrate/bMaxSPrate(orbattle_config.hp_rate/sp_rate) was non-default:status_calc_pc_()computes the VIT-based HP, adds flat bonuses, then multiplies the whole thing bysd->hprateandbattle_config.hp_rate. This path only sees equipment VIT, since it runs "from scratch, without SCadjustments."
status_calc_bl_main()'sSCB_MAXHPhandler recomputes the VIT-based HP using the SC-inclusive VIT, but instead of re-applying the same rate, it just added the delta between the previously-computed, already-ratedbst->max_hpand the previously-computed, unratedsd->status.max_hp. That delta bakes in the rate for the equipment-VIT portion only, so any VIT contributed by a status change was added at 1x regardless ofbMaxHPrate.Note: this does not address the separate concern raised in the same issue about SC-based
%MaxHPbonuses (SC_FORCEOFVANGUARD,SC_RAISINGDRAGON,SC_EPICLESIS, etc.) stacking multiplicatively rather than additively, Probably in another PR that will be fixed as I need to investigate for it further.Issues addressed: #914