mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-25 07:22:09 -05:00
Fix Life Orb + Emergency Exit interaction (#6738)
This commit is contained in:
parent
a4f56d27d2
commit
0450e8cb65
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ describe(`Emergency Exit`, function () {
|
|||
assert.equal(battle.requestState, 'switch');
|
||||
});
|
||||
|
||||
it.skip('should request switch-out after taking Life Orb recoil', function () {
|
||||
it('should request switch-out after taking Life Orb recoil', function () {
|
||||
battle = common.createBattle([[
|
||||
{species: "Golisopod", item: "lifeorb", ability: 'emergencyexit', moves: ['peck']},
|
||||
{species: "Wynaut", moves: ['sleeptalk']},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user