diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 1bbb75946015..8bceedfa47ad 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -8573,7 +8573,7 @@ BattleScript_SynchronizeActivates:: return BattleScript_NoItemSteal:: - pause B_WAIT_TIME_SHORT + call BattleScript_AbilityPopUpTarget printstring STRINGID_PKMNSXMADEYINEFFECTIVE waitmessage B_WAIT_TIME_LONG return diff --git a/graphics/pokemon/bounsweet/front.png b/graphics/pokemon/bounsweet/front.png index a31220dcf963..9e09d6d728ff 100644 Binary files a/graphics/pokemon/bounsweet/front.png and b/graphics/pokemon/bounsweet/front.png differ diff --git a/graphics/pokemon/bounsweet/normal.pal b/graphics/pokemon/bounsweet/normal.pal index 6ba3b9fb34c9..029ef53c85f8 100644 --- a/graphics/pokemon/bounsweet/normal.pal +++ b/graphics/pokemon/bounsweet/normal.pal @@ -15,5 +15,5 @@ JASC-PAL 248 136 136 88 104 96 184 192 192 -0 0 0 +248 248 248 0 0 0 diff --git a/graphics/pokemon/bounsweet/shiny.pal b/graphics/pokemon/bounsweet/shiny.pal index 14fc1f5ab3cc..704d72a19af9 100644 --- a/graphics/pokemon/bounsweet/shiny.pal +++ b/graphics/pokemon/bounsweet/shiny.pal @@ -14,6 +14,6 @@ JASC-PAL 248 224 40 248 136 136 88 104 96 -184 192 192 -0 0 0 +200 192 128 +247 240 184 0 0 0 diff --git a/graphics/pokemon/bruxish/back.png b/graphics/pokemon/bruxish/back.png index 32aeed0b5292..7969fb7197e2 100644 Binary files a/graphics/pokemon/bruxish/back.png and b/graphics/pokemon/bruxish/back.png differ diff --git a/graphics/pokemon/bruxish/front.png b/graphics/pokemon/bruxish/front.png index 4447621e55a4..ce29eb8d5f0c 100644 Binary files a/graphics/pokemon/bruxish/front.png and b/graphics/pokemon/bruxish/front.png differ diff --git a/graphics/pokemon/bruxish/shiny.pal b/graphics/pokemon/bruxish/shiny.pal index a609040e84b0..5deb432b1940 100644 --- a/graphics/pokemon/bruxish/shiny.pal +++ b/graphics/pokemon/bruxish/shiny.pal @@ -10,8 +10,8 @@ JASC-PAL 120 24 24 232 56 40 136 120 104 -224 216 208 -192 176 160 +248 248 248 +200 192 176 200 160 80 232 208 136 248 248 248 diff --git a/graphics/pokemon/charjabug/anim_front.png b/graphics/pokemon/charjabug/anim_front.png index 163ab2ba2d9d..58d39c97d29e 100644 Binary files a/graphics/pokemon/charjabug/anim_front.png and b/graphics/pokemon/charjabug/anim_front.png differ diff --git a/graphics/pokemon/charjabug/shiny.pal b/graphics/pokemon/charjabug/shiny.pal index 58974fb24f00..a5ffc233bc3e 100644 --- a/graphics/pokemon/charjabug/shiny.pal +++ b/graphics/pokemon/charjabug/shiny.pal @@ -15,5 +15,5 @@ JASC-PAL 248 160 72 112 72 24 176 112 48 -0 0 0 -0 0 0 +8 64 88 +176 168 176 diff --git a/graphics/pokemon/lurantis/back.png b/graphics/pokemon/lurantis/back.png index a080a77f0995..d133d63f7a81 100644 Binary files a/graphics/pokemon/lurantis/back.png and b/graphics/pokemon/lurantis/back.png differ diff --git a/include/vs_seeker.h b/include/vs_seeker.h index 723e73bf372d..d6795432b071 100644 --- a/include/vs_seeker.h +++ b/include/vs_seeker.h @@ -8,6 +8,7 @@ bool8 UpdateVsSeekerStepCounter(void); void MapResetTrainerRematches(u16 mapGroup, u16 mapNum); void ClearRematchMovementByTrainerId(void); u16 GetRematchTrainerIdVSSeeker(u16 trainerId); +bool32 IsVsSeekerEnabled(void); #define VSSEEKER_RECHARGE_STEPS 100 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 83c910f6b0c3..eaa69de10db4 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3454,7 +3454,7 @@ void SetMoveEffect(bool32 primary, bool32 certain) } else if (GetBattlerAbility(gBattlerTarget) == ABILITY_STICKY_HOLD) { - BattleScriptPushCursor(); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_NoItemSteal; gLastUsedAbility = gBattleMons[gBattlerTarget].ability; diff --git a/src/battle_setup.c b/src/battle_setup.c index 92fc2bea250c..2fe016ec8728 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -1916,15 +1916,16 @@ static bool32 HasAtLeastFiveBadges(void) void IncrementRematchStepCounter(void) { #if FREE_MATCH_CALL == FALSE - if (HasAtLeastFiveBadges() - && (I_VS_SEEKER_CHARGING != 0) - && (!CheckBagHasItem(ITEM_VS_SEEKER, 1))) - { - if (gSaveBlock1Ptr->trainerRematchStepCounter >= STEP_COUNTER_MAX) - gSaveBlock1Ptr->trainerRematchStepCounter = STEP_COUNTER_MAX; - else - gSaveBlock1Ptr->trainerRematchStepCounter++; - } + if (!HasAtLeastFiveBadges()) + return; + + if (IsVsSeekerEnabled()) + return; + + if (gSaveBlock1Ptr->trainerRematchStepCounter >= STEP_COUNTER_MAX) + gSaveBlock1Ptr->trainerRematchStepCounter = STEP_COUNTER_MAX; + else + gSaveBlock1Ptr->trainerRematchStepCounter++; #endif //FREE_MATCH_CALL } diff --git a/src/vs_seeker.c b/src/vs_seeker.c index 63b6c6f9d533..30dcb74ce0c4 100644 --- a/src/vs_seeker.c +++ b/src/vs_seeker.c @@ -577,6 +577,14 @@ u16 GetRematchTrainerIdVSSeeker(u16 trainerId) return gRematchTable[tableId].trainerIds[rematchTrainerIdx]; } +bool32 IsVsSeekerEnabled(void) +{ + if (I_VS_SEEKER_CHARGING == 0) + return FALSE; + + return (CheckBagHasItem(ITEM_VS_SEEKER, 1)); +} + static bool8 ObjectEventIdIsSane(u8 objectEventId) { struct ObjectEvent *objectEvent = &gObjectEvents[objectEventId]; diff --git a/test/battle/ability/sticky_hold.c b/test/battle/ability/sticky_hold.c new file mode 100644 index 000000000000..2c7cc095350c --- /dev/null +++ b/test/battle/ability/sticky_hold.c @@ -0,0 +1,18 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Sticky Hold prevents item theft") +{ + GIVEN { + ASSUME(MoveHasAdditionalEffect(MOVE_THIEF, MOVE_EFFECT_STEAL_ITEM)); + PLAYER(SPECIES_URSALUNA) { Item(ITEM_NONE); } + OPPONENT(SPECIES_GASTRODON) { Ability(ABILITY_STICKY_HOLD); Item(ITEM_LIFE_ORB); } + } WHEN { + TURN { MOVE(player, MOVE_THIEF); } + } SCENE { + MESSAGE("Ursaluna used Thief!"); + ABILITY_POPUP(opponent, ABILITY_STICKY_HOLD); + MESSAGE("Foe Gastrodon's Sticky Hold made Thief ineffective!"); + } +} +