Fix KNOWN_FAILING Bestow tests (#6947)

This commit is contained in:
Eduardo Quezada 2025-05-22 04:23:15 -04:00 committed by GitHub
parent e9ba4b5db0
commit be4b8ca3d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 15 deletions

View File

@ -11245,8 +11245,9 @@ bool32 CanBattlerGetOrLoseItem(u32 battler, u16 itemId)
u16 species = gBattleMons[battler].species;
u16 holdEffect = ItemId_GetHoldEffect(itemId);
// Mail can be stolen now
if (itemId == ITEM_ENIGMA_BERRY_E_READER)
if (ItemIsMail(itemId))
return FALSE;
else if (itemId == ITEM_ENIGMA_BERRY_E_READER)
return FALSE;
else if (DoesSpeciesUseHoldItemToChangeForm(species, itemId))
return FALSE;

View File

@ -13172,7 +13172,7 @@ const struct MoveInfo gMovesInfo[MOVES_COUNT_ALL] =
.category = DAMAGE_CATEGORY_STATUS,
.zMove = { .effect = Z_EFFECT_SPD_UP_2 },
.ignoresProtect = B_UPDATED_MOVE_FLAGS >= GEN_6,
.ignoresSubstitute = TRUE,
.ignoresSubstitute = B_UPDATED_MOVE_FLAGS >= GEN_6,
.metronomeBanned = TRUE,
.copycatBanned = TRUE,
.assistBanned = TRUE,

View File

@ -47,8 +47,6 @@ SINGLE_BATTLE_TEST("Bestow fails if the target already has a held item")
#include "mail.h"
SINGLE_BATTLE_TEST("Bestow fails if the user is holding Mail")
{
KNOWN_FAILING;
GIVEN {
ASSUME(ItemIsMail(ITEM_ORANGE_MAIL));
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_ORANGE_MAIL); }
@ -94,36 +92,41 @@ SINGLE_BATTLE_TEST("Bestow fails if the user's held item is a Z-Crystal")
}
}
SINGLE_BATTLE_TEST("Bestow fails if the target is behind a Substitute")
SINGLE_BATTLE_TEST("Bestow fails if the target is behind a Substitute (Gen 6+)")
{
KNOWN_FAILING;
GIVEN {
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_SITRUS_BERRY); Speed(50); }
OPPONENT(SPECIES_WOBBUFFET) { Speed(100); }
} WHEN {
TURN { MOVE(opponent, MOVE_SUBSTITUTE); MOVE(player, MOVE_BESTOW); }
} SCENE {
MESSAGE("But it failed!");
if (B_UPDATED_MOVE_FLAGS >= GEN_6) {
NOT MESSAGE("But it failed!");
} else {
MESSAGE("But it failed!");
}
} THEN {
EXPECT(player->item == ITEM_SITRUS_BERRY);
EXPECT(opponent->item == ITEM_NONE);
if (B_UPDATED_MOVE_FLAGS >= GEN_6) {
EXPECT(player->item == ITEM_NONE);
EXPECT(opponent->item == ITEM_SITRUS_BERRY);
} else {
EXPECT(player->item == ITEM_SITRUS_BERRY);
EXPECT(opponent->item == ITEM_NONE);
}
}
}
SINGLE_BATTLE_TEST("Bestow fails if the user's held item changes its form")
{
KNOWN_FAILING;
GIVEN {
PLAYER(SPECIES_GIRATINA_ORIGIN) { Item(ITEM_GRISEOUS_ORB); }
PLAYER(SPECIES_GIRATINA_ORIGIN) { Item(ITEM_GRISEOUS_CORE); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_BESTOW); }
} SCENE {
MESSAGE("But it failed!");
} THEN {
EXPECT(player->item == ITEM_GRISEOUS_ORB);
EXPECT(player->item == ITEM_GRISEOUS_CORE);
EXPECT(opponent->item == ITEM_NONE);
}
}