Fix Life Orb + Emergency Exit interaction (#6738)

This commit is contained in:
fart
2020-05-25 17:14:59 -04:00
committed by GitHub
parent a4f56d27d2
commit 0450e8cb65
2 changed files with 6 additions and 1 deletions

View File

@@ -285,6 +285,11 @@ export const BattleScripts: BattleScriptsData = {
if (!move.negateSecondary && !(move.hasSheerForce && pokemon.hasAbility('sheerforce'))) {
this.singleEvent('AfterMoveSecondarySelf', move, null, pokemon, target, move);
this.runEvent('AfterMoveSecondarySelf', pokemon, target, move);
if (pokemon && pokemon !== target && move && move.category !== 'Status') {
if (pokemon.hp <= pokemon.maxhp / 2) {
this.runEvent('EmergencyExit', pokemon, pokemon);
}
}
}
return true;