'use strict';

const assert = require('./../../assert');
const common = require('./../../common');

let battle;

describe("Mirror Armor", function () {
	afterEach(function () {
		battle.destroy();
	});

	it("should bounce boosts back to the source", function () {
		battle = common.createBattle();
		battle.setPlayer('p1', {team: [
			{species: 'Corviknight', ability: 'mirrorarmor', moves: ['endure']},
		]});
		battle.setPlayer('p2', {team: [
			{species: 'Machop', ability: 'noguard', moves: ['rocktomb', 'leer']},
		]});
		battle.makeChoices('auto', 'move rocktomb');
		const corv = battle.p1.active[0];
		const machop = battle.p2.active[0];
		assert.statStage(corv, 'spe', 0);
		assert.statStage(machop, 'spe', -1);
		battle.makeChoices('auto', 'move leer');
		assert.statStage(corv, 'def', 0);
		assert.statStage(machop, 'def', -1);
	});
});

@@ -836,13 +836,645 @@
 1);%0A%09%7D);
+%0A%0A%09it.skip(%22should reflect Parting Shot's stat drops, then the Parting Shot user should switch%22, function () %7B%0A%09%09battle = common.createBattle(%5B%5B%0A%09%09%09%7Bspecies: 'Corviknight', ability: 'mirrorarmor', moves: %5B'sleeptalk'%5D%7D,%0A%09%09%5D, %5B%0A%09%09%09%7Bspecies: 'Drapion', moves: %5B'partingshot'%5D%7D,%0A%09%09%09%7Bspecies: 'Pangoro', moves: %5B'sleeptalk'%5D%7D,%0A%09%09%5D%5D);%0A%09%09battle.makeChoices();%0A%09%09const corv = battle.p1.active%5B0%5D;%0A%09%09const drapion = battle.p2.active%5B0%5D;%0A%09%09assert.statStage(corv, 'atk', 0);%0A%09%09assert.statStage(corv, 'spa', 0);%0A%09%09assert.statStage(drapion, 'atk', -1);%0A%09%09assert.statStage(drapion, 'spa', -1);%0A%09%09assert.equal(battle.requestState, 'switch');%0A%09%7D);
 %0A%7D);%0A

Add Mirror Armor Parting Shot test (#6452)