summaryrefslogtreecommitdiff
path: root/src/battle_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/battle_util.c')
-rw-r--r--src/battle_util.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/battle_util.c b/src/battle_util.c
index a30145ea4..e929de091 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -536,9 +536,12 @@ 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 <=.
+ // BUG: safariEscapeFactor can become 0 below. This causes the pokeblock throw glitch.
+ #ifdef BUGFIX
+ if (gBattleStruct->safariEscapeFactor <= sPkblToEscapeFactor[gBattleStruct->safariPkblThrowCounter][gBattleCommunication[MULTISTRING_CHOOSER]])
+ #else
if (gBattleStruct->safariEscapeFactor < sPkblToEscapeFactor[gBattleStruct->safariPkblThrowCounter][gBattleCommunication[MULTISTRING_CHOOSER]])
+ #endif
gBattleStruct->safariEscapeFactor = 1;
else
gBattleStruct->safariEscapeFactor -= sPkblToEscapeFactor[gBattleStruct->safariPkblThrowCounter][gBattleCommunication[MULTISTRING_CHOOSER]];