Random Battle improvements

This commit is contained in:
The Immortal 2018-02-13 23:56:42 +08:00
parent 8c13f7e872
commit 4402c71423
2 changed files with 9 additions and 8 deletions

View File

@ -2925,7 +2925,7 @@ exports.BattleFormatsData = {
tier: "NFE",
},
slaking: {
randomBattleMoves: ["earthquake", "pursuit", "nightslash", "doubleedge", "gigaimpact"],
randomBattleMoves: ["earthquake", "pursuit", "nightslash", "retaliate", "gigaimpact", "firepunch"],
randomDoubleBattleMoves: ["earthquake", "nightslash", "doubleedge", "retaliate", "hammerarm", "rockslide"],
eventPokemon: [
{"generation": 4, "level": 50, "gender": "M", "nature": "Adamant", "moves": ["gigaimpact", "return", "shadowclaw", "aerialace"], "pokeball": "cherishball"},
@ -7173,7 +7173,7 @@ exports.BattleFormatsData = {
doublesTier: "DUU",
},
necrozma: {
randomBattleMoves: ["calmmind", "psychic", "darkpulse", "moonlight", "stealthrock", "storedpower"],
randomBattleMoves: ["calmmind", "photongeyser", "darkpulse", "moonlight", "stealthrock", "storedpower"],
randomDoubleBattleMoves: ["calmmind", "trickroom", "moonlight", "storedpower", "psyshock", "darkpulse"],
eventPokemon: [
{"generation": 7, "level": 75, "moves": ["stealthrock", "irondefense", "wringout", "prismaticlaser"]},

View File

@ -399,7 +399,7 @@ class RandomTeams extends Dex.ModdedDex {
];
// Moves that shouldn't be the only STAB moves:
let NoStab = [
'aquajet', 'bounce', 'explosion', 'fakeout', 'flamecharge', 'fly', 'iceshard', 'pursuit', 'quickattack', 'skyattack',
'aquajet', 'bounce', 'explosion', 'fakeout', 'firstimpression', 'flamecharge', 'fly', 'iceshard', 'pursuit', 'quickattack', 'skyattack',
'chargebeam', 'clearsmog', 'eruption', 'vacuumwave', 'waterspout',
];
@ -451,7 +451,7 @@ class RandomTeams extends Dex.ModdedDex {
// Moves with low accuracy:
if (move.accuracy && move.accuracy !== true && move.accuracy < 90) counter['inaccurate']++;
// Moves with non-zero priority:
if (move.priority !== 0) counter['priority']++;
if (move.category !== 'Status' && move.priority !== 0) counter['priority']++;
// Moves that change stats:
if (RecoveryMove.includes(moveid)) counter['recovery']++;
@ -778,7 +778,7 @@ class RandomTeams extends Dex.ModdedDex {
break;
case 'thunderbolt':
if (hasMove['discharge'] || (hasMove['raindance'] && hasMove['thunder']) || (hasMove['voltswitch'] && hasMove['wildcharge'])) rejected = true;
if (hasMove['voltswitch'] && !counter.setupType && !counter['speedsetup'] && (!!counter['Status'] || template.types.length > 1 && !counter[template.types.find(type => type !== 'Electric')])) rejected = true;
if (hasMove['voltswitch'] && !counter.setupType && !counter['speedsetup'] && template.types.length > 1 && (!counter[template.types.find(type => type !== 'Electric')]) || !!counter['Status']) rejected = true;
break;
case 'thunderpunch':
if (hasAbility['Galvanize'] && !!counter['Normal']) rejected = true;
@ -922,8 +922,8 @@ class RandomTeams extends Dex.ModdedDex {
case 'sludgewave':
if (hasMove['poisonjab']) rejected = true;
break;
case 'psychic':
if (hasMove['psyshock'] || hasMove['storedpower']) rejected = true;
case 'photongeyser': case 'psychic':
if (hasMove['psyshock'] || counter.setupType === 'Special' && hasMove['storedpower']) rejected = true;
break;
case 'psychocut': case 'zenheadbutt':
if ((hasMove['psychic'] || hasMove['psyshock']) && counter.setupType !== 'Physical') rejected = true;
@ -1027,7 +1027,7 @@ class RandomTeams extends Dex.ModdedDex {
if ((hasType['Bug'] && !hasMove['batonpass'] && (movePool.includes('megahorn') || movePool.includes('pinmissile') || (hasType['Flying'] && !hasMove['hurricane'] && movePool.includes('bugbuzz')))) ||
(hasType['Dark'] && hasMove['suckerpunch'] && counter.stab < template.types.length) ||
(hasType['Dragon'] && !counter['Dragon'] && !hasAbility['Aerilate'] && !hasAbility['Pixilate'] && !hasMove['rest'] && !hasMove['sleeptalk']) ||
(hasType['Electric'] && !counter['Electric']) ||
(hasType['Electric'] && !counter['Electric'] && !hasAbility['Galvanize']) ||
(hasType['Fighting'] && !counter['Fighting'] && (counter.setupType || !counter['Status'])) ||
(hasType['Fire'] && !counter['Fire']) ||
(hasType['Ground'] && !counter['Ground'] && !hasMove['rest'] && !hasMove['sleeptalk']) ||
@ -1043,6 +1043,7 @@ class RandomTeams extends Dex.ModdedDex {
(hasAbility['Guts'] && hasType['Normal'] && movePool.includes('facade')) ||
(hasAbility['Slow Start'] && movePool.includes('substitute')) ||
(hasAbility['Stance Change'] && !counter.setupType && movePool.includes('kingsshield')) ||
(hasAbility['Technician'] && movePool.includes('bulletpunch')) ||
(hasAbility['Water Bubble'] && !counter['Water']) ||
(counter['defensesetup'] && !counter.recovery && !hasMove['rest']) ||
(movePool.includes('technoblast') || template.requiredMove && movePool.includes(toId(template.requiredMove)))) &&