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' Start events #10877

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Fix breakable check
  • Loading branch information
andrebastosdias committed Feb 10, 2025
commit 39f314533eaa0b81cd47619883e7f303643f1b27
6 changes: 5 additions & 1 deletion sim/battle.ts
Original file line number Diff line number Diff line change
@@ -568,6 +568,11 @@ export class Battle {
// it's changed; call it off
return relayVar;
}
if (eventid === 'SwitchIn' && effect.effectType === 'Ability' && effect.flags['breakable'] &&
this.suppressingAbility(target as Pokemon)) {
this.debug(eventid + ' handler suppressed by Mold Breaker');
return relayVar;
}
if (eventid !== 'Start' && eventid !== 'TakeItem' && effect.effectType === 'Item' &&
(target instanceof Pokemon) && target.ignoringItem()) {
this.debug(eventid + ' handler suppressed by Embargo, Klutz or Magic Room');
@@ -826,7 +831,6 @@ export class Battle {
Boost: 1,
DragOut: 1,
Effectiveness: 1,
Start: 1,
};
if (eventid in AttackingEvents) {
this.debug(eventid + ' handler suppressed by Mold Breaker');