summaryrefslogtreecommitdiff
path: root/src/battle_util.c
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-09-19 18:09:49 -0400
committerGitHub <noreply@github.com>2020-09-19 18:09:49 -0400
commit0b592228c523747521ae0e096d7d680bc0418e2c (patch)
tree164515aa3969239c3f70dd87327525767ca1732f /src/battle_util.c
parent0088f59b1db2734cf89a24b57d10fa32ace40074 (diff)
parentf1366dfc694c78ac934e58a917a173f95c55df28 (diff)
Merge pull request #1186 from kiliwily/DocSomeBugs
Document some bugs
Diffstat (limited to 'src/battle_util.c')
-rw-r--r--src/battle_util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/battle_util.c b/src/battle_util.c
index eb3907157..31ed0b3fe 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -527,6 +527,8 @@ void HandleAction_ThrowPokeblock(void)
gBattleStruct->safariPkblThrowCounter++;
if (gBattleStruct->safariEscapeFactor > 1)
{
+ // BUG: The safariEscapeFactor is unintetionally able to become 0 (but it can not become negative!). This causes the pokeblock throw glitch.
+ // To fix that change the < in the if statement below to <=.
if (gBattleStruct->safariEscapeFactor < sPkblToEscapeFactor[gBattleStruct->safariPkblThrowCounter][gBattleCommunication[MULTISTRING_CHOOSER]])
gBattleStruct->safariEscapeFactor = 1;
else