Added B_FAST_EXP_GROW / Updated MoveBattleBar to use a more applicable denominator #4335
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.
Description
HP Fix
In
MoveBattlerBar
, whenB_FAST_HP_DRAIN
is enabled,hpFraction
gets the maximum amount of the relevant mon's HP and divides it byB_HEALTHBAR_PIXELS
. After some manual testing and conversations with @SonikkuA-DatH (who helped with the original implementation, 7ca07527faeb5d8f3c5aae355ecfd33a554acca6), I've realized:B_HEALTHBAR_PIXELS
should actually be divided by 2 here to provide a greater benefit to Pokémon of varying HP.EXP Addition
B_FAST_EXP_GROW
,GetScaledExpFraction
will calculatescale
by multiplying by 2 instead of 8.Even Faster?
hPFraction
is calculated by dividedmaxValue
by 8 instead 32, even greater performance jumps can be gained.GetScaledExpFraction
calculatesscale
by multiplying by 0 instead of 8, even greater performance jumps can be gained.In both cases, these changes extremely fast, and do not seem to be inline with Game Freak's overall design philosophy. As such, I have opted for what I believe to be more sane values.
Images
Testing
People who collaborated with me in this PR
@SonikkuA-DatH
Discord contact info
I am pkmnsnfrn on Discord. I have not started a discussion thread.