From 38cd80760bf15016905777b99ae4c2071b35ba32 Mon Sep 17 00:00:00 2001 From: spindrift64 <102487911+spindrift64@users.noreply.github.com> Date: Fri, 16 May 2025 08:09:18 +0200 Subject: [PATCH] Gen 1 no recharge on KO (#6869) --- include/config/battle.h | 1 + src/battle_script_commands.c | 3 +++ src/data/moves_info.h | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/include/config/battle.h b/include/config/battle.h index 195e1f82b4..becf2c8c9a 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -128,6 +128,7 @@ #define B_QUASH_TURN_ORDER GEN_LATEST // In Gen8+, Quash-affected battlers move according to speed order. Before Gen8, Quash-affected battlers move in the order they were affected by Quash. #define B_DESTINY_BOND_FAIL GEN_LATEST // In Gen7+, Destiny Bond fails if used repeatedly. #define B_PURSUIT_TARGET GEN_LATEST // In Gen4+, Pursuit attacks a switching opponent even if they weren't targeting them. Before Gen4, Pursuit only attacks a switching opponent that it originally targeted. +#define B_SKIP_RECHARGE GEN_LATEST // In Gen1, recharging moves such as Hyper Beam skip the recharge if the target gets KO'd // Ability settings #define B_GALE_WINGS GEN_LATEST // In Gen7+ requires full HP to trigger. diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 7f6ffc8a8b..caa16a3ef4 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3618,6 +3618,9 @@ void SetMoveEffect(bool32 primary, bool32 certain) } break; case MOVE_EFFECT_RECHARGE: + if (B_SKIP_RECHARGE == GEN_1 && !IsBattlerAlive(gBattlerTarget)) // Skip recharge if gen 1 and foe is KO'd + break; + gBattleMons[gEffectBattler].status2 |= STATUS2_RECHARGE; gDisableStructs[gEffectBattler].rechargeTimer = 2; gLockedMoves[gEffectBattler] = gCurrentMove; diff --git a/src/data/moves_info.h b/src/data/moves_info.h index d9684f8beb..a7c0ee165e 100644 --- a/src/data/moves_info.h +++ b/src/data/moves_info.h @@ -29,9 +29,15 @@ static const u8 sMegaDrainDescription[] = _( "An attack that absorbs\n" "half the damage inflicted."); +#if B_SKIP_RECHARGE != GEN_1 static const u8 sHyperBeamDescription[] = _( "Powerful, but leaves the\n" "user immobile the next turn."); +#else +static const u8 sHyperBeamDescription[] = _( + "Leaves the user immobile\n" + "if target is not KO'd."); +#endif static const u8 sRevengeDescription[] = _( "An attack that gains power\n"