diff options
author | nullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com> | 2018-12-05 22:31:01 +0800 |
---|---|---|
committer | nullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com> | 2018-12-06 10:38:28 +0800 |
commit | f9ff7316d5c7277eb7482e30121388cd65f4ecfc (patch) | |
tree | ee8f4a9c338f880a3585d6e9ed9ed695f27cef3d /src/battle_ai_switch_items.c | |
parent | 405f1bb529809b8169364737087189df0fcca1d2 (diff) |
Remove uses of INVALID_ defines, clean up some arrays with constants, and spaces -> tabs
Diffstat (limited to 'src/battle_ai_switch_items.c')
-rw-r--r-- | src/battle_ai_switch_items.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index d6a8e1336..ad25b483c 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -126,7 +126,7 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void) return FALSE; if (gLastLandedMoves[gActiveBattler] == 0) return FALSE; - if (gLastLandedMoves[gActiveBattler] == INVALID_U16) + if (gLastLandedMoves[gActiveBattler] == 0xFFFF) return FALSE; if (gBattleMoves[gLastLandedMoves[gActiveBattler]].power == 0) return FALSE; @@ -221,7 +221,7 @@ static bool8 ShouldSwitchIfNaturalCure(void) if (gBattleMons[gActiveBattler].hp < gBattleMons[gActiveBattler].maxHP / 2) return FALSE; - if ((gLastLandedMoves[gActiveBattler] == 0 || gLastLandedMoves[gActiveBattler] == INVALID_U16) && Random() & 1) + if ((gLastLandedMoves[gActiveBattler] == 0 || gLastLandedMoves[gActiveBattler] == 0xFFFF) && Random() & 1) { *(gBattleStruct->AI_monToSwitchIntoId + gActiveBattler) = PARTY_SIZE; BtlController_EmitTwoReturnValues(1, B_ACTION_SWITCH, 0); @@ -331,9 +331,9 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent) if (gLastLandedMoves[gActiveBattler] == 0) return FALSE; - if (gLastLandedMoves[gActiveBattler] == INVALID_U16) + if (gLastLandedMoves[gActiveBattler] == 0xFFFF) return FALSE; - if (gLastHitBy[gActiveBattler] == INVALID_U8) + if (gLastHitBy[gActiveBattler] == 0xFF) return FALSE; if (gBattleMoves[gLastLandedMoves[gActiveBattler]].power == 0) return FALSE; |