From a7682664dfba8a3021690d021571cc36afc960c7 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Sun, 12 Dec 2021 12:16:40 -0300 Subject: [PATCH] Added a max macro to avoid softlocks when maxValue/x is less than 1. --- Faster-HP-Drain.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Faster-HP-Drain.md b/Faster-HP-Drain.md index 57827e2..b07d431 100644 --- a/Faster-HP-Drain.md +++ b/Faster-HP-Drain.md @@ -15,7 +15,7 @@ In [src/battle_interface.c](../blob/master/src/battle_interface.c) , around Line gBattleSpritesDataPtr->battleBars[battlerId].receivedValue, &gBattleSpritesDataPtr->battleBars[battlerId].currValue, - B_HEALTHBAR_PIXELS / 8, 1); -+ B_HEALTHBAR_PIXELS / 8, gBattleSpritesDataPtr->battleBars[battlerId].maxValue / x); ++ B_HEALTHBAR_PIXELS / 8, max(gBattleSpritesDataPtr->battleBars[battlerId].maxValue / x, 1)); ``` With [x] being whatever value you want