Skip to content

Commit

Permalink
Fix breakable check
Browse files Browse the repository at this point in the history
  • Loading branch information
andrebastosdias committed Feb 10, 2025
1 parent 2996c11 commit 39f3145
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sim/battle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 39f3145

Please sign in to comment.