@pkmn/randoms 0.5.5 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/gen5.js +1 -1
- package/build/gen5.js.map +1 -1
- package/build/gen6.js +2 -2
- package/build/gen6.js.map +1 -1
- package/build/gen7.js +5 -3
- package/build/gen7.js.map +1 -1
- package/build/gen8.js +4 -4
- package/build/gen8.js.map +1 -1
- package/package.json +2 -2
- package/src/gen5.ts +1 -1
- package/src/gen6.ts +2 -2
- package/src/gen7.ts +7 -3
- package/src/gen8.ts +5 -5
package/src/gen7.ts
CHANGED
|
@@ -448,7 +448,11 @@ export class RandomGen7Teams extends RandomTeams {
|
|
|
448
448
|
case 'endeavor':
|
|
449
449
|
return {cull: !isLead && !abilities.has('Defeatist')};
|
|
450
450
|
case 'explosion':
|
|
451
|
-
return {cull:
|
|
451
|
+
return {cull: (
|
|
452
|
+
!!counter.setupType ||
|
|
453
|
+
moves.has('wish') ||
|
|
454
|
+
(abilities.has('Refrigerate') && (moves.has('freezedry') || movePool.includes('return')))
|
|
455
|
+
)};
|
|
452
456
|
case 'extremespeed': case 'skyattack':
|
|
453
457
|
return {cull: moves.has('substitute') || counter.setupType !== 'Physical' && moves.has('vacuumwave')};
|
|
454
458
|
case 'facade':
|
|
@@ -732,7 +736,7 @@ export class RandomGen7Teams extends RandomTeams {
|
|
|
732
736
|
if (ability === 'Harvest' || ability === 'Emergency Exit' && !!counter.get('Status')) return 'Sitrus Berry';
|
|
733
737
|
if (ability === 'Imposter') return 'Choice Scarf';
|
|
734
738
|
if (ability === 'Poison Heal') return 'Toxic Orb';
|
|
735
|
-
if (species.
|
|
739
|
+
if (species.nfe) return (ability === 'Technician' && counter.get('Physical') >= 4) ? 'Choice Band' : 'Eviolite';
|
|
736
740
|
if (moves.has('switcheroo') || moves.has('trick')) {
|
|
737
741
|
if (species.baseStats.spe >= 60 && species.baseStats.spe <= 108) {
|
|
738
742
|
return 'Choice Scarf';
|
|
@@ -1358,7 +1362,7 @@ export class RandomGen7Teams extends RandomTeams {
|
|
|
1358
1362
|
// Banned Ability
|
|
1359
1363
|
Dugtrio: 82, Gothitelle: 82, Pelipper: 84, Politoed: 84, Torkoal: 84, Wobbuffet: 82,
|
|
1360
1364
|
// Holistic judgement
|
|
1361
|
-
'Castform-Rainy': 100, 'Castform-Snowy': 100, 'Castform-Sunny': 100, Delibird: 100, Spinda: 100, Unown: 100,
|
|
1365
|
+
'Castform-Rainy': 100, 'Castform-Snowy': 100, 'Castform-Sunny': 100, Delibird: 100, Luvdisc: 100, Spinda: 100, Unown: 100,
|
|
1362
1366
|
};
|
|
1363
1367
|
const tier = toID(species.tier).replace('bl', '');
|
|
1364
1368
|
level = levelScale[tier] || (species.nfe ? 90 : 80);
|
package/src/gen8.ts
CHANGED
|
@@ -1697,7 +1697,7 @@ export class RandomTeams {
|
|
|
1697
1697
|
this.dex.getEffectiveness('Rock', species) >= 2 &&
|
|
1698
1698
|
!isDoubles
|
|
1699
1699
|
);
|
|
1700
|
-
if (species.
|
|
1700
|
+
if (species.nfe && !HDBBetterThanEviolite) return 'Eviolite';
|
|
1701
1701
|
|
|
1702
1702
|
// Ability based logic and miscellaneous logic
|
|
1703
1703
|
if (species.name === 'Wobbuffet' || ['Cheek Pouch', 'Harvest', 'Ripen'].includes(ability)) return 'Sitrus Berry';
|
|
@@ -2033,7 +2033,7 @@ export class RandomTeams {
|
|
|
2033
2033
|
// Genesect-Douse should never reject Techno Blast
|
|
2034
2034
|
const moveIsRejectable = !(species.id === 'genesectdouse' && move.id === 'technoblast') && (
|
|
2035
2035
|
move.category === 'Status' ||
|
|
2036
|
-
!types.has(move.type) ||
|
|
2036
|
+
(!types.has(move.type) && move.id !== 'judgment') ||
|
|
2037
2037
|
(isLowBP && !move.multihit && !abilities.has('Technician'))
|
|
2038
2038
|
);
|
|
2039
2039
|
// Setup-supported moves should only be rejected under specific circumstances
|
|
@@ -2043,6 +2043,7 @@ export class RandomTeams {
|
|
|
2043
2043
|
(counter.get(counter.setupType) + counter.get('Status') > 3 && !counter.get('hazards')) ||
|
|
2044
2044
|
(move.category !== counter.setupType && move.category !== 'Status')
|
|
2045
2045
|
);
|
|
2046
|
+
|
|
2046
2047
|
if (moveIsRejectable && (
|
|
2047
2048
|
!cull && !isSetup && !move.weather && !move.stallingMove && notImportantSetup && !move.damage &&
|
|
2048
2049
|
(isDoubles ? this.unrejectableMovesInDoubles(move) : this.unrejectableMovesInSingles(move))
|
|
@@ -2086,7 +2087,6 @@ export class RandomTeams {
|
|
|
2086
2087
|
}
|
|
2087
2088
|
}
|
|
2088
2089
|
|
|
2089
|
-
|
|
2090
2090
|
// Remove rejected moves from the move list
|
|
2091
2091
|
if (cull && movePool.length) {
|
|
2092
2092
|
if (moveid.startsWith('hiddenpower')) hasHiddenPower = false;
|
|
@@ -2261,7 +2261,7 @@ export class RandomTeams {
|
|
|
2261
2261
|
PUBL: 87,
|
|
2262
2262
|
PU: 88, "(PU)": 88, NFE: 88,
|
|
2263
2263
|
};
|
|
2264
|
-
const customScale: {[k: string]: number} = {};
|
|
2264
|
+
const customScale: {[k: string]: number} = {delibird: 100, luvdisc: 100, spinda: 100, unown: 100};
|
|
2265
2265
|
|
|
2266
2266
|
level = customScale[species.id] || tierScale[species.tier] || 80;
|
|
2267
2267
|
// Arbitrary levelling base on data files (typically winrate-influenced)
|
|
@@ -2303,7 +2303,7 @@ export class RandomTeams {
|
|
|
2303
2303
|
// Minimize confusion damage
|
|
2304
2304
|
const noAttackStatMoves = [...moves].every(m => {
|
|
2305
2305
|
const move = this.dex.moves.get(m);
|
|
2306
|
-
if (move.damageCallback || move.damage) return
|
|
2306
|
+
if (move.damageCallback || move.damage) return true;
|
|
2307
2307
|
return move.category !== 'Physical' || move.id === 'bodypress';
|
|
2308
2308
|
});
|
|
2309
2309
|
if (noAttackStatMoves && !moves.has('transform') && (!moves.has('shellsidearm') || !counter.get('Status'))) {
|