Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify that there is space in party/boxes before running modes that catch Pokémon #642

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

hanzi
Copy link
Collaborator

@hanzi hanzi commented Jan 31, 2025

Description

This adds a new assertion, assert_boxes_or_party_can_fit_pokemon(), which will verify that there is at least one empty slot in either the party or one of the boxes. (Because if there isn't, a Pokémon cannot be caught which would be a bit sad.)

This assertion is used in each mode that is meant to find shinies (i.e. it's not checked in modes like Level Grind and EV Train -- even though they could also encounter shinies that's not their primary purpose.)

I've also updated the assert_player_has_poke_balls() check in some modes that use soft resets to check the saved game and not the currently running one, as that's the actually important part.

Checklist

  • Black Linter has been ran, using --line-length 120 argument
  • Wiki has been updated (if relevant)

…atch Pokémon

This adds a new assertion, `assert_boxes_or_party_can_fit_pokemon()`, which will verify that there is at least one empty slot in either the party or one of the boxes.

This assertion is used in each mode that is meant to find shinies (i.e. it's not checked in modes like Level Grind and EV Train -- even though they _could_ also encounter shinies that's not their primary purpose.)

I've also updated the `assert_player_has_poke_balls()` check in some modes that use soft resets to check the saved game and not the currently running one, as that's the actually important part.
@hanzi hanzi merged commit 0815e9c into 40Cakes:main Jan 31, 2025
1 check passed
@hanzi hanzi deleted the verify-space-for-pokemon branch January 31, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants