-
Notifications
You must be signed in to change notification settings - Fork 3
Faster HP Drain
From GSC till Gen 5, GF has made an error that caused the HP drain for max values over 48HP to drain slower than intended. For GSC-DPP/HGSS, the bar drains at a set increment, regardless the max HP of the pokemon. As expected, it'll be slow the larger the HP (like Blissey)
We can fix this by making it use the Mon's Max HP value in a fraction formula instead of being a set value!
Note: Effects won't occur unless a Pokemon has 48 HP or higher for Max HP. For mons lower than 48 HP, the speed is just 1
In src/battle_interface.c , around Line 2220
if (whichBar == HEALTH_BAR) // health bar
{
currentBarValue = CalcNewBarValue(gBattleSpritesDataPtr->battleBars[battlerId].maxValue,
gBattleSpritesDataPtr->battleBars[battlerId].oldValue,
gBattleSpritesDataPtr->battleBars[battlerId].receivedValue,
&gBattleSpritesDataPtr->battleBars[battlerId].currValue,
- B_HEALTHBAR_PIXELS / 8, 1);
+ B_HEALTHBAR_PIXELS / 8, max(gBattleSpritesDataPtr->battleBars[battlerId].maxValue / x, 1));
With [x] being whatever value you want
Now let's define what this does
This takes the specified battler's Max HP, and uses that to divide by a specific value. To have it most like vanilla, x can be 48, though we can go faster.
The smaller the x value, the faster it'll go. The larger the Max HP, the faster it'll go!
Here's what I personally use, a value of 32 for x We can see the results for the tanky beast like a post lvl 50 Mewtwo
Experiment for the right speed you want, and enjoy!