mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-24 00:36:27 -05:00
17 lines
378 B
JavaScript
17 lines
378 B
JavaScript
'use strict';
|
|
|
|
exports.BattleItems = {
|
|
leppaberry: {
|
|
inherit: true,
|
|
onUpdate: function (pokemon) {
|
|
if (!pokemon.hp) return;
|
|
let moveSlot = pokemon.getMoveData(pokemon.getLastMoveAbsolute());
|
|
if (moveSlot && moveSlot.pp === 0) {
|
|
pokemon.addVolatile('leppaberry');
|
|
pokemon.volatiles['leppaberry'].moveSlot = moveSlot;
|
|
pokemon.eatItem();
|
|
}
|
|
},
|
|
},
|
|
};
|