summaryrefslogtreecommitdiff
path: root/src/battle_util.c
diff options
context:
space:
mode:
authorDiegoisawesome <Diegoisawesome@users.noreply.github.com>2017-11-14 16:52:40 -0600
committerGitHub <noreply@github.com>2017-11-14 16:52:40 -0600
commit3fb2a488f99d4d8499a2b0247f73f45837b07156 (patch)
tree96ade7ed86da5743019c8650613197c654b91759 /src/battle_util.c
parent118bf4f4b115ad6840427b00ba6a5ea0732574c8 (diff)
parent716590c165791ce33e18bd97c8ee2e26c580e5f8 (diff)
Merge pull request #111 from DizzyEggg/decompile_battle5
Decompile battle5
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 468b2c46d..b5357a0e0 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);