summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Quezada D'Ottone <eduardo602002@gmail.com>2021-12-12 12:16:40 -0300
committerEduardo Quezada D'Ottone <eduardo602002@gmail.com>2021-12-12 12:16:40 -0300
commita7682664dfba8a3021690d021571cc36afc960c7 (patch)
treeb55d2119006daac8c08937a8e3ea54db4a2e380c
parent7c7d8e02f1956e07d4333929da65cbd51da95892 (diff)
Added a max macro to avoid softlocks when maxValue/x is less than 1.
-rw-r--r--Faster-HP-Drain.md2
1 files changed, 1 insertions, 1 deletions
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