From 36174f12ae050a0f287779fd13a8362b7f253647 Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Mon, 9 Oct 2023 23:40:38 +0200 Subject: [PATCH] Fixes Salt Cure visual bug if mon fainted by direct attack (#3388) * Fixes Salt Cure visual bug if mon fainted by direct attack * Removes duplicate give all tm/hms in the debug menu * test * Revert "Removes duplicate give all tm/hms in the debug menu" This reverts commit 4e80451d6f5898799ef9b887a068dc1e1a3df56e. --- data/battle_scripts_1.s | 1 + test/battle/move_effect/salt_cure.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index a1ccf6f2b..15ebaf7ec 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -440,6 +440,7 @@ gBattleScriptsForMoveEffects:: BattleScript_EffectSaltCure: call BattleScript_EffectHit_Ret + tryfaintmon BS_TARGET jumpiffainted BS_TARGET, TRUE, BattleScript_EffectSaltCure_End applysaltcure BS_TARGET printstring STRINGID_TARGETISBEINGSALTCURED diff --git a/test/battle/move_effect/salt_cure.c b/test/battle/move_effect/salt_cure.c index fcf240631..c24703fa2 100644 --- a/test/battle/move_effect/salt_cure.c +++ b/test/battle/move_effect/salt_cure.c @@ -70,3 +70,17 @@ SINGLE_BATTLE_TEST("Salt Cure is removed when the afflicted Pokémon is switched } } } + +SINGLE_BATTLE_TEST("If Salt Cure faints the target no status will be applied") +{ + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET) { HP(1); } + } WHEN { + TURN { MOVE(player, MOVE_SALT_CURE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SALT_CURE, player); + NOT MESSAGE("Foe Wobbuffet is being salt cured!"); + MESSAGE("Foe Wobbuffet fainted!"); + } +}