diff --git a/Faster-HP-Drain.md b/Faster-HP-Drain.md new file mode 100644 index 0000000..9d5643f --- /dev/null +++ b/Faster-HP-Drain.md @@ -0,0 +1,32 @@ +## Faster HP Drain + +From GSC till Gen 4, 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](../blob/master/src/battle_interface.c) , around Line 2220 +```diff + 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, gBattleSpritesDataPtr->battleBars[battlerId].maxValue / x); +``` +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 + +![](https://cdn.discordapp.com/attachments/353690918597033984/813580261920210964/e.gif) + +Experiment for the right speed you want, and enjoy! \ No newline at end of file