From fc23103de13a64a5c070aba37ac16c87fd32387b Mon Sep 17 00:00:00 2001 From: Sergio Garcia <47090312+singiamtel@users.noreply.github.com> Date: Mon, 14 Apr 2025 08:59:36 +0200 Subject: [PATCH] Fix random typos (#11020) --- PROTOCOL.md | 4 ++-- config/formats.ts | 2 +- data/mods/gen1/README.md | 2 +- data/mods/gen3/rulesets.ts | 2 +- data/mods/gen9dlc1/abilities.ts | 2 +- data/rulesets.ts | 2 +- lib/repl.ts | 2 +- server/chat-commands/core.ts | 2 +- server/chat-plugins/COMMANDS.md | 2 +- server/chat-plugins/datasearch.ts | 18 +++++++++--------- server/chat-plugins/helptickets.ts | 6 +++--- server/chat-plugins/mafia.ts | 18 +++++++++--------- server/chat-plugins/suspect-tests.ts | 2 +- sim/SIM-PROTOCOL.md | 4 ++-- sim/side.ts | 2 +- sim/state.ts | 4 ++-- sim/team-validator.ts | 6 +++--- sim/tools/exhaustive-runner.ts | 2 +- test/server/punishments.js | 8 ++++---- test/sim/abilities/neutralizinggas.js | 2 +- test/sim/decisions.js | 2 +- test/sim/misc/hazards.js | 2 +- test/sim/misc/ogerpon.js | 2 +- test/sim/misc/prng.js | 22 +++++++++++----------- test/sim/moves/acupressure.js | 4 ++-- test/sim/moves/curse.js | 2 +- test/sim/moves/followme.js | 2 +- test/sim/moves/healblock.js | 2 +- test/sim/moves/substitute.js | 4 ++-- tools/simulate/README.md | 4 ++-- 30 files changed, 69 insertions(+), 69 deletions(-) diff --git a/PROTOCOL.md b/PROTOCOL.md index 277b1a1c5a..2d44c2136b 100644 --- a/PROTOCOL.md +++ b/PROTOCOL.md @@ -144,7 +144,7 @@ represented by a space), and the rest of the string being their username. `|uhtml|NAME|HTML` -> We recieved an HTML message (NAME) that can change what it's displaying, +> We received an HTML message (NAME) that can change what it's displaying, > this is used in things like our Polls system, for example. `|uhtmlchange|NAME|HTML` @@ -305,7 +305,7 @@ represented by a space), and the rest of the string being their username. `|tournament|update|JSON` > `JSON` is a JSON object representing the changes in the tournament -> since the last update you recieved or the start of the tournament. +> since the last update you received or the start of the tournament. > These include: > format: the tournament's custom name or the format being used diff --git a/config/formats.ts b/config/formats.ts index 40cc0f7527..684584b70d 100644 --- a/config/formats.ts +++ b/config/formats.ts @@ -2783,7 +2783,7 @@ export const Formats: import('../sim/dex-formats').FormatList = [ if (this.dex.species.get(name).exists || this.dex.moves.get(name).exists || this.dex.abilities.get(name).exists || name === 'blitz') { // Certain pokemon have volatiles named after their id - // To prevent overwriting those, and to prevent accidentaly leaking + // To prevent overwriting those, and to prevent accidentally leaking // that a pokemon is on a team through the onStart even triggering // at the start of a match, users with pokemon names will need their // statuses to end in "user". diff --git a/data/mods/gen1/README.md b/data/mods/gen1/README.md index 1b6ad07804..a4481e0393 100644 --- a/data/mods/gen1/README.md +++ b/data/mods/gen1/README.md @@ -10,7 +10,7 @@ There were only 151 Pokémon plus MissingNo, just a handful of moves, no abiliti EVd to the max and we had some kind of different IVs, which maxed at 15 and every point gave 2 to the stat, so in a similar fashion, Pokes used to have 30 IVs on each stat. -The following sources have been used and extremly useful when developing this mod: +The following sources have been used and extremely useful when developing this mod: https://raw.github.com/po-devs/pokemon-online/master/bin/database/rby-stuff.txt https://www.smogon.com/rb/articles/differences https://www.smogon.com/forums/threads/past-gens-research-thread.3506992/#post-5878612 diff --git a/data/mods/gen3/rulesets.ts b/data/mods/gen3/rulesets.ts index 1f10237c4b..28e97f7d49 100644 --- a/data/mods/gen3/rulesets.ts +++ b/data/mods/gen3/rulesets.ts @@ -2,7 +2,7 @@ export const Rulesets: import('../../../sim/dex-formats').ModdedFormatDataTable standard: { effectType: 'ValidatorRule', name: 'Standard', - desc: "The standard ruleset for all offical Smogon singles tiers (Ubers, OU, etc.)", + desc: "The standard ruleset for all official Smogon singles tiers (Ubers, OU, etc.)", ruleset: ['Obtainable', 'Sleep Clause Mod', 'Switch Priority Clause Mod', 'Species Clause', 'Nickname Clause', 'OHKO Clause', 'Evasion Items Clause', 'Evasion Moves Clause', 'Endless Battle Clause', 'HP Percentage Mod', 'Cancel Mod'], }, }; diff --git a/data/mods/gen9dlc1/abilities.ts b/data/mods/gen9dlc1/abilities.ts index c1d4999a78..4f06cf465d 100644 --- a/data/mods/gen9dlc1/abilities.ts +++ b/data/mods/gen9dlc1/abilities.ts @@ -14,7 +14,7 @@ export const Abilities: import('../../../sim/dex-abilities').ModdedAbilityDataTa if (this.field.isWeather('sunnyday')) { pokemon.addVolatile('protosynthesis'); } else if (!pokemon.volatiles['protosynthesis']?.fromBooster && this.field.weather !== 'sunnyday') { - // Protosynthesis will not deactivite if Sun is suppressed, hence the direct ID check (isWeather respects supression) + // Protosynthesis will not deactivite if Sun is suppressed, hence the direct ID check (isWeather respects suppression) pokemon.removeVolatile('protosynthesis'); } }, diff --git a/data/rulesets.ts b/data/rulesets.ts index 1e9b1956cd..61c43c78d4 100644 --- a/data/rulesets.ts +++ b/data/rulesets.ts @@ -19,7 +19,7 @@ export const Rulesets: import('../sim/dex-formats').FormatDataTable = { standard: { effectType: 'ValidatorRule', name: 'Standard', - desc: "The standard ruleset for all offical Smogon singles tiers (Ubers, OU, etc.)", + desc: "The standard ruleset for all official Smogon singles tiers (Ubers, OU, etc.)", ruleset: [ 'Standard AG', 'Sleep Clause Mod', 'Species Clause', 'Nickname Clause', 'OHKO Clause', 'Evasion Items Clause', 'Evasion Moves Clause', diff --git a/lib/repl.ts b/lib/repl.ts index 24f47c9aac..961c8eb41c 100644 --- a/lib/repl.ts +++ b/lib/repl.ts @@ -97,7 +97,7 @@ export const Repl = new class { /** * Starts a REPL server, using a UNIX socket for IPC. The eval function - * parametre is passed in because there is no other way to access a file's + * parameter is passed in because there is no other way to access a file's * non-global context. */ start(filename: string, evalFunction: (input: string) => any) { diff --git a/server/chat-commands/core.ts b/server/chat-commands/core.ts index 9a9a530a5e..1eefe1a285 100644 --- a/server/chat-commands/core.ts +++ b/server/chat-commands/core.ts @@ -145,7 +145,7 @@ export const crqHandlers: { [k: string]: Chat.CRQHandler } = { return targetRoom.battle.format; }, cmdsearch(target, user, trustable) { - // in no world should ths be a thing. our longest command name is 37 chars + // in no world should this be a thing. our longest command name is 37 chars if (target.length > 40) return null; const cmdPrefix = target.charAt(0); if (!['/', '!'].includes(cmdPrefix)) return null; diff --git a/server/chat-plugins/COMMANDS.md b/server/chat-plugins/COMMANDS.md index 278ebed3c3..bbc8b4c8e3 100644 --- a/server/chat-plugins/COMMANDS.md +++ b/server/chat-plugins/COMMANDS.md @@ -87,7 +87,7 @@ As an example: Plines ------------------------------------------------------------------------ -A lot of the functions refering "plines". A pline is a protocol line, +A lot of the functions referring "plines". A pline is a protocol line, documented in [PROTOCOL.md][https://github.com/smogon/pokemon-showdown/blob/master/PROTOCOL.md] Plines are the ones that usually start with `|MESSAGETYPE|`, but a pline diff --git a/server/chat-plugins/datasearch.ts b/server/chat-plugins/datasearch.ts index 7d99332af1..cb5776c7ce 100644 --- a/server/chat-plugins/datasearch.ts +++ b/server/chat-plugins/datasearch.ts @@ -752,9 +752,9 @@ function runDexsearch(target: string, cmd: string, message: string, isTest: bool if (g === undefined) continue; if (tierTraits.includes(cat) && tierInequalitySearch) continue; if (cat === 'stats') { - const ineqality = param.split(','); - const result = validStatInequality(group['stats'], ineqality[0], - ineqality[1] as Direction, ineqality[2], +ineqality[3], input); + const inequality = param.split(','); + const result = validStatInequality(group['stats'], inequality[0], + inequality[1] as Direction, inequality[2], +inequality[3], input); if (!result) continue; return result; } @@ -789,7 +789,7 @@ function runDexsearch(target: string, cmd: string, message: string, isTest: bool // Skip over combined inequality operations because they present separately. if (gEquality && !(input.search(/([><]{1}=)/) >= 0 || gInclusiveIneq)) { - return `The search already included '${input}' or another inequality which makes it redunant.`; + return `The search already included '${input}' or another inequality which makes it redundant.`; } else if (compareTo === 'numeric') { if ((greater && ((inclusiveGreater && value < +greater) || (!inclusiveGreater && value <= +greater))) || (less && ((inclusiveLess && value > +less) || (!inclusiveLess && value >= +less)))) { @@ -807,7 +807,7 @@ function runDexsearch(target: string, cmd: string, message: string, isTest: bool const checkEquality = input.includes('=') && gEquality; if (gValue || inverseSwapValue) { - return `The search already included '${input}' or another inequality which makes it redunant.`; + return `The search already included '${input}' or another inequality which makes it redundant.`; } else if (compareTo === 'numeric' && (inverseValue || gEquality)) { const result = value - Number(inverseValue || gEquality); if ((direction === 'greater' && ((checkEquality && result > 0) || (!checkEquality && result >= 0))) || @@ -874,8 +874,8 @@ function runDexsearch(target: string, cmd: string, message: string, isTest: bool tierSearch = tierSearch || !isNotSearch; if (isTierInequalityParam) { const tierValue = singlesTiersValues[target]; - const entires = Object.entries(singlesTiersValues); - for (const [key, value] of entires) { + const entries = Object.entries(singlesTiersValues); + for (const [key, value] of entries) { const useTier = (value > tierValue && tierInequality[0]) || (value < tierValue && !tierInequality[0]); if (useTier && (!key.startsWith('CAP') || capSearch)) { orGroup.tiers[key] = true; @@ -896,8 +896,8 @@ function runDexsearch(target: string, cmd: string, message: string, isTest: bool tierSearch = tierSearch || !isNotSearch; if (isTierInequalityParam) { const tierValue = doublesTiersValues[target]; - const entires = Object.entries(doublesTiersValues); - for (const [key, value] of entires) { + const entries = Object.entries(doublesTiersValues); + for (const [key, value] of entries) { if ((value > tierValue && tierInequality[0]) || (value < tierValue && !tierInequality[0])) { orGroup.doublesTiers[key] = true; } else if (tierValue === value && tierInequality[1]) { diff --git a/server/chat-plugins/helptickets.ts b/server/chat-plugins/helptickets.ts index 768a1b0cf2..7ab23cfa52 100644 --- a/server/chat-plugins/helptickets.ts +++ b/server/chat-plugins/helptickets.ts @@ -165,7 +165,7 @@ async function convertRoomPunishments() { } export function writeStats(line: string) { - // ticketType\ttotalTime\ttimeToFirstClaim\tinactiveTime\tresolution\tresult\tstaff,userids,seperated,with,commas + // ticketType\ttotalTime\ttimeToFirstClaim\tinactiveTime\tresolution\tresult\tstaff,userids,separated,with,commas const date = new Date(); const month = Chat.toTimestamp(date).split(' ')[0].split('-', 2).join('-'); try { @@ -442,7 +442,7 @@ export class HelpTicket extends Rooms.SimpleRoomGame { involvedStaff = Array.from(this.involvedStaff.entries()).map(s => s[0]).join(','); } // Write to TSV - // ticketType\ttotalTime\ttimeToFirstClaim\tinactiveTime\tresolution\tresult\tstaff,userids,seperated,with,commas + // ticketType\ttotalTime\ttimeToFirstClaim\tinactiveTime\tresolution\tresult\tstaff,userids,separated,with,commas const line = `${this.ticket.type}\t${(this.closeTime - this.createTime)}\t${firstClaimWait}\t${this.unclaimedTime}\t${this.resolution}\t${this.result}\t${involvedStaff}`; writeStats(line); } @@ -2523,7 +2523,7 @@ export const commands: Chat.ChatCommands = { if (tarUser) { HelpTicket.notifyResolved(tarUser, ticket, ticketId); } - // ticketType\ttotalTime\ttimeToFirstClaim\tinactiveTime\tresolution\tresult\tstaff,userids,seperated,with,commas + // ticketType\ttotalTime\ttimeToFirstClaim\tinactiveTime\tresolution\tresult\tstaff,userids,separated,with,commas writeStats(`${ticket.type}\t${Date.now() - ticket.created}\t0\t0\tresolved\tvalid\t${user.id}`); this.popupReply(`You resolved ${ticketId}'s ticket.`); await HelpTicket.modlog({ diff --git a/server/chat-plugins/mafia.ts b/server/chat-plugins/mafia.ts index c4575f4d2c..2eb391045c 100644 --- a/server/chat-plugins/mafia.ts +++ b/server/chat-plugins/mafia.ts @@ -405,7 +405,7 @@ class Mafia extends Rooms.RoomGame { this.roles.push(player.role); this.played.push(player.id); } else { - // TODO improve reseting roles + // TODO improve resetting roles this.originalRoles = []; this.originalRoleString = ''; this.roles = []; @@ -1854,7 +1854,7 @@ class Mafia extends Rooms.RoomGame { this.sendHTML(this.roomWindow()); this.updatePlayers(); if (this.room.roomid === 'mafia' && this.started) { - // Intead of using this.played, which shows players who have subbed out as well + // Instead of using this.played, which shows players who have subbed out as well // We check who played through to the end when recording playlogs const played = this.players.map(p => p.id); const month = new Date().toLocaleString("en-us", { month: "numeric", year: "numeric" }); @@ -2111,12 +2111,12 @@ export const pages: Chat.PageTable = { } buf += `

How to setup roles`; buf += `

Setting the roles

`; - buf += `

To set the roles, use /mafia setroles [comma seperated list of roles] OR /mafia setroles [theme] in ${room.title}.

`; + buf += `

To set the roles, use /mafia setroles [comma separated list of roles] OR /mafia setroles [theme] in ${room.title}.

`; buf += `

If you set the roles from a theme, the role parser will get all the correct roles for you. (Not all themes are supported).

`; buf += `

The following key words determine a role's alignment (If none are found, the default alignment is town):

`; buf += `

${Object.values(MafiaData.alignments).map(a => `${a.name}`).join(', ')}

`; buf += `

Please note that anything inside (parentheses) is ignored by the role parser.

`; - buf += `

If you have roles that have conflicting alignments or base roles, you can use /mafia forcesetroles [comma seperated list of roles] to forcibly set the roles.

`; + buf += `

If you have roles that have conflicting alignments or base roles, you can use /mafia forcesetroles [comma separated list of roles] to forcibly set the roles.

`; buf += `

Please note that you will have to PM all the players their alignment, partners (if any), and other information about their role because the server will not provide it.

`; buf += `

`; buf += `

Players who will be subbed unless they talk: ${game.hostRequestedSub.join(', ')}

`; @@ -3461,7 +3461,7 @@ export const commands: Chat.ChatCommands = { this.modlog('MAFIASUBHOST', targetUser, `replacing ${oldHostid}`, { noalts: true, noip: true }); } }, - subhosthelp: [`/mafia subhost [user] - Substitues the user as the new game host.`], + subhosthelp: [`/mafia subhost [user] - Substitutes the user as the new game host.`], cohosthelp: [ `/mafia cohost [user] - Adds the user as a cohost. Cohosts can talk during the game, as well as perform host actions.`, ], @@ -4113,7 +4113,7 @@ export const commands: Chat.ChatCommands = { `/mafia players - Display the current list of players, will highlight players.`, `/mafia [rl|orl] - Display the role list or the original role list for the current game.`, `/mafia data [alignment|role|modifier|theme|term] - Get information on a mafia alignment, role, modifier, theme, or term.`, - `/mafia subhost [user] - Substitues the user as the new game host. Requires % @ # ~`, + `/mafia subhost [user] - Substitutes the user as the new game host. Requires % @ # ~`, `/mafia (un)cohost [user] - Adds/removes the user as a cohost. Cohosts can talk during the game, as well as perform host actions. Requires % @ # ~`, `/mafia [enable|disable] - Enables/disables mafia in this room. Requires # ~`, ].join('
'); @@ -4143,8 +4143,8 @@ export const commands: Chat.ChatCommands = { `/mafia votelock [on|off] - Allows or disallows players to change their vote. Requires host % @ # ~`, `/mafia voting [on|off] - Allows or disallows voting. Requires host % @ # ~`, `/mafia forcevote [yes/no] - Forces players' votes onto themselves, and prevents unvoting. Requires host % @ # ~`, - `/mafia setroles [comma seperated roles] - Set the roles for a game of mafia. You need to provide one role per player. Requires host % @ # ~`, - `/mafia forcesetroles [comma seperated roles] - Forcibly set the roles for a game of mafia. No role PM information or alignment will be set. Requires host % @ # ~`, + `/mafia setroles [comma separated roles] - Set the roles for a game of mafia. You need to provide one role per player. Requires host % @ # ~`, + `/mafia forcesetroles [comma separated roles] - Forcibly set the roles for a game of mafia. No role PM information or alignment will be set. Requires host % @ # ~`, `/mafia start - Start the game of mafia. Signups must be closed. Requires host % @ # ~`, `/mafia [day|night] - Move to the next game day or night. Requires host % @ # ~`, `/mafia extend (minutes) - Return to the previous game day. If (minutes) is provided, set the deadline for (minutes) minutes. Requires host % @ # ~`, @@ -4162,7 +4162,7 @@ export const commands: Chat.ChatCommands = { `/mafia (un)[priest|actor] [player] - Makes [player] a priest (can't hammer) or actor (can only hammer). Requires host % @ # ~`, `/mafia deadline [minutes|off] - Sets or removes the deadline for the game. Cannot be more than 20 minutes.`, `/mafia sub next, [player] - Forcibly sub [player] out of the game. Requires host % @ # ~`, - `/mafia sub remove, [user] - Forcibly remove [user] from the sublist. Requres host % @ # ~`, + `/mafia sub remove, [user] - Forcibly remove [user] from the sublist. Requires host % @ # ~`, `/mafia sub unrequest, [player] - Remove's a player's request to sub out of the game. Requires host % @ # ~`, `/mafia sub [player], [user] - Forcibly sub [player] for [user]. Requires host % @ # ~`, `/mafia autosub [yes|no] - Sets if players will automatically sub out if a user is on the sublist. Defaults to yes. Requires host % @ # ~`, diff --git a/server/chat-plugins/suspect-tests.ts b/server/chat-plugins/suspect-tests.ts index f46d7fca6d..63e8875035 100644 --- a/server/chat-plugins/suspect-tests.ts +++ b/server/chat-plugins/suspect-tests.ts @@ -276,7 +276,7 @@ export const commands: Chat.ChatCommands = { `/suspects: displays currently running suspect tests.
` + `/suspects add [tier], [suspect], [date], [...reqs]: adds a suspect test. Date in the format MM/DD. ` + `Reqs in the format [key]=[value], where valid keys are 'coil', 'elo', and 'gxe', delimited by commas. At least one is required.
` + - `(note that if you are using COIL, you must set a B value indepedently with /suspects setcoil). Requires: ~
` + + `(note that if you are using COIL, you must set a B value independently with /suspects setcoil). Requires: ~
` + `/suspects remove [tier]: deletes a suspect test. Requires: ~
` + `/suspects whitelist [username]: allows [username] to add suspect tests. Requires: ~
` + `/suspects unwhitelist [username]: disallows [username] from adding suspect tests. Requires: ~
` + diff --git a/sim/SIM-PROTOCOL.md b/sim/SIM-PROTOCOL.md index 964c5962fe..63105fd682 100644 --- a/sim/SIM-PROTOCOL.md +++ b/sim/SIM-PROTOCOL.md @@ -156,7 +156,7 @@ The beginning of a battle will look something like this: `|t:|TIMESTAMP` > The current UNIX timestamp (the number of seconds since 1970) - useful for determining -> when events occured in real time. +> when events occurred in real time. ### Identifying Pokémon @@ -316,7 +316,7 @@ stat boosts are minor actions. `|-fail|POKEMON|ACTION` -> The specified `ACTION` has failed against the `POKEMON` targetted. The +> The specified `ACTION` has failed against the `POKEMON` targeted. The > `ACTION` in question should be a move that fails due to its own mechanics. > Moves (or effect activations) that fail because they're blocked by another > effect should use `-block` instead. diff --git a/sim/side.ts b/sim/side.ts index 6ee05b1201..59b4df7940 100644 --- a/sim/side.ts +++ b/sim/side.ts @@ -619,7 +619,7 @@ export class Side { if (maxMove) targetType = this.battle.dex.moves.get(maxMove).target; - // Validate targetting + // Validate targeting if (autoChoose) { targetLoc = 0; diff --git a/sim/state.ts b/sim/state.ts index 3f5bacf320..0a80fde767 100644 --- a/sim/state.ts +++ b/sim/state.ts @@ -154,7 +154,7 @@ export const State = new class { return battle; } - // Direct comparsions of serialized state will be flakey as the timestamp + // Direct comparisons of serialized state will be flakey as the timestamp // protocol message |t:| can diverge between two different runs over the same state. // State must first be normalized before it is comparable. normalize(state: AnyObject) { @@ -256,7 +256,7 @@ export const State = new class { // Simply looking for a 'hit' field to determine if an object is an ActiveMove or not seems // pretty fragile, but its no different than what the simulator is doing. We go further and - // also check if the object has an 'id', as that's what we will intrepret as the Move. + // also check if the object has an 'id', as that's what we will interpret as the Move. isActiveMove(obj: AnyObject): obj is ActiveMove { return obj.hasOwnProperty('hit') && (obj.hasOwnProperty('id') || obj.hasOwnProperty('move')); } diff --git a/sim/team-validator.ts b/sim/team-validator.ts index 6300069893..c427ca106e 100644 --- a/sim/team-validator.ts +++ b/sim/team-validator.ts @@ -559,7 +559,7 @@ export class TeamValidator { let species = dex.species.get(set.species); set.species = species.name; - // Backwards compatability with old Gmax format + // Backwards compatibility with old Gmax format if (set.species.toLowerCase().endsWith('-gmax') && this.format.id !== 'gen8megamax') { set.species = set.species.slice(0, -5); species = dex.species.get(set.species); @@ -2311,7 +2311,7 @@ export class TeamValidator { return problems; } /** - * Returns a list of problems regarding a Pokemon's avilability in Pokemon GO (empty list if no problems) + * Returns a list of problems regarding a Pokemon's availability in Pokemon GO (empty list if no problems) * If the Pokemon cannot be obtained from Pokemon GO, returns null */ validatePokemonGo( @@ -2594,7 +2594,7 @@ export class TeamValidator { const ability = dex.abilities.get(set.ability); if (dex.gen < 6 && ability.gen > learnedGen && !checkingPrevo) { - // You can evolve a transfered mon to reroll for its new Ability. + // You can evolve a transferred mon to reroll for its new Ability. cantLearnReason = `is learned in gen ${learnedGen}, but the Ability ${ability.name} did not exist then.`; continue; } diff --git a/sim/tools/exhaustive-runner.ts b/sim/tools/exhaustive-runner.ts index 185a30aa11..db239828ae 100644 --- a/sim/tools/exhaustive-runner.ts +++ b/sim/tools/exhaustive-runner.ts @@ -180,7 +180,7 @@ export class ExhaustiveRunner { // validation). Coordinates with the CoordinatedPlayerAI below through Pools to ensure as // many different options as possible get exercised in battle. class TeamGenerator { - // By default, the TeamGenerator generates sets completely at random which unforunately means + // By default, the TeamGenerator generates sets completely at random which unfortunately means // certain signature combinations (eg. Mega Stone/Z Moves which only work for specific Pokemon) // are unlikely to be chosen. To combat this, we keep a mapping of these combinations and some // fraction of the time when we are generating sets for these particular Pokemon we give them diff --git a/test/server/punishments.js b/test/server/punishments.js index b88a255434..81ad8c9ee9 100644 --- a/test/server/punishments.js +++ b/test/server/punishments.js @@ -124,13 +124,13 @@ describe('broader, more integrated Punishments tests', function () { const initialLogLength = this.room.log.log.length; await this.parse("Hi! I'm a locked user!"); - assert.equal(this.room.log.log.length, initialLogLength, `user should be unable to sucessfully chat while locked`); + assert.equal(this.room.log.log.length, initialLogLength, `user should be unable to successfully chat while locked`); Punishments.unlock(this.user.id); await this.parse("/msgroom lobby,Hi! I'm no longer locked!"); // we can't just check the roomlog length because unlocking adds a |n| message to const lastMessage = this.room.log.log.pop(); - assert(lastMessage.endsWith(` Lock Me Please|Hi! I'm no longer locked!`), `user should have sucessfuly sent a message after being locked`); + assert(lastMessage.endsWith(` Lock Me Please|Hi! I'm no longer locked!`), `user should have successfully sent a message after being locked`); }); // This test relies on Chat#parse returning `false` when permission is denied. @@ -138,13 +138,13 @@ describe('broader, more integrated Punishments tests', function () { // an `ErrorMessage` is the only time `false` will be returned by Chat#parse (unless a chat command returns it, which /msg does not). // If you are here because this test is failing, check if the above assumptions are still valid. // If they are not, the test should either be refactored to use another way of - // determining whether a PM was sucessful (such as modifying Chat.sendPM), or skipped entirely. + // determining whether a PM was successful (such as modifying Chat.sendPM), or skipped entirely. it('should prevent users from sending PMs other than to staff while they are locked', async () => { makeUser("Some Random Reg", '127.0.0.4'); makeUser("Annika", '127.0.0.5').tempGroup = '~'; let result = await this.parse("/msg Some Random Reg, Hi! I'm a locked user!"); - assert.equal(result, false, `user should be unable to sucessfully send PMs while locked`); + assert.equal(result, false, `user should be unable to successfully send PMs while locked`); result = await this.parse("/msg Annika, Hi! I'm a locked user!"); assert.notEqual(result, false, `user should be able to send PMs to global staff while locked`); diff --git a/test/sim/abilities/neutralizinggas.js b/test/sim/abilities/neutralizinggas.js index 7f15832ea6..b3f543844c 100644 --- a/test/sim/abilities/neutralizinggas.js +++ b/test/sim/abilities/neutralizinggas.js @@ -49,7 +49,7 @@ describe('Neutralizing Gas', () => { assert.statStage(battle.p2.active[0], 'atk', -1); }); - it(`should negate abilites that activate on switch-out`, () => { + it(`should negate abilities that activate on switch-out`, () => { battle = common.createBattle([ [{ species: "Weezing", ability: 'neutralizinggas', moves: ['toxic'] }, { species: "Type: Null", ability: 'battlearmor', moves: ['facade'] }], diff --git a/test/sim/decisions.js b/test/sim/decisions.js index c4c0183a0b..65321ad3d9 100644 --- a/test/sim/decisions.js +++ b/test/sim/decisions.js @@ -608,7 +608,7 @@ describe('Choices', () => { assert(logText.includes(subString), `${logText} does not include ${subString}`); }); - it('should privately log the target of targetted chosen moves', () => { + it('should privately log the target of targeted chosen moves', () => { battle = common.createBattle({ gameType: 'doubles' }, [[ { species: "Bulbasaur", ability: 'overgrow', moves: ['tackle'] }, { species: "Ivysaur", ability: 'overgrow', moves: ['tackle'] }, diff --git a/test/sim/misc/hazards.js b/test/sim/misc/hazards.js index 321df8eff9..af6043e17a 100644 --- a/test/sim/misc/hazards.js +++ b/test/sim/misc/hazards.js @@ -22,7 +22,7 @@ describe('Hazards', () => { assert.false(battle.field.isTerrain('electricterrain')); }); - it(`should damage multiple Pokemon switching in simulatenously by Speed order`, () => { + it(`should damage multiple Pokemon switching in simultaneously by Speed order`, () => { battle = common.createBattle([[ { species: 'wynaut', moves: ['stealthrock', 'sleeptalk'] }, { species: 'kyogre', ability: 'drizzle', item: 'choicescarf', moves: ['sleeptalk'] }, diff --git a/test/sim/misc/ogerpon.js b/test/sim/misc/ogerpon.js index 842ae66296..7285a0d105 100644 --- a/test/sim/misc/ogerpon.js +++ b/test/sim/misc/ogerpon.js @@ -7,7 +7,7 @@ let battle; describe(`[Hackmons] Ogerpon`, () => { // https://www.smogon.com/forums/threads/scarlet-violet-battle-mechanics-research.3709545/post-9838633 - it(`should keep permanent abilites after Terastallizing until it switches out`, () => { + it(`should keep permanent abilities after Terastallizing until it switches out`, () => { battle = common.gen(9).createBattle([[ { species: 'ogerpon', ability: 'multitype', moves: ['sleeptalk'] }, { species: 'shedinja', moves: ['splash'] }, diff --git a/test/sim/misc/prng.js b/test/sim/misc/prng.js index b8941def18..5441c38e5a 100644 --- a/test/sim/misc/prng.js +++ b/test/sim/misc/prng.js @@ -121,28 +121,28 @@ describe(`PRNG`, () => { }); it(`should return items with equal probability for a five-item array`, () => { const items = ['a', 'b', 'c', 'd', 'e']; - const occurences = { a: 0, b: 0, c: 0, d: 0, e: 0 }; + const occurrences = { a: 0, b: 0, c: 0, d: 0, e: 0 }; const prng = new PRNG(testSeed); for (let i = 0; i < 1000; ++i) { const sample = prng.sample(items); - occurences[sample] += 1; + occurrences[sample] += 1; } - assert.bounded(occurences.a, [170, 230]); - assert.bounded(occurences.b, [170, 230]); - assert.bounded(occurences.c, [170, 230]); - assert.bounded(occurences.d, [170, 230]); - assert.bounded(occurences.e, [170, 230]); + assert.bounded(occurrences.a, [170, 230]); + assert.bounded(occurrences.b, [170, 230]); + assert.bounded(occurrences.c, [170, 230]); + assert.bounded(occurrences.d, [170, 230]); + assert.bounded(occurrences.e, [170, 230]); }); it(`should return items with weighted probability for a three-item array with duplicates`, () => { const items = ['x', 'x', 'y']; - const occurences = { x: 0, y: 0 }; + const occurrences = { x: 0, y: 0 }; const prng = new PRNG(testSeed); for (let i = 0; i < 100; ++i) { const sample = prng.sample(items); - occurences[sample] += 1; + occurrences[sample] += 1; } - assert.bounded(occurences.x, [63, 71]); - assert.bounded(occurences.y, [29, 37]); + assert.bounded(occurrences.x, [63, 71]); + assert.bounded(occurrences.y, [29, 37]); }); it(`should be identical to array[random(array.length)]`, () => { // This invariant is important for battle logs. diff --git a/test/sim/moves/acupressure.js b/test/sim/moves/acupressure.js index 9e6f38bfe0..dfe300070f 100644 --- a/test/sim/moves/acupressure.js +++ b/test/sim/moves/acupressure.js @@ -39,7 +39,7 @@ describe('Acupressure', () => { }); // https://www.smogon.com/forums/threads/acupressure-targeting.3733779/post-9920405 - it(`should redirect to the user if a targetted ally faints`, () => { + it(`should redirect to the user if a targeted ally faints`, () => { battle = common.createBattle({ gameType: 'doubles' }, [[ { species: 'Pincurchin', moves: ['acupressure'] }, { species: 'Flutter Mane', moves: ['memento'] }, @@ -54,7 +54,7 @@ describe('Acupressure', () => { assert(Object.values(battle.p1.active[0].boosts).some(n => n === 2)); }); - it(`in Gen 5, should not redirect to the uesr if a targetted ally faints`, () => { + it(`in Gen 5, should not redirect to the uesr if a targeted ally faints`, () => { battle = common.gen(5).createBattle({ gameType: 'doubles' }, [[ { species: 'Shuckle', moves: ['acupressure'] }, { species: 'Dugtrio', moves: ['memento'] }, diff --git a/test/sim/moves/curse.js b/test/sim/moves/curse.js index 8afc1675ae..c642812ac7 100644 --- a/test/sim/moves/curse.js +++ b/test/sim/moves/curse.js @@ -131,7 +131,7 @@ describe('Curse', () => { }); }); -describe('XY/ORAS Curse targetting when becoming Ghost the same turn', () => { +describe('XY/ORAS Curse targeting when becoming Ghost the same turn', () => { afterEach(() => { battle.destroy(); }); diff --git a/test/sim/moves/followme.js b/test/sim/moves/followme.js index 558eea2e05..398f99e535 100644 --- a/test/sim/moves/followme.js +++ b/test/sim/moves/followme.js @@ -34,7 +34,7 @@ describe('Follow Me', () => { assert.equal(hitCount, 2); }); - it('should not redirect self-targetting moves', () => { + it('should not redirect self-targeting moves', () => { battle = common.createBattle({ gameType: 'doubles' }); battle.setPlayer('p1', { team: [ { species: 'Clefable', ability: 'unaware', moves: ['followme'] }, diff --git a/test/sim/moves/healblock.js b/test/sim/moves/healblock.js index 0d7c1fffd6..33cbf9e5c0 100644 --- a/test/sim/moves/healblock.js +++ b/test/sim/moves/healblock.js @@ -216,7 +216,7 @@ describe('Heal Block [Gen 4]', () => { assert.notEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp); }); - it('should fail indepedently on each target', () => { + it('should fail independently on each target', () => { battle = common.createBattle({ gameType: 'doubles' }, [[ { species: 'porygon2', moves: ['sleeptalk'] }, { species: 'marshadow', moves: ['sleeptalk'] }, diff --git a/test/sim/moves/substitute.js b/test/sim/moves/substitute.js index 19153637be..12544fb957 100644 --- a/test/sim/moves/substitute.js +++ b/test/sim/moves/substitute.js @@ -19,7 +19,7 @@ describe('Substitute', () => { assert.equal(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4)); }); - it('should not block the user\'s own moves from targetting itself', () => { + it('should not block the user\'s own moves from targeting itself', () => { battle = common.createBattle(); battle.setPlayer('p1', { team: [{ species: 'Mewtwo', ability: 'pressure', moves: ['substitute', 'calmmind'] }] }); battle.setPlayer('p2', { team: [{ species: 'Mewtwo', ability: 'pressure', moves: ['recover'] }] }); @@ -107,7 +107,7 @@ describe('Substitute', () => { assert.equal(battle.p2.active[0].hp - hp, Math.ceil(Math.floor(battle.p1.active[0].maxhp / 4) / 2)); }); - it('should block most status moves targetting the user', () => { + it('should block most status moves targeting the user', () => { battle = common.createBattle(); battle.setPlayer('p1', { team: [{ species: 'Mewtwo', ability: 'noguard', moves: ['substitute'] }] }); battle.setPlayer('p2', { team: [{ species: 'Mewtwo', ability: 'pressure', item: 'laggingtail', moves: ['hypnosis', 'toxic', 'poisongas', 'thunderwave', 'willowisp'] }] }); diff --git a/tools/simulate/README.md b/tools/simulate/README.md index 7a25db2e1a..d5baff19e1 100644 --- a/tools/simulate/README.md +++ b/tools/simulate/README.md @@ -49,7 +49,7 @@ games asynchronously. large performance benefits over the default sequential mode and may require additional memory. -**TODO**: Add support for running battles in `--parallel` on muliple cores with +**TODO**: Add support for running battles in `--parallel` on multiple cores with [`worker_threads`](https://nodejs.org/api/worker_threads.html). ## exhaustive @@ -74,4 +74,4 @@ likely to catch fire. - **`--forever`**: continue iterating through formats infinitely, exhausting each `--cycles` times. - **`--seed`**: PRNG seed to use (eg. `'1234,5678,9012,3456'`). -- **`--maxFailures`**: exit early if this many failures have occured. +- **`--maxFailures`**: exit early if this many failures have occurred.