summaryrefslogtreecommitdiff
path: root/src/battle_util.c
diff options
context:
space:
mode:
authorkiliwily <69381603+kiliwily@users.noreply.github.com>2020-09-12 18:43:20 +0200
committerkiliwily <69381603+kiliwily@users.noreply.github.com>2020-09-12 18:43:20 +0200
commit5c3669e0cd49ccc210d7c57228820685fef11230 (patch)
treee35581dc740febcc9049b442a9059a0e6e38fadb /src/battle_util.c
parent58a2b62bae1406d2c768698ed13efcd6a5ffbeec (diff)
Bug documenting
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..0c2e31e07 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