diff --git a/src/data/abilities/ability.ts b/src/data/abilities/ability.ts index 81de278853f..0dd529cafbb 100644 --- a/src/data/abilities/ability.ts +++ b/src/data/abilities/ability.ts @@ -6444,23 +6444,23 @@ export class PostDamageForceSwitchAbAttr extends PostDamageAbAttr { public override canApply({ pokemon, source, damage }: PostDamageAbAttrParams): boolean { const moveHistory = pokemon.getMoveHistory(); // Will not activate when the Pokémon's HP is lowered by cutting its own HP - const fordbiddenAttackingMoves = [MoveId.BELLY_DRUM, MoveId.SUBSTITUTE, MoveId.CURSE, MoveId.PAIN_SPLIT]; + const forbiddenAttackingMoves = [MoveId.BELLY_DRUM, MoveId.SUBSTITUTE, MoveId.CURSE, MoveId.PAIN_SPLIT]; if (moveHistory.length > 0) { const lastMoveUsed = moveHistory[moveHistory.length - 1]; - if (fordbiddenAttackingMoves.includes(lastMoveUsed.move)) { + if (forbiddenAttackingMoves.includes(lastMoveUsed.move)) { return false; } } // Dragon Tail and Circle Throw switch out Pokémon before the Ability activates. - const fordbiddenDefendingMoves = [MoveId.DRAGON_TAIL, MoveId.CIRCLE_THROW]; + const forbiddenDefendingMoves = [MoveId.DRAGON_TAIL, MoveId.CIRCLE_THROW]; if (source) { const enemyMoveHistory = source.getMoveHistory(); if (enemyMoveHistory.length > 0) { const enemyLastMoveUsed = enemyMoveHistory[enemyMoveHistory.length - 1]; // Will not activate if the Pokémon's HP falls below half while it is in the air during Sky Drop. if ( - fordbiddenDefendingMoves.includes(enemyLastMoveUsed.move) || + forbiddenDefendingMoves.includes(enemyLastMoveUsed.move) || (enemyLastMoveUsed.move === MoveId.SKY_DROP && enemyLastMoveUsed.result === MoveResult.OTHER) ) { return false; diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index f5862242175..fe85e92772c 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -5206,38 +5206,38 @@ export abstract class Pokemon extends Phaser.GameObjects.Container { } } - updateFusionPalette(ignoreOveride?: boolean): void { - if (!this.getFusionSpeciesForm(ignoreOveride)) { + updateFusionPalette(ignoreOverride?: boolean): void { + if (!this.getFusionSpeciesForm(ignoreOverride)) { [this.getSprite(), this.getTintSprite()] .filter(s => !!s) .map(s => { - s.pipelineData[`spriteColors${ignoreOveride && this.summonData.speciesForm ? "Base" : ""}`] = []; - s.pipelineData[`fusionSpriteColors${ignoreOveride && this.summonData.speciesForm ? "Base" : ""}`] = []; + s.pipelineData[`spriteColors${ignoreOverride && this.summonData.speciesForm ? "Base" : ""}`] = []; + s.pipelineData[`fusionSpriteColors${ignoreOverride && this.summonData.speciesForm ? "Base" : ""}`] = []; }); return; } - const speciesForm = this.getSpeciesForm(ignoreOveride); - const fusionSpeciesForm = this.getFusionSpeciesForm(ignoreOveride); + const speciesForm = this.getSpeciesForm(ignoreOverride); + const fusionSpeciesForm = this.getFusionSpeciesForm(ignoreOverride); const spriteKey = speciesForm.getSpriteKey( - this.getGender(ignoreOveride) === Gender.FEMALE, + this.getGender(ignoreOverride) === Gender.FEMALE, speciesForm.formIndex, this.shiny, this.variant, ); const backSpriteKey = speciesForm - .getSpriteKey(this.getGender(ignoreOveride) === Gender.FEMALE, speciesForm.formIndex, this.shiny, this.variant) + .getSpriteKey(this.getGender(ignoreOverride) === Gender.FEMALE, speciesForm.formIndex, this.shiny, this.variant) .replace("pkmn__", "pkmn__back__"); const fusionSpriteKey = fusionSpeciesForm.getSpriteKey( - this.getFusionGender(ignoreOveride) === Gender.FEMALE, + this.getFusionGender(ignoreOverride) === Gender.FEMALE, fusionSpeciesForm.formIndex, this.fusionShiny, this.fusionVariant, ); const fusionBackSpriteKey = fusionSpeciesForm .getSpriteKey( - this.getFusionGender(ignoreOveride) === Gender.FEMALE, + this.getFusionGender(ignoreOverride) === Gender.FEMALE, fusionSpeciesForm.formIndex, this.fusionShiny, this.fusionVariant, @@ -5522,8 +5522,8 @@ export abstract class Pokemon extends Phaser.GameObjects.Container { [this.getSprite(), this.getTintSprite()] .filter(s => !!s) .map(s => { - s.pipelineData[`spriteColors${ignoreOveride && this.summonData.speciesForm ? "Base" : ""}`] = spriteColors; - s.pipelineData[`fusionSpriteColors${ignoreOveride && this.summonData.speciesForm ? "Base" : ""}`] = + s.pipelineData[`spriteColors${ignoreOverride && this.summonData.speciesForm ? "Base" : ""}`] = spriteColors; + s.pipelineData[`fusionSpriteColors${ignoreOverride && this.summonData.speciesForm ? "Base" : ""}`] = fusionSpriteColors; }); diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index 9ec9ee0ad48..46ed7e1e4b5 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -105,7 +105,7 @@ import { TempExtraModifierModifier, TempStatStageBoosterModifier, TerastallizeAccessModifier, - TerrastalizeModifier, + TerastallizeModifier, TmModifier, TurnHealModifier, TurnHeldItemTransferModifier, @@ -431,7 +431,7 @@ export class TerastallizeModifierType extends PokemonModifierType { super( "", `${PokemonType[teraType].toLowerCase()}_tera_shard`, - (type, args) => new TerrastalizeModifier(type as TerastallizeModifierType, (args[0] as Pokemon).id, teraType), + (type, args) => new TerastallizeModifier(type as TerastallizeModifierType, (args[0] as Pokemon).id, teraType), (pokemon: PlayerPokemon) => { if ( [pokemon.species.speciesId, pokemon.fusionSpecies?.speciesId].filter( diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index b31bee7fc69..6907b6907ca 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -2073,7 +2073,7 @@ export abstract class ConsumablePokemonModifier extends ConsumableModifier { } } -export class TerrastalizeModifier extends ConsumablePokemonModifier { +export class TerastallizeModifier extends ConsumablePokemonModifier { public declare type: TerastallizeModifierType; public teraType: PokemonType; @@ -2084,9 +2084,9 @@ export class TerrastalizeModifier extends ConsumablePokemonModifier { } /** - * Checks if {@linkcode TerrastalizeModifier} should be applied + * Checks if {@linkcode TerastallizeModifier} should be applied * @param playerPokemon The {@linkcode PlayerPokemon} that consumes the item - * @returns `true` if the {@linkcode TerrastalizeModifier} should be applied + * @returns `true` if the {@linkcode TerastallizeModifier} should be applied */ override shouldApply(playerPokemon?: PlayerPokemon): boolean { return ( @@ -2098,7 +2098,7 @@ export class TerrastalizeModifier extends ConsumablePokemonModifier { } /** - * Applies {@linkcode TerrastalizeModifier} + * Applies {@linkcode TerastallizeModifier} * @param pokemon The {@linkcode PlayerPokemon} that consumes the item * @returns `true` if hp was restored */ @@ -3875,7 +3875,7 @@ const ModifierClassMap = Object.freeze({ ResetNegativeStatStageModifier, FieldEffectModifier, ConsumablePokemonModifier, - TerrastalizeModifier, + TerastallizeModifier, PokemonHpRestoreModifier, PokemonStatusHealModifier, ConsumablePokemonMoveModifier, diff --git a/src/phases/command-phase.ts b/src/phases/command-phase.ts index c7eb466157d..ff9ee7cc197 100644 --- a/src/phases/command-phase.ts +++ b/src/phases/command-phase.ts @@ -112,7 +112,7 @@ export class CommandPhase extends FieldPhase { * Clear out all unusable moves in front of the currently acting pokemon's move queue. */ // TODO: Refactor move queue handling to ensure that this method is not necessary. - private clearUnusuableMoves(): void { + private clearUnusableMoves(): void { const playerPokemon = this.getPokemon(); const moveQueue = playerPokemon.getMoveQueue(); if (moveQueue.length === 0) { @@ -143,7 +143,7 @@ export class CommandPhase extends FieldPhase { * @returns Whether a queued move was successfully set to be executed. */ private tryExecuteQueuedMove(): boolean { - this.clearUnusuableMoves(); + this.clearUnusableMoves(); const playerPokemon = globalScene.getPlayerField()[this.fieldIndex]; const moveQueue = playerPokemon.getMoveQueue(); diff --git a/src/ui/arena-flyout.ts b/src/ui/arena-flyout.ts index d2a45646690..e243bef342e 100644 --- a/src/ui/arena-flyout.ts +++ b/src/ui/arena-flyout.ts @@ -36,7 +36,7 @@ interface ArenaEffectInfo { /** The enum string representation of the effect */ name: string; /** {@linkcode ArenaEffectType} type of effect */ - effecType: ArenaEffectType; + effectType: ArenaEffectType; /** The maximum duration set by the effect */ maxDuration: number; @@ -246,7 +246,7 @@ export class ArenaFlyout extends Phaser.GameObjects.Container { // Creates a proxy object to decide which text object needs to be updated let textObject: Phaser.GameObjects.Text; - switch (fieldEffectInfo.effecType) { + switch (fieldEffectInfo.effectType) { case ArenaEffectType.PLAYER: textObject = this.flyoutTextPlayer; break; @@ -300,7 +300,7 @@ export class ArenaFlyout extends Phaser.GameObjects.Container { const existingTrapTagIndex = isArenaTrapTag ? this.fieldEffectInfo.findIndex( - e => tagAddedEvent.arenaTagType === e.tagType && arenaEffectType === e.effecType, + e => tagAddedEvent.arenaTagType === e.tagType && arenaEffectType === e.effectType, ) : -1; let name: string = getFieldEffectText(ArenaTagType[tagAddedEvent.arenaTagType]); @@ -318,7 +318,7 @@ export class ArenaFlyout extends Phaser.GameObjects.Container { this.fieldEffectInfo.push({ name, - effecType: arenaEffectType, + effectType: arenaEffectType, maxDuration: tagAddedEvent.duration, duration: tagAddedEvent.duration, tagType: tagAddedEvent.arenaTagType, @@ -353,7 +353,7 @@ export class ArenaFlyout extends Phaser.GameObjects.Container { ? WeatherType[fieldEffectChangedEvent.newWeatherType] : TerrainType[fieldEffectChangedEvent.newTerrainType], ), - effecType: + effectType: fieldEffectChangedEvent instanceof WeatherChangedEvent ? ArenaEffectType.WEATHER : ArenaEffectType.TERRAIN, maxDuration: fieldEffectChangedEvent.duration, duration: fieldEffectChangedEvent.duration, diff --git a/src/ui/battle-info/player-battle-info.ts b/src/ui/battle-info/player-battle-info.ts index 8784495e6d2..998f7cbb41f 100644 --- a/src/ui/battle-info/player-battle-info.ts +++ b/src/ui/battle-info/player-battle-info.ts @@ -198,11 +198,11 @@ export class PlayerBattleInfo extends BattleInfo { this.lastLevelCapped = isLevelCapped; if (this.lastExp !== pokemon.exp || this.lastLevel !== pokemon.level) { - const durationMultipler = Math.max( + const durationMultiplier = Math.max( Phaser.Tweens.Builders.GetEaseFunction("Cubic.easeIn")(1 - Math.min(pokemon.level - this.lastLevel, 10) / 10), 0.1, ); - await this.updatePokemonExp(pokemon, false, durationMultipler); + await this.updatePokemonExp(pokemon, false, durationMultiplier); } else if (isLevelCapped !== oldLevelCapped) { this.setLevel(pokemon.level); } diff --git a/src/ui/run-info-ui-handler.ts b/src/ui/run-info-ui-handler.ts index 667a22a001a..2def302c1d5 100644 --- a/src/ui/run-info-ui-handler.ts +++ b/src/ui/run-info-ui-handler.ts @@ -702,11 +702,11 @@ export class RunInfoUiHandler extends UiHandler { rules.push(i18next.t("challenges:inverseBattle.shortName")); break; default: { - const localisationKey = Challenges[this.runInfo.challenges[i].id] + const localizationKey = Challenges[this.runInfo.challenges[i].id] .split("_") .map((f, i) => (i ? `${f[0]}${f.slice(1).toLowerCase()}` : f.toLowerCase())) .join(""); - rules.push(i18next.t(`challenges:${localisationKey}.name`)); + rules.push(i18next.t(`challenges:${localizationKey}.name`)); break; } } diff --git a/src/ui/settings/abstract-binding-ui-handler.ts b/src/ui/settings/abstract-binding-ui-handler.ts index b2bda2455bb..2c8d0eb63ba 100644 --- a/src/ui/settings/abstract-binding-ui-handler.ts +++ b/src/ui/settings/abstract-binding-ui-handler.ts @@ -8,7 +8,7 @@ import { UiHandler } from "#ui/ui-handler"; import { addWindow } from "#ui/ui-theme"; import i18next from "i18next"; -type CancelFn = (succes?: boolean) => boolean; +type CancelFn = (success?: boolean) => boolean; /** * Abstract class for handling UI elements related to button bindings. diff --git a/src/ui/test-dialogue-ui-handler.ts b/src/ui/test-dialogue-ui-handler.ts index c57c73ca777..f077b8be23f 100644 --- a/src/ui/test-dialogue-ui-handler.ts +++ b/src/ui/test-dialogue-ui-handler.ts @@ -13,7 +13,7 @@ export class TestDialogueUiHandler extends FormModalUiHandler { setup() { super.setup(); - const flattenKeys = (object?: any, topKey?: string, midleKey?: string[]): Array => { + const flattenKeys = (object?: any, topKey?: string, middleKey?: string[]): Array => { return Object.keys(object ?? {}) .map((t, i) => { const value = Object.values(object)[i]; @@ -23,7 +23,7 @@ export class TestDialogueUiHandler extends FormModalUiHandler { // If the value is an object, execute the same process // si el valor es un objeto ejecuta el mismo proceso - return flattenKeys(value, topKey ?? t, topKey ? (midleKey ? [...midleKey, t] : [t]) : undefined).filter( + return flattenKeys(value, topKey ?? t, topKey ? (middleKey ? [...middleKey, t] : [t]) : undefined).filter( t => t.length > 0, ); } @@ -31,7 +31,7 @@ export class TestDialogueUiHandler extends FormModalUiHandler { // we check for null or undefined here as per above - the typeof is still an object but the value is null so we need to exit out of this and pass the null key // Return in the format expected by i18next - return midleKey ? `${topKey}:${midleKey.map(m => m).join(".")}.${t}` : `${topKey}:${t}`; + return middleKey ? `${topKey}:${middleKey.map(m => m).join(".")}.${t}` : `${topKey}:${t}`; } }) .filter(t => t);