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:
The Immortal 2016-03-06 20:36:28 +04:00
parent 5d01004381
commit 61e2cfca27

View File

@ -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;