Random Battles update

This commit is contained in:
Annika 2021-03-26 15:45:55 -07:00
parent b9d6b3e3f3
commit 9e7074572e
5 changed files with 34 additions and 11 deletions

View File

@ -1358,7 +1358,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
doublesTier: "(DUU)",
},
moltresgalar: {
randomBattleMoves: ["fierywrath", "hurricane", "nastyplot", "rest", "substitute"],
randomBattleMoves: ["fierywrath", "hurricane", "nastyplot", "rest"],
randomBattleLevel: 76,
randomDoubleBattleMoves: ["fierywrath", "hurricane", "nastyplot", "protect"],
randomDoubleBattleLevel: 78,
@ -3780,7 +3780,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
tier: "Illegal",
},
emolga: {
randomBattleMoves: ["airslash", "encore", "energyball", "roost", "thunderbolt", "toxic", "voltswitch"],
randomBattleMoves: ["airslash", "encore", "energyball", "roost", "thunderbolt", "toxic", "uturn"],
randomBattleLevel: 88,
randomDoubleBattleMoves: ["acrobatics", "helpinghand", "nuzzle", "tailwind", "taunt"],
randomDoubleBattleLevel: 88,
@ -4177,7 +4177,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
doublesTier: "DOU",
},
kyuremwhite: {
randomBattleMoves: ["dracometeor", "earthpower", "freezedry", "fusionflare", "icebeam"],
randomBattleMoves: ["dracometeor", "earthpower", "freezedry", "fusionflare", "icebeam", "roost"],
randomBattleLevel: 72,
randomDoubleBattleMoves: ["dracometeor", "dragonpulse", "earthpower", "freezedry", "fusionflare", "icebeam", "protect", "roost"],
randomDoubleBattleLevel: 72,

View File

@ -31,8 +31,9 @@ export class RandomGen4Teams extends RandomGen5Teams {
(counter.setupType || !counter.Status || movePool.includes('closecombat') || movePool.includes('highjumpkick'))
),
Fire: (movePool, hasMove, hasAbility, hasType, counter) => !counter.Fire,
Flying: (movePool, hasMove, hasAbility, hasType, counter) => (
!counter['Flying'] && (counter.setupType !== 'Special' && movePool.includes('bravebird'))
Flying: (movePool, hasMove, hasAbility, hasType, counter) => !counter.Flying && (
(counter.setupType !== 'Special' && movePool.includes('bravebird')) ||
(hasAbility['Serene Grace'] && movePool.includes('airslash'))
),
Grass: (movePool, hasMove, hasAbility, hasType, counter) => (
!counter.Grass &&

View File

@ -2241,7 +2241,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
doublesTier: "(DUU)",
},
latiasmega: {
randomBattleMoves: ["defog", "dracometeor", "psyshock", "roost", "surf"],
randomBattleMoves: ["calmmind", "defog", "dracometeor", "psyshock", "roost", "surf"],
randomDoubleBattleMoves: ["dragonpulse", "healpulse", "helpinghand", "protect", "psychic", "tailwind"],
tier: "OU",
doublesTier: "(DUU)",
@ -2253,7 +2253,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
doublesTier: "(DUU)",
},
latiosmega: {
randomBattleMoves: ["calmmind", "defog", "dracometeor", "hiddenpowerfire", "psyshock", "roost"],
randomBattleMoves: ["calmmind", "dracometeor", "hiddenpowerfire", "psyshock", "roost"],
randomDoubleBattleMoves: ["dracometeor", "dragonpulse", "hiddenpowerfire", "protect", "psyshock", "tailwind"],
tier: "UUBL",
doublesTier: "(DUU)",
@ -2277,7 +2277,7 @@ export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
doublesTier: "DUber",
},
groudonprimal: {
randomBattleMoves: ["firepunch", "lavaplume", "precipiceblades", "rockpolish", "stealthrock", "stoneedge", "swordsdance", "toxic"],
randomBattleMoves: ["firepunch", "lavaplume", "precipiceblades", "rockpolish", "stealthrock", "stoneedge", "swordsdance"],
randomDoubleBattleMoves: ["firepunch", "precipiceblades", "protect", "rockpolish", "rockslide", "stoneedge", "swordsdance"],
tier: "Uber",
doublesTier: "DUber",

View File

@ -43,7 +43,7 @@ const MixedSetup = [
];
// Moves which boost Speed:
const SpeedSetup = [
'agility', 'autotomize', 'flamecharge', 'rockpolish', 'shiftgear',
'agility', 'autotomize', 'flamecharge', 'rockpolish', 'shiftgear', 'dragondance',
];
// Moves that shouldn't be the only STAB moves:
const NoStab = [
@ -250,7 +250,8 @@ export class RandomTeams {
unrejectableMovesInSingles(move: Move) {
// These moves cannot be rejected in favor of a forced move in singles
return (move.category !== 'Status' || !move.flags.heal) && ![
'facade', 'lightscreen', 'reflect', 'sleeptalk', 'spore', 'substitute', 'switcheroo', 'teleport', 'toxic', 'trick',
'facade', 'leechseed', 'lightscreen', 'reflect', 'sleeptalk', 'spore', 'substitute', 'switcheroo',
'teleport', 'toxic', 'trick',
].includes(move.id);
}
@ -2011,9 +2012,15 @@ export class RandomTeams {
case 'Darmanitan':
if (species.gen === 8 && this.randomChance(1, 2)) continue;
break;
case 'Necrozma':
if (this.randomChance(3, 4)) continue;
break;
case 'Calyrex':
if (this.randomChance(2, 3)) continue;
break;
case 'Magearna': case 'Toxtricity': case 'Zacian': case 'Zamazenta': case 'Zarude':
case 'Appletun': case 'Blastoise': case 'Butterfree': case 'Copperajah': case 'Grimmsnarl':
case 'Inteleon': case 'Rillaboom': case 'Snorlax': case 'Urshifu':
case 'Inteleon': case 'Rillaboom': case 'Snorlax': case 'Urshifu': case 'Giratina':
if (this.gen >= 8 && this.randomChance(1, 2)) continue;
break;
}

View File

@ -0,0 +1,15 @@
/**
* Tests for Gen 4 randomized formats
*/
'use strict';
const assert = require('../assert');
const {testSet} = require('./tools');
describe('[Gen 4] Random Battle', () => {
const options = {format: 'gen4randombattle'};
it('should not generate Shaymin-Sky without Air Slash', () => {
testSet('shayminsky', options, set => assert(set.moves.includes('airslash'), `got ${set.moves}`));
});
});