This commit is contained in:
André Bastos Dias 2026-06-02 14:06:44 +01:00 committed by GitHub
commit a9c1a9d5fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 51 additions and 0 deletions

View File

@ -1030,6 +1030,23 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = {
},
},
},
psychoshift: {
inherit: true,
onTryHit(target, source, move) {
if (!source.status) return false;
source.addVolatile('psychoshift');
move.status = source.status;
},
self: null,
condition: {
duration: 1,
onSourceSetStatus(status, target, source, sourceEffect) {
if (sourceEffect.effectType !== 'Move' || sourceEffect.id !== this.effectState.id) return;
source.cureStatus();
source.removeVolatile('psychoshift');
},
},
},
psychup: {
inherit: true,
flags: { snatch: 1, bypasssub: 1, metronome: 1 },

View File

@ -0,0 +1,34 @@
'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Psycho Shift', () => {
afterEach(() => {
battle.destroy();
});
it(`should cure the user after transferring status`, () => {
battle = common.createBattle([[
{ species: 'gardevoir', ability: 'synchronize', moves: ['toxic'] },
], [
{ species: 'noctowl', moves: ['psycho shift'] },
]]);
battle.makeChoices();
assert.false(battle.p2.active[0].status);
});
describe('[Gen 4]', () => {
it(`should cure the user before transferring status`, () => {
battle = common.gen(4).createBattle([[
{ species: 'gardevoir', ability: 'synchronize', moves: ['toxic'] },
], [
{ species: 'noctowl', moves: ['psycho shift'] },
]]);
battle.makeChoices();
assert.equal(battle.p2.active[0].status, 'psn');
});
});
});