Skip to content

Commit

Permalink
Merge branch 'rh-hideout:master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
laserXdolphin committed Jul 1, 2024
2 parents 072c578 + 6957fc7 commit 9dc2780
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 18 deletions.
2 changes: 1 addition & 1 deletion data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file modified graphics/pokemon/bounsweet/front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion graphics/pokemon/bounsweet/normal.pal
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ JASC-PAL
248 136 136
88 104 96
184 192 192
0 0 0
248 248 248
0 0 0
4 changes: 2 additions & 2 deletions graphics/pokemon/bounsweet/shiny.pal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Binary file modified graphics/pokemon/bruxish/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/pokemon/bruxish/front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions graphics/pokemon/bruxish/shiny.pal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file modified graphics/pokemon/charjabug/anim_front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions graphics/pokemon/charjabug/shiny.pal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Binary file modified graphics/pokemon/lurantis/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions include/vs_seeker.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
19 changes: 10 additions & 9 deletions src/battle_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
8 changes: 8 additions & 0 deletions src/vs_seeker.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
18 changes: 18 additions & 0 deletions test/battle/ability/sticky_hold.c
Original file line number Diff line number Diff line change
@@ -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!");
}
}

0 comments on commit 9dc2780

Please sign in to comment.