From 358180946d60e5acc6fd5a95bb95f39232b93382 Mon Sep 17 00:00:00 2001 From: tennis Date: Wed, 22 Mar 2023 11:42:32 +0000 Subject: [PATCH] Fix Intimidate targetting dead sides and false postpones --- data/battle_scripts_1.s | 1 + src/battle_script_commands.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index a32e9a4ec..2754b5d7a 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -8627,6 +8627,7 @@ BattleScript_IntimidateActivates:: BattleScript_IntimidateLoop: jumpifbyteequal gBattlerTarget, gBattlerAttacker, BattleScript_IntimidateLoopIncrement jumpiftargetally BattleScript_IntimidateLoopIncrement + jumpifabsent BS_TARGET, BattleScript_IntimidateLoopIncrement jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_IntimidateLoopIncrement jumpifholdeffect BS_TARGET, HOLD_EFFECT_CLEAR_AMULET, BattleScript_IntimidatePrevented_Item jumpifability BS_TARGET, ABILITY_CLEAR_BODY, BattleScript_IntimidatePrevented diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 126ca06fd..7949dbae8 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6973,9 +6973,9 @@ bool32 ShouldPostponeSwitchInAbilities(u32 battlerId) // Checks for double battle, so abilities like Intimidate wait until all battlers are switched-in before activating. if (IsDoubleBattle()) { - if (aliveOpposing1 && !aliveOpposing2 && !HasNoMonsToSwitch(BATTLE_OPPOSITE(battlerId), PARTY_SIZE, PARTY_SIZE)) + if (aliveOpposing1 && !aliveOpposing2 && !HasNoMonsToSwitch(BATTLE_PARTNER(BATTLE_OPPOSITE(battlerId)), PARTY_SIZE, PARTY_SIZE)) return TRUE; - if (!aliveOpposing1 && aliveOpposing2 && !HasNoMonsToSwitch(BATTLE_PARTNER(BATTLE_OPPOSITE(battlerId)), PARTY_SIZE, PARTY_SIZE)) + if (!aliveOpposing1 && aliveOpposing2 && !HasNoMonsToSwitch(BATTLE_OPPOSITE(battlerId), PARTY_SIZE, PARTY_SIZE)) return TRUE; }