Skip to content

Commit

Permalink
Random Battle improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
TheImmortal authored and Quanyails committed May 12, 2021
1 parent 8048a4b commit 86eed49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
8 changes: 4 additions & 4 deletions data/formats-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2695,7 +2695,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
tier: "Illegal",
},
rayquaza: {
randomBattleMoves: ["dragondance", "earthquake", "extremespeed", "outrage", "vcreate"],
randomBattleMoves: ["dracometeor", "dragonascent", "extremespeed", "swordsdance", "vcreate"],
randomBattleLevel: 72,
randomDoubleBattleMoves: ["dracometeor", "dragonascent", "dragonclaw", "dragondance", "earthpower", "extremespeed", "vcreate"],
randomDoubleBattleLevel: 72,
Expand Down Expand Up @@ -6080,7 +6080,7 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
doublesTier: "DOU",
},
regidrago: {
randomBattleMoves: ["dracometeor", "dragondance", "firefang", "outrage", "thunderfang"],
randomBattleMoves: ["dracometeor", "dragondance", "hammerarm", "outrage", "thunderfang"],
randomBattleLevel: 82,
randomDoubleBattleMoves: ["crunch", "dragonclaw", "dragonenergy", "firefang"],
randomDoubleBattleLevel: 84,
Expand Down Expand Up @@ -6120,8 +6120,8 @@ export const FormatsData: {[k: string]: SpeciesFormatsData} = {
doublesTier: "DUber",
},
calyrexshadow: {
randomBattleMoves: ["astralbarrage", "darkpulse", "nastyplot", "substitute"],
randomBattleLevel: 76,
randomBattleMoves: ["astralbarrage", "nastyplot", "pollenpuff", "psyshock", "substitute", "trick"],
randomBattleLevel: 74,
randomDoubleBattleMoves: ["astralbarrage", "nastyplot", "pollenpuff", "protect", "psyshock"],
randomDoubleBattleLevel: 72,
tier: "Uber",
Expand Down
11 changes: 5 additions & 6 deletions data/random-teams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ export class RandomTeams {
case 'bulletpunch': case 'rockblast':
if (!!counter['speedsetup'] || counter.damagingMoves.length < 2) rejected = true;
break;
case 'closecombat': case 'flashcannon':
case 'closecombat': case 'flashcannon': case 'pollenpuff':
if ((hasMove['substitute'] && !hasType['Fighting']) || hasMove['toxic'] && movePool.includes('substitute')) rejected = true;
if (moveid === 'closecombat' && (hasMove['highjumpkick'] || movePool.includes('highjumpkick')) && !counter.setupType) rejected = true;
break;
Expand Down Expand Up @@ -965,9 +965,8 @@ export class RandomTeams {
if (hasMove['thunderwave'] || hasMove['toxic']) rejected = true;
break;
case 'defog':
if (hasMove['stealthrock'] || hasMove['toxicspikes'] || teamDetails.defog) rejected = true;
if (hasMove['healbell'] || hasMove['stealthrock'] || hasMove['toxicspikes'] || teamDetails.defog) rejected = true;
if (counter.setupType || hasMove['hex'] && !hasMove['thunderwave'] && !hasMove['willowisp']) rejected = true;
if (hasMove['energyball'] && !hasType['Grass']) rejected = true;
break;
case 'painsplit': case 'recover': case 'synthesis':
if (hasMove['rest'] || hasMove['wish']) rejected = true;
Expand Down Expand Up @@ -1006,7 +1005,7 @@ export class RandomTeams {
(!counter.stab && counter['physicalpool'] + counter['specialpool'] > 0) ||
(hasType['Bug'] && movePool.includes('megahorn')) ||
(hasType['Dark'] && (!counter['Dark'] || (hasMove['suckerpunch'] && (movePool.includes('knockoff') || movePool.includes('wickedblow'))))) ||
(hasType['Dragon'] && !counter['Dragon'] && !hasMove['substitute'] && !(hasMove['rest'] && hasMove['sleeptalk'])) ||
(hasType['Dragon'] && !counter['Dragon'] && !hasMove['dragonascent'] && !hasMove['substitute'] && !(hasMove['rest'] && hasMove['sleeptalk'])) ||
(hasType['Electric'] && (!counter['Electric'] || movePool.includes('thunder'))) ||
(hasType['Fairy'] && !counter['Fairy'] && !hasType['Flying'] && !hasAbility['Pixilate']) ||
(hasType['Fighting'] && (!counter['Fighting'] || !counter.stab)) ||
Expand Down Expand Up @@ -1110,7 +1109,7 @@ export class RandomTeams {
} else if (ability === 'Harvest') {
rejectAbility = (hasAbility['Frisk'] && !isDoubles);
} else if (ability === 'Hustle' || ability === 'Inner Focus') {
rejectAbility = counter.Physical < 2;
rejectAbility = (counter.Physical < 2 || hasAbility['Iron Fist']);
} else if (ability === 'Infiltrator') {
rejectAbility = ((hasMove['rest'] && hasMove['sleeptalk']) || isDoubles && hasAbility['Clear Body']);
} else if (ability === 'Intimidate') {
Expand Down Expand Up @@ -1392,7 +1391,7 @@ export class RandomTeams {
const srWeakness = (ability === 'Magic Guard' || item === 'Heavy-Duty Boots' ? 0 : this.dex.getEffectiveness('Rock', species));
while (evs.hp > 1) {
const hp = Math.floor(Math.floor(2 * species.baseStats.hp + ivs.hp + Math.floor(evs.hp / 4) + 100) * level / 100 + 10);
if (hasMove['substitute'] && (item === 'Sitrus Berry' || (hasMove['bellydrum'] && item === 'Salac Berry'))) {
if (hasMove['substitute'] && (item === 'Sitrus Berry' || ability === 'Power Construct' || (hasMove['bellydrum'] && item === 'Salac Berry'))) {
// Two Substitutes should activate Sitrus Berry
if (hp % 4 === 0) break;
} else if (hasMove['bellydrum'] && (item === 'Sitrus Berry' || ability === 'Gluttony')) {
Expand Down

0 comments on commit 86eed49

Please sign in to comment.