Shell Trap should not power up if hit by a Z- or Max move (#6622)

This commit is contained in:
urkerab
2020-04-27 16:04:49 +01:00
committed by GitHub
parent 5d57aaaedf
commit 8476a24318
2 changed files with 19 additions and 1 deletions

View File

@@ -16695,7 +16695,7 @@ export const BattleMovedex: {[moveid: string]: MoveData} = {
pokemon.volatiles['shelltrap'].gotHit = true;
const action = this.queue.willMove(pokemon);
if (action) {
this.queue.prioritizeAction(action, move);
this.queue.prioritizeAction(action);
}
}
},

View File

@@ -32,4 +32,22 @@ describe('Shell Trap', function () {
battle.makeChoices('move shelltrap, move splash', 'move tackle, move splash');
assert.equal(move.pp, move.maxpp - 2);
});
it('should not Z-power if hit by a Z-move', function () {
battle = common.createBattle({}, [
[{species: 'Turtonator', moves: ['shelltrap']}],
[{species: 'Magikarp', item: 'normaliumz', moves: ['flail']}],
]);
battle.makeChoices('move shelltrap', 'move flail zmove');
assert(battle.log.some(line => line.includes('|Shell Trap|')));
});
it('should not Max if hit by a Max move', function () {
battle = common.createBattle({}, [
[{species: 'Turtonator', moves: ['shelltrap']}],
[{species: 'Magikarp', moves: ['flail']}],
]);
battle.makeChoices('move shelltrap', 'move flail dynamax');
assert(battle.log.some(line => line.includes('|Shell Trap|')));
});
});