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.
This commit is contained in:
Alex 2023-10-09 23:40:38 +02:00 committed by GitHub
parent f7098414d3
commit 36174f12ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -440,6 +440,7 @@ gBattleScriptsForMoveEffects::
BattleScript_EffectSaltCure: BattleScript_EffectSaltCure:
call BattleScript_EffectHit_Ret call BattleScript_EffectHit_Ret
tryfaintmon BS_TARGET
jumpiffainted BS_TARGET, TRUE, BattleScript_EffectSaltCure_End jumpiffainted BS_TARGET, TRUE, BattleScript_EffectSaltCure_End
applysaltcure BS_TARGET applysaltcure BS_TARGET
printstring STRINGID_TARGETISBEINGSALTCURED printstring STRINGID_TARGETISBEINGSALTCURED

View File

@ -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!");
}
}