Skip to content

Commit

Permalink
Fix interaction of Me First and Assault Vest
Browse files Browse the repository at this point in the history
  • Loading branch information
DaWoblefet committed Jan 10, 2024
1 parent 1439452 commit 4e15b26
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion data/items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ export const Items: {[itemid: string]: ItemData} = {
},
onDisableMove(pokemon) {
for (const moveSlot of pokemon.moveSlots) {
if (this.dex.moves.get(moveSlot.move).category === 'Status') {
const move = this.dex.moves.get(moveSlot.id);
if (move.category === 'Status' && move.id !== 'mefirst') {
pokemon.disableMove(moveSlot.id);
}
}
Expand Down
14 changes: 13 additions & 1 deletion test/sim/moves/mefirst.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,19 @@ describe(`Me First`, function () {
battle.destroy();
});

it(`Me First should fail to copy recharge turns from moves like Hyper Beam`, function () {
it(`should be selectable even if the user is Taunted or holds Assault Vest`, function () {
battle = common.gen(7).createBattle([[
{species: 'corphish', moves: ['sleeptalk']},
{species: 'aerodactyl', item: 'assaultvest', moves: ['mefirst']},
], [
{species: 'wynaut', moves: ['taunt', 'watergun']},
]]);
battle.makeChoices('switch 2', 'move taunt');
battle.makeChoices('move mefirst', 'move watergun');
assert.false.fullHP(battle.p2.active[0]);
});

it(`should not copy recharge turns from moves like Hyper Beam`, function () {
battle = common.gen(7).createBattle([[
{species: 'aerodactyl', moves: ['sleeptalk', 'mefirst']},
], [
Expand Down

1 comment on commit 4e15b26

@DaWoblefet
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partially fixes https://www.smogon.com/forums/threads/bug-report-me-first-interactions-with-choice-items-and-assault-vest.3733716/ in the same way we do Me First hardcodes for Taunt and Sucker Punch elsewhere.

Please sign in to comment.