diff --git a/src/data/mystery-encounters/encounters/absolute-avarice-encounter.ts b/src/data/mystery-encounters/encounters/absolute-avarice-encounter.ts index 202dcabf412..432a0b778da 100644 --- a/src/data/mystery-encounters/encounters/absolute-avarice-encounter.ts +++ b/src/data/mystery-encounters/encounters/absolute-avarice-encounter.ts @@ -24,6 +24,7 @@ import { BerryType } from "#enums/berry-type"; import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; import { Stat } from "#enums/stat"; import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode"; +import i18next from "i18next"; /** the i18n namespace for this encounter */ const namespace = "mysteryEncounter:absoluteAvarice"; @@ -263,7 +264,7 @@ export const AbsoluteAvariceEncounter: MysteryEncounter = // Provides 1x Reviver Seed to each party member at end of battle const revSeed = generateModifierType(scene, modifierTypes.REVIVER_SEED); - encounter.setDialogueToken("foodReward", revSeed?.name ?? "Reviver Seed"); + encounter.setDialogueToken("foodReward", revSeed?.name ?? i18next.t("modifierType:ModifierType.REVIVER_SEED.name")); const givePartyPokemonReviverSeeds = () => { const party = scene.getParty(); party.forEach(p => { diff --git a/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts b/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts index 7a0807d7357..3a80e92918d 100644 --- a/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts +++ b/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts @@ -178,6 +178,9 @@ const MISC_TUTOR_MOVES = [ Moves.U_TURN ]; +/** + * Wave breakpoints that determine how strong to make the Bug-Type Superfan's team + */ const WAVE_LEVEL_BREAKPOINTS = [30, 50, 70, 100, 120, 140, 160]; /** @@ -219,11 +222,12 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = female: true, }); - let beedrillKeys, butterfreeKeys; + let beedrillKeys: { spriteKey: string, fileRoot: string }, butterfreeKeys: { spriteKey: string, fileRoot: string }; if (scene.currentBattle.waveIndex < WAVE_LEVEL_BREAKPOINTS[3]) { beedrillKeys = getSpriteKeysFromSpecies(Species.BEEDRILL, false); butterfreeKeys = getSpriteKeysFromSpecies(Species.BUTTERFREE, false); } else { + // Mega Beedrill/Gmax Butterfree beedrillKeys = getSpriteKeysFromSpecies(Species.BEEDRILL, false, 1); butterfreeKeys = getSpriteKeysFromSpecies(Species.BUTTERFREE, false, 1); } diff --git a/src/data/mystery-encounters/encounters/clowning-around-encounter.ts b/src/data/mystery-encounters/encounters/clowning-around-encounter.ts index 7845f78f19b..7e846b42ea4 100644 --- a/src/data/mystery-encounters/encounters/clowning-around-encounter.ts +++ b/src/data/mystery-encounters/encounters/clowning-around-encounter.ts @@ -500,7 +500,7 @@ function generateItemsOfTier(scene: BattleScene, pokemon: PlayerPokemon, numItem } const randIndex = randSeedInt(pool.length); const newItemType = pool[randIndex]; - let newMod; + let newMod: PokemonHeldItemModifierType; if (tier === "Berries") { newMod = generateModifierType(scene, modifierTypes.BERRY, [newItemType[0]]) as PokemonHeldItemModifierType; } else { diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index ddc5f6f5548..f53a07e8e21 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -13,7 +13,7 @@ import * as Utils from "../utils"; import { getBerryEffectFunc, getBerryPredicate } from "../data/berry"; import { BattlerTagType } from "#enums/battler-tag-type"; import { BerryType } from "#enums/berry-type"; -import { getStatusEffectHealText, StatusEffect } from "../data/status-effect"; +import { getStatusEffectHealText, StatusEffect } from "#app/data/status-effect"; import { achvs } from "../system/achv"; import { VoucherType } from "../system/voucher"; import { FormChangeItem, SpeciesFormChangeItemTrigger, SpeciesFormChangeLapseTeraTrigger, SpeciesFormChangeTeraTrigger } from "../data/pokemon-forms"; diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 91eb66d6d48..b2e199ad630 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -1198,13 +1198,6 @@ export class GameData { return resolve([false, false]); } const sessionData = this.getSessionSaveData(scene); - - // Filter out any "rental" Pokemon from the player's team that were used for the run - sessionData.party = sessionData.party.filter(p => { - const speciesRootForm = getPokemonSpecies(p.species).getRootSpeciesId(); - return !!this.scene.gameData.dexData[speciesRootForm].caughtAttr; - }); - Utils.apiPost(`savedata/session/clear?slot=${slotId}&trainerId=${this.trainerId}&secretId=${this.secretId}&clientSessionId=${clientSessionId}`, JSON.stringify(sessionData), undefined, true).then(response => { if (response.ok) { loggedInUser!.lastSessionSlot = -1; // TODO: is the bang correct? @@ -1586,10 +1579,10 @@ export class GameData { // If incrementCount === false (not a catch scenario), only update the pokemon's dex data if the Pokemon has already been marked as caught in dex // Prevents form changes, nature changes, etc. from unintentionally updating the dex data of a "rental" pokemon const speciesRootForm = pokemon.species.getRootSpeciesId(); - if (!!this.scene.gameData.dexData[speciesRootForm].caughtAttr) { + if (this.scene.gameData.dexData[speciesRootForm].caughtAttr) { return this.setPokemonSpeciesCaught(pokemon, pokemon.species, incrementCount, fromEgg, showMessage); } else { - return new Promise(resolve => resolve(false)); + return Promise.resolve(false); } } @@ -1727,7 +1720,7 @@ export class GameData { addStarterCandy(species: PokemonSpecies, count: integer): void { // Only gain candies if the Pokemon has already been marked as caught in dex (ignore "rental" pokemon) const speciesRootForm = species.getRootSpeciesId(); - if (!!this.scene.gameData.dexData[speciesRootForm].caughtAttr) { + if (this.scene.gameData.dexData[speciesRootForm].caughtAttr) { this.scene.candyBar.showStarterSpeciesCandy(species.speciesId, count); this.starterData[species.speciesId].candyCount += count; }