From c327655ef595d7d6bfe6ea756a0484009aa2b713 Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Tue, 6 Dec 2022 11:12:20 -0500 Subject: [PATCH] small fixes --- src/battle_script_commands.c | 5 +++-- src/battle_util.c | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index c5cf75280..059265588 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -2832,7 +2832,7 @@ void SetMoveEffect(bool32 primary, u32 certain) && (gBattleScripting.moveEffect <= MOVE_EFFECT_TRI_ATTACK || gBattleScripting.moveEffect >= MOVE_EFFECT_SMACK_DOWN)) // Exclude stat lowering effects { if (battlerAbility == ABILITY_SHIELD_DUST) - RecordAbilityBattle(gEffectBattler, battlerAbility) + RecordAbilityBattle(gEffectBattler, battlerAbility); else RecordItemEffectBattle(gEffectBattler, HOLD_EFFECT_COVERT_CLOAK); INCREMENT_RESET_RETURN @@ -8720,7 +8720,8 @@ static void Cmd_various(void) gBattlerAbility = BATTLE_PARTNER(gActiveBattler); i = GetBattlerAbility(gBattlerAbility); if (IsBattlerAlive(gBattlerAbility) - && (i == ABILITY_RECEIVER || i == ABILITY_POWER_OF_ALCHEMY)) + && (i == ABILITY_RECEIVER || i == ABILITY_POWER_OF_ALCHEMY) + && GetBattlerHoldEffect(gActiveBattler, TRUE) != HOLD_EFFECT_ABILITY_SHIELD) { switch (gBattleMons[gActiveBattler].ability) { // Can't copy these abilities. diff --git a/src/battle_util.c b/src/battle_util.c index 6416c592b..d3f78fd94 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -5379,7 +5379,8 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move case ABILITY_STANCE_CHANGE: break; default: - if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_ABILITY_SHIELD) { + if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_ABILITY_SHIELD) + { RecordItemEffectBattle(gBattlerAttacker, HOLD_EFFECT_ABILITY_SHIELD); break; } @@ -5415,7 +5416,8 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move case ABILITY_ZEN_MODE: break; default: - if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_ABILITY_SHIELD) { + if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_ABILITY_SHIELD) + { RecordItemEffectBattle(gBattlerAttacker, HOLD_EFFECT_ABILITY_SHIELD); break; }