mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-06-02 22:08:36 -05:00
Harvest Implementation
This commit is contained in:
parent
6fc1f0de1f
commit
0b868849a5
24
abilities.js
24
abilities.js
|
|
@ -687,13 +687,23 @@ exports.BattleAbilities = {
|
|||
num: "62"
|
||||
},
|
||||
"harvest": {
|
||||
desc: "When the user uses a held Berry, it is restored at the end of the turn.",
|
||||
id: "harvest",
|
||||
name: "Harvest",
|
||||
onResidualPriority: -26.1,
|
||||
rating: 4,
|
||||
num: "139"
|
||||
},
|
||||
desc: "When the user uses a held Berry, it is restored at the end of the turn.",
|
||||
id: "harvest",
|
||||
name: "Harvest",
|
||||
onResidualPriority: -26.1,
|
||||
onResidual: function(pokemon) {
|
||||
if ((this.weather === 'sunnyday') || (Math.random() * 2 < 1))
|
||||
{
|
||||
if (!pokemon.item && this.getItem(pokemon.lastItem).isBerry)
|
||||
{
|
||||
pokemon.setItem(pokemon.lastItem);
|
||||
this.add("-item", pokemon, pokemon.item, '[from] ability: Harvest');
|
||||
}
|
||||
}
|
||||
},
|
||||
rating: 4,
|
||||
num: "139"
|
||||
},
|
||||
"healer": {
|
||||
desc: "Has a 30% chance of curing an adjacent ally's status ailment at the end of each turn in Double and Triple Battles.",
|
||||
id: "healer",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user