'use strict';

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

let battle;

describe('Prankster', function () {
	afterEach(function () {
		battle.destroy();
	});

	it('should increase the priority of Status moves', function () {
		battle = common.createBattle([
			[{species: "Murkrow", ability: 'prankster', moves: ['taunt']}],
			[{species: "Deoxys-Speed", ability: 'pressure', moves: ['calmmind']}],
		]);
		battle.commitDecisions();
		assert.statStage(battle.p2.active[0], 'spa', 0);
	});

	it('should cause Status moves to fail against Dark Pokémon', function () {
		battle = common.createBattle([
			[{species: "Sableye", ability: 'prankster', moves: ['willowisp']}],
			[{species: "Sableye", ability: 'keeneye', moves: ['willowisp']}],
		]);
		assert.constant(() => battle.p2.active[0].status, () => battle.commitDecisions());
	});
});

describe('Prankster [Gen 6]', function () {
	afterEach(function () {
		battle.destroy();
	});

	it('should not cause Status moves to fail against Dark Pokémon', function () {
		battle = common.gen(6).createBattle([
			[{species: "Sableye", ability: 'prankster', moves: ['willowisp']}],
			[{species: "Sableye", ability: 'keeneye', moves: ['willowisp']}],
		]);
		assert.sets(() => battle.p2.active[0].status, 'brn', () => battle.commitDecisions());
	});
});

@@ -864,24 +864,380 @@
 ons());%0A%09%7D);
+%0A%0A%09it('should cause bounced Status moves to fail against Dark Pok%C3%A9mon', function () %7B%0A%09%09battle = common.createBattle(%5B%0A%09%09%09%5B%7Bspecies: %22Klefki%22, ability: 'prankster', moves: %5B'magiccoat'%5D%7D%5D,%0A%09%09%09%5B%7Bspecies: %22Spiritomb%22, ability: 'pressure', moves: %5B'willowisp'%5D%7D%5D,%0A%09%09%5D);%0A%09%09assert.constant(() =%3E battle.p2.active%5B0%5D.status, () =%3E battle.commitDecisions());%0A%09%7D);
 %0A%7D);%0A%0Adescri

Add test for bounced status moves affected by Prankster