summaryrefslogtreecommitdiff
path: root/src/battle_util2.c
diff options
context:
space:
mode:
authorgolem galvanize <golemgalvanize@github.com>2018-03-30 16:49:08 -0400
committergolem galvanize <golemgalvanize@github.com>2018-03-30 16:49:08 -0400
commit069a7e71fc8bd0886fe2d5c39bb96d8fee0d798b (patch)
tree191d39f28270fb43feaca1d128274ef317968869 /src/battle_util2.c
parent3006ff177b1020c0270ff33f48b3216c9d5381b1 (diff)
parenta5cd6e8ef4717aad4a055d5acb6ef250e359fc45 (diff)
Merge branch 'master' of https://github.com/pret/pokeemerald into decompile_pokedex
Diffstat (limited to 'src/battle_util2.c')
-rw-r--r--src/battle_util2.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/battle_util2.c b/src/battle_util2.c
index c1bbabc85..1d2f1e95b 100644
--- a/src/battle_util2.c
+++ b/src/battle_util2.c
@@ -76,26 +76,26 @@ void FreeBattleResources(void)
void AdjustFriendshipOnBattleFaint(u8 battlerId)
{
- u8 opposingBank;
+ u8 opposingBattlerId;
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
{
- u8 opposingBank2;
+ u8 opposingBattlerId2;
- opposingBank = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT);
- opposingBank2 = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT);
+ opposingBattlerId = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT);
+ opposingBattlerId2 = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT);
- if (gBattleMons[opposingBank2].level > gBattleMons[opposingBank].level)
- opposingBank = opposingBank2;
+ if (gBattleMons[opposingBattlerId2].level > gBattleMons[opposingBattlerId].level)
+ opposingBattlerId = opposingBattlerId2;
}
else
{
- opposingBank = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT);
+ opposingBattlerId = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT);
}
- if (gBattleMons[opposingBank].level > gBattleMons[battlerId].level)
+ if (gBattleMons[opposingBattlerId].level > gBattleMons[battlerId].level)
{
- if (gBattleMons[opposingBank].level - gBattleMons[battlerId].level > 29)
+ if (gBattleMons[opposingBattlerId].level - gBattleMons[battlerId].level > 29)
AdjustFriendship(&gPlayerParty[gBattlerPartyIndexes[battlerId]], 8);
else
AdjustFriendship(&gPlayerParty[gBattlerPartyIndexes[battlerId]], 6);