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 Mold Breaker interactions with abilities' Switch events #10874

Closed

Conversation

andrebastosdias
Copy link
Contributor

@andrebastosdias andrebastosdias commented Feb 9, 2025

Can anyone explain me why do these conditions exist?

@pyuk-bot
Copy link
Contributor

pyuk-bot commented Feb 9, 2025

Battle.suppressingAbility and Pokemon.ignoringAbility are two different checks. The former checks for Mold Breaker, Sunsteel Strike, etc., while the latter checks for Neutralizing Gas, Gastro Acid, etc. The Start event handler is often called via Battle.singleEvent, which doesn't have a suppressingAbility check in it because it usually doesn't need one. However, Pokemon can be dragged in by Roar, etc. mid move, in which case an ability can Start while Mold Breaker is still active. Most abilities with onStart handlers aren't breakable, but Aura Break is, and in gens 6 and 7 Dark Aura and Fairy Aura were too. Dark and Fairy Aura don't need the suppressingAbility check as of gen 8, but they would still need it in gen 7, and Aura Break still needs it now (or, well, Zygarde isn't in gen 9, so I doubt anyone's checked on the specific interaction of Mold Breaker phasing Aura Break in since gen 8).

As for the Ruin abilities, they function very similarly to the Aura abilities so their code used the Aura abilities as a template, apparently carrying over the now defunct check. The Ruin abilities are not breakable either, and never have been, so they do not need those checks.

@pyuk-bot
Copy link
Contributor

pyuk-bot commented Feb 9, 2025

Or, rather, that's what would have been correct a month ago, but of course now onStart gets called during the SwitchIn event for abilities, so the check is likely unnecessary for the Aura abilities too unless Aura Break Sunsteel Strike into Wandering Spirit suppresses the Aura Break announcement or something.

@andrebastosdias
Copy link
Contributor Author

andrebastosdias commented Feb 9, 2025

Just to see if I understood: in Gen 7, if a Pokémon with Fairy Aura switched in during the execution of a move, the activation message would not appear, but afterwards, the ability's effect would still work if the attacking Pokémon didn't have Mold Breaker.

@andrebastosdias andrebastosdias marked this pull request as draft February 10, 2025 02:51
@andrebastosdias andrebastosdias changed the title Remove unnecessary conditions Fix Mold Breaker interactions with Aura and Ruin abilities Feb 10, 2025
@andrebastosdias andrebastosdias marked this pull request as ready for review February 10, 2025 03:00
@andrebastosdias
Copy link
Contributor Author

andrebastosdias commented Feb 10, 2025

The following abilities are the only breakable abilities with Start events:

  • Ruins abilities ✔️
  • Aura Break ✔️
  • Ice Face ?
  • Wind Rider ✔️

Gen 8:

  • Flower Gift ?
  • Pastel Veil ?

@andrebastosdias andrebastosdias changed the title Fix Mold Breaker interactions with Aura and Ruin abilities Fix Mold Breaker interactions with abilities' Switch events Feb 10, 2025
@andrebastosdias
Copy link
Contributor Author

andrebastosdias commented Feb 10, 2025

The conditions were originally correct. Sword of Ruin didn't display its message when Chien-Pao was dragged in by a Mold Breaker Roar. I'll still check for the other abilities.

@andrebastosdias
Copy link
Contributor Author

Wind Rider doesn't activate if dragged in by a Mold Breaker Pokémon!

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