Revert "Fixed IV defaults for generations with hypertraining (#2140)"

This reverts commit 105ee1690e.
This commit is contained in:
HoeenHero 2023-08-28 22:29:09 -04:00 committed by GitHub
parent 5fd9defd92
commit b7ac5e0992
2 changed files with 12 additions and 7 deletions

View File

@ -1247,7 +1247,6 @@ Storage.importTeam = function (buffer, teams) {
if (line.substr(0, 14) === 'Hidden Power [') {
var hptype = line.substr(14, line.length - 15);
line = 'Hidden Power ' + hptype;
if ((parseInt(format[3], 10) || 6) < 7) { // update IVs to match hidden power if format is gen 6 or earlier
var type = Dex.types.get(hptype);
if (!curSet.ivs && type) {
curSet.ivs = {};
@ -1256,7 +1255,6 @@ Storage.importTeam = function (buffer, teams) {
}
}
}
}
if (line === 'Frustration' && curSet.happiness === undefined) {
curSet.happiness = 0;
}

View File

@ -398,6 +398,13 @@ class PSTeambuilder {
if (line.startsWith('Hidden Power [')) {
const hpType = line.slice(14, -1) as TypeName;
line = 'Hidden Power ' + hpType;
if (!set.ivs && Dex.types.isName(hpType)) {
set.ivs = {hp: 31, atk: 31, def: 31, spa: 31, spd: 31, spe: 31};
const hpIVs = Dex.types.get(hpType).HPivs || {};
for (let stat in hpIVs) {
set.ivs[stat as StatName] = hpIVs[stat as StatName]!;
}
}
}
if (line === 'Frustration' && set.happiness === undefined) {
set.happiness = 0;