{ "version": 3, "sources": ["../../../../../data/mods/gen7letsgo/random-teams.ts"], "sourcesContent": ["import type {PRNG} from '../../../sim';\r\nimport {MoveCounter, RandomGen8Teams, OldRandomBattleSpecies} from '../gen8/random-teams';\r\n\r\nexport class RandomLetsGoTeams extends RandomGen8Teams {\r\n\trandomData: {[species: string]: OldRandomBattleSpecies} = require('./random-data.json');\r\n\r\n\tconstructor(format: Format | string, prng: PRNG | PRNGSeed | null) {\r\n\t\tsuper(format, prng);\r\n\t\tthis.moveEnforcementCheckers = {\r\n\t\t\tDark: (movePool, moves, abilities, types, counter) => !counter.get('Dark'),\r\n\t\t\tDragon: (movePool, moves, abilities, types, counter) => !counter.get('Dragon'),\r\n\t\t\tElectric: (movePool, moves, abilities, types, counter) => !counter.get('Electric'),\r\n\t\t\tFighting: (movePool, moves, abilities, types, counter) => (\r\n\t\t\t\t!counter.get('Fighting') && (!!counter.setupType || !counter.get('Status'))\r\n\t\t\t),\r\n\t\t\tFire: (movePool, moves, abilities, types, counter) => !counter.get('Fire'),\r\n\t\t\tGhost: (movePool, moves, abilities, types, counter) => !types.has('Dark') && !counter.get('Ghost'),\r\n\t\t\tGround: (movePool, moves, abilities, types, counter) => !counter.get('Ground'),\r\n\t\t\tIce: (movePool, moves, abilities, types, counter) => !counter.get('Ice'),\r\n\t\t\tWater: (movePool, moves, abilities, types, counter) => !counter.get('Water') || !counter.get('stab'),\r\n\t\t};\r\n\t}\r\n\tshouldCullMove(\r\n\t\tmove: Move,\r\n\t\ttypes: Set,\r\n\t\tmoves: Set,\r\n\t\tabilities: Set,\r\n\t\tcounter: MoveCounter,\r\n\t\tmovePool: string[],\r\n\t\tteamDetails: RandomTeamsTypes.TeamDetails,\r\n\t): {cull: boolean, isSetup?: boolean} {\r\n\t\tswitch (move.id) {\r\n\t\t// Set up once and only if we have the moves for it\r\n\t\tcase 'bulkup': case 'swordsdance':\r\n\t\t\treturn {\r\n\t\t\t\tcull: (\r\n\t\t\t\t\tcounter.setupType !== 'Physical' ||\r\n\t\t\t\t\tcounter.get('physicalsetup') > 1 ||\r\n\t\t\t\t\tcounter.get('Physical') + counter.get('physicalpool') < 2\r\n\t\t\t\t),\r\n\t\t\t\tisSetup: true,\r\n\t\t\t};\r\n\t\tcase 'calmmind': case 'nastyplot': case 'quiverdance':\r\n\t\t\treturn {\r\n\t\t\t\tcull: (\r\n\t\t\t\t\tcounter.setupType !== 'Special' ||\r\n\t\t\t\t\tcounter.get('specialsetup') > 1 ||\r\n\t\t\t\t\tcounter.get('Special') + counter.get('specialpool') < 2\r\n\t\t\t\t),\r\n\t\t\t\tisSetup: true,\r\n\t\t\t};\r\n\t\tcase 'growth': case 'shellsmash':\r\n\t\t\treturn {\r\n\t\t\t\tcull: (\r\n\t\t\t\t\tcounter.setupType !== 'Mixed' ||\r\n\t\t\t\t\t(counter.damagingMoves.size + counter.get('physicalpool') + counter.get('specialpool')) < 2\r\n\t\t\t\t),\r\n\t\t\t\tisSetup: true,\r\n\t\t\t};\r\n\t\tcase 'agility':\r\n\t\t\treturn {\r\n\t\t\t\tcull: counter.damagingMoves.size < 2 && !counter.setupType,\r\n\t\t\t\tisSetup: !counter.setupType,\r\n\t\t\t};\r\n\r\n\t\t// Bad after setup\r\n\t\tcase 'dragontail':\r\n\t\t\treturn {cull: (\r\n\t\t\t\t!!counter.setupType || !!counter.get('speedsetup') || ['encore', 'roar', 'whirlwind'].some(m => moves.has(m))\r\n\t\t\t)};\r\n\t\tcase 'fakeout': case 'uturn': case 'teleport':\r\n\t\t\treturn {cull: !!counter.setupType || !!counter.get('speedsetup') || moves.has('substitute')};\r\n\t\tcase 'haze': case 'leechseed': case 'roar': case 'whirlwind':\r\n\t\t\treturn {cull: !!counter.setupType || !!counter.get('speedsetup') || moves.has('dragontail')};\r\n\t\tcase 'protect':\r\n\t\t\treturn {cull: !!counter.setupType || ['rest', 'lightscreen', 'reflect'].some(m => moves.has(m))};\r\n\t\tcase 'seismictoss':\r\n\t\t\treturn {cull: counter.damagingMoves.size > 1 || !!counter.setupType};\r\n\t\tcase 'stealthrock':\r\n\t\t\treturn {cull: !!counter.setupType || !!counter.get('speedsetup') || !!teamDetails.stealthRock};\r\n\r\n\t\t// Bit redundant to have both\r\n\t\tcase 'leechlife': case 'substitute':\r\n\t\t\treturn {cull: moves.has('uturn')};\r\n\t\tcase 'dragonpulse':\r\n\t\t\treturn {cull: moves.has('dragontail') || moves.has('outrage')};\r\n\t\tcase 'thunderbolt':\r\n\t\t\treturn {cull: moves.has('thunder')};\r\n\t\tcase 'flareblitz': case 'flamethrower':\r\n\t\t\treturn {cull: moves.has('fireblast') || moves.has('firepunch')};\r\n\t\tcase 'megadrain':\r\n\t\t\treturn {cull: moves.has('petaldance') || moves.has('powerwhip')};\r\n\t\tcase 'bonemerang':\r\n\t\t\treturn {cull: moves.has('earthquake')};\r\n\t\tcase 'icebeam':\r\n\t\t\treturn {cull: moves.has('blizzard')};\r\n\t\tcase 'rockslide':\r\n\t\t\treturn {cull: moves.has('stoneedge')};\r\n\t\tcase 'hydropump': case 'willowisp':\r\n\t\t\treturn {cull: moves.has('scald')};\r\n\t\tcase 'surf':\r\n\t\t\treturn {cull: moves.has('hydropump') || moves.has('scald')};\r\n\t\t}\r\n\r\n\t\t// Increased/decreased priority moves are unneeded with moves that boost only speed\r\n\t\tif (move.priority !== 0 && !!counter.get('speedsetup')) return {cull: true};\r\n\r\n\t\t// This move doesn't satisfy our setup requirements:\r\n\t\tif (\r\n\t\t\t(move.category === 'Physical' && counter.setupType === 'Special') ||\r\n\t\t\t(move.category === 'Special' && counter.setupType === 'Physical')\r\n\t\t) {\r\n\t\t\t// Reject STABs last in case the setup type changes later on\r\n\t\t\tif (!types.has(move.type) || counter.get('stab') > 1 || counter.get(move.category) < 2) return {cull: true};\r\n\t\t}\r\n\r\n\t\treturn {cull: false};\r\n\t}\r\n\trandomSet(species: string | Species, teamDetails: RandomTeamsTypes.TeamDetails = {}): RandomTeamsTypes.RandomSet {\r\n\t\tspecies = this.dex.species.get(species);\r\n\t\tlet forme = species.name;\r\n\r\n\t\tif (typeof species.battleOnly === 'string') {\r\n\t\t\t// Only change the forme. The species has custom moves, and may have different typing and requirements.\r\n\t\t\tforme = species.battleOnly;\r\n\t\t}\r\n\r\n\t\tconst data = this.randomData[species.id];\r\n\r\n\t\tconst movePool = (data.moves || Object.keys(this.dex.species.getLearnset(species.id)!)).slice();\r\n\t\tconst types = new Set(species.types);\r\n\r\n\t\tconst moves = new Set();\r\n\t\tlet counter;\r\n\r\n\t\tdo {\r\n\t\t\t// Choose next 4 moves from learnset/viable moves and add them to moves list:\r\n\t\t\twhile (moves.size < this.maxMoveCount && movePool.length) {\r\n\t\t\t\tconst moveid = this.sampleNoReplace(movePool);\r\n\t\t\t\tmoves.add(moveid);\r\n\t\t\t}\r\n\r\n\t\t\tcounter = this.queryMoves(moves, species.types, new Set(), movePool);\r\n\r\n\t\t\t// Iterate through the moves again, this time to cull them:\r\n\t\t\tfor (const moveid of moves) {\r\n\t\t\t\tconst move = this.dex.moves.get(moveid);\r\n\r\n\t\t\t\tlet {cull, isSetup} = this.shouldCullMove(move, types, moves, new Set(), counter, movePool, teamDetails);\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\t!isSetup &&\r\n\t\t\t\t\tcounter.setupType && counter.setupType !== 'Mixed' &&\r\n\t\t\t\t\tmove.category !== counter.setupType &&\r\n\t\t\t\t\tcounter.get(counter.setupType) < 2 && (\r\n\t\t\t\t\t\t// Mono-attacking with setup and RestTalk is allowed\r\n\t\t\t\t\t\t// Reject Status moves only if there is nothing else to reject\r\n\t\t\t\t\t\tmove.category !== 'Status' || (\r\n\t\t\t\t\t\t\tcounter.get(counter.setupType) + counter.get('Status') > 3 &&\r\n\t\t\t\t\t\t\tcounter.get('physicalsetup') + counter.get('specialsetup') < 2\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t)\r\n\t\t\t\t) {\r\n\t\t\t\t\tcull = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst moveIsRejectable = !move.damage && (move.category !== 'Status' || !move.flags.heal) && (\r\n\t\t\t\t\tmove.category === 'Status' ||\r\n\t\t\t\t\t!types.has(move.type) ||\r\n\t\t\t\t\tmove.selfSwitch ||\r\n\t\t\t\t\tmove.basePower && move.basePower < 40 && !move.multihit\r\n\t\t\t\t);\r\n\r\n\t\t\t\t// Pokemon should have moves that benefit their Type, as well as moves required by its forme\r\n\t\t\t\tif (moveIsRejectable && !cull && !isSetup && counter.get('physicalsetup') + counter.get('specialsetup') < 2 && (\r\n\t\t\t\t\t!counter.setupType || counter.setupType === 'Mixed' ||\r\n\t\t\t\t\t(move.category !== counter.setupType && move.category !== 'Status') ||\r\n\t\t\t\t\tcounter.get(counter.setupType) + counter.get('Status') > 3\r\n\t\t\t\t)) {\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t(counter.damagingMoves.size === 0 || !counter.get('stab')) &&\r\n\t\t\t\t\t\t(counter.get('physicalpool') || counter.get('specialpool'))\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tcull = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (const type of types) {\r\n\t\t\t\t\t\t\tif (this.moveEnforcementCheckers[type]?.(movePool, moves, new Set(), types, counter, species, teamDetails)) cull = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Remove rejected moves from the move list\r\n\t\t\t\tif (cull && movePool.length) {\r\n\t\t\t\t\tmoves.delete(moveid);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} while (moves.size < this.maxMoveCount && movePool.length);\r\n\r\n\t\tconst ivs = {hp: 31, atk: 31, def: 31, spa: 31, spd: 31, spe: 31};\r\n\t\t// Minimize confusion damage\r\n\t\tif (!counter.get('Physical') && !moves.has('transform')) ivs.atk = 0;\r\n\r\n\t\tconst requiredItem = species.requiredItem || (species.requiredItems ? this.sample(species.requiredItems) : null);\r\n\t\treturn {\r\n\t\t\tname: species.baseSpecies,\r\n\t\t\tspecies: forme,\r\n\t\t\tlevel: this.adjustLevel || 100,\r\n\t\t\tgender: species.gender,\r\n\t\t\thappiness: 70,\r\n\t\t\tshiny: this.randomChance(1, 1024),\r\n\t\t\titem: (requiredItem || ''),\r\n\t\t\tability: 'No Ability',\r\n\t\t\tevs: {hp: 20, atk: 20, def: 20, spa: 20, spd: 20, spe: 20},\r\n\t\t\tmoves: Array.from(moves),\r\n\t\t\tivs,\r\n\t\t};\r\n\t}\r\n\r\n\trandomTeam() {\r\n\t\tthis.enforceNoDirectCustomBanlistChanges();\r\n\r\n\t\tconst pokemon: RandomTeamsTypes.RandomSet[] = [];\r\n\r\n\t\tconst pokemonPool: string[] = [];\r\n\t\tfor (const id in this.dex.data.FormatsData) {\r\n\t\t\tconst species = this.dex.species.get(id);\r\n\t\t\tif (\r\n\t\t\t\tspecies.num < 1 ||\r\n\t\t\t\t(species.num > 151 && ![808, 809].includes(species.num)) ||\r\n\t\t\t\tspecies.gen > 7 ||\r\n\t\t\t\tspecies.nfe ||\r\n\t\t\t\t!this.randomData[species.id]?.moves ||\r\n\t\t\t\t(this.forceMonotype && !species.types.includes(this.forceMonotype))\r\n\t\t\t) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tpokemonPool.push(id);\r\n\t\t}\r\n\r\n\t\tconst typeCount: {[k: string]: number} = {};\r\n\t\tconst typeComboCount: {[k: string]: number} = {};\r\n\t\tconst baseFormes: {[k: string]: number} = {};\r\n\t\tconst teamDetails: RandomTeamsTypes.TeamDetails = {};\r\n\r\n\t\twhile (pokemonPool.length && pokemon.length < this.maxTeamSize) {\r\n\t\t\tconst species = this.dex.species.get(this.sampleNoReplace(pokemonPool));\r\n\t\t\tif (!species.exists) continue;\r\n\r\n\t\t\t// Limit to one of each species (Species Clause)\r\n\t\t\tif (baseFormes[species.baseSpecies]) continue;\r\n\r\n\t\t\tconst types = species.types;\r\n\r\n\t\t\t// Once we have 2 Pok\u00E9mon of a given type we reject more Pok\u00E9mon of that type 80% of the time\r\n\t\t\tlet skip = false;\r\n\t\t\tfor (const type of species.types) {\r\n\t\t\t\tif (typeCount[type] > 1 && this.randomChance(4, 5)) {\r\n\t\t\t\t\tskip = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (skip) continue;\r\n\r\n\t\t\t// Limit 1 of any type combination\r\n\t\t\tconst typeCombo = types.slice().sort().join();\r\n\t\t\tif (!this.forceMonotype && typeComboCount[typeCombo] >= 1) continue;\r\n\r\n\t\t\t// Okay, the set passes, add it to our team\r\n\t\t\tconst set = this.randomSet(species, teamDetails);\r\n\t\t\tpokemon.push(set);\r\n\r\n\t\t\t// Now that our Pokemon has passed all checks, we can increment our counters\r\n\t\t\tbaseFormes[species.baseSpecies] = 1;\r\n\r\n\t\t\t// Increment type counters\r\n\t\t\tfor (const type of types) {\r\n\t\t\t\tif (type in typeCount) {\r\n\t\t\t\t\ttypeCount[type]++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttypeCount[type] = 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (typeCombo in typeComboCount) {\r\n\t\t\t\ttypeComboCount[typeCombo]++;\r\n\t\t\t} else {\r\n\t\t\t\ttypeComboCount[typeCombo] = 1;\r\n\t\t\t}\r\n\r\n\t\t\t// Team details\r\n\t\t\tif (set.moves.includes('stealthrock')) teamDetails.stealthRock = 1;\r\n\t\t\tif (set.moves.includes('rapidspin')) teamDetails.rapidSpin = 1;\r\n\t\t}\r\n\t\treturn pokemon;\r\n\t}\r\n}\r\n\r\nexport default RandomLetsGoTeams;\r\n"], "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAmE;AAE5D,MAAM,0BAA0B,oCAAgB;AAAA,EAGtD,YAAY,QAAyB,MAA8B;AAClE,UAAM,QAAQ,IAAI;AAHnB,sBAA0D,QAAQ,oB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