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

better handle throwing balls in a double wild battle #2587

Merged
merged 2 commits into from
Jan 25, 2023

Conversation

walkingeyerobot
Copy link

Fixes issues with throwing balls when the player has only a single pokemon in a double wild battle.

Description

Without this patch, if one of the player's pokemon faints and they don't have another pokemon to replace it, throwing a ball results in odd behavior, such as the player's turn getting skipped. The game already checks to ensure that if the player would like to throw a ball in a double wild battle, the player does not get multiple turns by setting the action of the player's other mon to B_ACTION_NOTHING_FAINTED. This patch ensures that both the player's actions don't get set to that.

If there's a better way to do this, I'm happy to learn. This is my first attempt at making a change to the battle engine.

Discord contact info

walkingeye#6360

Copy link
Collaborator

@mrgriffin mrgriffin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! :)

src/battle_main.c Show resolved Hide resolved
src/battle_main.c Outdated Show resolved Hide resolved
@mrgriffin mrgriffin merged commit f9bb0bf into rh-hideout:upcoming Jan 25, 2023
@AsparagusEduardo AsparagusEduardo mentioned this pull request Feb 19, 2023
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