mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-09-10 02:05:35 -05:00
Shell Trap should not power up if hit by a Z- or Max move (#6622)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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|')));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user