From 3b20a18200befcf7da9a88ed5ae4fb57280ad8aa Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 21 Oct 2018 00:52:10 -0400 Subject: [PATCH] Identify BATTLEACTION_D and _E (thanks, ax6) --- constants/battle_constants.asm | 4 ++-- engine/battle/core.asm | 16 ++++++++-------- engine/battle/effect_commands.asm | 2 +- mobile/mobile_40.asm | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/constants/battle_constants.asm b/constants/battle_constants.asm index e426b615e..a8a249a5b 100644 --- a/constants/battle_constants.asm +++ b/constants/battle_constants.asm @@ -240,8 +240,8 @@ SUBSTATUS_CURLED EQU 0 const BATTLEACTION_A const BATTLEACTION_B const BATTLEACTION_C - const BATTLEACTION_D - const BATTLEACTION_E + const BATTLEACTION_SKIPTURN + const BATTLEACTION_STRUGGLE const BATTLEACTION_FORFEIT ; wBattlePlayerAction diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 6f76b6c5c..bee241e3c 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -440,9 +440,9 @@ DetermineMoveOrder: and a jr z, .use_move ld a, [wBattleAction] - cp BATTLEACTION_E + cp BATTLEACTION_STRUGGLE jr z, .use_move - cp BATTLEACTION_D + cp BATTLEACTION_SKIPTURN jr z, .use_move sub BATTLEACTION_SWITCH1 jr c, .use_move @@ -5191,9 +5191,9 @@ PlayerSwitch: .linked ld a, [wBattleAction] - cp BATTLEACTION_E + cp BATTLEACTION_STRUGGLE jp z, .switch - cp BATTLEACTION_D + cp BATTLEACTION_SKIPTURN jp z, .switch cp BATTLEACTION_SWITCH1 jp c, .switch @@ -5774,10 +5774,10 @@ ParseEnemyAction: call z, LinkBattleSendReceiveAction call Call_LoadTempTileMapToTileMap ld a, [wBattleAction] - cp BATTLEACTION_E + cp BATTLEACTION_STRUGGLE jp z, .struggle - cp BATTLEACTION_D - jp z, .battle_action_d + cp BATTLEACTION_SKIPTURN + jp z, .skip_turn cp BATTLEACTION_SWITCH1 jp nc, ResetVarsForSubstatusRage ld [wCurEnemyMoveNum], a @@ -5811,7 +5811,7 @@ ParseEnemyAction: jp nz, ResetVarsForSubstatusRage jr .continue -.battle_action_d +.skip_turn ld a, $ff jr .finish diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index 366898c8c..95a0475bf 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -15,7 +15,7 @@ DoEnemyTurn: jr z, DoTurn ld a, [wBattleAction] - cp BATTLEACTION_E + cp BATTLEACTION_STRUGGLE jr z, DoTurn cp BATTLEACTION_SWITCH1 ret nc diff --git a/mobile/mobile_40.asm b/mobile/mobile_40.asm index 5ab12d24f..05f8a6b80 100644 --- a/mobile/mobile_40.asm +++ b/mobile/mobile_40.asm @@ -1552,10 +1552,10 @@ _LinkBattleSendReceiveAction: and a ; BATTLEPLAYERACTION_USEMOVE? jr nz, .switch ld a, [wCurPlayerMove] - ld b, BATTLEACTION_E + ld b, BATTLEACTION_STRUGGLE cp STRUGGLE jr z, .struggle - ld b, BATTLEACTION_D + ld b, BATTLEACTION_SKIPTURN cp $ff jr z, .struggle ld a, [wCurMoveNum]