diff --git a/data/moves.ts b/data/moves.ts index e304d540ed..41c08aa90c 100644 --- a/data/moves.ts +++ b/data/moves.ts @@ -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); } } }, diff --git a/test/sim/moves/shelltrap.js b/test/sim/moves/shelltrap.js index 297525efc9..177072159a 100644 --- a/test/sim/moves/shelltrap.js +++ b/test/sim/moves/shelltrap.js @@ -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|'))); + }); });