Battle code enums in case switches

This commit is contained in:
DizzyEggg
2018-08-03 00:13:44 +02:00
parent 759bc2671c
commit d6537c811b
4 changed files with 115 additions and 61 deletions

View File

@@ -1120,9 +1120,9 @@ static void atk01_accuracycheck(void)
{
u16 move = T2_READ_16(gBattlescriptCurrInstr + 5);
if (move == 0xFFFE || move == 0xFFFF)
if (move == NO_ACC_CALC || move == NO_ACC_CALC_CHECK_LOCK_ON)
{
if (gStatuses3[gBattlerTarget] & STATUS3_ALWAYS_HITS && move == 0xFFFF && gDisableStructs[gBattlerTarget].battlerWithSureHit == gBattlerAttacker)
if (gStatuses3[gBattlerTarget] & STATUS3_ALWAYS_HITS && move == NO_ACC_CALC_CHECK_LOCK_ON && gDisableStructs[gBattlerTarget].battlerWithSureHit == gBattlerAttacker)
gBattlescriptCurrInstr += 7;
else if (gStatuses3[gBattlerTarget] & (STATUS3_ON_AIR | STATUS3_UNDERGROUND | STATUS3_UNDERWATER))
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);