Skip to content

Fix VIT/INT from status changes not benefiting from bMaxHPrate/bMaxSP… - #3429

Open
MrKeiKun wants to merge 1 commit into
HerculesWS:masterfrom
MrKeiKun:fix/issue-914-sc-vit-int-maxhp-maxsp-rate
Open

Fix VIT/INT from status changes not benefiting from bMaxHPrate/bMaxSP…#3429
MrKeiKun wants to merge 1 commit into
HerculesWS:masterfrom
MrKeiKun:fix/issue-914-sc-vit-int-maxhp-maxsp-rate

Conversation

@MrKeiKun

Copy link
Copy Markdown
Contributor

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/SP
whenever bMaxHPrate/bMaxSPrate (or battle_config.hp_rate/sp_rate) was non-default:

  • status_calc_pc_() computes the VIT-based HP, adds flat bonuses, then multiplies the whole thing by sd->hprate and battle_config.hp_rate. This path only sees equipment VIT, since it runs "from scratch, without SC
    adjustments."
  • status_calc_bl_main()'s SCB_MAXHP handler 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-rated bst->max_hp and the previously-computed, unrated sd->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 of bMaxHPrate.

Note: this does not address the separate concern raised in the same issue about SC-based %MaxHP bonuses (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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant