Skip to content

Commit

Permalink
Merge pull request #2284 from StephenLynx/master
Browse files Browse the repository at this point in the history
Fixed pickup running when it shouldn't in some cases.
  • Loading branch information
AsparagusEduardo authored Sep 1, 2022
2 parents bf830fc + 60132b2 commit 875f656
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -13313,10 +13313,7 @@ static void Cmd_pickup(void)
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);

if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))
ability = gBaseStats[species].abilities[1];
else
ability = gBaseStats[species].abilities[0];
ability = gBaseStats[species].abilities[GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM)];

if (ability == ABILITY_PICKUP
&& species != SPECIES_NONE
Expand Down Expand Up @@ -13352,10 +13349,7 @@ static void Cmd_pickup(void)
if (lvlDivBy10 > 9)
lvlDivBy10 = 9;

if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))
ability = gBaseStats[species].abilities[1];
else
ability = gBaseStats[species].abilities[0];
ability = gBaseStats[species].abilities[GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM)];

if (ability == ABILITY_PICKUP
&& species != SPECIES_NONE
Expand Down

0 comments on commit 875f656

Please sign in to comment.