From e883b7c2512540ff5df71abf867a7571ed45ae8f Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 22 Dec 2024 19:39:17 -0300 Subject: [PATCH] Fixed Wish triggering Disguise (#5860) --- data/battle_scripts_1.s | 2 +- test/battle/ability/disguise.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index d94ba2363b..752c352022 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -6738,7 +6738,7 @@ BattleScript_WishComesTrue:: playanimation BS_TARGET, B_ANIM_WISH_HEAL printstring STRINGID_PKMNWISHCAMETRUE waitmessage B_WAIT_TIME_LONG - orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE + orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE healthbarupdate BS_TARGET datahpupdate BS_TARGET printstring STRINGID_PKMNREGAINEDHEALTH diff --git a/test/battle/ability/disguise.c b/test/battle/ability/disguise.c index 3a8df70be5..9c5f917e9d 100644 --- a/test/battle/ability/disguise.c +++ b/test/battle/ability/disguise.c @@ -173,3 +173,19 @@ SINGLE_BATTLE_TEST("Disguised Mimikyu blocks a move after getting Gastro Acid Ba ABILITY_POPUP(player, ABILITY_DISGUISE); } } + +SINGLE_BATTLE_TEST("Disguise does not break from a teammate's Wish") +{ + GIVEN { + ASSUME(gMovesInfo[MOVE_WISH].effect == EFFECT_WISH); + PLAYER(SPECIES_JIRACHI); + PLAYER(SPECIES_MIMIKYU_DISGUISED) { Ability(ABILITY_DISGUISE); HP(219); MaxHP(220); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_WISH); } + TURN { SWITCH(player, 1); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_WISH, player); + NOT ABILITY_POPUP(player, ABILITY_DISGUISE); + } +}