From 259e59bae0f278b22aaac7115da2ff56bd2c6567 Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 14 Dec 2020 12:27:48 -0700 Subject: [PATCH 1/3] fix early mummy activation on two-turn moves --- src/battle_util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/battle_util.c b/src/battle_util.c index b929b7499d..9f1e0c8cb9 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4357,6 +4357,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move case ABILITY_MUMMY: if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && IsBattlerAlive(gBattlerAttacker) + && TARGET_TURN_DAMAGED && (gBattleMoves[move].flags & FLAG_MAKES_CONTACT)) { switch (gBattleMons[gBattlerAttacker].ability) From b3c5613ff737918aeb6cdc7d24f1053fb4d13c10 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 23 Dec 2020 13:16:01 -0300 Subject: [PATCH 2/3] battle_config.h tweaks -Moved the USE_BATTLE_DEBUG constant from include/battle_debug.h -Slight correction to a few comments in battle_config.h --- include/battle_debug.h | 2 -- include/constants/battle_config.h | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/battle_debug.h b/include/battle_debug.h index 271f875538..db2c92296e 100644 --- a/include/battle_debug.h +++ b/include/battle_debug.h @@ -1,8 +1,6 @@ #ifndef GUARD_BATTLE_DEBUG_H #define GUARD_BATTLE_DEBUG_H -#define USE_BATTLE_DEBUG TRUE - void CB2_BattleDebugMenu(void); #endif // GUARD_BATTLE_DEBUG_H diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index be58ba7e74..bf075fd8c5 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -165,7 +165,8 @@ #define B_NEW_IMPACT_PALETTE TRUE // If set to TRUE, it updates the basic 'hit' palette. #define B_NEW_SURF_PARTICLE_PALETTE TRUE // If set to TRUE, it updates Surf's wave palette. -#define HIDE_HEALTHBOXES_DURING_ANIMS TRUE //if TRUE, hides healthboxes during move animations -#define B_TERRAIN_BG_CHANGE TRUE // If TRUE, terrain moves permanently change the default battle background until the effect fades. +#define HIDE_HEALTHBOXES_DURING_ANIMS TRUE // If set to TRUE, hides healthboxes during move animations +#define B_TERRAIN_BG_CHANGE TRUE // If set to TRUE, terrain moves permanently change the default battle background until the effect fades. +#define USE_BATTLE_DEBUG TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button. #endif // GUARD_CONSTANTS_BATTLE_CONFIG_H From 320cc37ac967a696a99771459e033eadd6b8760a Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 23 Dec 2020 14:04:14 -0300 Subject: [PATCH 3/3] USE_BATTLE_DEBUG -> B_ENABLE_DEBUG --- include/constants/battle_config.h | 2 +- src/battle_controller_player.c | 2 +- src/battle_util.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index bf075fd8c5..50e66dffea 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -167,6 +167,6 @@ #define HIDE_HEALTHBOXES_DURING_ANIMS TRUE // If set to TRUE, hides healthboxes during move animations #define B_TERRAIN_BG_CHANGE TRUE // If set to TRUE, terrain moves permanently change the default battle background until the effect fades. -#define USE_BATTLE_DEBUG TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button. +#define B_ENABLE_DEBUG TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button. #endif // GUARD_CONSTANTS_BATTLE_CONFIG_H diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index dfb9cc207b..9392421058 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -331,7 +331,7 @@ static void HandleInputChooseAction(void) { SwapHpBarsWithHpText(); } - else if (USE_BATTLE_DEBUG && gMain.newKeys & SELECT_BUTTON) + else if (B_ENABLE_DEBUG && gMain.newKeys & SELECT_BUTTON) { BtlController_EmitTwoReturnValues(1, B_ACTION_DEBUG, 0); PlayerBufferExecCompleted(); diff --git a/src/battle_util.c b/src/battle_util.c index b929b7499d..3a9ffe5ee7 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -6155,7 +6155,7 @@ u32 GetBattlerHoldEffect(u8 battlerId, bool32 checkNegating) gPotentialItemEffectBattler = battlerId; - if (USE_BATTLE_DEBUG && gBattleStruct->debugHoldEffects[battlerId] != 0 && gBattleMons[battlerId].item) + if (B_ENABLE_DEBUG && gBattleStruct->debugHoldEffects[battlerId] != 0 && gBattleMons[battlerId].item) return gBattleStruct->debugHoldEffects[battlerId]; else if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY) return gEnigmaBerries[battlerId].holdEffect; @@ -7624,7 +7624,7 @@ bool32 CanMegaEvolve(u8 battlerId) // Check if there is an entry in the evolution table for regular Mega Evolution. if (GetMegaEvolutionSpecies(species, itemId) != SPECIES_NONE) { - if (USE_BATTLE_DEBUG && gBattleStruct->debugHoldEffects[battlerId]) + if (B_ENABLE_DEBUG && gBattleStruct->debugHoldEffects[battlerId]) holdEffect = gBattleStruct->debugHoldEffects[battlerId]; else if (itemId == ITEM_ENIGMA_BERRY) holdEffect = gEnigmaBerries[battlerId].holdEffect;