diff --git a/data/mods/gen6/random-teams.ts b/data/mods/gen6/random-teams.ts index 3848f034ff..670b921cd4 100644 --- a/data/mods/gen6/random-teams.ts +++ b/data/mods/gen6/random-teams.ts @@ -10,7 +10,8 @@ export class RandomGen6Teams extends RandomGen7Teams { this.noStab = [...this.noStab, 'aquajet', 'fakeout', 'iceshard', 'machpunch', 'quickattack', 'vacuumwave']; this.moveEnforcementCheckers = { - Bug: movePool => movePool.includes('megahorn') || movePool.includes('pinmissile'), + Bug: (movePool, moves, abilities, types, counter) => (['megahorn', 'pinmissile'].some(m => movePool.includes(m)) || + !counter.get('Bug') && abilities.has('Tinted Lens')), Dark: (movePool, moves, abilities, types, counter, species) => ( (!counter.get('Dark') && !abilities.has('Protean')) ), @@ -32,7 +33,8 @@ export class RandomGen6Teams extends RandomGen7Teams { !!counter.setupType || !counter.get('Status') ) ), - Fire: (movePool, moves, abilities, types, counter) => !counter.get('Fire') || movePool.includes('quiverdance'), + Fire: (movePool, moves, abilities, types, counter) => !counter.get('Fire') || + ['eruption', 'quiverdance'].some(m => movePool.includes(m)), Flying: (movePool, moves, abilities, types, counter) => ( !counter.get('Flying') && ( abilities.has('Gale Wings') || @@ -140,7 +142,7 @@ export class RandomGen6Teams extends RandomGen7Teams { (!moves.has('growth') || moves.has('sunnyday')) ) ), isSetup: true}; - case 'calmmind': case 'geomancy': case 'nastyplot': case 'quiverdance': case 'tailglow': + case 'calmmind': case 'geomancy': case 'nastyplot': case 'tailglow': if (types.has('Dark') && moves.has('darkpulse')) { counter.setupType = 'Special'; return {cull: false, isSetup: true}; @@ -150,6 +152,8 @@ export class RandomGen6Teams extends RandomGen7Teams { counter.get('specialsetup') > 1 || (counter.get('Special') + counter.get('specialpool') < 2 && (!moves.has('rest') || !moves.has('sleeptalk'))) ), isSetup: true}; + case 'quiverdance': + return {cull: false, isSetup: true}; case 'growth': case 'shellsmash': case 'workup': return {cull: ( counter.setupType !== 'Mixed' || @@ -562,7 +566,7 @@ export class RandomGen6Teams extends RandomGen7Teams { case 'Torrent': return (!counter.get('Water') || !!species.isMega); case 'Unaware': - return (!!counter.setupType || moves.has('stealthrock')); + return (!!counter.setupType || species.id === 'clefable' && moves.has('stealthrock')); case 'Unburden': return (!!species.isMega || abilities.has('Prankster') || !counter.setupType && !moves.has('acrobatics')); case 'Water Absorb': @@ -920,7 +924,9 @@ export class RandomGen6Teams extends RandomGen7Teams { (movePool.includes('moonlight') && types.size < 2) || (movePool.includes('stickyweb') && !counter.setupType && !teamDetails.stickyWeb) || (species.requiredMove && movePool.includes(toID(species.requiredMove))) || - (moves.has('suckerpunch') && counter.get('stab') < species.types.length) + (moves.has('suckerpunch') && counter.get('stab') < species.types.length) || + (movePool.includes('quiverdance') && ['defog', 'uturn', 'stickyweb'].every(m => !moves.has(m)) && + counter.get('Special') < 4) ) { cull = true; } else { @@ -957,7 +963,7 @@ export class RandomGen6Teams extends RandomGen7Teams { if ( move.category !== 'Status' && !move.damage && !move.flags.charge && - (moveid !== 'hiddenpower' || !availableHP) + (!moveid.startsWith('hiddenpower') || !availableHP) ) rejectedPool.push(moveid); moves.delete(moveid); if (moveid.startsWith('hiddenpower')) hasHiddenPower = false; diff --git a/data/mods/gen7/random-teams.ts b/data/mods/gen7/random-teams.ts index 93b6557d0c..8e70299c9e 100644 --- a/data/mods/gen7/random-teams.ts +++ b/data/mods/gen7/random-teams.ts @@ -36,7 +36,8 @@ export class RandomGen7Teams extends RandomGen8Teams { this.noStab = [...this.noStab, 'voltswitch']; this.moveEnforcementCheckers = { - Bug: movePool => movePool.includes('megahorn') || movePool.includes('pinmissile'), + Bug: (movePool, moves, abilities, types, counter) => (['megahorn', 'pinmissile'].some(m => movePool.includes(m)) || + !counter.get('Bug') && abilities.has('Tinted Lens')), Dark: (movePool, moves, abilities, types, counter, species) => ( (!counter.get('Dark') && !abilities.has('Protean')) || (moves.has('pursuit') && species.types.length > 1 && counter.get('Dark') === 1) @@ -188,7 +189,7 @@ export class RandomGen7Teams extends RandomGen8Teams { (move.id === 'bulkup' && hasRestTalk) || (move.id === 'bellydrum' && !abilities.has('Unburden') && !counter.get('priority')) ), isSetup: true}; - case 'calmmind': case 'geomancy': case 'nastyplot': case 'quiverdance': case 'tailglow': + case 'calmmind': case 'geomancy': case 'nastyplot': case 'tailglow': if (types.has('Dark') && moves.has('darkpulse')) { counter.setupType = 'Special'; return {cull: false, isSetup: true}; @@ -1132,7 +1133,7 @@ export class RandomGen7Teams extends RandomGen8Teams { } const singlesEnforcement = ( - !['judgment', 'lightscreen', 'reflect', 'sleeptalk', 'toxic'].includes(moveid) && ( + !['judgment', 'lightscreen', 'quiverdance', 'reflect', 'sleeptalk', 'toxic'].includes(moveid) && ( move.category !== 'Status' || // should allow Meganium to cull a recovery move for the sake of STAB !(move.flags.heal && species.id !== 'meganium') @@ -1173,7 +1174,9 @@ export class RandomGen7Teams extends RandomGen8Teams { movePool.includes('milkdrink') || movePool.includes('shoreup') || (movePool.includes('moonlight') && types.size < 2) || - (movePool.includes('stickyweb') && !counter.setupType && !teamDetails.stickyWeb) + (movePool.includes('stickyweb') && !counter.setupType && !teamDetails.stickyWeb) || + (movePool.includes('quiverdance') && ['defog', 'uturn', 'stickyweb'].every(m => !moves.has(m)) && + counter.get('Special') < 4) ) || ( isLead && movePool.includes('stealthrock') &&