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