From cf9b933a5fc355c6f89eac9554d512ad6082bbbd Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 6 Jul 2023 21:08:28 +0200 Subject: [PATCH 1/2] Fix Z-Moves softlocking when the z move effect was not used (#3108) --- src/battle_z_move.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/battle_z_move.c b/src/battle_z_move.c index 2e06323ba..dec3701c0 100644 --- a/src/battle_z_move.c +++ b/src/battle_z_move.c @@ -628,6 +628,10 @@ void SetZEffect(void) BattleScriptPush(gBattlescriptCurrInstr + Z_EFFECT_BS_LENGTH); gBattlescriptCurrInstr = BattleScript_ZEffectPrintString; } + else + { + gBattlescriptCurrInstr += Z_EFFECT_BS_LENGTH; + } break; case Z_EFFECT_BOOST_CRITS: if (!(gBattleMons[gBattlerAttacker].status2 & STATUS2_FOCUS_ENERGY)) @@ -637,6 +641,10 @@ void SetZEffect(void) BattleScriptPush(gBattlescriptCurrInstr + Z_EFFECT_BS_LENGTH); gBattlescriptCurrInstr = BattleScript_ZEffectPrintString; } + else + { + gBattlescriptCurrInstr += Z_EFFECT_BS_LENGTH; + } break; case Z_EFFECT_FOLLOW_ME: gSideTimers[GetBattlerSide(gBattlerAttacker)].followmeTimer = 1; @@ -653,6 +661,10 @@ void SetZEffect(void) BattleScriptPush(gBattlescriptCurrInstr + Z_EFFECT_BS_LENGTH); gBattlescriptCurrInstr = BattleScript_RecoverHPZMove; } + else + { + gBattlescriptCurrInstr += Z_EFFECT_BS_LENGTH; + } break; case Z_EFFECT_RESTORE_REPLACEMENT_HP: gBattleStruct->zmove.healReplacement = TRUE; From 98ae1beaecb751531e224ee884eab504039c3bb5 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 6 Jul 2023 21:10:28 +0200 Subject: [PATCH 2/2] Fix ability pop-up properly updating text (#3107) --- src/battle_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle_interface.c b/src/battle_interface.c index f2ca798db..1a4909818 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -2880,10 +2880,10 @@ static void PrintOnAbilityPopUp(const u8 *str, u8 *spriteTileData1, u8 *spriteTi } } -static const u8 sText_Space16[]= _(" "); +static const u8 sText_Spaces20[]= _(" "); static void ClearAbilityName(u8 spriteId1, u8 spriteId2) { - PrintOnAbilityPopUp(sText_Space16, + PrintOnAbilityPopUp(sText_Spaces20, (void*)(OBJ_VRAM0) + (gSprites[spriteId1].oam.tileNum * 32) + 256, (void*)(OBJ_VRAM0) + (gSprites[spriteId2].oam.tileNum * 32) + 256, 5, 12,