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

Fix switch-in abilities activating on an empty field #2712

Merged
merged 8 commits into from
Feb 22, 2023

Conversation

DizzyEggg
Copy link
Collaborator

Fixes #2619
Fixes #2371

Takes care of PRs #2622 and #2148.

Added tests for Download and Intimidate.
SwitchInDownload
intimidate

src/battle_script_commands.c Outdated Show resolved Hide resolved
|| AbilityBattleEffects(ABILITYEFFECT_TRACE2, 0, 0, 0, 0))
return;
// Don't activate switch-in abilities if the opposing field is empty.
// This could happen when a mon uses explosion and causes everyone to faint.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Then maybe, now that we have this, we wouldn't need to keep the VARIOUS_JUMP_IF_NO_VALID_TARGETS which I explicitly added to solve the interaction with Explosion? 👀

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done, I removed VARIOUS_JUMP_IF_NO_VALID_TARGETS

test/ability_download.c Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants