From d9280abde9c593e240d71bd0b44847cde3b18166 Mon Sep 17 00:00:00 2001 From: Damon Murdoch Date: Mon, 1 Jan 2024 19:19:28 +1000 Subject: [PATCH 1/2] Fixed genie signature moves Fixed genie signature moves --- src/battle_script_commands.c | 13 ++++++++----- src/data/battle_moves.h | 6 +++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 0bcde61666e1..cbb1e88d413d 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1586,11 +1586,14 @@ static bool32 AccuracyCalcHelper(u16 move) if (WEATHER_HAS_EFFECT) { - if ((IsBattlerWeatherAffected(gBattlerTarget, B_WEATHER_RAIN) && (gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_HURRICANE))) - { - // thunder/hurricane ignore acc checks in rain unless target is holding utility umbrella - JumpIfMoveFailed(7, move); - return TRUE; + if (IsBattlerWeatherAffected(gBattlerTarget, B_WEATHER_RAIN)){ + if ((gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_HURRICANE) || + (move == MOVE_BLEAKWIND_STORM || move == MOVE_WILDBOLT_STORM || move == MOVE_SANDSEAR_STORM)) + { + // thunder/hurricane/genie moves ignore acc checks in rain unless target is holding utility umbrella + JumpIfMoveFailed(7, move); + return TRUE; + } } else if (B_BLIZZARD_HAIL >= GEN_4 && (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW)) && move == MOVE_BLIZZARD) { diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 1fb2923c5373..3675234b8edc 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -13466,7 +13466,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = .type = TYPE_FLYING, .accuracy = 80, .secondaryEffectChance = 30, - .target = MOVE_TARGET_SELECTED, + .target = MOVE_TARGET_BOTH, .priority = 0, .split = SPLIT_SPECIAL, .zMoveEffect = Z_EFFECT_NONE, @@ -13487,7 +13487,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = .type = TYPE_ELECTRIC, .accuracy = 80, .secondaryEffectChance = 20, - .target = MOVE_TARGET_SELECTED, + .target = MOVE_TARGET_BOTH, .priority = 0, .split = SPLIT_SPECIAL, .zMoveEffect = Z_EFFECT_NONE, @@ -13508,7 +13508,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] = .type = TYPE_GROUND, .accuracy = 80, .secondaryEffectChance = 20, - .target = MOVE_TARGET_SELECTED, + .target = MOVE_TARGET_BOTH, .priority = 0, .split = SPLIT_SPECIAL, .zMoveEffect = Z_EFFECT_NONE, From 5a876377245f6e1b9fd8e6dbe92e6a387e06dfc9 Mon Sep 17 00:00:00 2001 From: Damon Murdoch Date: Mon, 1 Jan 2024 20:16:16 +1000 Subject: [PATCH 2/2] Condensed rain move checks into a single 'if' Condensed rain move checks into a single 'if' --- src/battle_script_commands.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index cbb1e88d413d..fdf3da1912c9 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1586,14 +1586,13 @@ static bool32 AccuracyCalcHelper(u16 move) if (WEATHER_HAS_EFFECT) { - if (IsBattlerWeatherAffected(gBattlerTarget, B_WEATHER_RAIN)){ - if ((gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_HURRICANE) || - (move == MOVE_BLEAKWIND_STORM || move == MOVE_WILDBOLT_STORM || move == MOVE_SANDSEAR_STORM)) - { - // thunder/hurricane/genie moves ignore acc checks in rain unless target is holding utility umbrella - JumpIfMoveFailed(7, move); - return TRUE; - } + if (IsBattlerWeatherAffected(gBattlerTarget, B_WEATHER_RAIN) && + (gBattleMoves[move].effect == EFFECT_THUNDER || gBattleMoves[move].effect == EFFECT_HURRICANE || + move == MOVE_BLEAKWIND_STORM || move == MOVE_WILDBOLT_STORM || move == MOVE_SANDSEAR_STORM)) + { + // thunder/hurricane/genie moves ignore acc checks in rain unless target is holding utility umbrella + JumpIfMoveFailed(7, move); + return TRUE; } else if (B_BLIZZARD_HAIL >= GEN_4 && (gBattleWeather & (B_WEATHER_HAIL | B_WEATHER_SNOW)) && move == MOVE_BLIZZARD) {