Jaboca berry triggers instead of being stolen by bug bite (#7237)

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
This commit is contained in:
ghoulslash 2025-06-28 02:43:50 -04:00 committed by GitHub
parent 565cf6f7ff
commit 3dda407bb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -3800,7 +3800,12 @@ void SetMoveEffect(bool32 primary, bool32 certain)
}
break;
case MOVE_EFFECT_BUG_BITE:
if (GetItemPocket(gBattleMons[gEffectBattler].item) == POCKET_BERRIES
if (GetBattlerHoldEffect(gEffectBattler, TRUE) == HOLD_EFFECT_JABOCA_BERRY)
{
// jaboca berry triggers instead of being stolen
gBattlescriptCurrInstr++;
}
else if (GetItemPocket(gBattleMons[gEffectBattler].item) == POCKET_BERRIES
&& battlerAbility != ABILITY_STICKY_HOLD)
{
// target loses their berry

View File

@ -42,7 +42,6 @@ SINGLE_BATTLE_TEST("Jaboca Berry causes the attacker to lose 1/8 of its max HP i
SINGLE_BATTLE_TEST("Jaboca Berry triggers before Bug Bite can steal it")
{
KNOWN_FAILING;
GIVEN {
ASSUME(GetMoveCategory(MOVE_BUG_BITE) == DAMAGE_CATEGORY_PHYSICAL);
PLAYER(SPECIES_WYNAUT);