From 528e231794a30d77d0af61dc5e43f90ea964c5b5 Mon Sep 17 00:00:00 2001 From: Lugiad Date: Thu, 19 Sep 2024 21:13:37 +0200 Subject: [PATCH 1/7] [Localization] Update pkmnems font (#4329) --- public/fonts/pkmnems.ttf | Bin 18932 -> 26132 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/public/fonts/pkmnems.ttf b/public/fonts/pkmnems.ttf index 0aa3a19b417a45c24421be1d769d2286dbfdabd8..b0b50d0f10ff8a64753acb663781be30d9b0213d 100644 GIT binary patch delta 5529 zcmbtYeQ;b=6+dV9ZFWgQn$2c6Nt0&xTTv8CMBo(^M3fM}u@s6RTR=cWhe0Q1#(_U{rX!4#=`aq?AY${e{?2`OH%kF^ zba&pn_q})TIluEeUvKwqmk+(dd14|uoeq$nF6!_9#D)9v*#yy!cX79E{n~Z?G{vpB zeht^{AG_qN?1Fcl+lhD!t~YPrGdR5cx_vc7RkcLE@v8>+4Ht`$L^~$%JapCW8+QJ3 zQ_TvZ>f=NgzcI99@XCK!N6*5uKjK(AG_)f>ShFp(1OgjzBRRBZWdENwSD%UNBSglf zyRY3oIP+@w0A%6X*RyAE|1fvZay;+F`o!MBJv;i^4nIM(?L{L0Cx@@yH*#$9g&5Ib z8}>i0jDvv>zxhhvWeZmRooYhZMs(z!jVEP%y}{S|_FcR*#4%aQO-EPpjehqcU&y`O zXH@yRsbFk%5Bp>8abK-Fqs+D#ieG%e9R1%s+g+Z|eQqN@Cu>y;797Pf&>r-<12TVdn1x-{QkIGU)Rd7g9a$RAXM`IA{10 zzRX}FWPIG%l4wbFxBxlmJyxkV14COsSz- zglHWtpnA7w!$WzZFVk1(t8^Q=^i6tz9-=WCr|;AE=m+#8`U(A*9;TntBXpRK(4%ye zenyYe6ZCU>lAfkx^b9={Kw1ck3Y(G6n!*mU1pP^ki-%9u4yblM_RrFakdZ*oV z6DB{*Q-Quf+X<%Y&mQ_5W>?V7bPIihUZP)@9)OERdJ0$1&)?Cr8}#@k8l^AN*XSU9 zo$jDJ>2|uC?!mJ|bU%HYzD2)M>#ozQZ^U>sQ+1H@lkL^*>GoXvmi7bfPq$CS>*Kxg z{`eK~o8#m0m*Q_FD3MI8N{l3qBqmHUyUl)cz}#;>U_NF}m@^%99ode7j?s?sj^{dF z>v+eCS<9_Utx@Y)>o3XbWG;DWa#!-!7D8Q zXQb~>|0exTXIh0Rqb${1mUBBykb1^N>F24Tgi@_x; z@{)Oo+u$6cGYFS1pa?b5A~L~|V@FNPvBQoT4VakPVTj9t98&>CCvGz@>K`5;uy73;#8$!%P}1@Y&t>c z4o9HUsnCgOS+N2Um?-I+8Sr4p^V#M?0lJ_M@PcchZvjyR#=)pQD-0uHqa{EEy%#1*8Yd>Gg!IPlEaDh9c4t-f~y7%cYtrUDZXd>RrWOi^m_7&N1n!)DZu z+Blc_gWAOmIVo@nsyycAM%};GF3ceol-P!I9DQz^2sxUe*aq&eN$d2z&n$|x-uD33W3;cvl#Cl3vb>jbqB!- zF<@Ys70y5oVhnq+4nD>6V!yF9@OuO;L9PnSu#BQ35Vlo>z*66oa%`Y!W}DFM>GpLS z+jzE_-0w6j-4zg3{xPVM9B70G+f|T25_p9)k*%PcB3sRbLlyE8VM>KJD$d0&IRvdY zn{AdExsTM|xOkqRkPyTcbU;(s^adeFWY12z#~Ygl6u62cjUZRvlb%g_KkMzV+e=Il zqNasHMKXec=0NP^2_E4QIDNV`QDeeNm1QmLb~kpMgKa8zBzR<^^T!Kwyjn!CJfa}m zk`MSuz#3bp$Ngi|;|PUY8#C@;Bd1{MWjkNBUa*&^%79BMf$6|Cc4TEH*9h5 zjrF(>#=EWwOw2a>rl!Y*S~ zu)#+%TXI`+Smp6>)3&?>8)U1PC8q=v&UTb(vUhr1&_b3ht#sk(a0hI%GKg}&#D~PR zDtzL8#PlSzEAL|=_Iibhz{>7cBm~< zqE4OwR>3Go8Ke$t>|W+oQ%OeK3t?Zkcz14eEg>`J*`)i#oCjQw6h z%atnZ%_3wzo244S=yF0=uvM+fZ&^ad!@>FY?62G_F^cysp-t6-5P&qGNwtBR3|N3o z5ws}N30P6v3Cl^^l>>i+@-uy&fx?l8F%X*>fRPff@{#1l2d^)9M-(N>+8U4@#akQv zYWam}@sVmk0pVWixwImFO7?nky+jdh{xRt#Cr=2us?>UcHXp;DA;JV+utiqbT#Az& z4nR?h%3_HZEmu;xR3assR6@>9devlS%lUZ)TX9or;3RF$^O0joBM*Qf$hS0BI7T^H zNDzb)t2&Ml3!|Vx_XY%@lyD@dc&zjd2c%p`&VdAkPNnlp-Nln9f?=ZYsv6k)3OTf@ z=eoh6HG=~wwlDx^E1ZHKMT$Tb#t|pDBh>nqh+IFpw=LY5*99DS|K9@c=};t#GfNpF z!7bNN87!M4eX~xAk=vM!W`aUUlblpJZ316XJOsT!*B|9hxr-k$ch*Ppx{v^QxfdY6 zOTECE?*+17oHaWsg+hfefRr+${3i8*-9aRJ-NCVx=RHCpF?lbL8cP%>G^7eHr!n}qebSZLX21Eyz_Acsk|JJhQl(l$cl9-arRa8ocDY%E? z7hWQjKlZD{+lV(zB+`ch{BUfB6Toy9*UK;*@zva=}r{!M2=21ub% zsi4AA@!}uz^n6%nDe02msAR2)#Fd_h)qU(#}OI-y8Me3*skoYKrP<2Ih6^S9QL_wHf zP}}qR9a9CalsRz}cF$KhucN4LA~q~Ttu!4GRqi2DYvu4ZOUQe_Ds;mDgOv>PPxC&9I*h4saC*ImD-N zHP>)0pU!o>fa^KT4IJS{j&h8fxS3mcA-8fHFT(#AaZa$w9c*!uQ=H~b?&8IK27iRl z&}Mui}sLIead!<~6*Q*Kt3u=M8)wZ{+j& z0(z1!Q47FY54} zfr0%91B1)yfrY^hNb@joFfakxbqxO*gB2vzoPhoXI)q^XV-S$% z@c;k+$NvxgFLE-R?>*pU37!({58WtWA85JE98yBCD$k5i_**$s2yv2)_EL*yK z)YLlt&|$F5k(~?&!3-c#3B)Zu&Anay6DIaeoyIU_&fM8Rp+X?8+Ps#di;;7e>?7H4 zavE|On;&rLT2J8-B@|#o@mPgfTO8^hB!FB)u From 7490699bef72672874ca009addf363b27ebad8a3 Mon Sep 17 00:00:00 2001 From: ImperialSympathizer <110984302+ben-lear@users.noreply.github.com> Date: Thu, 19 Sep 2024 16:46:27 -0400 Subject: [PATCH 2/7] [Feature] Adds Expert Pokemon Breeder Mystery Encounter to the game (#4328) * Adds Expert Breeder Mystery Encounter to the game * add achievement for Breeders in Space and remove redundant tests * rename to Expert Pokemon Breeder * remove unintentional test code * remove unintentional test code * test fix with breeder rename --------- Co-authored-by: ImperialSympathizer Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> --- .../trainer/expert_pokemon_breeder.json | 41 ++ .../images/trainer/expert_pokemon_breeder.png | Bin 0 -> 1006 bytes .../encounters/bug-type-superfan-encounter.ts | 15 +- .../encounters/dancing-lessons-encounter.ts | 2 +- .../the-expert-pokemon-breeder-encounter.ts | 549 ++++++++++++++++++ .../mystery-encounters/mystery-encounters.ts | 10 +- .../utils/encounter-phase-utils.ts | 17 + src/data/trainer-config.ts | 16 +- src/enums/mystery-encounter-type.ts | 3 +- src/enums/trainer-type.ts | 1 + src/field/arena.ts | 8 +- src/locales/en/achv.json | 4 + src/locales/en/config.ts | 4 +- .../part-timer-dialogue.json | 2 +- .../the-expert-pokemon-breeder-dialogue.json | 30 + src/locales/en/trainer-names.json | 3 +- src/system/achv.ts | 3 + .../a-trainers-test-encounter.test.ts | 16 - .../absolute-avarice-encounter.test.ts | 16 - ...an-offer-you-cant-refuse-encounter.test.ts | 16 - .../berries-abound-encounter.test.ts | 16 - .../bug-type-superfan-encounter.test.ts | 16 - .../clowning-around-encounter.test.ts | 8 - .../dancing-lessons-encounter.test.ts | 16 - .../encounters/delibirdy-encounter.test.ts | 16 - .../department-store-sale-encounter.test.ts | 16 - .../encounters/field-trip-encounter.test.ts | 16 - .../fiery-fallout-encounter.test.ts | 8 - .../fight-or-flight-encounter.test.ts | 16 - .../fun-and-games-encounter.test.ts | 16 - .../global-trade-system-encounter.test.ts | 16 - .../encounters/lost-at-sea-encounter.test.ts | 16 - .../mysterious-challengers-encounter.test.ts | 16 - .../encounters/part-timer-encounter.test.ts | 16 - .../teleporting-hijinks-encounter.test.ts | 16 - .../the-expert-breeder-encounter.test.ts | 283 +++++++++ .../the-pokemon-salesman-encounter.test.ts | 16 - .../the-strong-stuff-encounter.test.ts | 16 - .../the-winstrate-challenge-encounter.test.ts | 16 - .../trash-to-treasure-encounter.test.ts | 16 - .../uncommon-breed-encounter.test.ts | 16 - .../encounters/weird-dream-encounter.test.ts | 16 - .../mystery-encounter.test.ts | 24 +- 43 files changed, 975 insertions(+), 408 deletions(-) create mode 100644 public/images/trainer/expert_pokemon_breeder.json create mode 100644 public/images/trainer/expert_pokemon_breeder.png create mode 100644 src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts create mode 100644 src/locales/en/mystery-encounters/the-expert-pokemon-breeder-dialogue.json create mode 100644 src/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts diff --git a/public/images/trainer/expert_pokemon_breeder.json b/public/images/trainer/expert_pokemon_breeder.json new file mode 100644 index 00000000000..cd6ecffb267 --- /dev/null +++ b/public/images/trainer/expert_pokemon_breeder.json @@ -0,0 +1,41 @@ +{ + "textures": [ + { + "image": "expert_pokemon_breeder.png", + "format": "RGBA8888", + "size": { + "w": 39, + "h": 75 + }, + "scale": 1, + "frames": [ + { + "filename": "0001.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 80, + "h": 80 + }, + "spriteSourceSize": { + "x": 21, + "y": 3, + "w": 39, + "h": 75 + }, + "frame": { + "x": 0, + "y": 0, + "w": 39, + "h": 75 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:cb681265d8dca038a518ab14076fd140:18ff41b1ef6967682643a11695926e58:c59ea3971195f5a395b75223a77d9068$" + } +} diff --git a/public/images/trainer/expert_pokemon_breeder.png b/public/images/trainer/expert_pokemon_breeder.png new file mode 100644 index 0000000000000000000000000000000000000000..0625f5255c3f49fad5727546414a04cc53a306dd GIT binary patch literal 1006 zcmV7SSd-a4d|jEMp%@=p00J1IFjKi-ecI!@ ztc=2jB1WOI(i=!ccTaHk`1}eIC#i0NgS28;u57euot;1-h@ZzW<|*BnL_=7Y1P<0_VaY48D;D4}cD#17pJnatv{T-QN#>5QobU*CzNH3`}tcQ510< zuVId{C?f7H%tc=C)={v>a_Y-zE{^Fbn98}&Xp`g596Liz^Y7-IwaF=tFoTdJiK2;7 zgdL9@J2BK+u@Y~!JF>~{I%PGwmYM4x7(quwy%z=;*gTzT#z7?9Wgdff4K!yOG z8~a)FV8Tz7fZjc*MW7-#LCA0w>v`{UhR4hK)ix$z&;MtLqzA1T+viE${PaCs`^w%P;G2sUjuloaEK zg|fDdYlxd7F1IVsg8j>E8Kn{sxe&cvN<{d?kz{efD(R;mW void) { - return (scene: BattleScene, level: number, strength: PartyMemberStrength) => { - let species = Utils.randSeedItem(speciesPool); - if (!ignoreEvolution) { - species = getPokemonSpecies(species).getTrainerSpeciesForLevel(level, true, strength); - } - return scene.addEnemyPokemon(getPokemonSpecies(species), level, trainerSlot, undefined, undefined, postProcess); - }; -} - function doBugTypeMoveTutor(scene: BattleScene): Promise { return new Promise(async resolve => { const moveOptions = scene.currentBattle.mysteryEncounter!.misc.moveTutorOptions; diff --git a/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts b/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts index bd308a5919b..8a0a18d48ea 100644 --- a/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts +++ b/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts @@ -133,7 +133,7 @@ export const DancingLessonsEncounter: MysteryEncounter = } const oricorioData = new PokemonData(enemyPokemon); - const oricorio = scene.addEnemyPokemon(species, scene.currentBattle.enemyLevels![0], TrainerSlot.NONE, false, oricorioData); + const oricorio = scene.addEnemyPokemon(species, level, TrainerSlot.NONE, false, oricorioData); // Adds a real Pokemon sprite to the field (required for the animation) scene.getEnemyParty().forEach(enemyPokemon => { diff --git a/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts b/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts new file mode 100644 index 00000000000..104ddd3d663 --- /dev/null +++ b/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts @@ -0,0 +1,549 @@ +import { EnemyPartyConfig, generateModifierType, initBattleWithEnemyConfig, setEncounterRewards, } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; +import { trainerConfigs } from "#app/data/trainer-config"; +import { modifierTypes, PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; +import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import BattleScene from "#app/battle-scene"; +import { randSeedShuffle } from "#app/utils"; +import MysteryEncounter, { MysteryEncounterBuilder } from "../mystery-encounter"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode"; +import { Biome } from "#enums/biome"; +import { TrainerType } from "#enums/trainer-type"; +import i18next from "i18next"; +import { Species } from "#enums/species"; +import { getPokemonSpecies, speciesStarters } from "#app/data/pokemon-species"; +import { Nature } from "#enums/nature"; +import { Moves } from "#enums/moves"; +import { Type } from "#app/data/type"; +import { Stat } from "#enums/stat"; +import { PlayerPokemon } from "#app/field/pokemon"; +import { getEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; +import { IEggOptions } from "#app/data/egg"; +import { EggSourceType } from "#enums/egg-source-types"; +import { EggTier } from "#enums/egg-type"; +import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { achvs } from "#app/system/achv"; + +/** the i18n namespace for the encounter */ +const namespace = "mysteryEncounter:expertPokemonBreeder"; + +const trainerNameKey = "trainerNames:expert_pokemon_breeder"; + +const FIRST_STAGE_EVOLUTION_WAVE = 30; +const SECOND_STAGE_EVOLUTION_WAVE = 45; +const FINAL_STAGE_EVOLUTION_WAVE = 60; + +const FRIENDSHIP_ADDED = 20; + +class BreederSpeciesEvolution { + species: Species; + evolution: number; + + constructor(species: Species, evolution: number) { + this.species = species; + this.evolution = evolution; + } +} + +const POOL_1_POKEMON: (Species | BreederSpeciesEvolution)[][] = [ + [Species.MUNCHLAX, new BreederSpeciesEvolution(Species.SNORLAX, SECOND_STAGE_EVOLUTION_WAVE)], + [Species.HAPPINY, new BreederSpeciesEvolution(Species.CHANSEY, FIRST_STAGE_EVOLUTION_WAVE), new BreederSpeciesEvolution(Species.BLISSEY, FINAL_STAGE_EVOLUTION_WAVE)], + [Species.MAGBY, new BreederSpeciesEvolution(Species.MAGMAR, FIRST_STAGE_EVOLUTION_WAVE), new BreederSpeciesEvolution(Species.MAGMORTAR, FINAL_STAGE_EVOLUTION_WAVE)], + [Species.ELEKID, new BreederSpeciesEvolution(Species.ELECTABUZZ, FIRST_STAGE_EVOLUTION_WAVE), new BreederSpeciesEvolution(Species.ELECTIVIRE, FINAL_STAGE_EVOLUTION_WAVE)], + [Species.RIOLU, new BreederSpeciesEvolution(Species.LUCARIO, SECOND_STAGE_EVOLUTION_WAVE)], + [Species.BUDEW, new BreederSpeciesEvolution(Species.ROSELIA, FIRST_STAGE_EVOLUTION_WAVE), new BreederSpeciesEvolution(Species.ROSERADE, FINAL_STAGE_EVOLUTION_WAVE)], + [Species.TOXEL, new BreederSpeciesEvolution(Species.TOXTRICITY, SECOND_STAGE_EVOLUTION_WAVE)], + [Species.MIME_JR, new BreederSpeciesEvolution(Species.GALAR_MR_MIME, FIRST_STAGE_EVOLUTION_WAVE), new BreederSpeciesEvolution(Species.MR_RIME, FINAL_STAGE_EVOLUTION_WAVE)] +]; + +const POOL_2_POKEMON: (Species | BreederSpeciesEvolution)[][] = [ + [Species.PICHU, new BreederSpeciesEvolution(Species.PIKACHU, FIRST_STAGE_EVOLUTION_WAVE), new BreederSpeciesEvolution(Species.RAICHU, FINAL_STAGE_EVOLUTION_WAVE)], + [Species.PICHU, new BreederSpeciesEvolution(Species.PIKACHU, FIRST_STAGE_EVOLUTION_WAVE), new BreederSpeciesEvolution(Species.ALOLA_RAICHU, FINAL_STAGE_EVOLUTION_WAVE)], + [Species.JYNX], + [Species.TYROGUE, new BreederSpeciesEvolution(Species.HITMONLEE, SECOND_STAGE_EVOLUTION_WAVE)], + [Species.TYROGUE, new BreederSpeciesEvolution(Species.HITMONCHAN, SECOND_STAGE_EVOLUTION_WAVE)], + [Species.TYROGUE, new BreederSpeciesEvolution(Species.HITMONTOP, SECOND_STAGE_EVOLUTION_WAVE)], + [Species.IGGLYBUFF, new BreederSpeciesEvolution(Species.JIGGLYPUFF, FIRST_STAGE_EVOLUTION_WAVE), new BreederSpeciesEvolution(Species.WIGGLYTUFF, FINAL_STAGE_EVOLUTION_WAVE)], + [Species.AZURILL, new BreederSpeciesEvolution(Species.MARILL, FIRST_STAGE_EVOLUTION_WAVE), new BreederSpeciesEvolution(Species.AZUMARILL, FINAL_STAGE_EVOLUTION_WAVE)], + [Species.WYNAUT, new BreederSpeciesEvolution(Species.WOBBUFFET, SECOND_STAGE_EVOLUTION_WAVE)], + [Species.CHINGLING, new BreederSpeciesEvolution(Species.CHIMECHO, SECOND_STAGE_EVOLUTION_WAVE)], + [Species.BONSLY, new BreederSpeciesEvolution(Species.SUDOWOODO, SECOND_STAGE_EVOLUTION_WAVE)], + [Species.MANTYKE, new BreederSpeciesEvolution(Species.MANTINE, SECOND_STAGE_EVOLUTION_WAVE)] +]; + +/** + * The Expert Pokémon Breeder encounter. + * @see {@link https://github.com/pagefaultgames/pokerogue/issues/3818 | GitHub Issue #3818} + * @see For biome requirements check {@linkcode mysteryEncountersByBiome} + */ +export const TheExpertPokemonBreederEncounter: MysteryEncounter = + MysteryEncounterBuilder.withEncounterType(MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER) + .withEncounterTier(MysteryEncounterTier.ULTRA) + .withSceneWaveRangeRequirement(...CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES) + .withScenePartySizeRequirement(4, 6, true) // Must have at least 4 legal pokemon in party + .withIntroSpriteConfigs([]) // These are set in onInit() + .withIntroDialogue([ + { + text: `${namespace}.intro`, + }, + { + speaker: trainerNameKey, + text: `${namespace}.intro_dialogue`, + }, + ]) + .withOnInit((scene: BattleScene) => { + const encounter = scene.currentBattle.mysteryEncounter!; + const waveIndex = scene.currentBattle.waveIndex; + // Calculates what trainers are available for battle in the encounter + + // If player is in space biome, uses special "Space" version of the trainer + encounter.enemyPartyConfigs = [ + getPartyConfig(scene) + ]; + + const cleffaSpecies = waveIndex < FIRST_STAGE_EVOLUTION_WAVE ? Species.CLEFFA : waveIndex < FINAL_STAGE_EVOLUTION_WAVE ? Species.CLEFAIRY : Species.CLEFABLE; + encounter.spriteConfigs = [ + { + spriteKey: cleffaSpecies.toString(), + fileRoot: "pokemon", + hasShadow: true, + repeat: true, + x: 14, + y: -2, + yShadow: -2 + }, + { + spriteKey: "expert_pokemon_breeder", + fileRoot: "trainer", + hasShadow: true, + x: -14, + y: 4, + yShadow: 2 + }, + ]; + + // Determine the 3 pokemon the player can battle with + let partyCopy = scene.getParty().slice(0); + partyCopy = partyCopy + .filter(p => p.isAllowedInBattle()) + .sort((a, b) => a.friendship - b.friendship); + + const pokemon1 = partyCopy[0]; + const pokemon2 = partyCopy[1]; + const pokemon3 = partyCopy[2]; + encounter.setDialogueToken("pokemon1Name", pokemon1.getNameToRender()); + encounter.setDialogueToken("pokemon2Name", pokemon2.getNameToRender()); + encounter.setDialogueToken("pokemon3Name", pokemon3.getNameToRender()); + + // Dialogue and egg calcs for Pokemon 1 + const [pokemon1CommonEggs, pokemon1RareEggs] = calculateEggRewardsForPokemon(pokemon1); + let pokemon1Tooltip = getEncounterText(scene, `${namespace}.option.1.tooltip_base`)!; + if (pokemon1RareEggs > 0) { + const eggsText = i18next.t(`${namespace}.numEggs`, { count: pokemon1RareEggs, rarity: i18next.t("egg:greatTier") }); + pokemon1Tooltip += i18next.t(`${namespace}.eggs_tooltip`, { eggs: eggsText }); + encounter.setDialogueToken("pokemon1RareEggs", eggsText); + } + if (pokemon1CommonEggs > 0) { + const eggsText = i18next.t(`${namespace}.numEggs`, { count: pokemon1CommonEggs, rarity: i18next.t("egg:defaultTier") }); + pokemon1Tooltip += i18next.t(`${namespace}.eggs_tooltip`, { eggs: eggsText }); + encounter.setDialogueToken("pokemon1CommonEggs", eggsText); + } + encounter.options[0].dialogue!.buttonTooltip = pokemon1Tooltip; + + // Dialogue and egg calcs for Pokemon 2 + const [pokemon2CommonEggs, pokemon2RareEggs] = calculateEggRewardsForPokemon(pokemon2); + let pokemon2Tooltip = getEncounterText(scene, `${namespace}.option.2.tooltip_base`)!; + if (pokemon2RareEggs > 0) { + const eggsText = i18next.t(`${namespace}.numEggs`, { count: pokemon2RareEggs, rarity: i18next.t("egg:greatTier") }); + pokemon2Tooltip += i18next.t(`${namespace}.eggs_tooltip`, { eggs: eggsText }); + encounter.setDialogueToken("pokemon2RareEggs", eggsText); + } + if (pokemon2CommonEggs > 0) { + const eggsText = i18next.t(`${namespace}.numEggs`, { count: pokemon2CommonEggs, rarity: i18next.t("egg:defaultTier") }); + pokemon2Tooltip += i18next.t(`${namespace}.eggs_tooltip`, { eggs: eggsText }); + encounter.setDialogueToken("pokemon1CommonEggs", eggsText); + } + encounter.options[1].dialogue!.buttonTooltip = pokemon2Tooltip; + + // Dialogue and egg calcs for Pokemon 3 + const [pokemon3CommonEggs, pokemon3RareEggs] = calculateEggRewardsForPokemon(pokemon3); + let pokemon3Tooltip = getEncounterText(scene, `${namespace}.option.3.tooltip_base`)!; + if (pokemon3RareEggs > 0) { + const eggsText = i18next.t(`${namespace}.numEggs`, { count: pokemon3RareEggs, rarity: i18next.t("egg:greatTier") }); + pokemon3Tooltip += i18next.t(`${namespace}.eggs_tooltip`, { eggs: eggsText }); + encounter.setDialogueToken("pokemon3RareEggs", eggsText); + } + if (pokemon3CommonEggs > 0) { + const eggsText = i18next.t(`${namespace}.numEggs`, { count: pokemon3CommonEggs, rarity: i18next.t("egg:defaultTier") }); + pokemon3Tooltip += i18next.t(`${namespace}.eggs_tooltip`, { eggs: eggsText }); + encounter.setDialogueToken("pokemon3CommonEggs", eggsText); + } + encounter.options[2].dialogue!.buttonTooltip = pokemon3Tooltip; + + encounter.misc = { + pokemon1, + pokemon1CommonEggs, + pokemon1RareEggs, + pokemon2, + pokemon2CommonEggs, + pokemon2RareEggs, + pokemon3, + pokemon3CommonEggs, + pokemon3RareEggs + }; + + return true; + }) + .withTitle(`${namespace}.title`) + .withDescription(`${namespace}.description`) + .withQuery(`${namespace}.query`) + .withOption( + MysteryEncounterOptionBuilder + .newOptionWithMode(MysteryEncounterOptionMode.DEFAULT) + .withDialogue({ + buttonLabel: `${namespace}.option.1.label`, + selected: [ + { + speaker: trainerNameKey, + text: `${namespace}.option.selected`, + }, + ], + }) + .withOptionPhase(async (scene: BattleScene) => { + const encounter = scene.currentBattle.mysteryEncounter!; + // Spawn battle with first pokemon + const config: EnemyPartyConfig = encounter.enemyPartyConfigs[0]; + + const { pokemon1, pokemon1CommonEggs, pokemon1RareEggs } = encounter.misc; + encounter.setDialogueToken("chosenPokemon", pokemon1.getNameToRender()); + const eggOptions = getEggOptions(scene, pokemon1CommonEggs, pokemon1RareEggs); + setEncounterRewards(scene, { fillRemaining: true }, eggOptions); + + // Remove all Pokemon from the party except the chosen Pokemon + removePokemonFromPartyAndStoreHeldItems(scene, encounter, pokemon1); + + // Configure outro dialogue for egg rewards + encounter.dialogue.outro = [ + { + speaker: trainerNameKey, + text: `${namespace}.outro`, + }, + ]; + if (encounter.dialogueTokens.hasOwnProperty("pokemon1CommonEggs")) { + encounter.dialogue.outro.push({ + text: i18next.t(`${namespace}.gained_eggs`, { numEggs: encounter.dialogueTokens["pokemon1CommonEggs"] }), + }); + } + if (encounter.dialogueTokens.hasOwnProperty("pokemon1RareEggs")) { + encounter.dialogue.outro.push({ + text: i18next.t(`${namespace}.gained_eggs`, { numEggs: encounter.dialogueTokens["pokemon1RareEggs"] }), + }); + } + + initBattleWithEnemyConfig(scene, config); + }) + .withPostOptionPhase(async (scene: BattleScene) => { + // Give achievement if in Space biome + checkAchievement(scene); + // Give 20 friendship to the chosen pokemon + scene.currentBattle.mysteryEncounter!.misc.pokemon1.addFriendship(FRIENDSHIP_ADDED); + await restorePartyAndHeldItems(scene); + }) + .build() + ) + .withOption( + MysteryEncounterOptionBuilder + .newOptionWithMode(MysteryEncounterOptionMode.DEFAULT) + .withDialogue({ + buttonLabel: `${namespace}.option.2.label`, + selected: [ + { + speaker: trainerNameKey, + text: `${namespace}.option.selected`, + }, + ], + }) + .withOptionPhase(async (scene: BattleScene) => { + const encounter = scene.currentBattle.mysteryEncounter!; + // Spawn battle with second pokemon + const config: EnemyPartyConfig = encounter.enemyPartyConfigs[0]; + + const { pokemon2, pokemon2CommonEggs, pokemon2RareEggs } = encounter.misc; + encounter.setDialogueToken("chosenPokemon", pokemon2.getNameToRender()); + const eggOptions = getEggOptions(scene, pokemon2CommonEggs, pokemon2RareEggs); + setEncounterRewards(scene, { fillRemaining: true }, eggOptions); + + // Remove all Pokemon from the party except the chosen Pokemon + removePokemonFromPartyAndStoreHeldItems(scene, encounter, pokemon2); + + // Configure outro dialogue for egg rewards + encounter.dialogue.outro = [ + { + speaker: trainerNameKey, + text: `${namespace}.outro`, + }, + ]; + if (encounter.dialogueTokens.hasOwnProperty("pokemon2CommonEggs")) { + encounter.dialogue.outro.push({ + text: i18next.t(`${namespace}.gained_eggs`, { numEggs: encounter.dialogueTokens["pokemon2CommonEggs"] }), + }); + } + if (encounter.dialogueTokens.hasOwnProperty("pokemon2RareEggs")) { + encounter.dialogue.outro.push({ + text: i18next.t(`${namespace}.gained_eggs`, { numEggs: encounter.dialogueTokens["pokemon2RareEggs"] }), + }); + } + + initBattleWithEnemyConfig(scene, config); + }) + .withPostOptionPhase(async (scene: BattleScene) => { + // Give achievement if in Space biome + checkAchievement(scene); + // Give 20 friendship to the chosen pokemon + scene.currentBattle.mysteryEncounter!.misc.pokemon2.addFriendship(FRIENDSHIP_ADDED); + await restorePartyAndHeldItems(scene); + }) + .build() + ) + .withOption( + MysteryEncounterOptionBuilder + .newOptionWithMode(MysteryEncounterOptionMode.DEFAULT) + .withDialogue({ + buttonLabel: `${namespace}.option.3.label`, + selected: [ + { + speaker: trainerNameKey, + text: `${namespace}.option.selected`, + }, + ], + }) + .withOptionPhase(async (scene: BattleScene) => { + const encounter = scene.currentBattle.mysteryEncounter!; + // Spawn battle with third pokemon + const config: EnemyPartyConfig = encounter.enemyPartyConfigs[0]; + + const { pokemon3, pokemon3CommonEggs, pokemon3RareEggs } = encounter.misc; + encounter.setDialogueToken("chosenPokemon", pokemon3.getNameToRender()); + const eggOptions = getEggOptions(scene, pokemon3CommonEggs, pokemon3RareEggs); + setEncounterRewards(scene, { fillRemaining: true }, eggOptions); + + // Remove all Pokemon from the party except the chosen Pokemon + removePokemonFromPartyAndStoreHeldItems(scene, encounter, pokemon3); + + // Configure outro dialogue for egg rewards + encounter.dialogue.outro = [ + { + speaker: trainerNameKey, + text: `${namespace}.outro`, + }, + ]; + if (encounter.dialogueTokens.hasOwnProperty("pokemon3CommonEggs")) { + encounter.dialogue.outro.push({ + text: i18next.t(`${namespace}.gained_eggs`, { numEggs: encounter.dialogueTokens["pokemon3CommonEggs"] }), + }); + } + if (encounter.dialogueTokens.hasOwnProperty("pokemon3RareEggs")) { + encounter.dialogue.outro.push({ + text: i18next.t(`${namespace}.gained_eggs`, { numEggs: encounter.dialogueTokens["pokemon3RareEggs"] }), + }); + } + + initBattleWithEnemyConfig(scene, config); + }) + .withPostOptionPhase(async (scene: BattleScene) => { + // Give achievement if in Space biome + checkAchievement(scene); + // Give 20 friendship to the chosen pokemon + scene.currentBattle.mysteryEncounter!.misc.pokemon3.addFriendship(FRIENDSHIP_ADDED); + await restorePartyAndHeldItems(scene); + }) + .build() + ) + .withOutroDialogue([ + { + text: `${namespace}.outro`, + }, + ]) + .build(); + +function getPartyConfig(scene: BattleScene): EnemyPartyConfig { + // Bug type superfan trainer config + const waveIndex = scene.currentBattle.waveIndex; + const breederConfig = trainerConfigs[TrainerType.EXPERT_POKEMON_BREEDER].clone(); + breederConfig.name = i18next.t(trainerNameKey); + + // First mon is *always* this special cleffa + const cleffaSpecies = waveIndex < FIRST_STAGE_EVOLUTION_WAVE ? Species.CLEFFA : waveIndex < FINAL_STAGE_EVOLUTION_WAVE ? Species.CLEFAIRY : Species.CLEFABLE; + const baseConfig: EnemyPartyConfig = { + trainerType: TrainerType.EXPERT_POKEMON_BREEDER, + pokemonConfigs: [ + { + nickname: i18next.t(`${namespace}.cleffa_1_nickname`), + species: getPokemonSpecies(cleffaSpecies), + isBoss: false, + abilityIndex: 1, // Magic Guard + shiny: false, + nature: Nature.ADAMANT, + moveSet: [Moves.METEOR_MASH, Moves.FIRE_PUNCH, Moves.ICE_PUNCH, Moves.THUNDER_PUNCH], + ivs: [31, 31, 31, 31, 31, 31], + modifierConfigs: [ + { + modifier: generateModifierType(scene, modifierTypes.TERA_SHARD, [Type.STEEL]) as PokemonHeldItemModifierType, + }, + { + modifier: generateModifierType(scene, modifierTypes.BASE_STAT_BOOSTER, [Stat.ATK]) as PokemonHeldItemModifierType, + stackCount: 1 + Math.floor(waveIndex / 20), // +1 Protein every 20 waves + }, + { + modifier: generateModifierType(scene, modifierTypes.BASE_STAT_BOOSTER, [Stat.SPD]) as PokemonHeldItemModifierType, + stackCount: 1 + Math.floor(waveIndex / 40), // +1 Carbos every 40 waves + }, + ] + } + ] + }; + + if (scene.arena.biomeType === Biome.SPACE) { + // All 3 members always Cleffa line, but different configs + baseConfig.pokemonConfigs!.push({ + nickname: i18next.t(`${namespace}.cleffa_2_nickname`), + species: getPokemonSpecies(cleffaSpecies), + isBoss: false, + abilityIndex: 1, // Magic Guard + shiny: true, + variant: 1, + nature: Nature.MODEST, + moveSet: [Moves.MOONBLAST, Moves.MYSTICAL_FIRE, Moves.ICE_BEAM, Moves.THUNDERBOLT], + ivs: [31, 31, 31, 31, 31, 31] + }, + { + nickname: i18next.t(`${namespace}.cleffa_3_nickname`, { speciesName: getPokemonSpecies(cleffaSpecies).getName() }), + species: getPokemonSpecies(cleffaSpecies), + isBoss: false, + abilityIndex: 2, // Friend Guard / Unaware + shiny: true, + variant: 2, + nature: Nature.BOLD, + moveSet: [Moves.TRI_ATTACK, Moves.STORED_POWER, Moves.TAKE_HEART, Moves.MOONLIGHT], + ivs: [31, 31, 31, 31, 31, 31] + }); + } else { + // Second member from pool 1 + const pool1Species = getSpeciesFromPool(POOL_1_POKEMON, waveIndex); + // Third member from pool 2 + const pool2Species = getSpeciesFromPool(POOL_2_POKEMON, waveIndex); + + baseConfig.pokemonConfigs!.push({ + species: getPokemonSpecies(pool1Species), + isBoss: false, + ivs: [31, 31, 31, 31, 31, 31] + }, + { + species: getPokemonSpecies(pool2Species), + isBoss: false, + ivs: [31, 31, 31, 31, 31, 31] + }); + } + + return baseConfig; +} + +function getSpeciesFromPool(speciesPool: (Species | BreederSpeciesEvolution)[][], waveIndex: number): Species { + const poolCopy = speciesPool.slice(0); + randSeedShuffle(poolCopy); + const speciesEvolutions = poolCopy.pop()!.slice(0); + let speciesObject = speciesEvolutions.pop()!; + while (speciesObject instanceof BreederSpeciesEvolution && speciesObject.evolution > waveIndex) { + speciesObject = speciesEvolutions.pop()!; + } + return speciesObject instanceof BreederSpeciesEvolution ? speciesObject.species : speciesObject; +} + +function calculateEggRewardsForPokemon(pokemon: PlayerPokemon): [number, number] { + const bst = pokemon.calculateBaseStats().reduce((a, b) => a + b, 0); + // 1 point for every 20 points below 680 BST the pokemon is, (max 18, min 1) + const pointsFromBst = Math.min(Math.max(Math.floor((680 - bst) / 20), 1), 18); + + const rootSpecies = pokemon.species.getRootSpeciesId(true); + let pointsFromStarterTier = 0; + // 2 points for every 1 below 7 that the pokemon's starter tier is (max 12, min 0) + if (speciesStarters.hasOwnProperty(rootSpecies)) { + const starterTier = speciesStarters[rootSpecies]; + pointsFromStarterTier = Math.min(Math.max(Math.floor(7 - starterTier) * 2, 0), 12); + } + + // Maximum of 30 points + const totalPoints = Math.min(pointsFromStarterTier + pointsFromBst, 30); + + // 1 Rare egg for every 6 points + const numRares = Math.floor(totalPoints / 6); + // 1 Common egg for every point leftover + const numCommons = totalPoints % 6; + + return [numCommons, numRares]; +} + +function getEggOptions(scene: BattleScene, commonEggs: number, rareEggs: number) { + const eggDescription = i18next.t(`${namespace}.title`) + ":\n" + i18next.t(trainerNameKey); + const eggOptions: IEggOptions[] = []; + + if (commonEggs > 0) { + for (let i = 0; i < commonEggs; i++) { + eggOptions.push({ + scene, + pulled: false, + sourceType: EggSourceType.EVENT, + eggDescriptor: eggDescription, + tier: EggTier.COMMON + }); + } + } + if (rareEggs > 0) { + for (let i = 0; i < rareEggs; i++) { + eggOptions.push({ + scene, + pulled: false, + sourceType: EggSourceType.EVENT, + eggDescriptor: eggDescription, + tier: EggTier.GREAT + }); + } + } + + return eggOptions; +} + +function removePokemonFromPartyAndStoreHeldItems(scene: BattleScene, encounter: MysteryEncounter, chosenPokemon: PlayerPokemon) { + const party = scene.getParty(); + const chosenIndex = party.indexOf(chosenPokemon); + party[chosenIndex] = party[0]; + party[0] = chosenPokemon; + encounter.misc.originalParty = scene.getParty().slice(1); + encounter.misc.originalPartyHeldItems = encounter.misc.originalParty + .map(p => p.getHeldItems()); + scene["party"] = [ + chosenPokemon + ]; +} + +function checkAchievement(scene: BattleScene) { + if (scene.arena.biomeType === Biome.SPACE) { + scene.validateAchv(achvs.BREEDERS_IN_SPACE); + } +} + +async function restorePartyAndHeldItems(scene: BattleScene) { + const encounter = scene.currentBattle.mysteryEncounter!; + // Restore original party + scene.getParty().push(...encounter.misc.originalParty); + + // Restore held items + const originalHeldItems = encounter.misc.originalPartyHeldItems; + originalHeldItems.forEach(pokemonHeldItemsList => { + pokemonHeldItemsList.forEach(heldItem => { + scene.addModifier(heldItem, true, false, false, true); + }); + }); + await scene.updateModifiers(true); +} diff --git a/src/data/mystery-encounters/mystery-encounters.ts b/src/data/mystery-encounters/mystery-encounters.ts index d235ff86861..cc2eaf234c4 100644 --- a/src/data/mystery-encounters/mystery-encounters.ts +++ b/src/data/mystery-encounters/mystery-encounters.ts @@ -31,6 +31,7 @@ import { BugTypeSuperfanEncounter } from "#app/data/mystery-encounters/encounter import { FunAndGamesEncounter } from "#app/data/mystery-encounters/encounters/fun-and-games-encounter"; import { UncommonBreedEncounter } from "#app/data/mystery-encounters/encounters/uncommon-breed-encounter"; import { GlobalTradeSystemEncounter } from "#app/data/mystery-encounters/encounters/global-trade-system-encounter"; +import { TheExpertPokemonBreederEncounter } from "#app/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter"; /** * Spawn chance: (BASE_MYSTERY_ENCOUNTER_SPAWN_WEIGHT + WIGHT_INCREMENT_ON_SPAWN_MISS * ) / MYSTERY_ENCOUNTER_SPAWN_MAX_WEIGHT @@ -184,7 +185,8 @@ const humanTransitableBiomeEncounters: MysteryEncounterType[] = [ MysteryEncounterType.SHADY_VITAMIN_DEALER, MysteryEncounterType.THE_POKEMON_SALESMAN, MysteryEncounterType.AN_OFFER_YOU_CANT_REFUSE, - MysteryEncounterType.THE_WINSTRATE_CHALLENGE + MysteryEncounterType.THE_WINSTRATE_CHALLENGE, + MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER ]; const civilizationBiomeEncounters: MysteryEncounterType[] = [ @@ -238,7 +240,6 @@ export const mysteryEncountersByBiome = new Map([ MysteryEncounterType.SAFARI_ZONE, MysteryEncounterType.ABSOLUTE_AVARICE ]], - [Biome.SEA, [ MysteryEncounterType.LOST_AT_SEA ]], @@ -275,7 +276,9 @@ export const mysteryEncountersByBiome = new Map([ [Biome.ABYSS, [ MysteryEncounterType.DANCING_LESSONS ]], - [Biome.SPACE, []], + [Biome.SPACE, [ + MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER + ]], [Biome.CONSTRUCTION_SITE, []], [Biome.JUNGLE, [ MysteryEncounterType.SAFARI_ZONE @@ -319,6 +322,7 @@ export function initMysteryEncounters() { allMysteryEncounters[MysteryEncounterType.FUN_AND_GAMES] = FunAndGamesEncounter; allMysteryEncounters[MysteryEncounterType.UNCOMMON_BREED] = UncommonBreedEncounter; allMysteryEncounters[MysteryEncounterType.GLOBAL_TRADE_SYSTEM] = GlobalTradeSystemEncounter; + allMysteryEncounters[MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER] = TheExpertPokemonBreederEncounter; // Add extreme encounters to biome map extremeBiomeEncounters.forEach(encounter => { diff --git a/src/data/mystery-encounters/utils/encounter-phase-utils.ts b/src/data/mystery-encounters/utils/encounter-phase-utils.ts index 85d583fc898..187de3c93c4 100644 --- a/src/data/mystery-encounters/utils/encounter-phase-utils.ts +++ b/src/data/mystery-encounters/utils/encounter-phase-utils.ts @@ -36,6 +36,7 @@ import { BattleEndPhase } from "#app/phases/battle-end-phase"; import { GameOverPhase } from "#app/phases/game-over-phase"; import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; import { PartyExpPhase } from "#app/phases/party-exp-phase"; +import { Variant } from "#app/data/variant"; /** * Animates exclamation sprite over trainer's head at start of encounter @@ -67,6 +68,7 @@ export function doTrainerExclamation(scene: BattleScene) { export interface EnemyPokemonConfig { species: PokemonSpecies; isBoss: boolean; + nickname?: string; bossSegments?: number; bossSegmentModifier?: number; // Additive to the determined segment number mysteryEncounterPokemonData?: MysteryEncounterPokemonData; @@ -79,6 +81,8 @@ export interface EnemyPokemonConfig { nature?: Nature; ivs?: [number, number, number, number, number, number]; shiny?: boolean; + /** Is only checked if Pokemon is shiny */ + variant?: Variant; /** Can set just the status, or pass a timer on the status turns */ status?: StatusEffect | [StatusEffect, number]; mysteryEncounterBattleEffects?: (pokemon: Pokemon) => void; @@ -220,6 +224,11 @@ export async function initBattleWithEnemyConfig(scene: BattleScene, partyConfig: if (partyConfig?.pokemonConfigs && e < partyConfig.pokemonConfigs.length) { const config = partyConfig.pokemonConfigs[e]; + // Set form + if (!isNullOrUndefined(config.nickname)) { + enemyPokemon.nickname = btoa(unescape(encodeURIComponent(config.nickname!))); + } + // Generate new id, reset status and HP in case using data source if (config.dataSource) { enemyPokemon.id = Utils.randSeedInt(4294967296); @@ -235,6 +244,11 @@ export async function initBattleWithEnemyConfig(scene: BattleScene, partyConfig: enemyPokemon.shiny = config.shiny!; } + // Set Variant + if (enemyPokemon.shiny && !isNullOrUndefined(config.variant)) { + enemyPokemon.variant = config.variant!; + } + // Set custom mystery encounter data fields (such as sprite scale, custom abilities, types, etc.) if (!isNullOrUndefined(config.mysteryEncounterPokemonData)) { enemyPokemon.mysteryEncounterPokemonData = config.mysteryEncounterPokemonData!; @@ -315,6 +329,9 @@ export async function initBattleWithEnemyConfig(scene: BattleScene, partyConfig: // Requires re-priming summon data to update everything properly enemyPokemon.primeSummonData(enemyPokemon.summonData); + if (enemyPokemon.isShiny() && !enemyPokemon["shinySparkle"]) { + enemyPokemon.initShinySparkle(); + } enemyPokemon.initBattleInfo(); enemyPokemon.getBattleInfo().initInfo(enemyPokemon); enemyPokemon.generateName(); diff --git a/src/data/trainer-config.ts b/src/data/trainer-config.ts index 8b96e3cefb8..dca7b31a862 100644 --- a/src/data/trainer-config.ts +++ b/src/data/trainer-config.ts @@ -1105,8 +1105,16 @@ function getGymLeaderPartyTemplate(scene: BattleScene) { return getWavePartyTemplate(scene, trainerPartyTemplates.GYM_LEADER_1, trainerPartyTemplates.GYM_LEADER_2, trainerPartyTemplates.GYM_LEADER_3, trainerPartyTemplates.GYM_LEADER_4, trainerPartyTemplates.GYM_LEADER_5); } -function getRandomPartyMemberFunc(speciesPool: Species[], trainerSlot: TrainerSlot = TrainerSlot.TRAINER, ignoreEvolution: boolean = false, postProcess?: (enemyPokemon: EnemyPokemon) => void): PartyMemberFunc { - return (scene: BattleScene, level: integer, strength: PartyMemberStrength) => { +/** + * Randomly selects one of the `Species` from `speciesPool`, determines its evolution, level, and strength. + * Then adds Pokemon to scene. + * @param speciesPool + * @param trainerSlot + * @param ignoreEvolution + * @param postProcess + */ +export function getRandomPartyMemberFunc(speciesPool: Species[], trainerSlot: TrainerSlot = TrainerSlot.TRAINER, ignoreEvolution: boolean = false, postProcess?: (enemyPokemon: EnemyPokemon) => void) { + return (scene: BattleScene, level: number, strength: PartyMemberStrength) => { let species = Utils.randSeedItem(speciesPool); if (!ignoreEvolution) { species = getPokemonSpecies(species).getTrainerSpeciesForLevel(level, true, strength, scene.currentBattle.waveIndex); @@ -2302,6 +2310,8 @@ export const trainerConfigs: TrainerConfigs = { .setMoneyMultiplier(2) .setPartyTemplates(new TrainerPartyCompoundTemplate(new TrainerPartyTemplate(3, PartyMemberStrength.AVERAGE), new TrainerPartyTemplate(2, PartyMemberStrength.STRONG))), [TrainerType.BUG_TYPE_SUPERFAN]: new TrainerConfig(++t).setMoneyMultiplier(2.25).setEncounterBgm(TrainerType.ACE_TRAINER) - .setPartyTemplates(new TrainerPartyTemplate(2, PartyMemberStrength.AVERAGE)) + .setPartyTemplates(new TrainerPartyTemplate(2, PartyMemberStrength.AVERAGE)), + [TrainerType.EXPERT_POKEMON_BREEDER]: new TrainerConfig(++t).setMoneyMultiplier(3).setEncounterBgm(TrainerType.ACE_TRAINER) + .setPartyTemplates(new TrainerPartyTemplate(3, PartyMemberStrength.STRONG)) }; diff --git a/src/enums/mystery-encounter-type.ts b/src/enums/mystery-encounter-type.ts index 39a8087599c..b973652b113 100644 --- a/src/enums/mystery-encounter-type.ts +++ b/src/enums/mystery-encounter-type.ts @@ -28,5 +28,6 @@ export enum MysteryEncounterType { BUG_TYPE_SUPERFAN, FUN_AND_GAMES, UNCOMMON_BREED, - GLOBAL_TRADE_SYSTEM + GLOBAL_TRADE_SYSTEM, + THE_EXPERT_POKEMON_BREEDER } diff --git a/src/enums/trainer-type.ts b/src/enums/trainer-type.ts index cfc52b70eb0..fa52e376a07 100644 --- a/src/enums/trainer-type.ts +++ b/src/enums/trainer-type.ts @@ -107,6 +107,7 @@ export enum TrainerType { VICKY, VITO, BUG_TYPE_SUPERFAN, + EXPERT_POKEMON_BREEDER, BROCK = 200, MISTY, diff --git a/src/field/arena.ts b/src/field/arena.ts index 9ce19c85283..9897da7cfd7 100644 --- a/src/field/arena.ts +++ b/src/field/arena.ts @@ -1,19 +1,19 @@ import BattleScene from "../battle-scene"; -import { BiomePoolTier, PokemonPools, BiomeTierTrainerPools, biomePokemonPools, biomeTrainerPools } from "../data/biomes"; +import { biomePokemonPools, BiomePoolTier, BiomeTierTrainerPools, biomeTrainerPools, PokemonPools } from "../data/biomes"; import { Constructor } from "#app/utils"; import * as Utils from "../utils"; import PokemonSpecies, { getPokemonSpecies } from "../data/pokemon-species"; -import { Weather, WeatherType, getTerrainClearMessage, getTerrainStartMessage, getWeatherClearMessage, getWeatherStartMessage } from "../data/weather"; +import { getTerrainClearMessage, getTerrainStartMessage, getWeatherClearMessage, getWeatherStartMessage, Weather, WeatherType } from "../data/weather"; import { CommonAnim } from "../data/battle-anims"; import { Type } from "../data/type"; import Move from "../data/move"; import { ArenaTag, ArenaTagSide, ArenaTrapTag, getArenaTag } from "../data/arena-tag"; import { BattlerIndex } from "../battle"; import { Terrain, TerrainType } from "../data/terrain"; -import { PostTerrainChangeAbAttr, PostWeatherChangeAbAttr, applyPostTerrainChangeAbAttrs, applyPostWeatherChangeAbAttrs } from "../data/ability"; +import { applyPostTerrainChangeAbAttrs, applyPostWeatherChangeAbAttrs, PostTerrainChangeAbAttr, PostWeatherChangeAbAttr } from "../data/ability"; import Pokemon from "./pokemon"; import Overrides from "#app/overrides"; -import { WeatherChangedEvent, TerrainChangedEvent, TagAddedEvent, TagRemovedEvent } from "../events/arena"; +import { TagAddedEvent, TagRemovedEvent, TerrainChangedEvent, WeatherChangedEvent } from "../events/arena"; import { ArenaTagType } from "#enums/arena-tag-type"; import { Biome } from "#enums/biome"; import { Moves } from "#enums/moves"; diff --git a/src/locales/en/achv.json b/src/locales/en/achv.json index 32d519fbf78..b04f23d4209 100644 --- a/src/locales/en/achv.json +++ b/src/locales/en/achv.json @@ -283,5 +283,9 @@ "INVERSE_BATTLE": { "name": "Mirror rorriM", "description": "Complete the Inverse Battle challenge.\n.egnellahc elttaB esrevnI eht etelpmoC" + }, + "BREEDERS_IN_SPACE": { + "name": "Breeders in Space!", + "description": "Beat the Expert Pokémon Breeder in the Space Biome." } } diff --git a/src/locales/en/config.ts b/src/locales/en/config.ts index f83fec5be26..35eef91e2ad 100644 --- a/src/locales/en/config.ts +++ b/src/locales/en/config.ts @@ -84,6 +84,7 @@ import bugTypeSuperfan from "#app/locales/en/mystery-encounters/bug-type-superfa import funAndGames from "#app/locales/en/mystery-encounters/fun-and-games-dialogue.json"; import uncommonBreed from "#app/locales/en/mystery-encounters/uncommon-breed-dialogue.json"; import globalTradeSystem from "#app/locales/en/mystery-encounters/global-trade-system-dialogue.json"; +import expertPokemonBreeder from "#app/locales/en/mystery-encounters/the-expert-pokemon-breeder-dialogue.json"; /** * Dialogue/Text token injection patterns that can be used: @@ -183,7 +184,8 @@ export const enConfig = { bugTypeSuperfan, funAndGames, uncommonBreed, - globalTradeSystem + globalTradeSystem, + expertPokemonBreeder }, mysteryEncounterMessages }; diff --git a/src/locales/en/mystery-encounters/part-timer-dialogue.json b/src/locales/en/mystery-encounters/part-timer-dialogue.json index 614f1818e3f..801a409ee84 100644 --- a/src/locales/en/mystery-encounters/part-timer-dialogue.json +++ b/src/locales/en/mystery-encounters/part-timer-dialogue.json @@ -21,7 +21,7 @@ "label": "Sales Assistant", "tooltip": "(-) Your {{option3PrimaryName}} uses {{option3PrimaryMove}}\n(+) Earn @[MONEY]{Money}", "disabled_tooltip": "Your Pokémon need to know certain moves for this job", - "selected": "Your {{option3PrimaryName}} spends the day using {{option3PrimaryMove}} to attract customers to the business!" + "selected": "Your {{option3PrimaryName}} spends the day using {{option3PrimaryMove}} to draw customers to the business!" } }, "job_complete_good": "Thanks for the assistance!\nYour {{selectedPokemon}} was incredibly helpful!$Here's your check for the day.", diff --git a/src/locales/en/mystery-encounters/the-expert-pokemon-breeder-dialogue.json b/src/locales/en/mystery-encounters/the-expert-pokemon-breeder-dialogue.json new file mode 100644 index 00000000000..ebe3af38add --- /dev/null +++ b/src/locales/en/mystery-encounters/the-expert-pokemon-breeder-dialogue.json @@ -0,0 +1,30 @@ +{ + "intro": "It's a trainer carrying tons of Pokémon Eggs!", + "intro_dialogue": "Hey there, trainer!$It looks like some of your\npartner Pokémon are feeling a little down.$Why not have a battle with me to cheer them up?", + "title": "The Expert Pokémon Breeder", + "description": "You've been challenged to a battle where @[TOOLTIP_TITLE]{you can only use a single Pokémon}. It might be tough, but it would surely deepen the bond you have with the Pokémon you choose!\nThe breeder will also give you some @[TOOLTIP_TITLE]{Pokémon Eggs} if you win!", + "query": "Who will you battle with?", + "cleffa_1_nickname": "Ace", + "cleffa_2_nickname": "Clefablest", + "cleffa_3_nickname": "{{speciesName}} the Great", + "option": { + "1": { + "label": "{{pokemon1Name}}", + "tooltip_base": "(-) Tough Battle\n(+) Gain Friendship with {{pokemon1Name}}" + }, + "2": { + "label": "{{pokemon2Name}}", + "tooltip_base": "(-) Tough Battle\n(+) Gain Friendship with {{pokemon2Name}}" + }, + "3": { + "label": "{{pokemon3Name}}", + "tooltip_base": "(-) Tough Battle\n(+) Gain Friendship with {{pokemon3Name}}" + }, + "selected": "Let's do this!" + }, + "outro": "Look how happy your {{chosenPokemon}} is now!$Here, you can have these as well.", + "gained_eggs": "@s{item_fanfare}You received {{numEggs}}!", + "eggs_tooltip": "\n(+) Earn {{eggs}}", + "numEggs_one": "{{count}} {{rarity}} Egg", + "numEggs_other": "{{count}} {{rarity}} Eggs" +} \ No newline at end of file diff --git a/src/locales/en/trainer-names.json b/src/locales/en/trainer-names.json index 467ed03e044..3c709f6a138 100644 --- a/src/locales/en/trainer-names.json +++ b/src/locales/en/trainer-names.json @@ -172,5 +172,6 @@ "vivi": "Vivi", "vicky": "Vicky", "vito": "Vito", - "bug_type_superfan": "Bug-Type Superfan" + "bug_type_superfan": "Bug-Type Superfan", + "expert_pokemon_breeder": "Expert Pokémon Breeder" } diff --git a/src/system/achv.ts b/src/system/achv.ts index 6170fe23e1d..09ec74de50c 100644 --- a/src/system/achv.ts +++ b/src/system/achv.ts @@ -279,6 +279,8 @@ export function getAchievementDescription(localizationKey: string): string { return i18next.t("achv:FRESH_START.description", { context: genderStr }); case "INVERSE_BATTLE": return i18next.t("achv:INVERSE_BATTLE.description", { context: genderStr }); + case "BREEDERS_IN_SPACE": + return i18next.t("achv:BREEDERS_IN_SPACE.description", { context: genderStr }); default: return ""; } @@ -356,6 +358,7 @@ export const achvs = { MONO_FAIRY: new ChallengeAchv("MONO_FAIRY", "", "MONO_FAIRY.description", "fairy_feather", 100, (c, scene) => c instanceof SingleTypeChallenge && c.value === 18 && !scene.gameMode.challenges.some(c => c.id === Challenges.INVERSE_BATTLE && c.value > 0)), FRESH_START: new ChallengeAchv("FRESH_START", "", "FRESH_START.description", "reviver_seed", 100, (c, scene) => c instanceof FreshStartChallenge && c.value > 0 && !scene.gameMode.challenges.some(c => c.id === Challenges.INVERSE_BATTLE && c.value > 0)), INVERSE_BATTLE: new ChallengeAchv("INVERSE_BATTLE", "", "INVERSE_BATTLE.description", "inverse", 100, c => c instanceof InverseBattleChallenge && c.value > 0), + BREEDERS_IN_SPACE: new Achv("BREEDERS_IN_SPACE", "", "BREEDERS_IN_SPACE.description", "moon_stone", 100).setSecret(), }; export function initAchievements() { diff --git a/src/test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts b/src/test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts index b4cc186864c..3dc90427eb2 100644 --- a/src/test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/a-trainers-test-encounter.test.ts @@ -69,22 +69,6 @@ describe("A Trainer's Test - Mystery Encounter", () => { expect(ATrainersTestEncounter.options.length).toBe(2); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.A_TRAINERS_TEST); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully ", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = ATrainersTestEncounter; diff --git a/src/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts b/src/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts index 7cca7abba27..58c8e1fbc30 100644 --- a/src/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts @@ -66,22 +66,6 @@ describe("Absolute Avarice - Mystery Encounter", () => { expect(AbsoluteAvariceEncounter.options.length).toBe(3); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.ABSOLUTE_AVARICE); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should not spawn outside of proper biomes", async () => { game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT); game.override.startingBiome(Biome.VOLCANO); diff --git a/src/test/mystery-encounter/encounters/an-offer-you-cant-refuse-encounter.test.ts b/src/test/mystery-encounter/encounters/an-offer-you-cant-refuse-encounter.test.ts index 1c68852a63d..88704746a3c 100644 --- a/src/test/mystery-encounter/encounters/an-offer-you-cant-refuse-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/an-offer-you-cant-refuse-encounter.test.ts @@ -80,22 +80,6 @@ describe("An Offer You Can't Refuse - Mystery Encounter", () => { expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.AN_OFFER_YOU_CANT_REFUSE); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.AN_OFFER_YOU_CANT_REFUSE); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully ", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = AnOfferYouCantRefuseEncounter; diff --git a/src/test/mystery-encounter/encounters/berries-abound-encounter.test.ts b/src/test/mystery-encounter/encounters/berries-abound-encounter.test.ts index 5d30bc91de9..af5c0f0b48b 100644 --- a/src/test/mystery-encounter/encounters/berries-abound-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/berries-abound-encounter.test.ts @@ -69,22 +69,6 @@ describe("Berries Abound - Mystery Encounter", () => { expect(BerriesAboundEncounter.options.length).toBe(3); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.BERRIES_ABOUND); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = BerriesAboundEncounter; diff --git a/src/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts b/src/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts index 70adf93d502..247acc9e5b6 100644 --- a/src/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts @@ -201,22 +201,6 @@ describe("Bug-Type Superfan - Mystery Encounter", () => { expect(BugTypeSuperfanEncounter.options.length).toBe(3); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.BUG_TYPE_SUPERFAN); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = BugTypeSuperfanEncounter; diff --git a/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts b/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts index 383e3bd3564..5ed5a9487de 100644 --- a/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/clowning-around-encounter.test.ts @@ -95,14 +95,6 @@ describe("Clowning Around - Mystery Encounter", () => { expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.CLOWNING_AROUND); }); - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = ClowningAroundEncounter; diff --git a/src/test/mystery-encounter/encounters/dancing-lessons-encounter.test.ts b/src/test/mystery-encounter/encounters/dancing-lessons-encounter.test.ts index 5a2512ddaf6..cbf8251f2e7 100644 --- a/src/test/mystery-encounter/encounters/dancing-lessons-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/dancing-lessons-encounter.test.ts @@ -69,22 +69,6 @@ describe("Dancing Lessons - Mystery Encounter", () => { expect(DancingLessonsEncounter.options.length).toBe(3); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.DANCING_LESSONS); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should not spawn outside of proper biomes", async () => { game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT); game.override.startingBiome(Biome.SPACE); diff --git a/src/test/mystery-encounter/encounters/delibirdy-encounter.test.ts b/src/test/mystery-encounter/encounters/delibirdy-encounter.test.ts index 969188dca06..7e452fd90c7 100644 --- a/src/test/mystery-encounter/encounters/delibirdy-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/delibirdy-encounter.test.ts @@ -66,22 +66,6 @@ describe("Delibird-y - Mystery Encounter", () => { expect(DelibirdyEncounter.options.length).toBe(3); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.DELIBIRDY); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should not spawn if player does not have enough money", async () => { scene.money = 0; diff --git a/src/test/mystery-encounter/encounters/department-store-sale-encounter.test.ts b/src/test/mystery-encounter/encounters/department-store-sale-encounter.test.ts index f22bd832964..0b2d66db20b 100644 --- a/src/test/mystery-encounter/encounters/department-store-sale-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/department-store-sale-encounter.test.ts @@ -79,22 +79,6 @@ describe("Department Store Sale - Mystery Encounter", () => { expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.DEPARTMENT_STORE_SALE); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.DEPARTMENT_STORE_SALE); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - describe("Option 1 - TM Shop", () => { it("should have the correct properties", () => { const option = DepartmentStoreSaleEncounter.options[0]; diff --git a/src/test/mystery-encounter/encounters/field-trip-encounter.test.ts b/src/test/mystery-encounter/encounters/field-trip-encounter.test.ts index 7a8d951c5da..13550abb97c 100644 --- a/src/test/mystery-encounter/encounters/field-trip-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/field-trip-encounter.test.ts @@ -72,22 +72,6 @@ describe("Field Trip - Mystery Encounter", () => { expect(FieldTripEncounter.options.length).toBe(3); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.FIELD_TRIP); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - describe("Option 1 - Show off a physical move", () => { it("should have the correct properties", () => { const option = FieldTripEncounter.options[0]; diff --git a/src/test/mystery-encounter/encounters/fiery-fallout-encounter.test.ts b/src/test/mystery-encounter/encounters/fiery-fallout-encounter.test.ts index 445ab4491a4..cd11aa2628b 100644 --- a/src/test/mystery-encounter/encounters/fiery-fallout-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/fiery-fallout-encounter.test.ts @@ -88,14 +88,6 @@ describe("Fiery Fallout - Mystery Encounter", () => { expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.FIERY_FALLOUT); }); - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully ", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = FieryFalloutEncounter; diff --git a/src/test/mystery-encounter/encounters/fight-or-flight-encounter.test.ts b/src/test/mystery-encounter/encounters/fight-or-flight-encounter.test.ts index 86d79b57f80..df2f32231ba 100644 --- a/src/test/mystery-encounter/encounters/fight-or-flight-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/fight-or-flight-encounter.test.ts @@ -67,22 +67,6 @@ describe("Fight or Flight - Mystery Encounter", () => { expect(FightOrFlightEncounter.options.length).toBe(3); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.FIGHT_OR_FLIGHT); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = FightOrFlightEncounter; diff --git a/src/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts b/src/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts index 70250350af4..c337556728b 100644 --- a/src/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts @@ -85,22 +85,6 @@ describe("Fun And Games! - Mystery Encounter", () => { expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.FUN_AND_GAMES); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.FUN_AND_GAMES); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = new MysteryEncounter(FunAndGamesEncounter); diff --git a/src/test/mystery-encounter/encounters/global-trade-system-encounter.test.ts b/src/test/mystery-encounter/encounters/global-trade-system-encounter.test.ts index e91b936cb9d..5a99b0450ca 100644 --- a/src/test/mystery-encounter/encounters/global-trade-system-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/global-trade-system-encounter.test.ts @@ -69,22 +69,6 @@ describe("Global Trade System - Mystery Encounter", () => { expect(GlobalTradeSystemEncounter.options.length).toBe(4); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.GLOBAL_TRADE_SYSTEM); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should not spawn outside of CIVILIZATION_ENCOUNTER_BIOMES", async () => { game.override.mysteryEncounterTier(MysteryEncounterTier.COMMON); game.override.startingBiome(Biome.VOLCANO); diff --git a/src/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts b/src/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts index 82670e32daa..02872334fac 100644 --- a/src/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts @@ -74,22 +74,6 @@ describe("Lost at Sea - Mystery Encounter", () => { expect(game.scene.currentBattle.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.LOST_AT_SEA); }); - it("should not run below wave 11", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(game.scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(game.scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully", () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = LostAtSeaEncounter; diff --git a/src/test/mystery-encounter/encounters/mysterious-challengers-encounter.test.ts b/src/test/mystery-encounter/encounters/mysterious-challengers-encounter.test.ts index 2c0d48e59c6..15cd3338fff 100644 --- a/src/test/mystery-encounter/encounters/mysterious-challengers-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/mysterious-challengers-encounter.test.ts @@ -79,22 +79,6 @@ describe("Mysterious Challengers - Mystery Encounter", () => { expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.MYSTERIOUS_CHALLENGERS); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.MYSTERIOUS_CHALLENGERS); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = new MysteryEncounter(MysteriousChallengersEncounter); diff --git a/src/test/mystery-encounter/encounters/part-timer-encounter.test.ts b/src/test/mystery-encounter/encounters/part-timer-encounter.test.ts index f73c1f437d0..061b6a61461 100644 --- a/src/test/mystery-encounter/encounters/part-timer-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/part-timer-encounter.test.ts @@ -80,22 +80,6 @@ describe("Part-Timer - Mystery Encounter", () => { expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.PART_TIMER); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.PART_TIMER); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - describe("Option 1 - Make Deliveries", () => { it("should have the correct properties", () => { const option = PartTimerEncounter.options[0]; diff --git a/src/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts b/src/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts index 2505f28aa43..f7f96de3af3 100644 --- a/src/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/teleporting-hijinks-encounter.test.ts @@ -67,22 +67,6 @@ describe("Teleporting Hijinks - Mystery Encounter", () => { expect(TeleportingHijinksEncounter.options.length).toBe(3); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.TELEPORTING_HIJINKS); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should run in waves that are X1", async () => { game.override.startingWave(11); game.override.mysteryEncounterTier(MysteryEncounterTier.COMMON); diff --git a/src/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts b/src/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts new file mode 100644 index 00000000000..59765148ead --- /dev/null +++ b/src/test/mystery-encounter/encounters/the-expert-breeder-encounter.test.ts @@ -0,0 +1,283 @@ +import * as MysteryEncounters from "#app/data/mystery-encounters/mystery-encounters"; +import { HUMAN_TRANSITABLE_BIOMES } from "#app/data/mystery-encounters/mystery-encounters"; +import { Biome } from "#app/enums/biome"; +import { MysteryEncounterType } from "#app/enums/mystery-encounter-type"; +import { Species } from "#app/enums/species"; +import GameManager from "#app/test/utils/gameManager"; +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { runMysteryEncounterToEnd, skipBattleRunMysteryEncounterRewardsPhase } from "#test/mystery-encounter/encounter-test-utils"; +import BattleScene from "#app/battle-scene"; +import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; +import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; +import { initSceneWithoutEncounterPhase } from "#test/utils/gameManagerUtils"; +import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; +import MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; +import { CommandPhase } from "#app/phases/command-phase"; +import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; +import { TheExpertPokemonBreederEncounter } from "#app/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter"; +import { TrainerType } from "#enums/trainer-type"; +import { EggTier } from "#enums/egg-type"; +import { PostMysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; + +const namespace = "mysteryEncounter:expertPokemonBreeder"; +const defaultParty = [Species.LAPRAS, Species.GENGAR, Species.ABRA]; +const defaultBiome = Biome.CAVE; +const defaultWave = 45; + +describe("The Expert Pokémon Breeder - Mystery Encounter", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + let scene: BattleScene; + + beforeAll(() => { + phaserGame = new Phaser.Game({ type: Phaser.HEADLESS }); + }); + + beforeEach(async () => { + game = new GameManager(phaserGame); + scene = game.scene; + game.override.mysteryEncounterChance(100); + game.override.startingWave(defaultWave); + game.override.startingBiome(defaultBiome); + game.override.disableTrainerWaves(); + + const biomeMap = new Map([ + [Biome.VOLCANO, [MysteryEncounterType.FIGHT_OR_FLIGHT]], + ]); + HUMAN_TRANSITABLE_BIOMES.forEach(biome => { + biomeMap.set(biome, [MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER]); + }); + vi.spyOn(MysteryEncounters, "mysteryEncountersByBiome", "get").mockReturnValue(biomeMap); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + vi.clearAllMocks(); + vi.resetAllMocks(); + }); + + it("should have the correct properties", async () => { + await game.runToMysteryEncounter(MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER, defaultParty); + + expect(TheExpertPokemonBreederEncounter.encounterType).toBe(MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER); + expect(TheExpertPokemonBreederEncounter.encounterTier).toBe(MysteryEncounterTier.ULTRA); + expect(TheExpertPokemonBreederEncounter.dialogue).toBeDefined(); + expect(TheExpertPokemonBreederEncounter.dialogue.intro).toStrictEqual([ + { + text: `${namespace}.intro` + }, + { + speaker: "trainerNames:expert_pokemon_breeder", + text: `${namespace}.intro_dialogue` + }, + ]); + expect(TheExpertPokemonBreederEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}.title`); + expect(TheExpertPokemonBreederEncounter.dialogue.encounterOptionsDialogue?.description).toBe(`${namespace}.description`); + expect(TheExpertPokemonBreederEncounter.dialogue.encounterOptionsDialogue?.query).toBe(`${namespace}.query`); + expect(TheExpertPokemonBreederEncounter.options.length).toBe(3); + }); + + it("should not spawn outside of HUMAN_TRANSITABLE_BIOMES", async () => { + game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT); + game.override.startingBiome(Biome.VOLCANO); + await game.runToMysteryEncounter(); + + expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER); + }); + + it("should initialize fully", async () => { + initSceneWithoutEncounterPhase(scene, defaultParty); + scene.currentBattle.mysteryEncounter = new MysteryEncounter(TheExpertPokemonBreederEncounter); + const encounter = scene.currentBattle.mysteryEncounter!; + scene.currentBattle.waveIndex = defaultWave; + + const { onInit } = encounter; + + expect(encounter.onInit).toBeDefined(); + + encounter.populateDialogueTokensFromRequirements(scene); + const onInitResult = onInit!(scene); + + expect(encounter.enemyPartyConfigs).toBeDefined(); + expect(encounter.enemyPartyConfigs.length).toBe(1); + expect(encounter.enemyPartyConfigs[0].trainerType).toBe(TrainerType.EXPERT_POKEMON_BREEDER); + expect(encounter.enemyPartyConfigs[0].pokemonConfigs?.length).toBe(3); + expect(encounter.spriteConfigs).toBeDefined(); + expect(encounter.spriteConfigs.length).toBe(2); + expect(onInitResult).toBe(true); + }); + + describe("Option 1 - Battle with Pokemon 1", () => { + it("should have the correct properties", () => { + const option = TheExpertPokemonBreederEncounter.options[0]; + expect(option.optionMode).toBe(MysteryEncounterOptionMode.DEFAULT); + expect(option.dialogue).toBeDefined(); + expect(option.dialogue).toStrictEqual({ + buttonLabel: `${namespace}.option.1.label`, + buttonTooltip: expect.any(String), // Varies based on pokemon + selected: [ + { + speaker: "trainerNames:expert_pokemon_breeder", + text: `${namespace}.option.selected`, + }, + ], + }); + }); + + it("should start battle against the trainer", async () => { + await game.runToMysteryEncounter(MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER, defaultParty); + await runMysteryEncounterToEnd(game, 1, undefined, true); + + expect(scene.getCurrentPhase()?.constructor.name).toBe(CommandPhase.name); + expect(scene.currentBattle.trainer).toBeDefined(); + expect(scene.currentBattle.mysteryEncounter?.encounterMode).toBe(MysteryEncounterMode.TRAINER_BATTLE); + expect(scene.getParty().length).toBe(1); + }); + + it("Should reward the player with friendship and eggs based on pokemon selected", async () => { + await game.runToMysteryEncounter(MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER, defaultParty); + + const friendshipBefore = scene.currentBattle.mysteryEncounter!.misc.pokemon1.friendship; + + scene.gameData.eggs = []; + const eggsBefore = scene.gameData.eggs; + expect(eggsBefore).toBeDefined(); + const eggsBeforeLength = eggsBefore.length; + + await runMysteryEncounterToEnd(game, 1, undefined, true); + await skipBattleRunMysteryEncounterRewardsPhase(game); + await game.phaseInterceptor.to(SelectModifierPhase, false); + expect(scene.getCurrentPhase()?.constructor.name).toBe(SelectModifierPhase.name); + + const eggsAfter = scene.gameData.eggs; + const commonEggs = scene.currentBattle.mysteryEncounter!.misc.pokemon1CommonEggs; + const rareEggs = scene.currentBattle.mysteryEncounter!.misc.pokemon1RareEggs; + expect(eggsAfter).toBeDefined(); + expect(eggsBeforeLength + commonEggs + rareEggs).toBe(eggsAfter.length); + expect(eggsAfter.filter(egg => egg.tier === EggTier.COMMON).length).toBe(commonEggs); + expect(eggsAfter.filter(egg => egg.tier === EggTier.GREAT).length).toBe(rareEggs); + + game.phaseInterceptor.superEndPhase(); + await game.phaseInterceptor.to(PostMysteryEncounterPhase); + + const friendshipAfter = scene.currentBattle.mysteryEncounter!.misc.pokemon1.friendship; + expect(friendshipAfter).toBe(friendshipBefore + 20 + 2); // +2 extra for friendship gained from winning battle + }); + }); + + describe("Option 2 - Battle with Pokemon 2", () => { + it("should have the correct properties", () => { + const option = TheExpertPokemonBreederEncounter.options[1]; + expect(option.optionMode).toBe(MysteryEncounterOptionMode.DEFAULT); + expect(option.dialogue).toBeDefined(); + expect(option.dialogue).toStrictEqual({ + buttonLabel: `${namespace}.option.2.label`, + buttonTooltip: expect.any(String), // Varies based on pokemon + selected: [ + { + speaker: "trainerNames:expert_pokemon_breeder", + text: `${namespace}.option.selected`, + }, + ], + }); + }); + + it("should start battle against the trainer", async () => { + await game.runToMysteryEncounter(MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER, defaultParty); + await runMysteryEncounterToEnd(game, 2, undefined, true); + + expect(scene.getCurrentPhase()?.constructor.name).toBe(CommandPhase.name); + expect(scene.currentBattle.trainer).toBeDefined(); + expect(scene.currentBattle.mysteryEncounter?.encounterMode).toBe(MysteryEncounterMode.TRAINER_BATTLE); + expect(scene.getParty().length).toBe(1); + }); + + it("Should reward the player with friendship and eggs based on pokemon selected", async () => { + await game.runToMysteryEncounter(MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER, defaultParty); + + const friendshipBefore = scene.currentBattle.mysteryEncounter!.misc.pokemon2.friendship; + + scene.gameData.eggs = []; + const eggsBefore = scene.gameData.eggs; + expect(eggsBefore).toBeDefined(); + const eggsBeforeLength = eggsBefore.length; + + await runMysteryEncounterToEnd(game, 2, undefined, true); + await skipBattleRunMysteryEncounterRewardsPhase(game); + await game.phaseInterceptor.to(SelectModifierPhase, false); + expect(scene.getCurrentPhase()?.constructor.name).toBe(SelectModifierPhase.name); + + const eggsAfter = scene.gameData.eggs; + const commonEggs = scene.currentBattle.mysteryEncounter!.misc.pokemon2CommonEggs; + const rareEggs = scene.currentBattle.mysteryEncounter!.misc.pokemon2RareEggs; + expect(eggsAfter).toBeDefined(); + expect(eggsBeforeLength + commonEggs + rareEggs).toBe(eggsAfter.length); + expect(eggsAfter.filter(egg => egg.tier === EggTier.COMMON).length).toBe(commonEggs); + expect(eggsAfter.filter(egg => egg.tier === EggTier.GREAT).length).toBe(rareEggs); + + game.phaseInterceptor.superEndPhase(); + await game.phaseInterceptor.to(PostMysteryEncounterPhase); + + const friendshipAfter = scene.currentBattle.mysteryEncounter!.misc.pokemon2.friendship; + expect(friendshipAfter).toBe(friendshipBefore + 20 + 2); // +2 extra for friendship gained from winning battle + }); + }); + + describe("Option 3 - Battle with Pokemon 3", () => { + it("should have the correct properties", () => { + const option = TheExpertPokemonBreederEncounter.options[2]; + expect(option.optionMode).toBe(MysteryEncounterOptionMode.DEFAULT); + expect(option.dialogue).toBeDefined(); + expect(option.dialogue).toStrictEqual({ + buttonLabel: `${namespace}.option.3.label`, + buttonTooltip: expect.any(String), // Varies based on pokemon + selected: [ + { + speaker: "trainerNames:expert_pokemon_breeder", + text: `${namespace}.option.selected`, + }, + ], + }); + }); + + it("should start battle against the trainer", async () => { + await game.runToMysteryEncounter(MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER, defaultParty); + await runMysteryEncounterToEnd(game, 3, undefined, true); + + expect(scene.getCurrentPhase()?.constructor.name).toBe(CommandPhase.name); + expect(scene.currentBattle.trainer).toBeDefined(); + expect(scene.currentBattle.mysteryEncounter?.encounterMode).toBe(MysteryEncounterMode.TRAINER_BATTLE); + expect(scene.getParty().length).toBe(1); + }); + + it("Should reward the player with friendship and eggs based on pokemon selected", async () => { + await game.runToMysteryEncounter(MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER, defaultParty); + + const friendshipBefore = scene.currentBattle.mysteryEncounter!.misc.pokemon3.friendship; + + scene.gameData.eggs = []; + const eggsBefore = scene.gameData.eggs; + expect(eggsBefore).toBeDefined(); + const eggsBeforeLength = eggsBefore.length; + + await runMysteryEncounterToEnd(game, 3, undefined, true); + await skipBattleRunMysteryEncounterRewardsPhase(game); + await game.phaseInterceptor.to(SelectModifierPhase, false); + expect(scene.getCurrentPhase()?.constructor.name).toBe(SelectModifierPhase.name); + + const eggsAfter = scene.gameData.eggs; + const commonEggs = scene.currentBattle.mysteryEncounter!.misc.pokemon3CommonEggs; + const rareEggs = scene.currentBattle.mysteryEncounter!.misc.pokemon3RareEggs; + expect(eggsAfter).toBeDefined(); + expect(eggsBeforeLength + commonEggs + rareEggs).toBe(eggsAfter.length); + expect(eggsAfter.filter(egg => egg.tier === EggTier.COMMON).length).toBe(commonEggs); + expect(eggsAfter.filter(egg => egg.tier === EggTier.GREAT).length).toBe(rareEggs); + + game.phaseInterceptor.superEndPhase(); + await game.phaseInterceptor.to(PostMysteryEncounterPhase); + + const friendshipAfter = scene.currentBattle.mysteryEncounter!.misc.pokemon3.friendship; + expect(friendshipAfter).toBe(friendshipBefore + 20 + 2); // +2 extra for friendship gained from winning battle + }); + }); +}); diff --git a/src/test/mystery-encounter/encounters/the-pokemon-salesman-encounter.test.ts b/src/test/mystery-encounter/encounters/the-pokemon-salesman-encounter.test.ts index c43577337da..d37a9d8fb7b 100644 --- a/src/test/mystery-encounter/encounters/the-pokemon-salesman-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/the-pokemon-salesman-encounter.test.ts @@ -76,22 +76,6 @@ describe("The Pokemon Salesman - Mystery Encounter", () => { expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.THE_POKEMON_SALESMAN); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.THE_POKEMON_SALESMAN); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully ", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = ThePokemonSalesmanEncounter; diff --git a/src/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts b/src/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts index ef80271c423..5c1353ee337 100644 --- a/src/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/the-strong-stuff-encounter.test.ts @@ -83,22 +83,6 @@ describe("The Strong Stuff - Mystery Encounter", () => { expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.THE_STRONG_STUFF); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.THE_STRONG_STUFF); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully ", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = TheStrongStuffEncounter; diff --git a/src/test/mystery-encounter/encounters/the-winstrate-challenge-encounter.test.ts b/src/test/mystery-encounter/encounters/the-winstrate-challenge-encounter.test.ts index 0c642225031..1efe6dbd7f8 100644 --- a/src/test/mystery-encounter/encounters/the-winstrate-challenge-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/the-winstrate-challenge-encounter.test.ts @@ -90,22 +90,6 @@ describe("The Winstrate Challenge - Mystery Encounter", () => { expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.THE_WINSTRATE_CHALLENGE); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.THE_WINSTRATE_CHALLENGE); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = new MysteryEncounter(TheWinstrateChallengeEncounter); diff --git a/src/test/mystery-encounter/encounters/trash-to-treasure-encounter.test.ts b/src/test/mystery-encounter/encounters/trash-to-treasure-encounter.test.ts index 0f89e90031c..bfeb249543f 100644 --- a/src/test/mystery-encounter/encounters/trash-to-treasure-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/trash-to-treasure-encounter.test.ts @@ -71,22 +71,6 @@ describe("Trash to Treasure - Mystery Encounter", () => { expect(TrashToTreasureEncounter.options.length).toBe(2); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.TRASH_TO_TREASURE); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = TrashToTreasureEncounter; diff --git a/src/test/mystery-encounter/encounters/uncommon-breed-encounter.test.ts b/src/test/mystery-encounter/encounters/uncommon-breed-encounter.test.ts index 5b17ff3a2f7..2f8c4e5111a 100644 --- a/src/test/mystery-encounter/encounters/uncommon-breed-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/uncommon-breed-encounter.test.ts @@ -74,22 +74,6 @@ describe("Uncommon Breed - Mystery Encounter", () => { expect(UncommonBreedEncounter.options.length).toBe(3); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.UNCOMMON_BREED); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = UncommonBreedEncounter; diff --git a/src/test/mystery-encounter/encounters/weird-dream-encounter.test.ts b/src/test/mystery-encounter/encounters/weird-dream-encounter.test.ts index ef014c6949b..e532891810c 100644 --- a/src/test/mystery-encounter/encounters/weird-dream-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/weird-dream-encounter.test.ts @@ -73,22 +73,6 @@ describe("Weird Dream - Mystery Encounter", () => { expect(WeirdDreamEncounter.options.length).toBe(2); }); - it("should not run below wave 10", async () => { - game.override.startingWave(9); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.WEIRD_DREAM); - }); - - it("should not run above wave 179", async () => { - game.override.startingWave(181); - - await game.runToMysteryEncounter(); - - expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); - }); - it("should initialize fully", async () => { initSceneWithoutEncounterPhase(scene, defaultParty); scene.currentBattle.mysteryEncounter = WeirdDreamEncounter; diff --git a/src/test/mystery-encounter/mystery-encounter.test.ts b/src/test/mystery-encounter/mystery-encounter.test.ts index d2a2e7f9d92..38c999f8aac 100644 --- a/src/test/mystery-encounter/mystery-encounter.test.ts +++ b/src/test/mystery-encounter/mystery-encounter.test.ts @@ -4,10 +4,12 @@ import Phaser from "phaser"; import { Species } from "#enums/species"; import { MysteryEncounterPhase } from "#app/phases/mystery-encounter-phases"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; +import BattleScene from "#app/battle-scene"; describe("Mystery Encounters", () => { let phaserGame: Phaser.Game; let game: GameManager; + let scene: BattleScene; beforeAll(() => { phaserGame = new Phaser.Game({ @@ -21,6 +23,7 @@ describe("Mystery Encounters", () => { beforeEach(() => { game = new GameManager(phaserGame); + scene = game.scene; game.override.startingWave(11); game.override.mysteryEncounterChance(100); }); @@ -32,23 +35,20 @@ describe("Mystery Encounters", () => { expect(game.scene.getCurrentPhase()!.constructor.name).toBe(MysteryEncounterPhase.name); }); - it("", async () => { - await game.runToMysteryEncounter(MysteryEncounterType.MYSTERIOUS_CHALLENGERS, [Species.CHARIZARD, Species.VOLCARONA]); + it("Encounters should not run below wave 10", async () => { + game.override.startingWave(9); - await game.phaseInterceptor.to(MysteryEncounterPhase, false); - expect(game.scene.getCurrentPhase()!.constructor.name).toBe(MysteryEncounterPhase.name); + await game.runToMysteryEncounter(); + + expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.MYSTERIOUS_CHALLENGERS); }); - it("spawns mysterious challengers encounter", async () => { - }); + it("Encounters should not run above wave 180", async () => { + game.override.startingWave(181); - it("spawns mysterious chest encounter", async () => { - }); + await game.runToMysteryEncounter(); - it("spawns dark deal encounter", async () => { - }); - - it("spawns fight or flight encounter", async () => { + expect(scene.currentBattle.mysteryEncounter).toBeUndefined(); }); }); From 48430c8feb62bd276f9725baba41833d05f06c71 Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:59:37 -0700 Subject: [PATCH 3/7] [Feature] Seasonal splash messages logic + scaffolding (#4318) * add: seasonsl splash messages logic + scaffolding * refactor: settin up and displaying splash messages. They are now stored with their i18next keys and only get translated as soon as they are displayed. This also allows for better display of the `battlesWon` parameter which now supports better number formatting and the count is an interpolation * fix: updateTitleStats not checking the namespace of battlesWon * add tests for splash_messages * test: always use UTC time * fix: time-pattern to MM-DD * fix splash_messages test * add: const to control usage of seasonal splash messages * fix tests (splashj) * Update src/locales/ja/splash-messages.json Co-authored-by: Chapybara-jp * Update src/locales/es/splash-messages.json Add missing `number` format for battlesWon message --------- Co-authored-by: Chapybara-jp --- src/constants.ts | 6 +- src/data/splash-messages.ts | 170 +++++++++++++++++++------ src/locales/de/splash-messages.json | 2 +- src/locales/en/splash-messages.json | 16 ++- src/locales/es/splash-messages.json | 2 +- src/locales/fr/splash-messages.json | 2 +- src/locales/it/splash-messages.json | 2 +- src/locales/ja/splash-messages.json | 2 +- src/locales/ko/splash-messages.json | 2 +- src/locales/pt_BR/splash-messages.json | 2 +- src/locales/zh_CN/splash-messages.json | 2 +- src/locales/zh_TW/splash-messages.json | 2 +- src/test/data/splash_messages.test.ts | 66 ++++++++++ src/test/vitest.setup.ts | 2 + src/ui/title-ui-handler.ts | 11 +- 15 files changed, 233 insertions(+), 56 deletions(-) create mode 100644 src/test/data/splash_messages.test.ts diff --git a/src/constants.ts b/src/constants.ts index a2f7e47b996..0b1261ad814 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1 +1,5 @@ -export const PLAYER_PARTY_MAX_SIZE = 6; +/** The maximum size of the player's party */ +export const PLAYER_PARTY_MAX_SIZE: number = 6; + +/** Whether to use seasonal splash messages in general */ +export const USE_SEASONAL_SPLASH_MESSAGES: boolean = false; diff --git a/src/data/splash-messages.ts b/src/data/splash-messages.ts index 8e95bba0591..b8069f77737 100644 --- a/src/data/splash-messages.ts +++ b/src/data/splash-messages.ts @@ -1,46 +1,136 @@ -import i18next from "i18next"; +import { USE_SEASONAL_SPLASH_MESSAGES } from "#app/constants"; -export function getBattleCountSplashMessage(): string { - return `{COUNT} ${i18next.t("splashMessages:battlesWon")}`; +//#region Interfaces/Types + +type Month = "01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09" | "10" | "11" | "12"; +type Day = + | Month + | "13" + | "14" + | "15" + | "16" + | "17" + | "18" + | "19" + | "20" + | "21" + | "22" + | "23" + | "24" + | "25" + | "26" + | "27" + | "28" + | "29" + | "30" + | "31"; + +/** + * Represents a season with its {@linkcode name}, + * {@linkcode start} day+month, {@linkcode end} day+month + * and {@linkcode messages}. + */ +interface Season { + /** The name of the season (internal use only) */ + name: string; + /** The start day and month of the season. Format `MM-DD` */ + start: `${Month}-${Day}`; + /** The end day and month of the season. Format `MM-DD` */ + end: `${Month}-${Day}`; + /** Collection of the messages to display (without the `i18next.t()` call!) */ + messages: string[]; } +//#region Constants + +/** The weight multiplier for the battles-won splash message */ +const BATTLES_WON_WEIGHT_MULTIPLIER = 10; +/** The weight multiplier for the seasonal splash messages */ +const SEASONAL_WEIGHT_MULTIPLIER = 10; + +//#region Common Messages + +const commonSplashMessages = [ + ...Array(BATTLES_WON_WEIGHT_MULTIPLIER).fill("battlesWon"), + "joinTheDiscord", + "infiniteLevels", + "everythingStacks", + "optionalSaveScumming", + "biomes", + "openSource", + "playWithSpeed", + "liveBugTesting", + "heavyInfluence", + "pokemonRiskAndPokemonRain", + "nowWithMoreSalt", + "infiniteFusionAtHome", + "brokenEggMoves", + "magnificent", + "mubstitute", + "thatsCrazy", + "oranceJuice", + "questionableBalancing", + "coolShaders", + "aiFree", + "suddenDifficultySpikes", + "basedOnAnUnfinishedFlashGame", + "moreAddictiveThanIntended", + "mostlyConsistentSeeds", + "achievementPointsDontDoAnything", + "youDoNotStartAtLevel", + "dontTalkAboutTheManaphyEggIncident", + "alsoTryPokengine", + "alsoTryEmeraldRogue", + "alsoTryRadicalRed", + "eeveeExpo", + "ynoproject", + "breedersInSpace", +]; + +//#region Seasonal Messages + +const seasonalSplashMessages: Season[] = [ + { + name: "Halloween", + start: "09-15", + end: "10-31", + messages: ["halloween.pumpkaboosAbout", "halloween.mayContainSpiders", "halloween.spookyScaryDuskulls"], + }, + { + name: "XMAS", + start: "12-01", + end: "12-26", + messages: ["xmas.happyHolidays", "xmas.delibirdSeason"], + }, + { + name: "New Year's", + start: "01-01", + end: "01-31", + messages: ["newYears.happyNewYear"], + }, +]; + +//#endregion + export function getSplashMessages(): string[] { - const splashMessages = Array(10).fill(getBattleCountSplashMessage()); - splashMessages.push( - i18next.t("splashMessages:joinTheDiscord"), - i18next.t("splashMessages:infiniteLevels"), - i18next.t("splashMessages:everythingStacks"), - i18next.t("splashMessages:optionalSaveScumming"), - i18next.t("splashMessages:biomes"), - i18next.t("splashMessages:openSource"), - i18next.t("splashMessages:playWithSpeed"), - i18next.t("splashMessages:liveBugTesting"), - i18next.t("splashMessages:heavyInfluence"), - i18next.t("splashMessages:pokemonRiskAndPokemonRain"), - i18next.t("splashMessages:nowWithMoreSalt"), - i18next.t("splashMessages:infiniteFusionAtHome"), - i18next.t("splashMessages:brokenEggMoves"), - i18next.t("splashMessages:magnificent"), - i18next.t("splashMessages:mubstitute"), - i18next.t("splashMessages:thatsCrazy"), - i18next.t("splashMessages:oranceJuice"), - i18next.t("splashMessages:questionableBalancing"), - i18next.t("splashMessages:coolShaders"), - i18next.t("splashMessages:aiFree"), - i18next.t("splashMessages:suddenDifficultySpikes"), - i18next.t("splashMessages:basedOnAnUnfinishedFlashGame"), - i18next.t("splashMessages:moreAddictiveThanIntended"), - i18next.t("splashMessages:mostlyConsistentSeeds"), - i18next.t("splashMessages:achievementPointsDontDoAnything"), - i18next.t("splashMessages:youDoNotStartAtLevel"), - i18next.t("splashMessages:dontTalkAboutTheManaphyEggIncident"), - i18next.t("splashMessages:alsoTryPokengine"), - i18next.t("splashMessages:alsoTryEmeraldRogue"), - i18next.t("splashMessages:alsoTryRadicalRed"), - i18next.t("splashMessages:eeveeExpo"), - i18next.t("splashMessages:ynoproject"), - i18next.t("splashMessages:breedersInSpace"), - ); + const splashMessages: string[] = [...commonSplashMessages]; + console.log("use seasonal splash messages", USE_SEASONAL_SPLASH_MESSAGES); + if (USE_SEASONAL_SPLASH_MESSAGES) { + // add seasonal splash messages if the season is active + for (const { name, start, end, messages } of seasonalSplashMessages) { + const now = new Date(); + const startDate = new Date(`${start}-${now.getFullYear()}`); + const endDate = new Date(`${end}-${now.getFullYear()}`); - return splashMessages; + if (now >= startDate && now <= endDate) { + console.log(`Adding ${messages.length} ${name} splash messages (weight: x${SEASONAL_WEIGHT_MULTIPLIER})`); + messages.forEach((message) => { + const weightedMessage = Array(SEASONAL_WEIGHT_MULTIPLIER).fill(message); + splashMessages.push(...weightedMessage); + }); + } + } + } + + return splashMessages.map((message) => `splashMessages:${message}`); } diff --git a/src/locales/de/splash-messages.json b/src/locales/de/splash-messages.json index ac3fd345f3f..ba126393ccb 100644 --- a/src/locales/de/splash-messages.json +++ b/src/locales/de/splash-messages.json @@ -1,5 +1,5 @@ { - "battlesWon": "Kämpfe gewonnen!", + "battlesWon": "{{count, number}} Kämpfe gewonnen!", "joinTheDiscord": "Tritt dem Discord bei!", "infiniteLevels": "Unendliche Level!", "everythingStacks": "Alles stapelt sich!", diff --git a/src/locales/en/splash-messages.json b/src/locales/en/splash-messages.json index c0686e6ad75..168974525f8 100644 --- a/src/locales/en/splash-messages.json +++ b/src/locales/en/splash-messages.json @@ -1,5 +1,5 @@ { - "battlesWon": "Battles Won!", + "battlesWon": "{{count, number}} Battles Won!", "joinTheDiscord": "Join the Discord!", "infiniteLevels": "Infinite Levels!", "everythingStacks": "Everything Stacks!", @@ -32,5 +32,17 @@ "alsoTryRadicalRed": "Also Try Radical Red!", "eeveeExpo": "Eevee Expo!", "ynoproject": "YNOproject!", - "breedersInSpace": "Breeders in space!" + "breedersInSpace": "Breeders in space!", + "halloween": { + "pumpkaboosAbout": "Pumpkaboos about!", + "mayContainSpiders": "May contain spiders!", + "spookyScaryDuskulls": "Spooky, Scary Duskulls!" + }, + "xmas": { + "happyHolidays": "Happy Holidays!", + "delibirdSeason": "Delibird Season!" + }, + "newYears": { + "happyNewYear": "Happy New Year!" + } } \ No newline at end of file diff --git a/src/locales/es/splash-messages.json b/src/locales/es/splash-messages.json index b1d4820b06e..da31d394c0f 100644 --- a/src/locales/es/splash-messages.json +++ b/src/locales/es/splash-messages.json @@ -1,5 +1,5 @@ { - "battlesWon": "¡Batallas ganadas!", + "battlesWon": "¡{{count, number}} Batallas ganadas!", "joinTheDiscord": "¡Únete al Discord!", "infiniteLevels": "¡Niveles infinitos!", "everythingStacks": "¡Todo se acumula!", diff --git a/src/locales/fr/splash-messages.json b/src/locales/fr/splash-messages.json index 9dd3e86fb32..2ac85680e58 100644 --- a/src/locales/fr/splash-messages.json +++ b/src/locales/fr/splash-messages.json @@ -1,5 +1,5 @@ { - "battlesWon": "combats gagnés !", + "battlesWon": "{{count, number}} combats gagnés !", "joinTheDiscord": "Rejoins le Discord !", "infiniteLevels": "Niveaux infinis !", "everythingStacks": "Tout se cumule !", diff --git a/src/locales/it/splash-messages.json b/src/locales/it/splash-messages.json index 55018d0ada0..d4b411241b6 100644 --- a/src/locales/it/splash-messages.json +++ b/src/locales/it/splash-messages.json @@ -1,5 +1,5 @@ { - "battlesWon": "Battaglie Vinte!", + "battlesWon": "{{count, number}} Battaglie Vinte!", "joinTheDiscord": "Entra nel Discord!", "infiniteLevels": "Livelli Infiniti!", "everythingStacks": "Tutto si impila!", diff --git a/src/locales/ja/splash-messages.json b/src/locales/ja/splash-messages.json index b7378e7a916..db3948fa2f1 100644 --- a/src/locales/ja/splash-messages.json +++ b/src/locales/ja/splash-messages.json @@ -1,5 +1,5 @@ { - "battlesWon": "Battles Won!", + "battlesWon": "勝ったバトル:{{count, number}}回!", "joinTheDiscord": "Join the Discord!", "infiniteLevels": "Infinite Levels!", "everythingStacks": "Everything Stacks!", diff --git a/src/locales/ko/splash-messages.json b/src/locales/ko/splash-messages.json index 6cf7ce050b7..1e89713ccde 100644 --- a/src/locales/ko/splash-messages.json +++ b/src/locales/ko/splash-messages.json @@ -1,5 +1,5 @@ { - "battlesWon": "전투에서 승리하세요!", + "battlesWon": "{{count, number}} 전투에서 승리하세요!", "joinTheDiscord": "디스코드에 가입하세요!", "infiniteLevels": "무한한 레벨!", "everythingStacks": "모든 것이 누적됩니다!", diff --git a/src/locales/pt_BR/splash-messages.json b/src/locales/pt_BR/splash-messages.json index 55c0b1b9e74..237b0f21202 100644 --- a/src/locales/pt_BR/splash-messages.json +++ b/src/locales/pt_BR/splash-messages.json @@ -1,5 +1,5 @@ { - "battlesWon": "Batalhas Ganhas!", + "battlesWon": "{{count, number}} Batalhas Ganhas!", "joinTheDiscord": "Junte-se ao Discord!", "infiniteLevels": "Níveis Infinitos!", "everythingStacks": "Tudo Acumula!", diff --git a/src/locales/zh_CN/splash-messages.json b/src/locales/zh_CN/splash-messages.json index 4d2d208edfd..24981513afe 100644 --- a/src/locales/zh_CN/splash-messages.json +++ b/src/locales/zh_CN/splash-messages.json @@ -1,5 +1,5 @@ { - "battlesWon": "场胜利!", + "battlesWon": "{{count, number}} 场胜利!", "joinTheDiscord": "加入Discord!", "infiniteLevels": "等级无限!", "everythingStacks": "道具全部叠加!", diff --git a/src/locales/zh_TW/splash-messages.json b/src/locales/zh_TW/splash-messages.json index a25e7dab97b..60b03549c2f 100644 --- a/src/locales/zh_TW/splash-messages.json +++ b/src/locales/zh_TW/splash-messages.json @@ -1,5 +1,5 @@ { - "battlesWon": "勝利場數!", + "battlesWon": "{{count, number}} 勝利場數!", "joinTheDiscord": "加入Discord!", "infiniteLevels": "無限等級!", "everythingStacks": "所有效果都能疊加!", diff --git a/src/test/data/splash_messages.test.ts b/src/test/data/splash_messages.test.ts new file mode 100644 index 00000000000..7e07b9a6e77 --- /dev/null +++ b/src/test/data/splash_messages.test.ts @@ -0,0 +1,66 @@ +import { getSplashMessages } from "#app/data/splash-messages"; +import { describe, expect, it, vi, afterEach, beforeEach } from "vitest"; +import * as Constants from "#app/constants"; + +describe("Data - Splash Messages", () => { + it("should contain at least 15 splash messages", () => { + expect(getSplashMessages().length).toBeGreaterThanOrEqual(15); + }); + + // make sure to adjust this test if the weight it changed! + it("should add contain 10 `battlesWon` splash messages", () => { + const battlesWonMessages = getSplashMessages().filter((message) => message === "splashMessages:battlesWon"); + expect(battlesWonMessages).toHaveLength(10); + }); + + describe("Seasonal", () => { + beforeEach(() => { + vi.spyOn(Constants, "USE_SEASONAL_SPLASH_MESSAGES", "get").mockReturnValue(true); + }); + + afterEach(() => { + vi.useRealTimers(); // reset system time + }); + + it("should contain halloween messages from Sep 15 to Oct 31", () => { + testSeason(new Date("2024-09-15"), new Date("2024-10-31"), "halloween"); + }); + + it("should contain xmas messages from Dec 1 to Dec 26", () => { + testSeason(new Date("2024-12-01"), new Date("2024-12-26"), "xmas"); + }); + + it("should contain new years messages frm Jan 1 to Jan 31", () => { + testSeason(new Date("2024-01-01"), new Date("2024-01-31"), "newYears"); + }); + }); +}); + +/** + * Helpoer method to test seasonal messages + * @param startDate The seasons start date + * @param endDate The seasons end date + * @param prefix the splash message prefix (e.g. `newYears` or `xmas`) + */ +function testSeason(startDate: Date, endDate: Date, prefix: string) { + const filterFn = (message: string) => message.startsWith(`splashMessages:${prefix}.`); + + const beforeDate = new Date(startDate); + beforeDate.setDate(startDate.getDate() - 1); + + const afterDate = new Date(endDate); + afterDate.setDate(endDate.getDate() + 1); + + const dates: Date[] = [beforeDate, startDate, endDate, afterDate]; + const [before, start, end, after] = dates.map((date) => { + vi.setSystemTime(date); + console.log("System time set to", date); + const count = getSplashMessages().filter(filterFn).length; + return count; + }); + + expect(before).toBe(0); + expect(start).toBeGreaterThanOrEqual(10); // make sure to adjust if weight is changed! + expect(end).toBeGreaterThanOrEqual(10); // make sure to adjust if weight is changed! + expect(after).toBe(0); +} diff --git a/src/test/vitest.setup.ts b/src/test/vitest.setup.ts index 3bb5c240d94..74129f20d26 100644 --- a/src/test/vitest.setup.ts +++ b/src/test/vitest.setup.ts @@ -14,6 +14,8 @@ import { initStatsKeys } from "#app/ui/game-stats-ui-handler"; import { initMysteryEncounters } from "#app/data/mystery-encounters/mystery-encounters"; import { beforeAll, vi } from "vitest"; +process.env.TZ = "UTC"; + /** Mock the override import to always return default values, ignoring any custom overrides. */ vi.mock("#app/overrides", async (importOriginal) => { const { defaultOverrides } = await importOriginal(); diff --git a/src/ui/title-ui-handler.ts b/src/ui/title-ui-handler.ts index 67a4f7260e6..a85e670eaba 100644 --- a/src/ui/title-ui-handler.ts +++ b/src/ui/title-ui-handler.ts @@ -3,11 +3,14 @@ import OptionSelectUiHandler from "./settings/option-select-ui-handler"; import { Mode } from "./ui"; import * as Utils from "../utils"; import { TextStyle, addTextObject, getTextStyleOptions } from "./text"; -import { getBattleCountSplashMessage, getSplashMessages } from "../data/splash-messages"; +import { getSplashMessages } from "../data/splash-messages"; import i18next from "i18next"; import { TimedEventDisplay } from "#app/timed-event-manager"; export default class TitleUiHandler extends OptionSelectUiHandler { + /** If the stats can not be retrieved, use this fallback value */ + private static readonly BATTLES_WON_FALLBACK: number = -99999999; + private titleContainer: Phaser.GameObjects.Container; private playerCountLabel: Phaser.GameObjects.Text; private splashMessage: string; @@ -72,8 +75,8 @@ export default class TitleUiHandler extends OptionSelectUiHandler { .then(request => request.json()) .then(stats => { this.playerCountLabel.setText(`${stats.playerCount} ${i18next.t("menu:playersOnline")}`); - if (this.splashMessage === getBattleCountSplashMessage()) { - this.splashMessageText.setText(getBattleCountSplashMessage().replace("{COUNT}", stats.battleCount.toLocaleString("en-US"))); + if (this.splashMessage === "splashMessages:battlesWon") { + this.splashMessageText.setText(i18next.t(this.splashMessage, { count: stats.battlesWon })); } }) .catch(err => { @@ -86,7 +89,7 @@ export default class TitleUiHandler extends OptionSelectUiHandler { if (ret) { this.splashMessage = Utils.randItem(getSplashMessages()); - this.splashMessageText.setText(this.splashMessage.replace("{COUNT}", "?")); + this.splashMessageText.setText(i18next.t(this.splashMessage, { count: TitleUiHandler.BATTLES_WON_FALLBACK })); const ui = this.getUi(); From a98ec39d0004315bdbb2c9591f9035a92a1b541d Mon Sep 17 00:00:00 2001 From: ImperialSympathizer <110984302+ben-lear@users.noreply.github.com> Date: Thu, 19 Sep 2024 21:26:24 -0400 Subject: [PATCH 4/7] [Feature] Adds special item rewards to fixed classic/challenge battles (#4332) * Adds special item rewards to fixed classic/challenge battles * remove unintentional overrides changes * remove redundant variable * remove Lock Capsule from Classic item pool * swapped Lock Capsule and Super EXP Charm mistake * address nits and small enhancement to eliminate magic numbers --------- Co-authored-by: ImperialSympathizer Co-authored-by: damocleas Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> --- src/battle.ts | 37 +++++++++++++++++++++++++++-------- src/game-mode.ts | 1 - src/modifier/modifier-type.ts | 2 +- src/phases/victory-phase.ts | 24 ++++++++++++++++++++--- 4 files changed, 51 insertions(+), 13 deletions(-) diff --git a/src/battle.ts b/src/battle.ts index b857314b4bf..973104108b3 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -16,6 +16,14 @@ import { TrainerType } from "#enums/trainer-type"; import i18next from "#app/plugins/i18n"; import MysteryEncounter from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; +import { CustomModifierSettings } from "#app/modifier/modifier-type"; +import { ModifierTier } from "#app/modifier/modifier-tier"; + +export enum ClassicFixedBossWaves { + // TODO: other fixed wave battles should be added here + EVIL_BOSS_1 = 115, + EVIL_BOSS_2 = 165, +} export enum BattleType { WILD, @@ -419,6 +427,7 @@ export class FixedBattleConfig { public getTrainer: GetTrainerFunc; public getEnemyParty: GetEnemyPartyFunc; public seedOffsetWaveIndex: number; + public customModifierRewardSettings?: CustomModifierSettings; setBattleType(battleType: BattleType): FixedBattleConfig { this.battleType = battleType; @@ -444,6 +453,11 @@ export class FixedBattleConfig { this.seedOffsetWaveIndex = seedOffsetWaveIndex; return this; } + + setCustomModifierRewards(customModifierRewardSettings: CustomModifierSettings) { + this.customModifierRewardSettings = customModifierRewardSettings; + return this; + } } @@ -503,11 +517,13 @@ export const classicFixedBattles: FixedBattleConfigs = { [8]: new FixedBattleConfig().setBattleType(BattleType.TRAINER) .setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)), [25]: new FixedBattleConfig().setBattleType(BattleType.TRAINER) - .setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_2, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)), + .setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_2, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)) + .setCustomModifierRewards({ guaranteedModifierTiers: [ModifierTier.ULTRA, ModifierTier.GREAT, ModifierTier.GREAT], allowLuckUpgrades: false }), [35]: new FixedBattleConfig().setBattleType(BattleType.TRAINER) .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT, TrainerType.AETHER_GRUNT, TrainerType.SKULL_GRUNT, TrainerType.MACRO_GRUNT ], true)), [55]: new FixedBattleConfig().setBattleType(BattleType.TRAINER) - .setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_3, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)), + .setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_3, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)) + .setCustomModifierRewards({ guaranteedModifierTiers: [ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.GREAT, ModifierTier.GREAT], allowLuckUpgrades: false }), [62]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35) .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT, TrainerType.AETHER_GRUNT, TrainerType.SKULL_GRUNT, TrainerType.MACRO_GRUNT ], true)), [64]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35) @@ -515,17 +531,21 @@ export const classicFixedBattles: FixedBattleConfigs = { [66]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35) .setGetTrainerFunc(getRandomTrainerFunc([[ TrainerType.ARCHER, TrainerType.ARIANA, TrainerType.PROTON, TrainerType.PETREL ], [ TrainerType.TABITHA, TrainerType.COURTNEY ], [ TrainerType.MATT, TrainerType.SHELLY ], [ TrainerType.JUPITER, TrainerType.MARS, TrainerType.SATURN ], [ TrainerType.ZINZOLIN, TrainerType.ROOD ], [ TrainerType.XEROSIC, TrainerType.BRYONY ], TrainerType.FABA, TrainerType.PLUMERIA, TrainerType.OLEANA ], true)), [95]: new FixedBattleConfig().setBattleType(BattleType.TRAINER) - .setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_4, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)), + .setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_4, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)) + .setCustomModifierRewards({ guaranteedModifierTiers: [ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.ULTRA], allowLuckUpgrades: false }), [112]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35) .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_GRUNT, TrainerType.MAGMA_GRUNT, TrainerType.AQUA_GRUNT, TrainerType.GALACTIC_GRUNT, TrainerType.PLASMA_GRUNT, TrainerType.FLARE_GRUNT, TrainerType.AETHER_GRUNT, TrainerType.SKULL_GRUNT, TrainerType.MACRO_GRUNT ], true)), [114]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35) .setGetTrainerFunc(getRandomTrainerFunc([[ TrainerType.ARCHER, TrainerType.ARIANA, TrainerType.PROTON, TrainerType.PETREL ], [ TrainerType.TABITHA, TrainerType.COURTNEY ], [ TrainerType.MATT, TrainerType.SHELLY ], [ TrainerType.JUPITER, TrainerType.MARS, TrainerType.SATURN ], [ TrainerType.ZINZOLIN, TrainerType.ROOD ], [ TrainerType.XEROSIC, TrainerType.BRYONY ], TrainerType.FABA, TrainerType.PLUMERIA, TrainerType.OLEANA ], true, 1)), - [115]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35) - .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_BOSS_GIOVANNI_1, TrainerType.MAXIE, TrainerType.ARCHIE, TrainerType.CYRUS, TrainerType.GHETSIS, TrainerType.LYSANDRE, TrainerType.LUSAMINE, TrainerType.GUZMA, TrainerType.ROSE ])), + [ClassicFixedBossWaves.EVIL_BOSS_1]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35) + .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_BOSS_GIOVANNI_1, TrainerType.MAXIE, TrainerType.ARCHIE, TrainerType.CYRUS, TrainerType.GHETSIS, TrainerType.LYSANDRE, TrainerType.LUSAMINE, TrainerType.GUZMA, TrainerType.ROSE ])) + .setCustomModifierRewards({ guaranteedModifierTiers: [ModifierTier.ROGUE, ModifierTier.ROGUE, ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.ULTRA], allowLuckUpgrades: false }), [145]: new FixedBattleConfig().setBattleType(BattleType.TRAINER) - .setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_5, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)), - [165]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35) - .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_BOSS_GIOVANNI_2, TrainerType.MAXIE_2, TrainerType.ARCHIE_2, TrainerType.CYRUS_2, TrainerType.GHETSIS_2, TrainerType.LYSANDRE_2, TrainerType.LUSAMINE_2, TrainerType.GUZMA_2, TrainerType.ROSE_2 ])), + .setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_5, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)) + .setCustomModifierRewards({ guaranteedModifierTiers: [ModifierTier.ROGUE, ModifierTier.ROGUE, ModifierTier.ROGUE, ModifierTier.ULTRA, ModifierTier.ULTRA], allowLuckUpgrades: false }), + [ClassicFixedBossWaves.EVIL_BOSS_2]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(35) + .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.ROCKET_BOSS_GIOVANNI_2, TrainerType.MAXIE_2, TrainerType.ARCHIE_2, TrainerType.CYRUS_2, TrainerType.GHETSIS_2, TrainerType.LYSANDRE_2, TrainerType.LUSAMINE_2, TrainerType.GUZMA_2, TrainerType.ROSE_2 ])) + .setCustomModifierRewards({ guaranteedModifierTiers: [ModifierTier.ROGUE, ModifierTier.ROGUE, ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.ULTRA], allowLuckUpgrades: false }), [182]: new FixedBattleConfig().setBattleType(BattleType.TRAINER) .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.LORELEI, TrainerType.WILL, TrainerType.SIDNEY, TrainerType.AARON, TrainerType.SHAUNTAL, TrainerType.MALVA, [ TrainerType.HALA, TrainerType.MOLAYNE ], TrainerType.MARNIE_ELITE, TrainerType.RIKA, TrainerType.CRISPIN ])), [184]: new FixedBattleConfig().setBattleType(BattleType.TRAINER).setSeedOffsetWave(182) @@ -538,4 +558,5 @@ export const classicFixedBattles: FixedBattleConfigs = { .setGetTrainerFunc(getRandomTrainerFunc([ TrainerType.BLUE, [ TrainerType.RED, TrainerType.LANCE_CHAMPION ], [ TrainerType.STEVEN, TrainerType.WALLACE ], TrainerType.CYNTHIA, [ TrainerType.ALDER, TrainerType.IRIS ], TrainerType.DIANTHA, TrainerType.HAU, TrainerType.LEON, [ TrainerType.GEETA, TrainerType.NEMONA ], TrainerType.KIERAN ])), [195]: new FixedBattleConfig().setBattleType(BattleType.TRAINER) .setGetTrainerFunc(scene => new Trainer(scene, TrainerType.RIVAL_6, scene.gameData.gender === PlayerGender.MALE ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT)) + .setCustomModifierRewards({ guaranteedModifierTiers: [ModifierTier.ROGUE, ModifierTier.ROGUE, ModifierTier.ULTRA, ModifierTier.ULTRA, ModifierTier.GREAT, ModifierTier.GREAT], allowLuckUpgrades: false }) }; diff --git a/src/game-mode.ts b/src/game-mode.ts index a2d61d7cfff..525c975a19b 100644 --- a/src/game-mode.ts +++ b/src/game-mode.ts @@ -268,7 +268,6 @@ export class GameMode implements GameModeConfig { isFixedBattle(waveIndex: integer): boolean { const dummyConfig = new FixedBattleConfig(); return this.battleConfig.hasOwnProperty(waveIndex) || applyChallenges(this, ChallengeType.FIXED_BATTLES, waveIndex, dummyConfig); - } /** diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index a23a9c5ece2..ce2ffc6a462 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -1761,7 +1761,7 @@ const modifierPool: ModifierPool = { new WeightedModifierType(modifierTypes.ABILITY_CHARM, skipInClassicAfterWave(189, 6)), new WeightedModifierType(modifierTypes.FOCUS_BAND, 5), new WeightedModifierType(modifierTypes.KINGS_ROCK, 3), - new WeightedModifierType(modifierTypes.LOCK_CAPSULE, skipInLastClassicWaveOrDefault(3)), + new WeightedModifierType(modifierTypes.LOCK_CAPSULE, (party: Pokemon[]) => party[0].scene.gameMode.isClassic ? 0 : 3), new WeightedModifierType(modifierTypes.SUPER_EXP_CHARM, skipInLastClassicWaveOrDefault(8)), new WeightedModifierType(modifierTypes.RARE_FORM_CHANGE_ITEM, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 50), 4) * 6, 24), new WeightedModifierType(modifierTypes.MEGA_BRACELET, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 50), 4) * 9, 36), diff --git a/src/phases/victory-phase.ts b/src/phases/victory-phase.ts index c11dd80b3aa..c10adc5683d 100644 --- a/src/phases/victory-phase.ts +++ b/src/phases/victory-phase.ts @@ -1,6 +1,6 @@ import BattleScene from "#app/battle-scene"; -import { BattlerIndex, BattleType } from "#app/battle"; -import { modifierTypes } from "#app/modifier/modifier-type"; +import { BattlerIndex, BattleType, ClassicFixedBossWaves } from "#app/battle"; +import { CustomModifierSettings, modifierTypes } from "#app/modifier/modifier-type"; import { BattleEndPhase } from "./battle-end-phase"; import { NewBattlePhase } from "./new-battle-phase"; import { PokemonPhase } from "./pokemon-phase"; @@ -42,8 +42,12 @@ export class VictoryPhase extends PokemonPhase { } if (this.scene.gameMode.isEndless || !this.scene.gameMode.isWaveFinal(this.scene.currentBattle.waveIndex)) { this.scene.pushPhase(new EggLapsePhase(this.scene)); + if (this.scene.gameMode.isClassic && this.scene.currentBattle.waveIndex === ClassicFixedBossWaves.EVIL_BOSS_2) { + // Should get Lock Capsule on 165 before shop phase so it can be used in the rewards shop + this.scene.pushPhase(new ModifierRewardPhase(this.scene, modifierTypes.LOCK_CAPSULE)); + } if (this.scene.currentBattle.waveIndex % 10) { - this.scene.pushPhase(new SelectModifierPhase(this.scene)); + this.scene.pushPhase(new SelectModifierPhase(this.scene, undefined, undefined, this.getFixedBattleCustomModifiers())); } else if (this.scene.gameMode.isDaily) { this.scene.pushPhase(new ModifierRewardPhase(this.scene, modifierTypes.EXP_CHARM)); if (this.scene.currentBattle.waveIndex > 10 && !this.scene.gameMode.isWaveFinal(this.scene.currentBattle.waveIndex)) { @@ -76,4 +80,18 @@ export class VictoryPhase extends PokemonPhase { this.end(); } + + /** + * If this wave is a fixed battle with special custom modifier rewards, + * will pass those settings to the upcoming {@linkcode SelectModifierPhase}`. + */ + getFixedBattleCustomModifiers(): CustomModifierSettings | undefined { + const gameMode = this.scene.gameMode; + const waveIndex = this.scene.currentBattle.waveIndex; + if (gameMode.isFixedBattle(waveIndex)) { + return gameMode.getFixedBattle(waveIndex).customModifierRewardSettings; + } + + return undefined; + } } From 4bdaf93c72fd47efe62e0a70d8f4e8ca614fcc21 Mon Sep 17 00:00:00 2001 From: Chapybara-jp Date: Fri, 20 Sep 2024 05:22:58 +0200 Subject: [PATCH 5/7] [Localisation] [JA] Translated various dialogue files (#4336) * Update ability-trigger.json * Update ability.json * Update arena-flyout.json * Update arena-tag.json * Update battle.json * Update fight-ui-handler.json * Update berry.json * Update menu.json * Update party-ui-handler.json * Update starter-select-ui-handler.json * Update tutorial.json * Update move.json * Update battle.json * Update arena-flyout.json * Update arena-flyout.json * Update arena-tag.json * Update party-ui-handler.json * Update settings.json * Update move-trigger.json * Translate modifier-type.json * Update modifier-type.json * Translated modifier-type.json * Update move-trigger.json * Update move-trigger.json * Update move-trigger.json * Update modifier-type.json * Update dialogue.json * Update dialogue.json * Update dialogue.json * Update dialogue-misc.json * Update dialogue.json * Update dialogue-misc.json * Update dialogue-misc.json * Update dialogue.json * Update dialogue.json * Update dialogue.json * Update dialogue.json Archers and Arianas dialog taken from Pokemon Stadium 2, HGSS, LGP/LGE, FRLG * Update dialogue.json * Update dialogue.json * Update dialogue.json * Update menu.json * Update dialogue.json * dialogue.json * Update dialogue-final-boss.json * Update dialogue.json * Update dialogue.json * Update dialogue.json --- src/locales/ja/dialogue-final-boss.json | 16 +- src/locales/ja/dialogue-misc.json | 8 +- src/locales/ja/dialogue.json | 854 ++++++++++++------------ src/locales/ja/menu.json | 4 +- 4 files changed, 441 insertions(+), 441 deletions(-) diff --git a/src/locales/ja/dialogue-final-boss.json b/src/locales/ja/dialogue-final-boss.json index f20d0f013d1..2378a09f6d6 100644 --- a/src/locales/ja/dialogue-final-boss.json +++ b/src/locales/ja/dialogue-final-boss.json @@ -1,10 +1,10 @@ { - "encounter": "It appears the time has finally come once again.\nYou know why you have come here, do you not?\n$You were drawn here, because you have been here before.\nCountless times.\n$Though, perhaps it can be counted.\nTo be precise, this is in fact your {{cycleCount}} cycle.\n$Each cycle your mind reverts to its former state.\nEven so, somehow, remnants of your former selves remain.\n$Until now you have yet to succeed, but I sense a different presence in you this time.\n\n$You are the only one here, though it is as if there is… another.\n$Will you finally prove a formidable challenge to me?\nThe challenge I have longed after for millennia?\n$We begin.", - "encounter_female": "It appears the time has finally come once again.\nYou know why you have come here, do you not?\n$You were drawn here, because you have been here before.\nCountless times.\n$Though, perhaps it can be counted.\nTo be precise, this is in fact your {{cycleCount}} cycle.\n$Each cycle your mind reverts to its former state.\nEven so, somehow, remnants of your former selves remain.\n$Until now you have yet to succeed, but I sense a different presence in you this time.\n\n$You are the only one here, though it is as if there is… another.\n$Will you finally prove a formidable challenge to me?\nThe challenge I have longed after for millennia?\n$We begin.", - "firstStageWin": "I see. The presence I felt was indeed real.\nIt appears I no longer need to hold back.\n$Do not disappoint me.", - "secondStageWin": "…Magnificent.", - "key_ordinal_one": "st", - "key_ordinal_two": "nd", - "key_ordinal_few": "rd", - "key_ordinal_other": "th" + "encounter": "又しても 時が満ちた 様 である。\nこちらへ 至る 理由は 存知するな。\n$汝は この場所へ 引かれた……\nこの何度となく 至った場所。\n$けれども 数えられぬとも 限らぬ……\n正確に宣ふ(のたまう)と 現在の 循環は {{cycleCount}}回目 である。\n$各循環に 心… 意識… 両方も 元の有様に 戻る。\nなれども 故吾の 残影は 汝の 中に 存する。\n$未だに 成功せぬ ままでも\n異なる 存在を 感ずる。\n$御座在る者は 一人。\nなれども 感ずるは… もう 他人。\n$到頭 汝から いかめしい 挑戦は 我が目にかかるか?\n千歳 万歳 相まってた挑戦……\n$始もう。", + "encounter_female": "又しても 時が満ちた 様 である。\nこちらへ 至る 理由は 存知するな。\n$汝は この場所へ 引かれた……\nこの何度となく 至った場所。\n$けれども 数えられぬとも 限らぬ……\n正確に宣ふ(のたまう)と 現在の 循環は {{cycleCount}}回目 である。\n$各循環に 心… 意識… 両方も 元の有様に 戻る。\nなれども 故吾の 残影は 汝の 中に 存する。\n$未だに 成功せぬ ままでも\n異なる 存在を 感ずる。\n$御座在る者は 一人。\nなれども 感ずるは… もう 他人。\n$到頭 汝から いかめしい 挑戦は 我が目にかかるか?\n千歳 万歳 相まってた挑戦……\n$始もう。", + "firstStageWin": "成る程。 感じた 存在は 正身(むざね) であった。\n自分を括る 必要 有らぬ 様である。\n$失望させぬが良い。", + "secondStageWin": "……お見事でございます。", + "key_ordinal_one": "", + "key_ordinal_two": "", + "key_ordinal_few": "", + "key_ordinal_other": "" } diff --git a/src/locales/ja/dialogue-misc.json b/src/locales/ja/dialogue-misc.json index 2f333b5f383..d0527564613 100644 --- a/src/locales/ja/dialogue-misc.json +++ b/src/locales/ja/dialogue-misc.json @@ -1,6 +1,6 @@ { - "ending": "@c{shock}You're back?@d{32} Does that mean…@d{96} you won?!\n@c{smile_ehalf}I should have known you had it in you.\n$@c{smile_eclosed}Of course… I always had that feeling.\n@c{smile}It's over now, right? You ended the loop.\n$@c{smile_ehalf}You fulfilled your dream too, didn't you?\nYou didn't lose even once.\n$I'll be the only one to remember what you did.\n@c{angry_mopen}I'll try not to forget!\n$@c{smile_wave_wink}Just kidding!@d{64} @c{smile}I'd never forget.@d{32}\nYour legend will live on in our hearts.\n$@c{smile_wave}Anyway,@d{64} it's getting late…@d{96} I think?\nIt's hard to tell in this place.\n$Let's go home. @c{smile_wave_wink}Maybe tomorrow, we can have another battle, for old time's sake?", - "ending_female": "@c{smile}Oh? You won?@d{96} @c{smile_eclosed}I guess I should've known.\nBut, you're back now.\n$@c{smile}It's over.@d{64} You ended the loop.\n$@c{serious_smile_fists}You fulfilled your dream too, didn't you?\nYou didn't lose even once.\n$@c{neutral}I'm the only one who'll remember what you did.@d{96}\nI guess that's okay, isn't it?\n$@c{serious_smile_fists}Your legend will always live on in our hearts.\n$@c{smile_eclosed}Anyway, I've had about enough of this place, haven't you? Let's head home.\n$@c{serious_smile_fists}Maybe when we get back, we can have another battle?\nIf you're up to it.", - "ending_endless": "Congratulations on reaching the current end!\nMore content is coming soon.", - "ending_name": "Devs" + "ending": "@c{shock}帰ってきた?@d{32} それなら…@d{96} 勝った っていうこと だろう?!\n@c{smile_ehalf}絶対 やれると思う べきだったな。\n$@c{smile_eclosed}もちろん、ずっと そんな気 がしたんだな。\n@c{smile}ついに 終わった だろう? ループを 断ち切った。\n$@c{smile_ehalf}キミの夢も 叶ったよな?\n一回も 負けなかった。\n$キミの しつくした事を 覚えるのは おれだけだ。\n@c{angry_mopen}忘れない ように するが…\n$@c{smile_wave_wink}なんつって!@d{64} @c{smile}一生 忘れない。@d{32}\nキミの伝説は いつまでも みんなの 心の中に 残っているから。\n$@c{smile_wave}とにかく、@d{64} そろそろ 遅くなる……@d{96} かな?\nこの場所で よく 分からない。\n$さあ、帰ろう。\n@c{smile_wave_wink}明日、昔のよしみで バトルでも しないか?", + "ending_female": "@c{smile}えぇ? 勝ちゃった?@d{96} @c{smile_eclosed}勝てるのが 分かる べきだったね。\nやっぱり 帰ってきた…\n$@c{smile}ついに終わった。@d{64} ループを 断ち切った。\n$@c{serious_smile_fists} アナタの夢も 叶ったよね?\n一回も 負けなかった!\n$@c{neutral}アタシだけが アナタが できた事 を覚えていく、ね。@d{96}\nでもね、たぶん 大丈夫なの かなぁ?\n$@c{serious_smile_fists}アナタの伝説は みんなの 心の中に\nずっと 残っているからね……\n$@c{smile_eclosed}じゃあ、こんなトコは もう飽きた だろう?\n帰ろうよ。\n$@c{serious_smile_fists}ふるさとに 着いたら、 また バトルしよう?\nやる気 あればね!", + "ending_endless": "現在のエンドまで やって来て おめでとう!\n更に多くの コンテンツは  近日公開予定です。", + "ending_name": "開発者" } diff --git a/src/locales/ja/dialogue.json b/src/locales/ja/dialogue.json index 6130ade1cb4..24cd19b6ffc 100644 --- a/src/locales/ja/dialogue.json +++ b/src/locales/ja/dialogue.json @@ -40,839 +40,839 @@ }, "lass": { "encounter": { - "1": "Let's have a battle, shall we?", - "2": "You look like a new trainer. Let's have a battle!", - "2_female": "You look like a new trainer. Let's have a battle!", - "3": "I don't recognize you. How about a battle?", - "4": "Let's have a fun Pokémon battle!", - "5": "I'll show you the ropes of how to really use Pokémon!", - "6": "A serious battle starts from a serious beginning! Are you sure you're ready?", - "6_female": "A serious battle starts from a serious beginning! Are you sure you're ready?", - "7": "You're only young once. And you only get one shot at a given battle. Soon, you'll be nothing but a memory.", - "8": "You'd better go easy on me, OK? Though I'll be seriously fighting!", - "9": "School is boring. I've got nothing to do. Yawn. I'm only battling to kill the time." + "1": "勝負しない?", + "2": "新人 トレーナーだろう? 勝負しよう!", + "2_female": "新しい トレーナーだろう? 勝負しよう!", + "3": "初めて 見る 顔ね! 勝負しない?", + "4": "ドッキドキで ワックワクな\nポケモン勝負に しよう!", + "5": "手取り 足取り 教えて あげる!\nホントの ポケモンの 使いかた!", + "6": "マジの 勝負 マジ始めっからー\n準備とか 覚悟とか オーケー?", + "6_female": "マジの 勝負 マジ始めっからー\n準備とか 覚悟とか オーケー?", + "7": "青春も バトルも 一度きり!!\nあなたを 思い出に させて!!", + "8": "あんた ちょっとは 手加減してよ…\nあたしは 本気で いくけど!", + "9": "学校 タルいし やることないし\nヒマだけあるから バトルしてんの。" }, "victory": { - "1": "That was impressive! I've got a lot to learn.", - "2": "I didn't think you'd beat me that bad…", - "2_female": "I didn't think you'd beat me that bad…", - "3": "I hope we get to have a rematch some day.", - "4": "That was pretty amazingly fun! You've totally exhausted me…", - "5": "You actually taught me a lesson! You're pretty amazing!", - "6": "Seriously, I lost. That is, like, seriously depressing, but you were seriously cool.", - "6_female": "Seriously, I lost. That is, like, seriously depressing, but you were seriously cool.", - "7": "I don't need memories like this. Deleting memory…", - "8": "Hey! I told you to go easy on me! Still, you're pretty cool when you're serious.", - "8_female": "Hey! I told you to go easy on me! Still, you're pretty cool when you're serious.", - "9": "I'm actually getting tired of battling… There's gotta be something new to do…" + "1": "すごい! 覚えること いっぱいね。", + "2": "新人に こんなに ぶっ壊されて なんて……", + "2_female": "新人に こんなに ぶっ壊されて なんて……", + "3": "またいつか 勝負を できると いいね!", + "4": "キミに ドッキ ドキドキ\n私は ボッロ ボロボロ……", + "5": "逆に 教えられちゃった!\nキミって 結構 スゴいんだ!", + "6": "マジ負けてる マジ凹む マジ辛い\nでも アンタは マジで イケてるかも。", + "6_female": "マジ負けてる マジ凹む マジ辛い\nでも アンタは マジで イケてるかも。", + "7": "こんな 思い出 いらないし\n記憶から 消しちゃおっと…", + "8": "ぷんぷん! 手加減してよね!!\n……本気の あんたも いいけどさ。", + "8_female": "ぷんぷん! 手加減してよね!!\n……本気の あんたも いいけどさ。", + "9": "バトルも そろそろ あきたわ 実際…\n何か 新しいこと とか ない?" } }, "breeder": { "encounter": { - "1": "Obedient Pokémon, selfish Pokémon… Pokémon have unique characteristics.", - "2": "Even though my upbringing and behavior are poor, I've raised my Pokémon well.", - "3": "Hmm, do you discipline your Pokémon? Pampering them too much is no good." + "1": "素直なヤツに ワガママなヤツ……\nポケモンにも 個性が あるんだよな。", + "2": "育ちも 素行も 悪い オレが\n育てた割に いい ポケモン だぜ!", + "3": "きみは ポケモンを しつけてるか?\n甘やかすだけじゃ ダメなんだぜ!" }, "victory": { - "1": "It is important to nurture and train each Pokémon's characteristics.", - "2": "Unlike my diabolical self, these are some good Pokémon.", - "3": "Too much praise can spoil both Pokémon and people." + "1": "ポケモンの 持っている 個性を\n活かして 育てることが 大切だ。", + "2": "極悪非道の オレと 違って\nこいつらは いいポケモン だよ!", + "3": "褒めてばっかりだと ポケモンも\n人も ダメに なっちゃうよな…" }, "defeat": { - "1": "You should not get angry at your Pokémon, even if you lose a battle.", - "2": "Right? Pretty good Pokémon, huh? I'm suited to raising things.", - "3": "No matter how much you love your Pokémon, you still have to discipline them when they misbehave." + "1": "負けたからって むやみに ポケモンを\n怒ったりしては ダメなんだぞ。", + "2": "な? なかなか いいポケモン だろ?\n育てるってのが 向いてるんだな オレ。", + "3": "可愛くて 大好きなポケモンでも\n悪いこと したら 叱らないとな!" } }, "breeder_female": { "encounter": { - "1": "Pokémon never betray you. They return all the love you give them.", - "2": "Shall I give you a tip for training good Pokémon?", - "3": "I have raised these very special Pokémon using a special method." + "1": "ポケモンは 裏切らないからね、\nささげた 愛情は 返ってくる。", + "2": "いいポケモンを 育てるコツを\nキミに 教えてあげようかな?", + "3": "秘密の 方法で 育てあげた\nとっても スペシャルな ポケモンだ。" }, "victory": { - "1": "Ugh… It wasn't supposed to be like this. Did I administer the wrong blend?", - "2": "How could that happen to my Pokémon… What are you feeding your Pokémon?", - "3": "If I lose, that tells you I was just killing time. It doesn't damage my ego at all." + "1": "うーん…… こんな はずでは……\nエキスの 配合を 間違えたか?", + "2": "ワイの 育てた ポケモンが そんな……\nキミは ポケモンに なに あげとるんや?", + "3": "負けたところで ただのヒマつぶし\n心に ダメージ ございません…" }, "defeat": { - "1": "This proves my Pokémon have accepted my love.", - "2": "The real trick behind training good Pokémon is catching good Pokémon.", - "3": "Pokémon will be strong or weak depending on how you raise them." + "1": "私の 愛情が ポケモンに\n届いてる 証拠 だわね。", + "2": "いいポケモンを 育てるコツは\nいいポケモンを 捕まえることだ。", + "3": "育てかた 次第で ポケモンは\n強くも 弱くも なるのだ。" } }, "fisherman": { "encounter": { - "1": "Aack! You made me lose a bite!\nWhat are you going to do about it?", - "2": "Go away! You're scaring the Pokémon!", - "3": "Let's see if you can reel in a victory!" + "1": "釣り糸が 絡まって イライラするーっ!\nええいっ 勝負だっ!", + "2": "海釣りと 川釣り キミは どっちが 好き?", + "3": "よーし! ポケモン好きと 釣り好きの 対決だ!" }, "victory": { - "1": "Just forget about it.", - "2": "Next time, I'll be reelin' in the triumph!", - "3": "Guess I underestimated the currents this time." + "1": "負けたっ! 余計に イライラするぞーっ!", + "2": "まるで 海釣りの ように 豪快に 負けたぞーっ!", + "3": "わあ! 糸が 絡まった! まさに 後の祭り…" } }, "fisherman_female": { "encounter": { - "1": "Woah! I've hooked a big one!", - "2": "Line's in, ready to reel in success!", - "3": "Ready to make waves!" + "1": "でっかいの 釣れたっ でっかいの!", + "2": "うちは 常に 大物ねらい!\n雑魚だったら 引っ込んで おくれよ!", + "3": "釣りたて ピチピチの\nポケモンで 勝負してあげよう!!" }, "victory": { - "1": "I'll be back with a stronger hook.", - "2": "I'll reel in victory next time.", - "3": "I'm just sharpening my hooks for the comeback!" + "1": "あれー 大きさで 負けたかな…", + "2": "なかなかの 引きな キミ!\nナイス ファイトだった!", + "3": "釣りあげられたのは……\nこの 私だったか!" } }, "swimmer": { "encounter": { - "1": "Time to dive in!", - "2": "Let's ride the waves of victory!", - "3": "Ready to make a splash!" + "1": "全力で 飛び込むよ!", + "2": "勝利の 大波に 乗っていくよ!", + "3": "完全に 浸しちゃうよ!" }, "victory": { - "1": "Drenched in defeat!", - "2": "A wave of defeat!", - "3": "Back to shore, I guess." + "1": "失敗で ぐしゃぐしゃ!", + "2": "敗北の 小波だった……", + "3": "そろそろ 漂って帰ろう……" } }, "backpacker": { "encounter": { - "1": "Pack up, game on!", - "2": "Let's see if you can keep pace!", - "3": "Gear up, challenger!", - "4": "I've spent 20 years trying to find myself… But where am I?" + "1": "旅する バックパッカー\n同じく 旅のトレーナーに 会う…", + "2": "私と 旅しているのは 人気の\nガイドブックで お薦めの ポケモン です!", + "3": "旅をしても していなくても\n私は 発見したいのです!", + "4": "旅を 続け 幾年月、\n知らない 国は ないくらい。" }, "victory": { - "1": "Tripped up this time!", - "2": "Oh, I think I'm lost.", - "3": "Dead end!", - "4": "Wait up a second! Hey! Don't you know who I am?" + "1": "きみと 出会うため\n旅していたのかも? なんて", + "2": "ガイドブックに 勝ち方は\n載っていないのよね…", + "3": "あっ! あなたの いいところ\n発見しちゃったかも!", + "4": "本当は ただ 「お帰り」 って\n言ってくれる ダーリンが 欲しい…" } }, "ace_trainer": { "encounter": { - "1": "You seem quite confident.", - "1_female": "You seem quite confident.", - "2": "Your Pokémon… Show them to me…", - "3": "Because I'm an Ace Trainer, people think I'm strong.", - "4": "Are you aware of what it takes to be an Ace Trainer?" + "1": "自信満々って 感じ ですな…", + "1_female": "自信満々って 感じ だね…", + "2": "君の ポケモン…… 私に 見せてごらんよ……", + "3": "エリートトレーナーなんて やってるから\n強い 人って 思われるんだ。", + "4": "エリートトレーナーたる 資格 って\nあなたは ご存じ かしら?" }, "victory": { - "1": "Yes… You have good Pokémon…", - "2": "What?! But I'm a battling genius!", - "3": "Of course, you are the main character!", - "3_female": "Of course, you are the main character!", - "4": "OK! OK! You could be an Ace Trainer!", - "4_female": "OK! OK! You could be an Ace Trainer!" + "1": "うん…… いいポケモンだね……", + "2": "勝負の 天才 いわれる\n私も 負けるこつの あっけんか!", + "3": "やはり あなたこそ 主人公だ!", + "3_female": "やはり あなたこそ 主人公だ!", + "4": "戦う 姿が なじんでるのね\nエリートトレーナーに なれるよ キミ!", + "4_female": "戦う 姿が なじんでるのね\nエリートトレーナーに なれるよ キミ!" }, "defeat": { - "1": "I am devoting my body and soul to Pokémon battles!", - "2": "All within my expectations… Nothing to be surprised about…", - "3": "I thought I'd grow up to be a frail person who looked like they would break if you squeezed them too hard.", - "4": "Of course I'm strong and don't lose. It's important that I win gracefully." + "1": "私はな ポケモン勝負に\n魂 かけてんだよォ!", + "2": "すべて 予想の はんちゅう……\n何の 驚きもないね……", + "3": "弱くて 抱きしめたら 折れそうな\n人に なるはずだったのにな。", + "4": "強いこと 負けないことは 当たり前……\nいかに 優雅に 勝つかが 重要 なの。" } }, "parasol_lady": { "encounter": { - "1": "Time to grace the battlefield with elegance and poise!" + "1": "傘が ないと パラソルおねえさんって\n言えないからさ 仕方なく 差してんの。" }, "victory": { - "1": "My elegance remains unbroken!" + "1": "傘がっ 傘が 折れちゃったっ!\nただの おねえさんに なっちゃう!" } }, "twins": { "encounter": { - "1": "Get ready, because when we team up, it's double the trouble!", - "2": "Two hearts, one strategy – let's see if you can keep up with our twin power!", - "3": "Hope you're ready for double trouble, because we're about to bring the heat!", - "3_female": "Hope you're ready for double trouble, because we're about to bring the heat!" + "1": "準備してね! あたしたちが 力を 組み合うと Wトラブルでちゅ!", + "2": "心は二つ、 作戦は一つ!\nツインパワーを 見せるなだ!", + "3": "二倍の 力で 熱いバトルを しましょうよ!", + "3_female": "二倍の 力で 熱いバトルを しましょうよ!" }, "victory": { - "1": "We may have lost this round, but our bond remains unbreakable!", - "2": "Our twin spirit won't be dimmed for long.", - "3": "We'll come back stronger as a dynamic duo!" + "1": "バトル 負けたけど、 絆 壊れないんでちゅ!", + "2": "何が起こっても ツイン魂が あせてはしないよ!", + "3": "二倍、 いや、 四倍の 力で 戻って来るよ!" }, "defeat": { - "1": "Twin power reigns supreme!", - "2": "Two hearts, one triumph!", - "3": "Double the smiles, double the victory dance!" + "1": "ツインパワーに 誰も 勝てない!", + "2": "心は二つ、 勝利は一つ!", + "3": "笑顔も 勝利の舞も 二倍!" } }, "cyclist": { "encounter": { - "1": "Get ready to eat my dust!", - "2": "Gear up, challenger! I'm about to leave you in the dust!", - "3": "Pedal to the metal, let's see if you can keep pace!" + "1": "両足 砕けようとも 漕ぐ、\nこれ サイクリング 極意なり…", + "2": "やー 悪いねー ついつい パートナー\n連れてきちゃったわ ラブラブだからさ!", + "3": "もうダメェ! 物足りないのォ!\n自転車じゃ 物足りないよォ!" }, "victory": { - "1": "Spokes may be still, but determination pedals on.", - "2": "Outpaced!", - "3": "The road to victory has many twists and turns yet to explore." + "1": "我が サイクリングは 無限\nいずれまた 貴様に 挑む…", + "2": "冷たいボディに ふんわりサドル\nコイツは 最高の パートナーだぜ…", + "3": "自転車じゃ 満足できないのォ!\n暴走族に 入れてもらうのォ!" } }, "black_belt": { "encounter": { - "1": "I praise your courage in challenging me! For I am the one with the strongest kick!", - "2": "Oh, I see. Would you like to be cut to pieces? Or do you prefer the role of punching bag?", - "2_female": "Oh, I see. Would you like to be cut to pieces? Or do you prefer the role of punching bag?" + "1": "宇宙一の キックを 持つ\nわしに 挑むとは 褒めてやろう!", + "2": "んー そうだね、 ズタズタ されたい?\nそれとも ボロボロが 好み かな?", + "2_female": "んー そうだね、 ズタズタ されたい?\nそれとも ボロボロが 好み かな?" }, "victory": { - "1": "Oh. The Pokémon did the fighting. My strong kick didn't help a bit.", - "2": "Hmmm… If I was going to lose anyway, I was hoping to get totally messed up in the process." + "1": "あ 戦うのは ポケモンだっけ\nわしの キックは 関係ないわ。", + "2": "んー…… どうせ 負けるなら\nボクは メチャクチャに されたかったんだけどね。" } }, "battle_girl": { "encounter": { - "1": "You don't have to try to impress me. You can lose against me." + "1": "いいのよ、 見栄 張らなくても\n私には 負けてもいいのよ。" }, "victory": { - "1": "It's hard to say good-bye, but we are running out of time…" + "1": "さようならするのは つらいけれど\nもう 時間が ないわね……" } }, "hiker": { "encounter": { - "1": "My middle-age spread has given me as much gravitas as the mountains I hike!", - "2": "I inherited this big-boned body from my parents… I'm like a living mountain range…" + "1": "中年太りの このボディ\n山の ごとき 貫禄で ゴワス!", + "2": "親 から もらった メタボな ボディ……\n生ける 山脈とは オレの こと……" }, "victory": { - "1": "At least I cannot lose when it comes to BMI!", - "2": "It's not enough… It's never enough. My bad cholesterol isn't high enough…" + "1": "皮下脂肪 だったら\n負けないのにで ゴワス!", + "2": "足りぬ…… 足りぬぞ……\n悪玉コレステロールが 足りぬぞ……" } }, "ranger": { "encounter": { - "1": "When I am surrounded by nature, most other things cease to matter.", - "2": "When I'm living without nature in my life, sometimes I'll suddenly feel an anxiety attack coming on." + "1": "自然に 囲まれ 暮らしているとな\n大抵の ことが どうでも良くなる……", + "2": "自然から 離れ 暮らしているとな\n時々 急に 苦しくなるのさ。" }, "victory": { - "1": "It doesn't matter to the vastness of nature whether I win or lose…", - "2": "Something like this is pretty trivial compared to the stifling feelings of city life." + "1": "ぼくが 負けたって 大自然に\nとっては どうだって いいことさ……", + "2": "都会の 息苦しさに 比べれば\nこんなこと へ でも ないさ……" }, "defeat": { - "1": "I won the battle. But victory is nothing compared to the vastness of nature…", - "2": "I'm sure how you feel is not so bad if you compare it to my anxiety attacks…" + "1": "ぼくが 勝ったことも 大自然に\n比べたら どうだっていいのさ……", + "2": "僕の 不安に 比べれば\n大したこと ないさ きっと……" } }, "scientist": { "encounter": { - "1": "My research will lead this world to peace and joy." + "1": "ボクノ 研究ガ 世界ヲ\n平和ト 幸セニ 導クノデス。" }, "victory": { - "1": "I am a genius… I am not supposed to lose against someone like you…" + "1": "ボクハ 天才 ナンダ……\nコンナ 相手ニ 負ケルハズ……" } }, "school_kid": { "encounter": { - "1": "…Heehee. I'm confident in my calculations and analysis.", - "2": "I'm gaining as much experience as I can because I want to be a Gym Leader someday." + "1": "……グフフ 計算と 分析には\n自信が ありますからね 僕!", + "2": "ここで いっぱい 経験 積んで\nいつかは ジムリーダーを 目指すんだ!" }, "victory": { - "1": "Ohhhh… Calculation and analysis are perhaps no match for chance…", - "2": "Even difficult, trying experiences have their purpose, I suppose." + "1": "ムググ…… 計算も 分析も\n偶然には 敵わないか……", + "2": "辛く 悲しい 経験も\nいつかは 役に 立つはずです……" } }, "artist": { "encounter": { - "1": "I used to be popular, but now I am all washed up." + "1": "かつては おれも 売れっ子だったが\n今では だれにも 相手にされん……" }, "victory": { - "1": "As times change, values also change. I realized that too late." + "1": "時代が 変われば 価値も 移ろう\nそれに 気がつくのが 遅かったのだ……" } }, "guitarist": { "encounter": { - "1": "Get ready to feel the rhythm of defeat as I strum my way to victory!" + "1": "ロックン ロールッ!\n戦いは リズムッ!" }, "victory": { - "1": "Silenced for now, but my melody of resilience will play on." + "1": "ぎゅぎゅーん……\n悲しい メロディ だぜ……" } }, "worker": { "encounter": { - "1": "It bothers me that people always misunderstand me. I'm a lot more pure than everyone thinks." + "1": "作業員 ってのは 命がけ\nだけど やりがいは 十分よ!" }, "victory": { - "1": "I really don't want my skin to burn, so I want to stay in the shade while I work." + "1": "100年 残る ビルや 橋を\n建てるなんて ロマン だろう?" } }, "worker_female": { "encounter": { - "1": "It bothers me that people always misunderstand me.\n$I'm a lot more pure than everyone thinks." + "1": "よく 勘違い されて 困るんだけど\nみんなが 思うよりも ナイーブ なのね。" }, "victory": { - "1": "I really don't want my skin to burn, so I want to stay in the shade while I work." + "1": "本当は お肌 焼きたくない から\n日陰 でしか 作業 したくないのね……" }, "defeat": { - "1": "My body and mind aren't necessarily always in sync." + "1": "心と体は 必ずしも\n一致するわけでは ないのね……" } }, "worker_double": { "encounter": { - "1": "I'll show you we can break you. We've been training in the field!" + "1": "現場で 鍛えた ワシらの 力\n今 見せちゃるけえのぉ!" }, "victory": { - "1": "How strange… How could this be… I shouldn't have been outmuscled." + "1": "おかしいのぉ なんでかのぉ\n力で 負けるはず ないんじゃが……" } }, "hex_maniac": { "encounter": { - "1": "I normally only ever listen to classical music, but if I lose, I think I shall try a bit of new age!", - "2": "I grow stronger with each tear I cry." + "1": "普段 クラシックしか 聴きませんが 負けたら ラップを してみます!", + "2": "涙の 数だけ 強くなれるの だって\nわたし 女の子 だもん。" }, "victory": { - "1": "Is this the dawning of the age of Aquarius?", - "2": "Now I can get even stronger. I grow with every grudge." + "1": "アタイの 想いは アイツに 重い!\n呪いと 願いは 大体 同じッ!", + "2": "これで わたしは また 強くなれる\n恨んだ数だけ 成長 するの。" }, "defeat": { - "1": "New age simply refers to twentieth century classical composers, right?", - "2": "Don't get hung up on sadness or frustration. You can use your grudges to motivate yourself.", - "2_female": "Don't get hung up on sadness or frustration. You can use your grudges to motivate yourself." + "1": "ラッパーって ラップ現象を\n起こすのが 仕事なんですよね?", + "2": "辛いことや 悲しいことを バネにせず\nそのまま 恨みの 力に 変えるんだ。", + "2_female": "辛いことや 悲しいことを バネにせず\nそのまま 恨みの 力に 変えるんだ。" } }, "psychic": { "encounter": { - "1": "Hi! Focus!" + "1": "ハイッ!! 集中ッ!!" }, "victory": { - "1": "Eeeeek!" + "1": "フギャンッ!!" } }, "officer": { "encounter": { - "1": "Brace yourself, because justice is about to be served!", - "2": "Ready to uphold the law and serve justice on the battlefield!" + "1": "ボクは お巡り なんだよ!!\nつまり ボクは ジャスティスだよ!", + "2": "さぼってないのでー ありますっ!\nパトロールなのでー ありますっ!" }, "victory": { - "1": "The weight of justice feels heavier than ever…", - "2": "The shadows of defeat linger in the precinct." + "1": "ボクはっ ボクは お巡りだぞぉ!!\nジャスティス なのにーっ!!", + "2": "キミ 要注意でー ありますっ!\nマークしちゃうでー ありますっ!" } }, "beauty": { "encounter": { - "1": "My last ever battle… That's the way I'd like us to view this match…" + "1": "これが 最後の 勝負……\nそう 思って 相手するわね。" }, "victory": { - "1": "It's been fun… Let's have another last battle again someday…" + "1": "楽しかった……\nまた 最後の 勝負を したいものね。" } }, "baker": { "encounter": { - "1": "Hope you're ready to taste defeat!", - "1_female": "Hope you're ready to taste defeat!" + "1": "きみは もうすぐ\n敗北を 味わっちゃうわ!", + "1_female": "君は もうすぐ\n敗北を 味わっちゃうわ!" }, "victory": { - "1": "I'll bake a comeback." + "1": "諦める べーき かもね……" } }, "biker": { "encounter": { - "1": "Time to rev up and leave you in the dust!" + "1": "おんしゃー 覚悟は できとるんか?\n暴走族 なめたら いかんぜよ!" }, "victory": { - "1": "I'll tune up for the next race." + "1": "ボクらぁー ほんまは 真面目です!\nちっくとも 悪いことは せんです!!" } }, "firebreather": { "encounter": { - "1": "My flames shall devour you!", - "2": "My soul is on fire. I'll show you how hot it burns!", - "3": "Step right up and take a look!" + "1": "やけたとうで 火を 吹く 練習をした!\n良い子は 真似 すんなよ!", + "2": "俺たち 火吹きやろうは 誰よりも 火の こわさを 知ってるのさ!", + "3": "よってらっしゃい みてらっしゃい!" }, "victory": { - "1": "I burned down to ashes...", - "2": "Yow! That's hot!", - "3": "Ow! I scorched the tip of my nose!" + "1": "おっと 誤解 しないでくれ!\nあのとうが 燃えたのは 俺のせいじゃ ないんだ!", + "2": "アツい 勝負を ありがとう!", + "3": "あちちち 鼻の 先っぽ 焦げちゃった!" } }, "sailor": { "encounter": { - "1": "Matey, you're walking the plank if you lose!", - "2": "Come on then! My sailor's pride is at stake!", - "3": "Ahoy there! Are you seasick?", - "3_female": "Ahoy there! Are you seasick?" + "1": "うっしゃー! 負けたら 海に 落とすぞー!", + "2": "そら 来い! 船乗り 魂に かけて 勝つ!", + "3": "おい あんた! 乗ってて 船酔い しないか?", + "3_female": "おい あんた! 乗ってて 船酔い しないか?" }, "victory": { - "1": "Argh! Beaten by a kid!", - "2": "Your spirit sank me!", - "3": "I think it's me that's seasick..." + "1": "くー やられた!", + "2": "船乗り 魂も お前には 負けた!", + "3": "船酔いしてるのが 俺か……" } }, "archer": { "encounter": { - "1": "Before you go any further, let's see how you fare against us, Team Rocket!", - "2": "I have received reports that your skills are not insignificant. Let's see if they are true.", - "3": "I am Archer, an Admin of Team Rocket. And I do not go easy on enemies of our organization." + "1": "先に進む 前に 我々 ロケット団と 戦って もらおうか?", + "2": "あなたも 相当の腕だと 報告が 来ています。 確認しましょう。", + "3": "私は ロケット団幹部の アポロ。\n私達の 敵に 手加減 しませんよ!" }, "victory": { - "1": "What a blunder!", - "2": "With my current skills, I was not up to the task after all.", - "3": "F-forgive me, Giovanni... For me to be defeated by a mere trainer..." + "1": "……なんという 失態!", + "2": "今の腕で やはり 私では 無理 でしたか……", + "3": "さ サカキ様 お許しください\n私とも あろう ものが……" } }, "ariana": { "encounter": { - "1": "Hold it right there! We can't someone on the loose.\n$It's harmful to Team Rocket's pride, you see.", - "2": "I don't know or care if what I'm doing is right or wrong...\n$I just put my faith in Giovanni and do as I am told", - "3": "Your trip ends here. I'm going to take you down!" + "1": "そこまでよーーーっ!!\n$あなたみたいな ヤツを いつまでも のさばらせて おいたら\nロケット団の プライドは キズついて キズついて キズだらけに なっちゃうのよー!", + "2": "私たちの している ことが\n正しいかどうか なんて どうでもいい…\n$私は サカキ様を 信じて ただ 付いてきた のよ!", + "3": "ここは 通さないよ。\nだって 私が 勝つんだから!" }, "victory": { - "1": "Tch, you really are strong. It's too bad.\n$If you were to join Team Rocket, you could become an Executive.", - "1_female": "Tch, you really are strong. It's too bad.\n$If you were to join Team Rocket, you could become an Executive.", - "2": "I... I'm shattered...", - "3": "Aaaieeeee! This can't be happening! I fought hard, but I still lost…" + "1": "あら 強いのね 残念ね\nあなたなら ロケット団に くれば 幹部に だって なれるかもよ。", + "1_female": "あら 強いのね 残念ね\nあなたなら ロケット団に くれば 幹部に だって なれるかもよ。", + "2": "ま まけたわ……", + "3": "くききききーっ! 全力で 戦ったのに……\nこれでも 勝てない なんて!" } }, "proton": { "encounter": { - "1": "What do you want? If you interrupt our work, don't expect any mercy!", - "2": "What do we have here? I am often labeled as the scariest and cruelest guy in Team Rocket…\n$I strongly urge you not to interfere with our business!", - "3": "I am Proton, an Admin of Team Rocket. I am here to put an end to your meddling!" + "1": "まちな! ロケット団の 砦と言われた この私!\nこれ以上 先には 行かせません!", + "2": "なんですか? 私は ロケット団で もっとも 冷酷と 呼ばれた 男……\n$私達の 仕事の ジャマなど させはしませんよ!", + "3": "私は ロケット団幹部の ランス。\nこれ以上 仕事の ジャマは させませんよ!" }, "victory": { - "1": "The fortress came down!", - "2": "You may have won this time… But all you did was make Team Rocket's wrath grow…", - "3": "I am defeated… But I will not forget this!" + "1": "砦が 崩れました……", + "2": "私に 勝った ところで\n所詮は ロケット団の 怒りを 強めた だけですよ……", + "3": "くっ! なかなか やりますね。\nしかし、 次からは そうは 行きません!" } }, "petrel": { "encounter": { - "1": "Muhahaha, we've been waiting for you. Me? You don't know who I am? It is me, Giovanni.\n$The majestic Giovanni himself! Wahahaha! …Huh? I don't sound anything like Giovanni?\n$I don't even look like Giovanni? How come? I've worked so hard to mimic him!", - "2": "I am Petrel, an Admin of Team Rocket. I will not allow you to interfere with our plans!", - "3": "Rocket Executive Petrel will deal with this intruder!" + "1": "ぐっふっふっ よくきたな…\nおや? 私が 誰か 分からんかね?\n$サカキだよ サカキ様 だよ!\nぐわぁーっはっはーっ!\n$……あれ? 全然 似てない? サカキ様に 見えない?\nくっそー 一生懸命 練習したのに!", + "2": "私は ロケット団幹部の ラムダ。\n計画を 邪魔するのは 許さない!", + "3": "侵入者には  ロケット団幹部の ラムダが 対処するぞ!" }, "victory": { - "1": "OK, OK. I'll tell you where he is.", - "2": "I… I couldn't do a thing… Giovanni, please forgive me…", - "3": "No, I can't let this affect me. I have to inform the others…" + "1": "わ 分かった…… 局長の 居場所 教える……", + "2": "ぐうう…… まったく 歯が立たない……\nサカキ様 お許し ください……", + "3": "いかん 負けて 落ち込んでる 場合じゃない\n仲間に 知らせなくては……" } }, "tabitha": { "encounter": { - "1": "Hehehe! So you've come all the way here! But you're too late!", - "2": "Hehehe... Got here already, did you? We underestimated you! But this is it! \n$I'm a cut above the Grunts you've seen so far. I'm not stalling for time.\n$I'm going to pulverize you!", - "3": "I'm going to give you a little taste of pain! Resign yourself to it!" + "1": "ウヒョヒョ! お前 ここまで 来たのか! だけど 遅かったぜ!", + "2": "ウヒョヒョ…… もう ここまで 来たのか!\n思っていたより やるな! だが ここまでだ!\n$俺は これまでの 下っ端ども とは 一味違う!\n時間稼ぎなんか しねえで コテンパンしてやるぜ!", + "3": "ウヒョヒョ! 痛みを 味わわせて あげますよ! 身を 委ねろ!" }, "victory": { - "1": "Hehehe! You might have beaten me, but you don't stand a chance against the boss!\n$If you get lost now, you won't have to face a sound whipping!", - "2": "Hehehe... So, I lost, too...", - "3": "Ahya! How could this be? For an Admin like me to lose to some random trainer...", - "3_female": "Ahya! How could this be? For an Admin like me to lose to some random trainer..." + "1": "「ウヒョヒョ‥‥! 俺に 勝てても リーダーには 勝てないぜ!\n$さっさと 帰ったほうが 痛い 思い しなくて 済むぜ!", + "2": "ウヒョヒョ…… 負けちまったか……", + "3": "うっひょーん……! なんたる事だろうか……!\nサブリーダーの ホムラさんが こんな デタラメなヤツ なぞに……", + "3_female": "うっひょーん……! なんたる事だろうか……!\nサブリーダーの ホムラさんが こんな デタラメなヤツ なぞに……" } }, "courtney": { "encounter": { - "1": "Don't. Get. In. My. Way.", - "2": "You... ...I want to...analyze. Ahahaha", - "3": "... Well then...Deleting..." + "1": "………ジャっ…マ……ッ\nするなあああああッッッッ!!!!!!", + "2": "キミを …………アナライズ\n…………したい …………ァハハハッ♪", + "3": "…………………じゃあ\n…………………デリートします" }, "victory": { - "1": "Hah hah... Uhn...hah hah...", - "2": "As anticipated. Unanticipated. You. Target lock...completed.\n$Commencing...experiment. You. Forever. Aha... ♪", - "3": "That's unanticipated. ...I knew it. You...are interesting! ...Haha. ♪" + "1": "…………はぁはぁ……\n………んぅ…はぁはぁ………", + "2": "…………予想内 …………予想外\n…………キミ …………ターゲットロック …………したから\n$…………エクスペリメント …………するから\n…………キミを …………ずっと …………ァハッ……♪", + "3": "…………また …………予想外\n…………やっぱり …………キミ……オモチロイ……! ……ァハハッ……♪" } }, "shelly": { "encounter": { - "1": "Ahahahaha! You're going to meddle in Team Aqua's affairs?\n$You're either absolutely fearless, simply ignorant, or both!\n$You're so cute, you're disgusting! I'll put you down", - "2": "What's this? Who's this spoiled brat?", - "3": "Cool your jets. Be patient. I'll crush you shortly.", - "3_female": "Cool your jets. Be patient. I'll crush you shortly." + "1": "オーッホッホ! 我々 アクア団の\n邪魔を しようと 言うの!?\n$もう 怖いもの知らず と言おうか\nただの 愚か者 と言おうか……\n$かわいすぎて 憎らしく なっちゃう!\nやっつけて あげるわね!", + "2": "ああん? なんだい?\nこの クソ生意気な オコチャマは……?", + "3": "熱くなってん じゃないよ、 少しは 頭を 冷やしな。\nすぐ ぶっ壊すから。", + "3_female": "熱くなってん じゃないよ、 少しは 頭を 冷やしな。\nすぐ ぶっ壊すから。" }, "victory": { - "1": "Ahahahaha! We got meddled with unexpectedly! We're out of options.\n$We'll have to pull out. But this isn't the last you'll see of Team Aqua!\n$We have other plans! Don't you forget it!", - "2": "Ahhh?! Did I go too easy on you?!", - "3": "Uh. Are you telling me you've upped your game even more during the fight?\n$You're a brat with a bright future… My Pokémon and I don't have any strength left to fight…\n$Go on… Go and be destroyed by Archie.", - "3_female": "Uh. Are you telling me you've upped your game even more during the fight?\n$You're a brat with a bright future… My Pokémon and I don't have any strength left to fight…\n$Go on… Go and be destroyed by Archie." + "1": "オーッホッホ! 思わぬ 邪魔が 入っちゃったわ!\n仕方ないわね!\n$ここは 一度 引き上げちゃう! でもね アクア団の\n活動は まだまだ 続くんだから 覚えておきなさーい!", + "2": "くううっ……!?\n手を 抜きすぎちゃった かしら……!", + "3": "……うぅ ……この間 よりも\n更に ウデを上げてる ですって……!?\n$末恐ろしい オコチャマだわ……\n……アタシと ポケモンたちに もう 戦うチカラは 残っちゃいない\n$……行きなさいよ 行って\nアオギリ様に 粛清されるが いいわ。", + "3_female": "……うぅ ……この間 よりも\n更に ウデを上げてる ですって……!?\n$末恐ろしい オコチャマだわ……\n……アタシと ポケモンたちに もう 戦うチカラは 残っちゃいない\n$……行きなさいよ 行って\nアオギリ様に 粛清されるが いいわ。" } }, "matt": { "encounter": { - "1": "All right then, until the boss has time for you, I'll be your opponent!", - "2": "Hooah! Full on! I'm burning up! Well! Welll! Wellllll! Let's battle it out until we've got nothing left!", - "3": "Hoo hah! I'm gonna smash you up!" + "1": "……ってな ワケでヨォ あにィが ジカンが開くマデ\nオレッちの 相手を してもらうゼぃ!", + "2": "フウハアッ!! マックスッ!!\nタギってッ!! きたゼェェェェッ!!!!!\n$サアッ! サアッ! サアアアッ!!!\nチカラ 尽きハテるまで ヤリあおうゼッッ!!!", + "3": "UPAAAAA!!!\nモミツブシテ ヤルゼェェェ!!" }, "victory": { - "1": "Muwuhahaha! That battle was fun even though I lost!", - "2": "I can feel it! I can feel it, all right! The strength coming offa you!\n$More! I still want more! But looks like we're outta time...", - "3": "Oho! That's a loss I can be proud of!", - "3_female": "Oho! That's a loss I can be proud of!" + "1": "フゥーハッハッハァァァ!!!\nマケても タノしい ショウブ だったゼ!", + "2": "ビンビン かんじるゼェ!! オメェの ツヨサ!\n$モミつぶせる ときを タノシミに してるゼィ!", + "3": "オウホウッ! タカぶる ハイボク だぜっ!", + "3_female": "オウホウッ! タカぶる ハイボク だぜっ!" } }, "mars": { "encounter": { - "1": "I'm Mars, one of Team Galactic's top Commanders.", - "2": "Team Galactic's vision for the future is unwavering. Opposition will be crushed without mercy!", - "3": "Feeling nervous? You should be!", - "3_female": "Feeling nervous? You should be!" + "1": "あたしは ギンガ団幹部の マーズ!\n強くて 美しいの!", + "2": "ギンガ団は 生み出そうと しているのは 新しい 世界。\nジャマは 許さないわ!", + "3": "ボスの ジャマは させないわよ!\nこの先に 進みたいなら あたしが 相手するわ!", + "3_female": "ボスの ジャマは させないわよ!\nこの先に 進みたいなら あたしが 相手するわ!" }, "victory": { - "1": "This can't be happening! How did I lose?!", - "2": "You have some skill, I'll give you that.", - "3": "Defeated... This was a costly mistake." + "1": "負けた……! ギンガ団の 幹部 として……\nこんなことって ありえない!!", + "2": "何なのよッ! あたしのこと 嫌いなの!?", + "3": "まさか! 負けるだなんて!?\n生意気な ヤツね!!" } }, "jupiter": { "encounter": { - "1": "Jupiter, Commander of Team Galactic, at your service.", - "2": "Resistance is futile. Team Galactic will prevail!", - "3": "You're trembling... scared already?" + "1": "いいわ!\nこの ジュピターが 相手 してあげましょう!", + "2": "反対なんて 虚しい!\nギンガ団は 勝利するわ!", + "3": "どうしたの? もしかして 震えているのかしら?" }, "victory": { - "1": "No way... I lost?!", - "2": "Impressive, you've got guts!", - "3": "Losing like this... How embarrassing." + "1": "フン! 相変わらずの 強さ ちっとも かわいくないわね!", + "2": "フン! なかなか やるじゃない!", + "3": "フン! 次は 泣かして あげるんだから!" } }, "saturn": { "encounter": { - "1": "I am Saturn, Commander of Team Galactic.", - "2": "Our mission is absolute. Any hindrance will be obliterated!", - "3": "Is that fear I see in your eyes?" + "1": "ミッションは 順調!\nボスも 満足 なさるだろう。\n$全ては みんなの ために\nそして ギンガ団の ために!", + "2": "ギンガ団の 使命を ジャマするなら\nどんな 可能性でも 潰す!", + "3": "わたしたち ギンガ団は 必要な ものを 独占し\n要らない ものは 捨てるだけ!" }, "victory": { - "1": "Impossible... Defeated by you?!", - "2": "You have proven yourself a worthy adversary.", - "3": "Bestowed in defeat... This is unacceptable." + "1": "強い! だが 哀れだな。", + "2": "……なるほど 強い!\nギンガ団に 歯向かう わけだ。", + "3": "くっ! この わたしが!\n時間稼ぎにしか ならないだと…\n$まあ いい! おまえが 何をしても\n流れる 時間は 止められない!" } }, "zinzolin": { "encounter": { - "1": "You could become a threat to Team Plasma, so we will eliminate you here and now!", - "1_female": "You could become a threat to Team Plasma, so we will eliminate you here and now!", - "2": "You don't have the sense to know when to quit, it seems. It's an act of mercy on my part to bring an end to this now!", - "3": "You're an impressive Trainer to have made it this far. But it ends here.", - "3_female": "You're an impressive Trainer to have made it this far. But it ends here." + "1": "さて…… おまえは プラズマ団に とって\n不安要素に なりかねない。\n$ここで 排除するのだ!", + "1_female": "さて…… おまえは プラズマ団に とって\n不安要素に なりかねない。\n$ここで 排除するのだ!", + "2": "諦めきれぬか? なら 引導を 渡すのが\nワタシなりの 優しさ なのだ!", + "3": "ここまで 来るとは 大した トレーナー だが、\n今は 終わりだ。", + "3_female": "ここまで 来るとは 大した トレーナー が、\n今は 終わりだ。" }, "victory": { - "1": "Ghetsis... I have failed you...", - "2": "It's bitter cold. I'm shivering. I'm suffering. Yet, we will stand victorious.", - "3": "Hmph. You're a smarter Trainer than I expected, but not smart enough.", - "3_female": "Hmph. You're a smarter Trainer than I expected, but not smart enough." + "1": "ゲーチス様…… 失望させました……", + "2": "寒い。 ワタシは 震えている。\n苦しいが いつか ワタシたちは 成功する。", + "3": "ふむう。 存外 さとい トレーナーだ。", + "3_female": "ふむう。 存外 さとい トレーナーだ。" } }, "rood": { "encounter": { - "1": "You are a threat to Team Plasma. We cannot let you walk away from here and now!", - "1_female": "You are a threat to Team Plasma. We cannot let you walk away from here and now!", - "2": "It seems you don't know when to give up. I'll make sure no one interferes with our plans!", - "3": "You are a remarkable Trainer to have made it this far. But this is where it ends.", - "3_female": "You are a remarkable Trainer to have made it this far. But this is where it ends." + "1": "おまえ という トレーナーが\nどんな 人物か 見せてもらいたい…\n$そう、 ポケモン勝負 でな。", + "1_female": "おまえ という トレーナーが\nどんな 人物か 見せてもらいたい…\n$そう、 ポケモン勝負 でな。", + "2": "見限らぬようだ。 だれにも ジャマは させぬよ。", + "3": "……これが おまえの\n望みと あらば", + "3_female": "……これが おまえの\n望みと あらば" }, "victory": { - "1": "Ghetsis... I have failed my mission...", - "2": "The cold is piercing. I'm shivering. I'm suffering. Yet, we will stand triumphant.", - "3": "Hm. You are a talented Trainer, but unfortunately not talented enough." + "1": "ほう! ポケモンと 心が\n通じているような 戦い方……", + "2": "失敗しました……\nそぞろに 潮の 匂いが 恋しくなる……", + "3": "正直言って…… ゲーチス様の なにが 真実で\nなにが 虚構か わからないがね……" } }, - "xerosic": { +"xerosic": { "encounter": { - "1": "Ah ha ha! It would be my pleasure. Come on, little Trainer! Let's see what you've got!", - "1_female": "Ah ha ha! It would be my pleasure. Come on, little Trainer! Let's see what you've got!", - "2": "Hmm... You're more powerful than you look. I wonder how much energy there is inside you.", - "2_female": "Hmm... You're more powerful than you look. I wonder how much energy there is inside you.", - "3": "I've been waiting for you! I need to do a little research on you! Come, let us begin!" + "1": "オマエを 倒せば ワタシの 科学力の\nすごさを 証明できるゾ! よし いくのだ!", + "1_female": "オマエを 倒せば ワタシの 科学力の\nすごさを 証明できるゾ! よし いくのだ!", + "2": "なるほど ジャマを したのは オマエだったのか!\nわかったゾ! よーし! オマエで 実験だゾ!", + "2_female": "なるほど ジャマを したのは オマエだったのか!\nわかったゾ! よーし! オマエで 実験だゾ!", + "3": "おおー ウワサの オマエか 待っていたゾ!\nオマエを 調べる ほら 始めるゾ!" }, "victory": { - "1": "Ah, you're quite strong. Oh yes—very strong, indeed.", - "2": "Ding-ding-ding! You did it! To the victor go the spoils!", - "2_female": "Ding-ding-ding! You did it! To the victor go the spoils!", - "3": "Wonderful! Amazing! You have tremendous skill and bravery!" + "1": "グヌウウ…… なぜだ……\nなぜ こんなことが 起こるのだ……?", + "2": "なんだと! オマエ すごいゾ!\nオマエの ポケモン すごいゾ!", + "2_female": "なんだと! オマエ すごいゾ!\nオマエの ポケモン すごいゾ!", + "3": "すごいな オマエ! すごいぞ オマエ!\nワタシは オマエを 認める イコール 金を あげる!" } }, "bryony": { "encounter": { - "1": "I am Bryony, and it would be my pleasure to battle you. Show me what you've got.", - "2": "Impressive... You're more powerful than you appear. Let's see the true extent of your energy.", - "2_female": "Impressive... You're more powerful than you appear. Let's see the true extent of your energy.", - "3": "I've anticipated your arrival. It's time for a little test. Shall we begin?" + "1": "一人で やっつける。\n勝てる 確率を あげる 必要ない。", + "2": "どこかで 見た 顔?\nわかんないけど フレア団 じゃないし やっつけようよ…", + "2_female": "どこかで 見た 顔?\nわかんないけど フレア団 じゃないし やっつけようよ…", + "3": "あら? あら?" }, "victory": { - "1": "You're quite strong. Oh yes—very strong, indeed.", - "2": "Ding-ding-ding! You've done well. Victory is yours.", - "3": "Wonderful! Remarkable! Your skill and bravery are commendable." + "1": "確率は あくまでも 確率。\n絶対では ないのよね……", + "2": "確率を 無視する トレーナー\nあなたの パワーの 源は?", + "3": "あらま! こいつめ!\nわたしが かわいそうでしょ!" } }, "rocket_grunt": { "encounter": { - "1": "Prepare for trouble!", - "2": "We're pulling a big job here! Get lost, kid!", - "2_female": "We're pulling a big job here! Get lost, kid!", - "3": "Hand over your Pokémon, or face the wrath of Team Rocket!", - "4": "You're about to experience the true terror of Team Rocket!", - "5": "Hey, kid! Me am a Team Rocket member kind of guy!", - "5_female": "Hey, kid! Me am a Team Rocket member kind of guy!" + "1": "なんだかんだと 聞かれたら\n答えてあげるのが 世の情け!", + "2": "おれ達は 大事な 仕事を してるんだ! お家へ 帰りな!", + "2_female": "おれ達は 大事な 仕事を してるんだ! お家へ 帰りな!", + "3": "ロケット団の 恐ろしさを 知りたくないなら\nおまえの ポケモンを よこせ!", + "4": "ロケット団の 本当の 恐ろしさ\nおまえに 教えて 差しあげよう!", + "5": "ロケット団に ガイコクジン\nワタシ オンリーワン だけど……\n$しかーし! そんなコト ノー カンケー!", + "5_female": "ロケット団に ガイコクジン\nワタシ オンリーワン だけど……\n$しかーし! そんなコト ノー カンケー!" }, "victory": { - "1": "Team Rocket blasting off again!", - "2": "Oh no! I dropped the Lift Key!", - "3": "I blew it!", - "4": "My associates won't stand for this!", - "5": "You say what? Team Rocket bye-bye a go-go? Broken it is says you?" + "1": "やな感じ~!", + "2": "しまった…! せっかく 隠して置いた エレベータの カギが…!", + "3": "しくじったか!", + "4": "くそ! 仲間が 黙っちゃ いねえぞ!", + "5": "オー ノー! キャント ビリーブ!\nユーは ブルーベリー ストロベリー!\n$……ソーリー ミステイク!\nユーは ベリー ストロング!\n$ティース キャント スタンダップ!\n歯が 立ちませーん!" } }, "magma_grunt": { "encounter": { - "1": "If you get in the way of Team Magma, don’t expect any mercy!", - "2": "You'd better not interfere with our plans! We're making the world a better place!", - "3": "You're in the way! Team Magma has no time for kids like you!", - "4": "I hope you brought marshmallows because things are about to heat up!", - "5": "We're going to use the power of a volcano! It's gonna be... explosive! Get it? Heh heh!" + "1": "おれたち マグマ団の 邪魔を するなら\n容赦は しないぜ!", + "2": "すべての 人々の ために\n我々 マグマ団は あるのよ!", + "3": "邪魔だ! マグマ団は お前の ような ヤツに\n用が ねーんだ! ほら さっさと 帰れよ!", + "4": "マシュマロ 持ってきた?\nすぐ 炎は 燃え上がっちゃう からー!!", + "5": "燃料の 力を 利用して 火山を 噴火させて やるのさ! ズドドーン とな!" }, "victory": { - "1": "Huh? I lost?!", - "2": "I can't believe I lost! I even skipped lunch for this", - "3": "No way! You're just a kid!", - "3_female": "No way! You're just a kid!", - "4": "Urrrgh... I should've ducked into our hideout right away...", - "5": "You beat me... Do you think the boss will dock my pay for this?" + "1": "ぬぬぬー 敗北 するなどー!?", + "2": "負けちゃった! せっかくの 昼ご飯を 抜いたのにー", + "3": "ガキの くせに この 強さ だと!?", + "3_female": "ガキの くせに この 強さ だと!?", + "4": "うぐぐ‥‥ 早く アジトに 逃げ込めば 良かった……", + "5": "負けた… そんなことじゃ ボーナスが 減るぜ?" } }, "aqua_grunt": { "encounter": { - "1": "No one who crosses Team Aqua gets any mercy, not even kids!", - "2": "Grrr... You've got some nerve meddling with Team Aqua!", - "3": "You're about to get soaked! And not just from my water Pokémon!", - "4": "We, Team Aqua, exist for the good of all!", - "5": "Prepare to be washed away by the tides of my... uh, Pokémon! Yeah, my Pokémon!" + "1": "おれら アクア団の ジャマするつもりかい?\nガキでも 容赦せーへんで!", + "2": "うむむ…… アクア団に 逆らうと いい度胸 だろ!", + "3": "おれの みずポケモンが おまれを ずぶ濡れに しちゃうぞ!", + "4": "活動を 邪魔する つもりなら ぶっ壊す!\nこの世界を より良い 場所に してるぞ!", + "5": "俺の ポケモンの 水の に 押し流されちゃうぞ!" }, "victory": { - "1": "You're kidding me!", - "2": "Arrgh, I didn't count on being meddled with by some meddling kid!", - "3": "I lost?! Guess I'll have to swim back to the hideout now...", - "4": "Oh, man, what a disaster... The boss is going to be furious...", - "5": "You beat me... Do you think the boss will make me walk the plank for this?" + "1": "冗談じゃねえ?!", + "2": "うむ‥‥ まさか ヤツに 邪魔 されるなんて\nこれっぽっちも おもってなかったぜ!", + "3": "チクショウ… アジトへ 泳ぎ帰らなくちゃ……", + "4": "……やばい! このまま じゃあ\nリーダーに 怒られちまうぞ……", + "5": "倒された… 板歩きの刑に なっちゃうかも……" } }, "galactic_grunt": { "encounter": { - "1": "Don't mess with Team Galactic!", - "2": "Witness the power of our technology and the future we envision!", - "3": "In the name of Team Galactic, I'll eliminate anyone who stands in our way!", - "4": "Get ready to lose!", - "5": "Hope you're ready for a cosmic beatdown!", - "5_female": "Hope you're ready for a cosmic beatdown!" + "1": "ギンガ団に 逆らうな!", + "2": "我らの 技術の 力と\n目論む 未来 を目に当たりに しちゃえ!", + "3": "ギンガ団にかわって 邪魔する 誰もを 排除するぞ!", + "4": "負ける 準備 いいかい!?", + "5": "コスミックに 破壊しちゃうぞ!\n覚悟せよ!", + "5_female": "コスミックに 破壊しちゃうぞ!\n覚悟せよ!" }, "victory": { - "1": "Shut down...", - "2": "This setback means nothing in the grand scheme.", - "3": "Our plans are bigger than this defeat.", - "4": "How?!", - "5": "Note to self: practice Pokémon battling, ASAP." + "1": "墜落……", + "2": "この負けは 次のカケで\n取り返せば いいさ!", + "3": "かまわない!\n我らの 目的の方は この負けより 大きい!", + "4": "ホワイ?! なぜ?!", + "5": "自分への覚え書き:\nポケモン勝負練習 なる早" } }, "plasma_grunt": { "encounter": { - "1": "We won't tolerate people who have different ideas!", - "2": "If I win against you, release your Pokémon!", - "3": "If you get in the way of Team Plasma, I'll take care of you!", - "4": "Team Plasma will liberate Pokémon from selfish humans like you!", - "5": "Our hairstyles are out of this world... but our battling skills? You'll find out soon enough." + "1": "あたしたちと 違う\n考えの 持ち主は 許さない!", + "2": "オレが 勝てば\nおまえの ポケモンを 解き放て!", + "3": "プラズマ団の ジャマをするなら\nアタシが やっつけてやる!!", + "4": "プラズマ団は お前のような 身勝手な\n人間から 開放する!", + "5": "おまえの ような トレーナーが\nポケモンを 苦しめているのだ!" }, "victory": { - "1": "Plasmaaaaaaaaa!", - "2": "How could I lose...", - "3": "...What a weak Pokémon, I'll just have to go steal some better ones!", - "4": "Great plans are always interrupted.", - "5": "This is bad... Badbadbadbadbadbadbad! Bad for Team Plasma! Or Plasbad, for short!" + "1": "プラズマーーーーー!!!", + "2": "なんてこと……! おれが 負けるなど!", + "3": "……弱い ポケモンね\n別の ポケモンを 奪わなきゃ!!", + "4": "すばらしい 計画に\nジャマは 付き物 ね!", + "5": "マズイ……\nマズイマズイマズイマズイマズイマズイ\n$プラズマ団と して マズイ\n縮めて プラズマズイ!" } }, "flare_grunt": { "encounter": { - "1": "Your Pokémon are no match for the elegance of Team Flare.", - "2": "Hope you brought your sunglasses, because things are about to get bright!", - "2_female": "Hope you brought your sunglasses, because things are about to get bright!", - "3": "Team Flare will cleanse the world of imperfection!", - "4": "Prepare to face the brilliance of Team Flare!", - "5": "Fashion is most important to us!" + "1": "お前の ポケモンが フレア団の 優美さには 敵わない!", + "2": "この サングラス いいだろう?\n羨ましいだろ? でも あげない!", + "2_female": "この サングラス いいだろう?\n羨ましいだろ? でも あげない!", + "3": "無風流は 許さない フレア団が お前を 打ち倒す!", + "4": "フレア団の 眩しさは お前を 圧倒するぞ!", + "5": "おれら 泣く子も 黙る\nオシャレチーム フレア団!" }, "victory": { - "1": "The future doesn't look bright for me.", - "2": "Perhaps there's more to battling than I thought. Back to the drawing board.", - "3": "Gahh?! I lost?!", - "4": "Even in defeat, Team Flare's elegance shines through.", - "5": "You may have beaten me, but when I lose, I go out in style!" + "1": "敗北でも フレア団が 優美さが 華やかに 輝く!", + "2": "目の前が 真っ暗……\nあっ サングラス だからか?", + "3": "ぐあああ! 負けた! シャレにならない!", + "4": "やっぱり バトルには\nオシャレより 大事なことが あるかも…", + "5": "ちっ! フレア団 御用達の\nオシャレスーツが 汚れたぜ!" } }, "aether_grunt": { "encounter": { - "1": "I'll fight you with all I have to wipe you out!", - "2": "I don't care if you're a kid or what. I'll send you flying if you threaten us!", - "2_female": "I don't care if you're a kid or what. I'll send you flying if you threaten us!", - "3": "I was told to turn away Trainers, whomever they might be!", - "4": "I'll show you the power of Aether Paradise!", - "5": "Now that you've learned of the darkness at the heart of Aether Paradise, we'll need you to conveniently disappear!" + "1": "侵入者 発見!\nシークレットラボを 守ります!", + "2": "大事な 研究なのよ!\n子供とはいえ ぶっとばすわよ!", + "2_female": "大事な 研究なのよ!\n子供とはいえ ぶっとばすわよ!", + "3": "どんな トレーナーだろうと\n追い返すよう いわれてるのよ!", + "4": "エーテルパラダイスの\n開発力を みせてやろう!", + "5": "エーテルパラダイスの 闇を 知った\nおまえには 消えてもらうぜ!" }, "victory": { - "1": "Hmph! You seem to have a lot of skill.", - "2": "What does this mean? What does this mean!", - "3": "Hey! You're so strong that there's no way I can turn you away!", - "4": "Hmm... It seems as though I may have lost.", - "5": "Here's an impression for you: Aiyee!" + "1": "ふむう…… どうやら\nわたしは 負けたようですな。", + "2": "どういう ことだ……!\nどういう ことだ……?", + "3": "ちょっと! 強すぎて\n追い返すなんて ムリムリ!", + "4": "ポケモン勝負に 関する\n発見は してなかった!", + "5": "真似して ぎゃひーん!" } }, "faba": { "encounter": { - "1": "I, Branch Chief Faba, shall show you the harshness of the real world!", - "2": "The man who is called Aether Paradise's last line of defense is to battle a mere child?", - "2_female": "The man who is called Aether Paradise's last line of defense is to battle a mere child?", - "3": "I, Faba, am the Aether Branch Chief. The only one in the world, I'm irreplaceable." + "1": "支部長 ザオボーは あなたに 現実を みせて さしあげますよ!", + "2": "ザオボー 人呼んで エーテルパラダイス\n最後の 最後の 最後の 砦は あなたを 壊します!", + "2_female": "ザオボー 人呼んで エーテルパラダイス\n最後の 最後の 最後の 砦は あなたを 壊します!", + "3": "エーテル財団の 支部長 といえば\n世界に ただ一人…… この ザオボーだけで ございます。" }, "victory": { - "1": "Aiyee!", - "2": "H-h-how can this be?! How could this child...", - "2_female": "H-h-how can this be?! How could this child...", - "3": "This is why... This is why I can't bring myself to like children." + "1": "ぎゃひーん!!!", + "2": "な ななな なんということでしょう?\nこの わたしが お子さま相手に……", + "2_female": "な ななな なんということでしょう?\nこの わたしが お子さま相手に……", + "3": "なんということでしょう!?" } }, "skull_grunt": { "encounter": { - "1": "We're not bad-we're just hard!", - "2": "You want some? That's how we say hello! Nice knowing you, punks!", - "2_female": "You want some? That's how we say hello! Nice knowing you, punks!", - "3": "We're just a bunch of guys and gals with a great interest in other people's Pokémon!", - "4": "Why you trying to act hard when we're already hard as bones out here, homie?", - "4_female": "Why you trying to act hard when we're already hard as bones out here, homie?", - "5": "Team Skull represent! We can't pay the rent! Had a lot of fun, but our youth was misspent!", - "5_female": "Team Skull represent! We can't pay the rent! Had a lot of fun, but our youth was misspent!" + "1": "まじめが キライでよ!\n$スカル団 やっているのに\nまじめに 下っ端 してるぜ?", + "2": "なんだ とは ご挨拶 ジャン!\nこいつら まとめて しめちゃおうよ!", + "2_female": "なんだ とは ご挨拶 ジャン!\nこいつら まとめて しめちゃおうよ!", + "3": "オレが ポケモンを 使いこなす\nすごいとこ みせてやりまスカ!", + "4": "あんたが ホネ身を 惜しまないかを 確かめたいから バトルッスカ!", + "4_female": "あんたが ホネ身を 惜しまないかを 確かめたいから バトルッスカ!", + "5": "だからYo♪ きけYo♪\n侵入者さんYo♪\n$オレら レペゼン サボる♪ スカル♪\nすこぶる♪ そそる♪ 話するYo♪", + "5_female": "だからYo♪ きけYo♪\n侵入者さんYo♪\n$オレら レペゼン サボる♪ スカル♪\nすこぶる♪ そそる♪ 話するYo♪" }, "victory": { - "1": "Huh? Is it over already?", - "2": "Time for us to break out, yo! Gotta tell y'all peace out, yo!", - "3": "We don't need your wack Pokémon anyway!", - "4": "Wha-?! This kid's way too strong-no bones about it!", - "5": "So, what? I'm lower than a Pokémon?! I already got self-esteem issues, man." + "1": "ちっ! まじめ だから\n……応援してやるよ\n$ヨーヨー 止まるなよ\n負けてもいいから 止まるなよ!", + "2": "しめるなよ! 袋叩き するなよ!", + "3": "オマエが ポケモンを 使いこなす\nすごいとこ みせられたのでスカ!?", + "4": "あんたらの ハート ホネ身に しみちゃう……!", + "5": "そーかYo♪\n後悔すんじゃねーYo♪" } }, "plumeria": { "encounter": { - "1": " ...Hmph. You don't look like anything special to me.", - "1_female": " ...Hmph. You don't look like anything special to me.", - "2": "It takes these dumb Grunts way too long to deal with you kids...", - "3": "Mess with anyone in Team Skull, and I'll show you how serious I can get." + "1": "あんたね…… さっき 聞いたの\n$……なんにも 感じない\nふつーのコに みえるけどねえ", + "1_female": " .あんたね…… さっき 聞いたの\n$……なんにも 感じない\nふつーのコに みえるけどねえ", + "2": "下っ端 あんたのような\n雑魚相手に モタモタ してるからさ", + "3": "スカル団を 束ねている……\n言うなれば あねごって ところ。\n$かわいい あいつらを\nいじめる あんたが ジャマなのよ!" }, "victory": { - "1": "Hmmph! You're pretty strong. I'll give you that.", - "1_female": "Hmmph! You're pretty strong. I'll give you that.", - "2": "Hmmph. Guess you are pretty tough. Now I understand why my Grunts waste so much time battling kids.", - "3": "Hmmph! I guess I just have to hold that loss." + "1": "ハンッ! たいした もんだよ\nただし 次 ジャマしたら 本気で やっちまうから", + "1_female": "ハンッ! たいした もんだよ\nただし 次 ジャマしたら 本気で やっちまうから", + "2": "あんた たいした もんだよ\nま 雑魚相手に 手間取るのも わかる 強さか。", + "3": "……チッ" } }, "macro_grunt": { "encounter": { - "1": "It looks like this is the end of the line for you!", - "2": "You are a trainer aren't you? I'm afraid that doesn't give you the right to interfere in our work.", - "2_female": "You are a trainer aren't you? I'm afraid that doesn't give you the right to interfere in our work.", - "3": "I'm from Macro Cosmos Insurance! Do you have a life insurance policy?" + "1": "不審者を 追い払って\nたんまり ボーナス いただくぜ!", + "2": "ジャマは 許しません!\n$マクロコスモスの さまざまな\n関連会社を 守るためにも 追い返します!", + "2_female": "ジャマは 許しません!\n$マクロコスモスの さまざまな\n関連会社を 守るためにも 追い返します!", + "3": "マクロコスモス生命です!\n保険に 入っていますか?" }, "victory": { - "1": "I have little choice but to respectfully retreat.", - "2": "Having to give up my pocket money... Losing means I'm back in the red...", - "3": "Nobody can beat Macro Cosmos when it comes to our dedication to our work!" + "1": "ボーナスが……\n夢の マイホームが……", + "2": "負けたからには\n素直に 引き下がりましょう。\n$だが ローズ委員長の\nジャマは しないでくださいよ。", + "3": "マクロコスモス生命の 仕事なら\n誰にも 負けないのに…" } }, "oleana": { "encounter": { - "1": "I won't let anyone interfere with Mr. Rose's plan!", - "2": "So, you got through all of the special staff that I had ordered to stop you. I would expect nothing less.", - "3": "For the chairman! I won't lose!" + "1": "ローズ様の ジャマ だなんて\nわたくし 絶対に 許せません!", + "2": "わたくしの オーダーを こなす 特別な\nスタッフ達を ものともせずに やってくるなんて……", + "3": "あなたを ボコボコに すれば\n委員長の 計画が すらっと 進めます!" }, "victory": { - "1": "*sigh* I wasn't able to win... Oleana...you really are a hopeless woman.", - "2": "Arghhh! This is inexcusable... What was I thinking... Any trainer who's made it this far would be no pushover..", - "2_female": "Arghhh! This is inexcusable... What was I thinking... Any trainer who's made it this far would be no pushover..", - "3": "*sigh* I am one tired Oleana..." + "1": "はあああぁ 勝てないなんて……\nオリーヴ…… ほんとに ダメな子", + "2": "はああ……! なんてこと……\n$勝ちあがった トレーナーの\n実力を みくびっていました……", + "2_female": "はああ……! なんてこと……\n$勝ちあがった トレーナーの\n実力を みくびっていました……", + "3": "まあ 生意気!\nオリーヴの パートナーを キズつけるなんて!" } }, "rocket_boss_giovanni_1": { "encounter": { - "1": "So! I must say, I am impressed you got here!" + "1": "こんな所 まで よく来た…" }, "victory": { - "1": "WHAT! This cannot be!" + "1": "ぐ ぐーッ! そんな ばかなーッ!" }, "defeat": { - "1": "Mark my words. Not being able to measure your own strength shows that you are still a child.", - "1_female": "Mark my words. Not being able to measure your own strength shows that you are still a child." + "1": "自分の 力を 把握できない 内は\nまだ 子供 ということだ…… 覚えておくがいい……", + "1_female": "自分の 力を 把握できない 内は\nまだ 子供 ということだ…… 覚えておくがいい……" } }, "rocket_boss_giovanni_2": { "encounter": { - "1": "My old associates need me... Are you going to get in my way?" + "1": "かつての 仲間たちが 私を 必要としてる…… 先の 失敗は もう 二度と 繰り返さない! " }, "victory": { - "1": "How is this possible...? The precious dream of Team Rocket has become little more than an illusion..." + "1": "なっ なぜだ……!\nロケット団 最高の 夢が 幻となって 消えていく……" }, "defeat": { - "1": "Team Rocket will be reborn again, and I will rule the world!" + "1": "ロケット団は 生まれ変わり\n世界を 我が物に するのだ!" } }, "magma_boss_maxie_1": { "encounter": { - "1": "I will bury you by my own hand. I hope you appreciate this honor!" + "1": "私 自らの 手で 葬ってやる……\n光栄に 思うが よい!" }, "victory": { - "1": "Ugh! You are... quite capable...\nI fell behind, but only by an inch..." + "1": "グッ…… やりおる……!\nわずか 1ミリ 及ばぬか……!" }, "defeat": { - "1": "Team Magma will prevail!" + "1": "マグマ団の 活動を 止めることなど 誰にも できぬ!" } }, "magma_boss_maxie_2": { "encounter": { - "1": "You are the final obstacle remaining between me and my goals.\n$Brace yourself for my ultimate attack! Fuhahaha!" + "1": "……キサマは 私が 図った日を\n迎えるための 最後の カベ―――\n$この マツブサが 治めし すべての チカラを もって 排除してやろう……!" }, "victory": { - "1": "This... This is not.. Ngh..." + "1": "こん…な……" }, "defeat": { - "1": "And now... I will transform this planet to a land ideal for humanity." + "1": "そして……\n$この世界は 人類にとって 理想の……" } }, "aqua_boss_archie_1": { "encounter": { - "1": "I'm the leader of Team Aqua, so I'm afraid it's the rope's end for you." + "1": "アクア団 リーダーとして テメエの ポケモン\nもろとも バッキバキに 揉み潰して やるよ!" }, "victory": { - "1": "Let's meet again somewhere. I'll be sure to remember that face." + "1": "んじゃあ またな\n……そのツラ 忘れねえぜ" }, "defeat": { - "1": "Brilliant! My team won't hold back now!" + "1": "おもしれえッ!\n今は アクア団が 全開を!" } }, "aqua_boss_archie_2": { "encounter": { - "1": "I've been waiting so long for this day to come.\nThis is the true power of my team!" + "1": "前回の勝負 じゃあ 見せられなかった\nポケモン達と オレの 全開パワー……\n$たーんと 食らわせてやるぜえああああッ!" }, "victory": { - "1": "Like I figured..." + "1": "……流石…だな…ッ!" }, "defeat": { - "1": "I'll return everything in this world to its original, pure state!!" + "1": "オレは この日が 来るのを 長い間 待っていた‥‥\n今は この世界を あるがままの 姿にッ!" } }, "galactic_boss_cyrus_1": { "encounter": { - "1": "You were compelled to come here by such vacuous sentimentality.\n$I will make you regret paying heed to your heart!", - "1_female": "You were compelled to come here by such vacuous sentimentality.\n$I will make you regret paying heed to your heart!" + "1": "心いう 不完全なものが 感じる\n哀れみや 優しさ……\n$そんな 曖昧なものに 突き動かされ \nここに来たことを わたしが 公開させてあげよう。", + "1_female": "心いう 不完全なものが 感じる\n哀れみや 優しさ……\n$そんな 曖昧なものに 突き動かされ \nここに来たことを わたしが 公開させてあげよう" }, "victory": { - "1": "Interesting. And quite curious." + "1": "面白い\nそして 興味深い" }, "defeat": { - "1": "I will create my new world..." + "1": "まさに 新しい ギンガの! 宇宙の 誕生だ!" } }, "galactic_boss_cyrus_2": { "encounter": { - "1": "So we meet again. It seems our fates have become intertwined.\n$But here and now, I will finally break that bond!" + "1": "またキミか。\n$キミとは ほとほと 縁が あるね…\n$腐れ縁 といっても いいが\n今 ここで 断ち切ろう!" }, "victory": { - "1": "How? How? HOW?!" + "1": "まさか まさか まさかッ!" }, "defeat": { - "1": "Farewell." + "1": "さらばだ。" } }, "plasma_boss_ghetsis_1": { @@ -2718,7 +2718,7 @@ }, "rival": { "encounter": { - "1": "@c{smile}あっ、ここに いたんだ! 旅に 出る前に 「じゃ またね!」って くらい 聞きたかったよ……$@c{smile_eclosed}やっぱり 夢を 追ってこうと しているんだ? 信じられない ほどね……$@c{serious_smile_fists}じゃあ、 ここまで 来たから バトルしよっか? 覚悟してるかを 確かめたい から!$@c{serious_mopen_fists}遠慮せずに 全力で かかってこいぜ!" + "1": "@c{smile}あっ、ここに いたんだ! 旅に 出る前に\n「じゃ またね!」って くらい 聞きたかったよ……$@c{smile_eclosed}やっぱり 夢を 追ってこうと しているんだ?\n信じられない ほどね……$@c{serious_smile_fists}じゃあ、 ここまで 来たから バトルしよっか?\n覚悟してるかを 確かめたい から!$@c{serious_mopen_fists}遠慮せずに 全力で かかってこいぜ!" }, "victory": { "1": "@c{shock}ウワッ、カンゼンに ぶっ壊したぜ。\n初心者だとは 思えないほど……$@c{smile}たぶん 運が良っかった だけが……\n最後まで 行ける素質が あるかもな!$こっちの アイテムを あげよう、 博士に そう言いつけたから。 結構 スゴそうな もんだ!$@c{serious_smile_fists}ここからも ガンバレ!" @@ -2734,7 +2734,7 @@ }, "rival_2": { "encounter": { - "1": "@c{smile}おや、なんと グウゼン。\n@c{smile_eclosed}今までも パーフェクトに 勝った ようだな……\n$@c{serious_mopen_fists}なんか 忍び寄った みたいだとは 分かるけど、 そんなことない… ほとんどはな。\n$@c{serious_smile_fists}ぶっちゃけ言うと、 オレが 負けた時から 再戦したくて ウズウズしてたぜ。\n$張り切って 特訓したから 今は ちゃんと 勢い 見せるんだ。\n$@c{serious_mopen_fists}今回も 遠慮しな!\n行こうぜ!" + "1": "@c{smile}おや、なんと グウゼン。\n@c{smile_eclosed}今までも パーフェクトに 勝った ようだな……\n$@c{serious_mopen_fists}なんか 忍び寄った みたいだとは 分かるけど、 そんなことない… ほとんどはな。\n$@c{serious_smile_fists}ぶっちゃけ言うと、 おれが 負けた時から 再戦したくて ウズウズしてたぜ。\n$張り切って 特訓したから 今は ちゃんと 勢い 見せるんだ。\n$@c{serious_mopen_fists}今回も 遠慮しな!\n行こうぜ!" }, "victory": { "1": "@c{neutral_eclosed}あ。 自信過剰かも。\n$@c{smile}いいけどさ、 こうなるのを 見込んだから。\n@c{serious_mopen_fists}次回まで もっと頑張らなくちゃ ってことだよな!\n\n$@c{smile}きっと 助け 要らないんだが、 もう一つの アイテムが 欲しいかと 思ったから あげるぜ。\n\n$@c{serious_smile_fists}でも これで ラストだ!\n相手に 利点を あげ続けると 行けないんだろう!" @@ -2753,10 +2753,10 @@ }, "rival_3": { "encounter": { - "1": "@c{smile}Hey, look who it is! It's been a while.\n@c{neutral}You're… still undefeated? Huh.\n$@c{neutral_eclosed}Things have been kind of… strange.\nIt's not the same back home without you.\n$@c{serious}I know it's selfish, but I need to get this off my chest.\n@c{neutral_eclosed}I think you're in over your head here.\n$@c{serious}Never losing once is just unrealistic.\nWe need to lose sometimes in order to grow.\n$@c{neutral_eclosed}You've had a great run but there's still so much ahead, and it only gets harder. @c{neutral}Are you prepared for that?\n$@c{serious_mopen_fists}If so, prove it to me." + "1": "@c{smile}おお 誰かと思ったら な! 久しぶり!\n@c{neutral}もう… 倒されなかった か? フン\n$@c{neutral_eclosed}最近 なんか… 変な 気分だな。\nキミが いないと ふるさとは 同じ場所 じゃない。\n$@c{serious}わがまま かもしれないが、本音 明かさなくちゃ。\n@c{neutral_eclosed}このままで すぐ キミの 手に 負えなくなる。\n$@c{serious}一回も 負けないこと って むちゃくちゃだろう。\nみんなは 時々 失敗しなくちゃ。 そうでなけりゃ 成長できない。\n$@c{neutral_eclosed}ここまで よく やって来たが、\nまだまだ 先が 辛いこと ばかり。@c{neutral}覚悟してるか?\n$@c{serious_mopen_fists}それなら、見せてくれ。" }, "victory": { - "1": "@c{angry_mhalf}This is ridiculous… I've hardly stopped training…\nHow are we still so far apart?" + "1": "@c{angry_mhalf}こりゃ むっちゃ だろ… 訓練しか してないよ…\nなぜ 力が もう こんなに 違うなだ?" } }, "rival_3_female": { @@ -2772,10 +2772,10 @@ }, "rival_4": { "encounter": { - "1": "@c{neutral}Hey.\n$I won't mince words or pleasantries with you.\n@c{neutral_eclosed}I'm here to win, plain and simple.\n$@c{serious_mhalf_fists}I've learned to maximize my potential by putting all my time into training.\n$@c{smile}You get a lot of extra time when you cut out the unnecessary sleep and social interaction.\n$@c{serious_mopen_fists}None of that matters anymore, not until I win.\n$@c{neutral_eclosed}I've even reached the point where I don't lose anymore.\n@c{smile_eclosed}I suppose your philosophy wasn't so wrong after all.\n$@c{angry_mhalf}Losing is for the weak, and I'm not weak anymore.\n$@c{serious_mopen_fists}Prepare yourself." + "1": "@c{neutral}よっ。\n$歯に 衣着せない。\n@c{neutral_eclosed}キミに 勝つために ここに 来た、それだけ。\n$@c{serious_mhalf_fists}地力を 最大限に 引き出す ために\n全労力を 費やして 訓練していた。\n$@c{smile}不要な 睡眠や 人間関係なんか 抜くと\n訓練の 時間は 割と 増えるね。\n$@c{serious_mopen_fists}そんなことは 勝てるときまで 全然 どうでもない。\n$@c{neutral_eclosed}今 負けられないとこまで やって来た。\n@c{smile_eclosed}キミの 考え方は 違いない ようだね。\n$@c{angry_mhalf}負けるのは 弱き者。 おれは もう 弱くない。\n$@c{serious_mopen_fists}覚悟せよ。" }, "victory": { - "1": "@c{neutral}What…@d{64} What are you?" + "1": "@c{neutral}一体…@d{64} 何モノか……?" } }, "rival_4_female": { @@ -2783,7 +2783,7 @@ "1": "@c{neutral}アタシよ! また 忘れちゃった… のね?\n$@c{smile}こんな 遠くまで 来たのは 鼻が高いことだよ! おめでと~\nしかし、 ここは 終着点だね。\n$@c{smile_eclosed}アタシの 中にある 全然 知らなかった 部分を 目覚めたよ。\n今は、 トレーニングしか してないみたい。\n$@c{smile_ehalf}食べたり 寝たりも しなくて 朝から晩まで ポケモンを 育って、 毎日 昨日より 強くなってる。\n$@c{neutral}実は… もう 自分 認識できない。\n$結局、 峠を越して まるで カミに なった。\n今は 誰にも アタシを 倒せないと 思う。\n$ねえ、分かる? 全ては アンタの お陰で。\n@c{smile_ehalf}お礼を言うか アンタのこと嫌いか どうしたらいいの 分からない。\n$@c{angry_mopen}覚悟しなさい。" }, "victory": { - "1": "@c{neutral}一体…@d{64} 何モノか…?" + "1": "@c{neutral}一体…@d{64} 何モノか……?" }, "defeat": { "1": "$@c{smile}ここまで 頑張ってたのを 誇りに思ってね。" @@ -2810,10 +2810,10 @@ }, "rival_6": { "encounter": { - "1": "@c{smile_eclosed}We meet again.\n$@c{neutral}I've had some time to reflect on all this.\nThere's a reason this all seems so strange.\n$@c{neutral_eclosed}Your dream, my drive to beat you…\nIt's all a part of something greater.\n$@c{serious}This isn't about me, or about you… This is about the world, @c{serious_mhalf_fists}and it's my purpose to push you to your limits.\n$@c{neutral_eclosed}Whether I've fulfilled that purpose I can't say, but I've done everything in my power.\n$@c{neutral}This place we ended up in is terrifying… Yet somehow I feel unphased, like I've been here before.\n$@c{serious_mhalf_fists}You feel the same, don't you?\n$@c{serious}…and it's like something here is speaking to me.\nThis is all the world's known for a long time now.\n$Those times we cherished together that seem so recent are nothing but a distant memory.\n$@c{neutral_eclosed}Who can say whether they were ever even real in the first place.\n$@c{serious_mopen_fists}You need to keep pushing, because if you don't, it will never end. You're the only one who can do this.\n$@c{serious_smile_fists}I hardly know what any of this means, I just know that it's true.\n$@c{serious_mopen_fists}If you can't defeat me here and now, you won't stand a chance." + "1": "@c{smile_eclosed}また 会ったね。\n$@c{neutral}今までの ことを 振り返る 時間があった。\n全てが 変に感じる 訳が あるよ。\n$@c{neutral_eclosed}キミの夢、おれが キミに 倒したい熱心……\nより大きい 何かの 部分だけだ。\n$@c{serious}おれや キミの 物語じゃない。これは 全世界の物語だ。\n@c{serious_mhalf_fists}この物語で、 おれの「役割」 っていうのは キミを 限界まで 押すこと。\n$@c{neutral_eclosed}その役割を 果たしたのかは 言えないが、 全力を尽くした。\n$@c{neutral}最後に行き着いた この場所って 恐ろしいが……\n以前 ここに来た ことがある ような 気がして、 怯えもしない。\n$@c{serious_mhalf_fists}キミも 同じ 気がするん だろう?\n$@c{serious}……何かが おれに 話してるようだ。\n昔から これだけしかは この世界こそ そのもの。\n$大事にしてた 最近だと思ってた 一緒にいた日々、\n今は もう 遠い記憶 だけだ。\n$@c{neutral_eclosed}そもそも 現実だったかは もう 言えなくなったな。\n$@c{serious_mopen_fists}キミは 頑張り続かないと、\n決して 終わらない。 キミしか できやしない。\n$@c{serious_smile_fists}全ての意味、 全然 分からない。\nしかし、 真実だと 知ってるな。\n$@c{serious_mopen_fists}今ここで おれを 倒せなきゃ、 最後に 勝ち目が ナイ。" }, "victory": { - "1": "@c{smile_eclosed}It looks like my work is done here.\n$I want you to promise me one thing.\n@c{smile}After you heal the world, please come home." + "1": "@c{smile_eclosed}おれの 仕事が 終わったようだな。\n$一つだけの ことを 約束してほしい。\n@c{smile}この世界を 癒やした後、 お願い…… 帰ってくれ。" } }, "rival_6_female": { diff --git a/src/locales/ja/menu.json b/src/locales/ja/menu.json index f0914a7941c..b7db414493c 100644 --- a/src/locales/ja/menu.json +++ b/src/locales/ja/menu.json @@ -6,7 +6,7 @@ "newGame": "はじめから", "settings": "設定", "selectGameMode": "ゲームモードを 選んでください。", - "logInOrCreateAccount": "始めるには、ログイン、または 登録して ください。\nメールアドレスは 必要が ありません!", + "logInOrCreateAccount": "始めるには、ログイン、または 登録して ください。\nメールアドレスは 必要 ありません!", "username": "ユーザー名", "password": "パスワード", "login": "ログイン", @@ -14,7 +14,7 @@ "register": "登録", "emptyUsername": "ユーザー名を 空にする ことは できません", "invalidLoginUsername": "入力されたユーザー名は無効です", - "invalidRegisterUsername": "ユーザー名には 英文字、 数字、 アンダースコアのみを 含くむ必要が あります", + "invalidRegisterUsername": "ユーザー名には 英文字、 数字、 アンダースコアのみを 含くむことが 必要です", "invalidLoginPassword": "入力したパスワードは無効です", "invalidRegisterPassword": "パスワードは 6文字以上 でなければなりません", "usernameAlreadyUsed": "入力したユーザー名は すでに 使用されています", From baf686f621121e106c76fec387677c9bed0a99d8 Mon Sep 17 00:00:00 2001 From: flx-sta <50131232+flx-sta@users.noreply.github.com> Date: Thu, 19 Sep 2024 20:23:36 -0700 Subject: [PATCH 6/7] [Beta][P3 Bug] fix: reading stats.battleCount (#4335) instead of stats.battlesWon --- src/ui/title-ui-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/title-ui-handler.ts b/src/ui/title-ui-handler.ts index a85e670eaba..4087b397ff7 100644 --- a/src/ui/title-ui-handler.ts +++ b/src/ui/title-ui-handler.ts @@ -76,7 +76,7 @@ export default class TitleUiHandler extends OptionSelectUiHandler { .then(stats => { this.playerCountLabel.setText(`${stats.playerCount} ${i18next.t("menu:playersOnline")}`); if (this.splashMessage === "splashMessages:battlesWon") { - this.splashMessageText.setText(i18next.t(this.splashMessage, { count: stats.battlesWon })); + this.splashMessageText.setText(i18next.t(this.splashMessage, { count: stats.battleCount })); } }) .catch(err => { From 63fba0dcaee59336c3591ecad3932600adb8b989 Mon Sep 17 00:00:00 2001 From: Tempoanon <163687446+Tempo-anon@users.noreply.github.com> Date: Thu, 19 Sep 2024 23:30:21 -0400 Subject: [PATCH 7/7] [P3 Bug] Update pokemon-info-container ability highlighting to match tinted ball ability check (#4307) * Update pokemon-info-container ability highlighting to match tinted ball ability check * Fix typo Co-authored-by: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com> --------- Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com> Co-authored-by: MokaStitcher <54149968+MokaStitcher@users.noreply.github.com> --- src/field/pokemon.ts | 19 +++++++++++++++++++ src/ui/battle-info.ts | 11 +---------- src/ui/pokemon-info-container.ts | 15 +++++---------- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 5cfdb333db2..3935778296f 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -3812,6 +3812,25 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const rootForm = getPokemonSpecies(this.species.getRootSpeciesId()); return rootForm.getAbility(abilityIndex) === rootForm.getAbility(currentAbilityIndex); } + + /** + * Helper function to check if the player already owns the starter data of the Pokemon's + * current ability + * @param ownedAbilityAttrs the owned abilityAttr of this Pokemon's root form + * @returns true if the player already has it, false otherwise + */ + checkIfPlayerHasAbilityOfStarter(ownedAbilityAttrs: number): boolean { + if ((ownedAbilityAttrs & 1) > 0 && this.hasSameAbilityInRootForm(0)) { + return true; + } + if ((ownedAbilityAttrs & 2) > 0 && this.hasSameAbilityInRootForm(1)) { + return true; + } + if ((ownedAbilityAttrs & 4) > 0 && this.hasSameAbilityInRootForm(2)) { + return true; + } + return false; + } } export default interface Pokemon { diff --git a/src/ui/battle-info.ts b/src/ui/battle-info.ts index 1d598f6ac4e..b3474bed5cd 100644 --- a/src/ui/battle-info.ts +++ b/src/ui/battle-info.ts @@ -381,17 +381,8 @@ export default class BattleInfo extends Phaser.GameObjects.Container { const ownedAbilityAttrs = pokemon.scene.gameData.starterData[pokemon.species.getRootSpeciesId()].abilityAttr; - let playerOwnsThisAbility = false; // Check if the player owns ability for the root form - if ((ownedAbilityAttrs & 1) > 0 && pokemon.hasSameAbilityInRootForm(0)) { - playerOwnsThisAbility = true; - } - if ((ownedAbilityAttrs & 2) > 0 && pokemon.hasSameAbilityInRootForm(1)) { - playerOwnsThisAbility = true; - } - if ((ownedAbilityAttrs & 4) > 0 && pokemon.hasSameAbilityInRootForm(2)) { - playerOwnsThisAbility = true; - } + const playerOwnsThisAbility = pokemon.checkIfPlayerHasAbilityOfStarter(ownedAbilityAttrs); if (missingDexAttrs || !playerOwnsThisAbility) { this.ownedIcon.setTint(0x808080); diff --git a/src/ui/pokemon-info-container.ts b/src/ui/pokemon-info-container.ts index 3c54e529d43..e9ad2a26c15 100644 --- a/src/ui/pokemon-info-container.ts +++ b/src/ui/pokemon-info-container.ts @@ -267,18 +267,13 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { this.pokemonAbilityText.setColor(getTextColor(abilityTextStyle, false, this.scene.uiTheme)); this.pokemonAbilityText.setShadowColor(getTextColor(abilityTextStyle, true, this.scene.uiTheme)); - /** - * If the opposing Pokemon only has 1 normal ability and is using the hidden ability it should have the same behavior - * if it had 2 normal abilities. This code checks if that is the case and uses the correct opponent Pokemon abilityIndex (2) - * for calculations so it aligns with where the hidden ability is stored in the starter data's abilityAttr (4) - */ - const opponentPokemonOneNormalAbility = (pokemon.species.getAbilityCount() === 2); - const opponentPokemonAbilityIndex = (opponentPokemonOneNormalAbility && pokemon.abilityIndex === 1) ? 2 : pokemon.abilityIndex; - const opponentPokemonAbilityAttr = 1 << opponentPokemonAbilityIndex; - const rootFormHasHiddenAbility = starterEntry.abilityAttr & opponentPokemonAbilityAttr; + const ownedAbilityAttrs = pokemon.scene.gameData.starterData[pokemon.species.getRootSpeciesId()].abilityAttr; - if (!rootFormHasHiddenAbility) { + // Check if the player owns ability for the root form + const playerOwnsThisAbility = pokemon.checkIfPlayerHasAbilityOfStarter(ownedAbilityAttrs); + + if (!playerOwnsThisAbility) { this.pokemonAbilityLabelText.setColor(getTextColor(TextStyle.SUMMARY_BLUE, false, this.scene.uiTheme)); this.pokemonAbilityLabelText.setShadowColor(getTextColor(TextStyle.SUMMARY_BLUE, true, this.scene.uiTheme)); } else {