From a6198e5d4682d284a6259467505ffd947280cbcb Mon Sep 17 00:00:00 2001 From: BuffelSaft Date: Wed, 6 Oct 2021 15:30:52 +1300 Subject: [PATCH] Fix Simple Beam - No longer freezes the game - Now fails if the target already has simple - Explicitly checks and changes the target's ability instead of gActiveBattler's ability --- src/battle_script_commands.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 8d6dd5bdb..ead08479a 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -7910,15 +7910,15 @@ static void Cmd_various(void) gBattlescriptCurrInstr += 7; return; case VARIOUS_SET_SIMPLE_BEAM: - if (IsEntrainmentTargetOrSimpleBeamBannedAbility(gBattleMons[gActiveBattler].ability)) + if (IsEntrainmentTargetOrSimpleBeamBannedAbility(gBattleMons[gBattlerTarget].ability) + || gBattleMons[gBattlerTarget].ability == ABILITY_SIMPLE) { gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); } else { - gBattleMons[gActiveBattler].ability = ABILITY_SIMPLE; + gBattleMons[gBattlerTarget].ability = ABILITY_SIMPLE; gBattlescriptCurrInstr += 7; - break; } return; case VARIOUS_TRY_ENTRAINMENT: