summaryrefslogtreecommitdiff
path: root/src/battle_util.c
diff options
context:
space:
mode:
authorDiegoisawesome <diego@domoreaweso.me>2017-11-15 00:47:34 -0600
committerDiegoisawesome <diego@domoreaweso.me>2017-11-15 00:47:34 -0600
commitce0e5cbfe4439a9767134a670868f65cc9920e65 (patch)
tree07d1e496a653dc2c6584022cb977bbdf273858aa /src/battle_util.c
parent6e6e11205d312a296391ec7d16d809e52c5b4027 (diff)
parent3fb2a488f99d4d8499a2b0247f73f45837b07156 (diff)
Merge branch 'master' of https://github.com/pret/pokeemerald into dump_maps
Diffstat (limited to 'src/battle_util.c')
-rw-r--r--src/battle_util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/battle_util.c b/src/battle_util.c
index 15c11dbb2..ed3bdef98 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -1292,9 +1292,9 @@ bool8 sub_8041364(void)
gBattleTextBuff1[1] = 1;
gBattleTextBuff1[2] = 1;
gBattleTextBuff1[3] = 1;
- gBattleTextBuff1[4] = gDisableStructs[gActiveBank].perishSong1;
+ gBattleTextBuff1[4] = gDisableStructs[gActiveBank].perishSongTimer1;
gBattleTextBuff1[5] = EOS;
- if (gDisableStructs[gActiveBank].perishSong1 == 0)
+ if (gDisableStructs[gActiveBank].perishSongTimer1 == 0)
{
gStatuses3[gActiveBank] &= ~STATUS3_PERISH_SONG;
gBattleMoveDamage = gBattleMons[gActiveBank].hp;
@@ -1302,7 +1302,7 @@ bool8 sub_8041364(void)
}
else
{
- gDisableStructs[gActiveBank].perishSong1--;
+ gDisableStructs[gActiveBank].perishSongTimer1--;
gBattlescriptCurrInstr = gUnknown_082DAF20;
}
BattleScriptExecute(gBattlescriptCurrInstr);
@@ -1805,7 +1805,7 @@ bool8 sub_80423F4(u8 bank, u8 r1, u8 r2)
&& GetMonData(&party[i], MON_DATA_SPECIES2) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG
// FIXME: Using index[array] instead of array[index] is BAD!
- && i != r1 && i != r2 && i != r7[gBattleStruct->field_5C] && i != r6[gBattleStruct->field_5C])
+ && i != r1 && i != r2 && i != r7[gBattleStruct->monToSwitchIntoId] && i != r6[gBattleStruct->monToSwitchIntoId])
break;
}
return (i == 6);