mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-22 07:25:28 -05:00
Correctly implement Shedinja's HP
Pokemon with a base HP of 1 do increase according to the stat formula. Shedinja is hardcoded to have 1 HP no matter what its base stat is.
This commit is contained in:
parent
5d01004381
commit
61e2cfca27
|
|
@ -276,7 +276,7 @@ BattlePokemon = (() => {
|
|||
}
|
||||
|
||||
this.maxhp = Math.floor(Math.floor(2 * this.template.baseStats['hp'] + this.set.ivs['hp'] + Math.floor(this.set.evs['hp'] / 4) + 100) * this.level / 100 + 10);
|
||||
if (this.template.baseStats['hp'] === 1) this.maxhp = 1; // shedinja
|
||||
if (this.speciesid === 'shedinja') this.maxhp = 1;
|
||||
this.hp = this.hp || this.maxhp;
|
||||
|
||||
this.isStale = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user