diff --git a/sim/battle.js b/sim/battle.js index 6e4605681cd44..41a0f986d76a8 100644 --- a/sim/battle.js +++ b/sim/battle.js @@ -2433,6 +2433,7 @@ class Battle extends Dex.ModdedDex { switch (targetType) { case 'randomNormal': + case 'scripted': case 'normal': return isAdjacent; case 'adjacentAlly': diff --git a/test/simulator/moves/counter.js b/test/simulator/moves/counter.js index 989b90ca69ecf..01d16d77df1c2 100644 --- a/test/simulator/moves/counter.js +++ b/test/simulator/moves/counter.js @@ -57,7 +57,7 @@ describe('Counter', function () { assert.false.fullHP(battle.p2.active[1]); }); - it('should bypass Follow Me', function () { + it('should respect Follow Me', function () { battle = common.createBattle({gameType: 'doubles'}); battle.join('p1', 'Guest 1', 1, [ {species: 'Bastiodon', ability: 'sturdy', moves: ['counter']}, @@ -68,8 +68,8 @@ describe('Counter', function () { {species: 'Clefable', ability: 'unaware', moves: ['followme']}, ]); battle.makeChoices('move counter, move splash', 'move acrobatics 1, move followme'); - assert.fullHP(battle.p2.active[1]); - assert.false.fullHP(battle.p2.active[0]); + assert.false.fullHP(battle.p2.active[1]); + assert.fullHP(battle.p2.active[0]); }); }); @@ -123,7 +123,7 @@ describe('Mirror Coat', function () { assert.false.fullHP(battle.p2.active[1]); }); - it('should bypass Follow Me', function () { + it('should respect Follow Me', function () { battle = common.createBattle({gameType: 'doubles'}); battle.join('p1', 'Guest 1', 1, [ {species: 'Mew', ability: 'synchronize', moves: ['mirrorcoat']}, @@ -134,7 +134,7 @@ describe('Mirror Coat', function () { {species: 'Clefable', ability: 'unaware', moves: ['followme']}, ]); battle.makeChoices('move mirrorcoat, move splash', 'move venoshock 1, move followme'); - assert.fullHP(battle.p2.active[1]); - assert.false.fullHP(battle.p2.active[0]); + assert.false.fullHP(battle.p2.active[1]); + assert.fullHP(battle.p2.active[0]); }); });