Merge branch 'pagefaultgames:main' into main

This commit is contained in:
RedstonewolfX 2024-07-08 11:14:37 -04:00 committed by GitHub
commit 6a0f9b3ea6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
55 changed files with 665 additions and 51 deletions

View File

@ -13,6 +13,7 @@ import { Moves } from "#enums/moves";
import { PlayerGender } from "#enums/player-gender"; import { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import { TrainerType } from "#enums/trainer-type"; import { TrainerType } from "#enums/trainer-type";
import i18next from "#app/plugins/i18n";
export enum BattleType { export enum BattleType {
WILD, WILD,
@ -173,7 +174,10 @@ export default class Battle {
scene.addMoney(moneyAmount.value); scene.addMoney(moneyAmount.value);
scene.queueMessage(`You picked up ₽${moneyAmount.value.toLocaleString("en-US")}!`, null, true); const userLocale = navigator.language || "en-US";
const formattedMoneyAmount = moneyAmount.value.toLocaleString(userLocale);
const message = i18next.t("battle:moneyPickedUp", { moneyAmount: formattedMoneyAmount });
scene.queueMessage(message, null, true);
scene.currentBattle.moneyScattered = 0; scene.currentBattle.moneyScattered = 0;
} }

View File

@ -5,6 +5,7 @@ import * as Utils from "../utils";
import { IncrementMovePriorityAbAttr, applyAbAttrs } from "./ability"; import { IncrementMovePriorityAbAttr, applyAbAttrs } from "./ability";
import { ProtectAttr } from "./move"; import { ProtectAttr } from "./move";
import { BattlerIndex } from "#app/battle.js"; import { BattlerIndex } from "#app/battle.js";
import i18next from "i18next";
export enum TerrainType { export enum TerrainType {
NONE, NONE,
@ -67,6 +68,22 @@ export class Terrain {
} }
} }
export function getTerrainName(terrainType: TerrainType): string {
switch (terrainType) {
case TerrainType.MISTY:
return i18next.t("terrain:misty");
case TerrainType.ELECTRIC:
return i18next.t("terrain:electric");
case TerrainType.GRASSY:
return i18next.t("terrain:grassy");
case TerrainType.PSYCHIC:
return i18next.t("terrain:psychic");
}
return "";
}
export function getTerrainColor(terrainType: TerrainType): [ integer, integer, integer ] { export function getTerrainColor(terrainType: TerrainType): [ integer, integer, integer ] {
switch (terrainType) { switch (terrainType) {
case TerrainType.MISTY: case TerrainType.MISTY:

View File

@ -59855,16 +59855,11 @@ export const tmSpecies: TmSpecies = {
Species.ZUBAT, Species.ZUBAT,
Species.GOLBAT, Species.GOLBAT,
Species.TENTACRUEL, Species.TENTACRUEL,
Species.MUK,
Species.KOFFING, Species.KOFFING,
Species.WEEZING, Species.WEEZING,
Species.MEW, Species.MEW,
Species.ARIADOS,
Species.CROBAT, Species.CROBAT,
Species.QWILFISH, Species.QWILFISH,
Species.GULPIN,
Species.SWALOT,
Species.SEVIPER,
Species.ROSERADE, Species.ROSERADE,
Species.STUNKY, Species.STUNKY,
Species.SKUNTANK, Species.SKUNTANK,
@ -59896,8 +59891,6 @@ export const tmSpecies: TmSpecies = {
Species.NAGANADEL, Species.NAGANADEL,
Species.PINCURCHIN, Species.PINCURCHIN,
Species.ETERNATUS, Species.ETERNATUS,
Species.PIKACHU,
Species.ALOLA_MUK,
Species.GALAR_WEEZING, Species.GALAR_WEEZING,
Species.GALAR_SLOWKING, Species.GALAR_SLOWKING,
[ [

View File

@ -1,12 +1,12 @@
import { Biome } from "#enums/biome"; import { Biome } from "#enums/biome";
import { getPokemonMessage, getPokemonNameWithAffix } from "../messages"; import { getPokemonNameWithAffix } from "../messages";
import Pokemon from "../field/pokemon"; import Pokemon from "../field/pokemon";
import { Type } from "./type"; import { Type } from "./type";
import Move, { AttackMove } from "./move"; import Move, { AttackMove } from "./move";
import * as Utils from "../utils"; import * as Utils from "../utils";
import BattleScene from "../battle-scene"; import BattleScene from "../battle-scene";
import { SuppressWeatherEffectAbAttr } from "./ability"; import { SuppressWeatherEffectAbAttr } from "./ability";
import { TerrainType } from "./terrain"; import { TerrainType, getTerrainName } from "./terrain";
import i18next from "i18next"; import i18next from "i18next";
export enum WeatherType { export enum WeatherType {
@ -216,34 +216,34 @@ export function getWeatherClearMessage(weatherType: WeatherType): string {
export function getTerrainStartMessage(terrainType: TerrainType): string { export function getTerrainStartMessage(terrainType: TerrainType): string {
switch (terrainType) { switch (terrainType) {
case TerrainType.MISTY: case TerrainType.MISTY:
return "Mist swirled around the battlefield!"; return i18next.t("terrain:mistyStartMessage");
case TerrainType.ELECTRIC: case TerrainType.ELECTRIC:
return "An electric current ran across the battlefield!"; return i18next.t("terrain:electricStartMessage");
case TerrainType.GRASSY: case TerrainType.GRASSY:
return "Grass grew to cover the battlefield!"; return i18next.t("terrain:grassyStartMessage");
case TerrainType.PSYCHIC: case TerrainType.PSYCHIC:
return "The battlefield got weird!"; return i18next.t("terrain:psychicStartMessage");
} }
} }
export function getTerrainClearMessage(terrainType: TerrainType): string { export function getTerrainClearMessage(terrainType: TerrainType): string {
switch (terrainType) { switch (terrainType) {
case TerrainType.MISTY: case TerrainType.MISTY:
return "The mist disappeared from the battlefield."; return i18next.t("terrain:mistyClearMessage");
case TerrainType.ELECTRIC: case TerrainType.ELECTRIC:
return "The electricity disappeared from the battlefield."; return i18next.t("terrain:electricClearMessage");
case TerrainType.GRASSY: case TerrainType.GRASSY:
return "The grass disappeared from the battlefield."; return i18next.t("terrain:grassyClearMessage");
case TerrainType.PSYCHIC: case TerrainType.PSYCHIC:
return "The weirdness disappeared from the battlefield!"; return i18next.t("terrain:psychicClearMessage");
} }
} }
export function getTerrainBlockMessage(pokemon: Pokemon, terrainType: TerrainType): string { export function getTerrainBlockMessage(pokemon: Pokemon, terrainType: TerrainType): string {
if (terrainType === TerrainType.MISTY) { if (terrainType === TerrainType.MISTY) {
return getPokemonMessage(pokemon, " surrounds itself with a protective mist!"); return i18next.t("terrain:mistyBlockMessage", {pokemonNameWithAffix: getPokemonNameWithAffix(pokemon)});
} }
return getPokemonMessage(pokemon, ` is protected by the ${Utils.toReadableString(TerrainType[terrainType])} Terrain!`); return i18next.t("terrain:defaultBlockMessage", {pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), terrainName: getTerrainName(terrainType)});
} }
interface WeatherPoolEntry { interface WeatherPoolEntry {

View File

@ -384,6 +384,10 @@ export class Arena {
return weatherMultiplier * terrainMultiplier; return weatherMultiplier * terrainMultiplier;
} }
/**
* Gets the denominator for the chance for a trainer spawn
* @returns n where 1/n is the chance of a trainer battle
*/
getTrainerChance(): integer { getTrainerChance(): integer {
switch (this.biomeType) { switch (this.biomeType) {
case Biome.METROPOLIS: case Biome.METROPOLIS:

View File

@ -107,22 +107,37 @@ export class GameMode implements GameModeConfig {
} }
} }
/**
* Determines whether or not to generate a trainer
* @param waveIndex the current floor the player is on (trainer sprites fail to generate on X1 floors)
* @param arena the arena that contains the scene and functions
* @returns true if a trainer should be generated, false otherwise
*/
isWaveTrainer(waveIndex: integer, arena: Arena): boolean { isWaveTrainer(waveIndex: integer, arena: Arena): boolean {
/**
* Daily spawns trainers on floors 5, 15, 20, 25, 30, 35, 40, and 45
*/
if (this.isDaily) { if (this.isDaily) {
return waveIndex % 10 === 5 || (!(waveIndex % 10) && waveIndex > 10 && !this.isWaveFinal(waveIndex)); return waveIndex % 10 === 5 || (!(waveIndex % 10) && waveIndex > 10 && !this.isWaveFinal(waveIndex));
} }
if ((waveIndex % 30) === (arena.scene.offsetGym ? 0 : 20) && !this.isWaveFinal(waveIndex)) { if ((waveIndex % 30) === (arena.scene.offsetGym ? 0 : 20) && !this.isWaveFinal(waveIndex)) {
return true; return true;
} else if (waveIndex % 10 !== 1 && waveIndex % 10) { } else if (waveIndex % 10 !== 1 && waveIndex % 10) {
/**
* Do not check X1 floors since there's a bug that stops trainer sprites from appearing
* after a X0 full party heal
*/
const trainerChance = arena.getTrainerChance(); const trainerChance = arena.getTrainerChance();
let allowTrainerBattle = true; let allowTrainerBattle = true;
if (trainerChance) { if (trainerChance) {
const waveBase = Math.floor(waveIndex / 10) * 10; const waveBase = Math.floor(waveIndex / 10) * 10;
// Stop generic trainers from spawning in within 3 waves of a trainer battle
for (let w = Math.max(waveIndex - 3, waveBase + 2); w <= Math.min(waveIndex + 3, waveBase + 9); w++) { for (let w = Math.max(waveIndex - 3, waveBase + 2); w <= Math.min(waveIndex + 3, waveBase + 9); w++) {
if (w === waveIndex) { if (w === waveIndex) {
continue; continue;
} }
if ((w % 30) === (arena.scene.offsetGym ? 0 : 20) || this.isFixedBattle(waveIndex)) { if ((w % 30) === (arena.scene.offsetGym ? 0 : 20) || this.isFixedBattle(w)) {
allowTrainerBattle = false; allowTrainerBattle = false;
break; break;
} else if (w < waveIndex) { } else if (w < waveIndex) {
@ -138,7 +153,7 @@ export class GameMode implements GameModeConfig {
} }
} }
} }
return allowTrainerBattle && trainerChance && !Utils.randSeedInt(trainerChance); return Boolean(allowTrainerBattle && trainerChance && !Utils.randSeedInt(trainerChance));
} }
return false; return false;
} }

View File

@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = {
"switchQuestion": "Möchtest du\n{{pokemonName}} auswechseln?", "switchQuestion": "Möchtest du\n{{pokemonName}} auswechseln?",
"trainerDefeated": "{{trainerName}}\nwurde besiegt!", "trainerDefeated": "{{trainerName}}\nwurde besiegt!",
"moneyWon": "Du gewinnst\n{{moneyAmount}} ₽!", "moneyWon": "Du gewinnst\n{{moneyAmount}} ₽!",
"moneyPickedUp": "Du hebst {{moneyAmount}} ₽ auf!",
"pokemonCaught": "{{pokemonName}} wurde gefangen!", "pokemonCaught": "{{pokemonName}} wurde gefangen!",
"addedAsAStarter": "{{pokemonName}} wurde als Starterpokémon hinzugefügt!", "addedAsAStarter": "{{pokemonName}} wurde als Starterpokémon hinzugefügt!",
"partyFull": "Dein Team ist voll.\nMöchtest du ein Pokémon durch {{pokemonName}} ersetzen?", "partyFull": "Dein Team ist voll.\nMöchtest du ein Pokémon durch {{pokemonName}} ersetzen?",

View File

@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler";
import { growth } from "./growth"; import { growth } from "./growth";
import { menu } from "./menu"; import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler"; import { menuUiHandler } from "./menu-ui-handler";
import { modifier } from "./modifier";
import { modifierType } from "./modifier-type"; import { modifierType } from "./modifier-type";
import { move } from "./move"; import { move } from "./move";
import { nature } from "./nature"; import { nature } from "./nature";
@ -39,7 +40,7 @@ import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { terrain, weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "./settings.js"; import { settings } from "./settings.js";
import { common } from "./common.js"; import { common } from "./common.js";
@ -73,6 +74,7 @@ export const deConfig = {
growth: growth, growth: growth,
menu: menu, menu: menu,
menuUiHandler: menuUiHandler, menuUiHandler: menuUiHandler,
modifier: modifier,
modifierType: modifierType, modifierType: modifierType,
move: move, move: move,
nature: nature, nature: nature,
@ -85,6 +87,7 @@ export const deConfig = {
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect, statusEffect: statusEffect,
terrain: terrain,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const modifier: SimpleTranslationEntries = {
"surviveDamageApply": "{{pokemonNameWithAffix}} hält mithilfe des Items {{typeName}} durch!",
"turnHealApply": "{{typeName}} von {{pokemonNameWithAffix}} füllt einige KP auf!",
"hitHealApply": "{{typeName}} von {{pokemonNameWithAffix}} füllt einige KP auf!",
"pokemonInstantReviveApply": "{{pokemonNameWithAffix}} wurde durch {{typeName}} wiederbelebt!",
"moneyInterestApply": "Du erhählst {{moneyAmount}} ₽ durch das Item {{typeName}}!",
"turnHeldItemTransferApply": "{{itemName}} von {{pokemonNameWithAffix}} wurde durch {{typeName}} von {{pokemonName}} absorbiert!",
"contactHeldItemTransferApply": "{{itemName}} von {{pokemonNameWithAffix}} wurde durch {{typeName}} von {{pokemonName}} geklaut!",
"enemyTurnHealApply": "{{pokemonNameWithAffix}} stellt einige KP wieder her!",
} as const;

View File

@ -82,7 +82,7 @@ export const settings: SimpleTranslationEntries = {
"buttonMenu": "Menü", "buttonMenu": "Menü",
"buttonSubmit": "Bestätigen", "buttonSubmit": "Bestätigen",
"buttonCancel": "Abbrechen", "buttonCancel": "Abbrechen",
"buttonStats": "Statistiken", "buttonStats": "Statuswerte",
"buttonCycleForm": "Form wechseln", "buttonCycleForm": "Form wechseln",
"buttonCycleShiny": "Schillernd wechseln", "buttonCycleShiny": "Schillernd wechseln",
"buttonCycleGender": "Geschlecht wechseln", "buttonCycleGender": "Geschlecht wechseln",

View File

@ -43,3 +43,24 @@ export const weather: SimpleTranslationEntries = {
"strongWindsEffectMessage": "Rätselhafte Luftströmungen haben den Angriff abgeschwächt!", "strongWindsEffectMessage": "Rätselhafte Luftströmungen haben den Angriff abgeschwächt!",
"strongWindsClearMessage": "Die rätselhafte Luftströmung hat sich wieder geleget.", "strongWindsClearMessage": "Die rätselhafte Luftströmung hat sich wieder geleget.",
}; };
export const terrain: SimpleTranslationEntries = {
"misty": "Nebelfeld",
"mistyStartMessage": "Am Boden breitet sich dichter Nebel aus!",
"mistyClearMessage": "Das Nebelfeld ist wieder verschwunden!",
"mistyBlockMessage": "{{pokemonNameWithAffix}} wird vom Nebelfeld geschützt!",
"electric": "Elektrofeld",
"electricStartMessage": "Elektrische Energie fließt durch den Boden!",
"electricClearMessage": "Das Elektrofeld ist wieder verschwunden!",
"grassy": "Grasfeld",
"grassyStartMessage": "Dichtes Gras schießt aus dem Boden!",
"grassyClearMessage": "Das Grasfeld ist wieder verschwunden!",
"psychic": "Psychofeld",
"psychicStartMessage": "Der Boden fühlt sich seltsam an!",
"psychicClearMessage": "Das Psychofeld ist wieder verschwunden!",
"defaultBlockMessage": "{{pokemonNameWithAffix}} wird vom {{terrainName}} geschützt!"
};

View File

@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = {
"switchQuestion": "Will you switch\n{{pokemonName}}?", "switchQuestion": "Will you switch\n{{pokemonName}}?",
"trainerDefeated": "You defeated\n{{trainerName}}!", "trainerDefeated": "You defeated\n{{trainerName}}!",
"moneyWon": "You got\n₽{{moneyAmount}} for winning!", "moneyWon": "You got\n₽{{moneyAmount}} for winning!",
"moneyPickedUp": "You picked up ₽{{moneyAmount}}!",
"pokemonCaught": "{{pokemonName}} was caught!", "pokemonCaught": "{{pokemonName}} was caught!",
"addedAsAStarter": "{{pokemonName}} has been\nadded as a starter!", "addedAsAStarter": "{{pokemonName}} has been\nadded as a starter!",
"partyFull": "Your party is full.\nRelease a Pokémon to make room for {{pokemonName}}?", "partyFull": "Your party is full.\nRelease a Pokémon to make room for {{pokemonName}}?",

View File

@ -27,6 +27,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler";
import { growth } from "./growth"; import { growth } from "./growth";
import { menu } from "./menu"; import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler"; import { menuUiHandler } from "./menu-ui-handler";
import { modifier } from "./modifier";
import { modifierType } from "./modifier-type"; import { modifierType } from "./modifier-type";
import { move } from "./move"; import { move } from "./move";
import { nature } from "./nature"; import { nature } from "./nature";
@ -42,7 +43,7 @@ import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { terrain, weather } from "./weather";
import { modifierSelectUiHandler } from "./modifier-select-ui-handler"; import { modifierSelectUiHandler } from "./modifier-select-ui-handler";
export const enConfig = { export const enConfig = {
@ -73,10 +74,10 @@ export const enConfig = {
growth: growth, growth: growth,
menu: menu, menu: menu,
menuUiHandler: menuUiHandler, menuUiHandler: menuUiHandler,
modifier: modifier,
modifierType: modifierType, modifierType: modifierType,
move: move, move: move,
nature: nature, nature: nature,
partyUiHandler: partyUiHandler,
pokeball: pokeball, pokeball: pokeball,
pokemon: pokemon, pokemon: pokemon,
pokemonInfo: pokemonInfo, pokemonInfo: pokemonInfo,
@ -86,11 +87,13 @@ export const enConfig = {
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect, statusEffect: statusEffect,
terrain: terrain,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,
tutorial: tutorial, tutorial: tutorial,
voucher: voucher, voucher: voucher,
weather: weather, weather: weather,
partyUiHandler: partyUiHandler,
modifierSelectUiHandler: modifierSelectUiHandler modifierSelectUiHandler: modifierSelectUiHandler
}; };

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const modifier: SimpleTranslationEntries = {
"surviveDamageApply": "{{pokemonNameWithAffix}} hung on\nusing its {{typeName}}!",
"turnHealApply": "{{pokemonNameWithAffix}} restored a little HP using\nits {{typeName}}!",
"hitHealApply": "{{pokemonNameWithAffix}} restored a little HP using\nits {{typeName}}!",
"pokemonInstantReviveApply": "{{pokemonNameWithAffix}} was revived\nby its {{typeName}}!",
"moneyInterestApply": "You received interest of ₽{{moneyAmount}}\nfrom the {{typeName}}!",
"turnHeldItemTransferApply": "{{pokemonNameWithAffix}}'s {{itemName}} was absorbed\nby {{pokemonName}}'s {{typeName}}!",
"contactHeldItemTransferApply": "{{pokemonNameWithAffix}}'s {{itemName}} was snatched\nby {{pokemonName}}'s {{typeName}}!",
"enemyTurnHealApply": "{{pokemonNameWithAffix}}\nrestored some HP!",
} as const;

View File

@ -43,3 +43,24 @@ export const weather: SimpleTranslationEntries = {
"strongWindsEffectMessage": "The mysterious air current weakened the attack!", "strongWindsEffectMessage": "The mysterious air current weakened the attack!",
"strongWindsClearMessage": "The heavy wind stopped." "strongWindsClearMessage": "The heavy wind stopped."
}; };
export const terrain: SimpleTranslationEntries = {
"misty": "Misty",
"mistyStartMessage": "Mist swirled around the battlefield!",
"mistyClearMessage": "The mist disappeared from the battlefield.",
"mistyBlockMessage": "{{pokemonNameWithAffix}} surrounds itself with a protective mist!",
"electric": "Electric",
"electricStartMessage": "An electric current ran across the battlefield!",
"electricClearMessage": "The electricity disappeared from the battlefield.",
"grassy": "Grassy",
"grassyStartMessage": "Grass grew to cover the battlefield!",
"grassyClearMessage": "The grass disappeared from the battlefield.",
"psychic": "Psychic",
"psychicStartMessage": "The battlefield got weird!",
"psychicClearMessage": "The weirdness disappeared from the battlefield!",
"defaultBlockMessage": "{{pokemonNameWithAffix}} is protected by the {{terrainName}} Terrain!"
};

View File

@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = {
"switchQuestion": "¿Quieres cambiar a\n{{pokemonName}}?", "switchQuestion": "¿Quieres cambiar a\n{{pokemonName}}?",
"trainerDefeated": "¡Has derrotado a\n{{trainerName}}!", "trainerDefeated": "¡Has derrotado a\n{{trainerName}}!",
"moneyWon": "¡Has ganado\n₽{{moneyAmount}} por vencer!", "moneyWon": "¡Has ganado\n₽{{moneyAmount}} por vencer!",
"moneyPickedUp": "You picked up ₽{{moneyAmount}}!",
"pokemonCaught": "¡{{pokemonName}} atrapado!", "pokemonCaught": "¡{{pokemonName}} atrapado!",
"addedAsAStarter": "{{pokemonName}} ha sido añadido\na tus iniciales!", "addedAsAStarter": "{{pokemonName}} ha sido añadido\na tus iniciales!",
"partyFull": "Tu equipo esta completo.\n¿Quieres liberar un Pokémon para meter a {{pokemonName}}?", "partyFull": "Tu equipo esta completo.\n¿Quieres liberar un Pokémon para meter a {{pokemonName}}?",

View File

@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler";
import { growth } from "./growth"; import { growth } from "./growth";
import { menu } from "./menu"; import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler"; import { menuUiHandler } from "./menu-ui-handler";
import { modifier } from "./modifier";
import { modifierType } from "./modifier-type"; import { modifierType } from "./modifier-type";
import { move } from "./move"; import { move } from "./move";
import { nature } from "./nature"; import { nature } from "./nature";
@ -39,7 +40,7 @@ import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { terrain, weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "./settings.js"; import { settings } from "./settings.js";
import { common } from "./common.js"; import { common } from "./common.js";
@ -73,6 +74,7 @@ export const esConfig = {
growth: growth, growth: growth,
menu: menu, menu: menu,
menuUiHandler: menuUiHandler, menuUiHandler: menuUiHandler,
modifier: modifier,
modifierType: modifierType, modifierType: modifierType,
move: move, move: move,
nature: nature, nature: nature,
@ -85,6 +87,7 @@ export const esConfig = {
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect, statusEffect: statusEffect,
terrain: terrain,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const modifier: SimpleTranslationEntries = {
"surviveDamageApply": "{{pokemonNameWithAffix}} hung on\nusing its {{typeName}}!",
"turnHealApply": "{{pokemonNameWithAffix}} restored a little HP using\nits {{typeName}}!",
"hitHealApply": "{{pokemonNameWithAffix}} restored a little HP using\nits {{typeName}}!",
"pokemonInstantReviveApply": "{{pokemonNameWithAffix}} was revived\nby its {{typeName}}!",
"moneyInterestApply": "You received interest of ₽{{moneyAmount}}\nfrom the {{typeName}}!",
"turnHeldItemTransferApply": "{{pokemonNameWithAffix}}'s {{itemName}} was absorbed\nby {{pokemonName}}'s {{typeName}}!",
"contactHeldItemTransferApply": "{{pokemonNameWithAffix}}'s {{itemName}} was snatched\nby {{pokemonName}}'s {{typeName}}!",
"enemyTurnHealApply": "{{pokemonNameWithAffix}}\nrestored some HP!",
} as const;

View File

@ -43,3 +43,24 @@ export const weather: SimpleTranslationEntries = {
"strongWindsEffectMessage": "¡Las misteriosas turbulencias atenúan el ataque!", "strongWindsEffectMessage": "¡Las misteriosas turbulencias atenúan el ataque!",
"strongWindsClearMessage": "El fuerte viento cesó." "strongWindsClearMessage": "El fuerte viento cesó."
}; };
export const terrain: SimpleTranslationEntries = {
"misty": "Misty",
"mistyStartMessage": "Mist swirled around the battlefield!",
"mistyClearMessage": "The mist disappeared from the battlefield.",
"mistyBlockMessage": "{{pokemonNameWithAffix}} surrounds itself with a protective mist!",
"electric": "Electric",
"electricStartMessage": "An electric current ran across the battlefield!",
"electricClearMessage": "The electricity disappeared from the battlefield.",
"grassy": "Grassy",
"grassyStartMessage": "Grass grew to cover the battlefield!",
"grassyClearMessage": "The grass disappeared from the battlefield.",
"psychic": "Psychic",
"psychicStartMessage": "The battlefield got weird!",
"psychicClearMessage": "The weirdness disappeared from the battlefield!",
"defaultBlockMessage": "{{pokemonNameWithAffix}} is protected by the {{terrainName}} Terrain!"
};

View File

@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = {
"switchQuestion": "Voulez-vous changer\nvotre {{pokemonName}} ?", "switchQuestion": "Voulez-vous changer\nvotre {{pokemonName}} ?",
"trainerDefeated": "Vous avez battu\n{{trainerName}} !", "trainerDefeated": "Vous avez battu\n{{trainerName}} !",
"moneyWon": "Vous remportez\n{{moneyAmount}} ₽ !", "moneyWon": "Vous remportez\n{{moneyAmount}} ₽ !",
"moneyPickedUp": "Vous obtenez {{moneyAmount}} ₽ !",
"pokemonCaught": "Vous avez attrapé {{pokemonName}} !", "pokemonCaught": "Vous avez attrapé {{pokemonName}} !",
"addedAsAStarter": "{{pokemonName}} est ajouté\ncomme starter !", "addedAsAStarter": "{{pokemonName}} est ajouté\ncomme starter !",
"partyFull": "Votre équipe est pleine.\nRelâcher un Pokémon pour {{pokemonName}} ?", "partyFull": "Votre équipe est pleine.\nRelâcher un Pokémon pour {{pokemonName}} ?",

View File

@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler";
import { growth } from "./growth"; import { growth } from "./growth";
import { menu } from "./menu"; import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler"; import { menuUiHandler } from "./menu-ui-handler";
import { modifier } from "./modifier";
import { modifierType } from "./modifier-type"; import { modifierType } from "./modifier-type";
import { move } from "./move"; import { move } from "./move";
import { nature } from "./nature"; import { nature } from "./nature";
@ -39,7 +40,7 @@ import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { terrain, weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "./settings.js"; import { settings } from "./settings.js";
import { common } from "./common.js"; import { common } from "./common.js";
@ -73,6 +74,7 @@ export const frConfig = {
growth: growth, growth: growth,
menu: menu, menu: menu,
menuUiHandler: menuUiHandler, menuUiHandler: menuUiHandler,
modifier: modifier,
modifierType: modifierType, modifierType: modifierType,
move: move, move: move,
nature: nature, nature: nature,
@ -85,6 +87,7 @@ export const frConfig = {
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect, statusEffect: statusEffect,
terrain: terrain,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const modifier: SimpleTranslationEntries = {
"surviveDamageApply": "{{pokemonNameWithAffix}} tient bon\ngrâce à son {{typeName}} !",
"turnHealApply": "Les PV de {{pokemonNameWithAffix}}\nsont un peu restaurés par les {{typeName}} !",
"hitHealApply": "Les PV de {{pokemonNameWithAffix}}\nsont un peu restaurés par le {{typeName}} !",
"pokemonInstantReviveApply": "{{pokemonNameWithAffix}} a repris connaissance\navec sa {{typeName}} et est prêt à se battre de nouveau !",
"moneyInterestApply": "La {{typeName}} vous rapporte\n{{moneyAmount}}  dintérêts !",
"turnHeldItemTransferApply": "{{itemName}} de {{pokemonNameWithAffix}} est absorbé·e\npar le {{typeName}} de {{pokemonName}} !",
"contactHeldItemTransferApply": "{{itemName}} de {{pokemonNameWithAffix}} est volé·e\npar l{{typeName}} de {{pokemonName}} !",
"enemyTurnHealApply": "{{pokemonNameWithAffix}}\nrestaure un peu ses PV !",
} as const;

View File

@ -43,3 +43,24 @@ export const weather: SimpleTranslationEntries = {
"strongWindsEffectMessage": "Le courant aérien mystérieux affaiblit lattaque!", "strongWindsEffectMessage": "Le courant aérien mystérieux affaiblit lattaque!",
"strongWindsClearMessage": "Le vent mystérieux sest dissipé…" "strongWindsClearMessage": "Le vent mystérieux sest dissipé…"
}; };
export const terrain: SimpleTranslationEntries = {
"misty": "Brumeux",
"mistyStartMessage": "La brume recouvre le terrain !",
"mistyClearMessage": "La brume qui recouvrait le terrain se dissipe…",
"mistyBlockMessage": "La brume enveloppe {{pokemonNameWithAffix}} !",
"electric": "Électrifié",
"electricStartMessage": "De lélectricité parcourt le terrain !",
"electricClearMessage": "Lélectricité parcourant le terrain sest dissipée…",
"grassy": "Herbu",
"grassyStartMessage": "Un beau gazon pousse sur le terrain !",
"grassyClearMessage": "Le gazon disparait…",
"psychic": "Psychique",
"psychicStartMessage": "Le sol se met à réagir de façon bizarre…",
"psychicClearMessage": "Le sol redevient normal !",
"defaultBlockMessage": "{{pokemonNameWithAffix}} est protégé\npar le Champ {{terrainName}} !"
};

View File

@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = {
"switchQuestion": "Vuoi cambiare\n{{pokemonName}}?", "switchQuestion": "Vuoi cambiare\n{{pokemonName}}?",
"trainerDefeated": "Hai sconfitto\n{{trainerName}}!", "trainerDefeated": "Hai sconfitto\n{{trainerName}}!",
"moneyWon": "Hai vinto {{moneyAmount}}₽", "moneyWon": "Hai vinto {{moneyAmount}}₽",
"moneyPickedUp": "You picked up ₽{{moneyAmount}}!",
"pokemonCaught": "Preso! {{pokemonName}} è stato catturato!", "pokemonCaught": "Preso! {{pokemonName}} è stato catturato!",
"addedAsAStarter": "{{pokemonName}} has been\nadded as a starter!", "addedAsAStarter": "{{pokemonName}} has been\nadded as a starter!",
"partyFull": "La tua squadra è al completo.\nVuoi liberare un Pokémon per far spazio a {{pokemonName}}?", "partyFull": "La tua squadra è al completo.\nVuoi liberare un Pokémon per far spazio a {{pokemonName}}?",

View File

@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler";
import { growth } from "./growth"; import { growth } from "./growth";
import { menu } from "./menu"; import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler"; import { menuUiHandler } from "./menu-ui-handler";
import { modifier } from "./modifier";
import { modifierType } from "./modifier-type"; import { modifierType } from "./modifier-type";
import { move } from "./move"; import { move } from "./move";
import { nature } from "./nature"; import { nature } from "./nature";
@ -39,7 +40,7 @@ import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { terrain, weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "./settings.js"; import { settings } from "./settings.js";
import { common } from "./common.js"; import { common } from "./common.js";
@ -73,6 +74,7 @@ export const itConfig = {
growth: growth, growth: growth,
menu: menu, menu: menu,
menuUiHandler: menuUiHandler, menuUiHandler: menuUiHandler,
modifier: modifier,
modifierType: modifierType, modifierType: modifierType,
move: move, move: move,
nature: nature, nature: nature,
@ -85,6 +87,7 @@ export const itConfig = {
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect, statusEffect: statusEffect,
terrain: terrain,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const modifier: SimpleTranslationEntries = {
"surviveDamageApply": "{{pokemonNameWithAffix}} hung on\nusing its {{typeName}}!",
"turnHealApply": "{{pokemonNameWithAffix}} restored a little HP using\nits {{typeName}}!",
"hitHealApply": "{{pokemonNameWithAffix}} restored a little HP using\nits {{typeName}}!",
"pokemonInstantReviveApply": "{{pokemonNameWithAffix}} was revived\nby its {{typeName}}!",
"moneyInterestApply": "You received interest of ₽{{moneyAmount}}\nfrom the {{typeName}}!",
"turnHeldItemTransferApply": "{{pokemonNameWithAffix}}'s {{itemName}} was absorbed\nby {{pokemonName}}'s {{typeName}}!",
"contactHeldItemTransferApply": "{{pokemonNameWithAffix}}'s {{itemName}} was snatched\nby {{pokemonName}}'s {{typeName}}!",
"enemyTurnHealApply": "{{pokemonNameWithAffix}}\nrestored some HP!",
} as const;

View File

@ -43,3 +43,24 @@ export const weather: SimpleTranslationEntries = {
"strongWindsEffectMessage": "La corrente misteriosa indebolisce lattacco!", "strongWindsEffectMessage": "La corrente misteriosa indebolisce lattacco!",
"strongWindsClearMessage": "La corrente d'aria è cessata." "strongWindsClearMessage": "La corrente d'aria è cessata."
}; };
export const terrain: SimpleTranslationEntries = {
"misty": "Misty",
"mistyStartMessage": "Mist swirled around the battlefield!",
"mistyClearMessage": "The mist disappeared from the battlefield.",
"mistyBlockMessage": "{{pokemonNameWithAffix}} surrounds itself with a protective mist!",
"electric": "Electric",
"electricStartMessage": "An electric current ran across the battlefield!",
"electricClearMessage": "The electricity disappeared from the battlefield.",
"grassy": "Grassy",
"grassyStartMessage": "Grass grew to cover the battlefield!",
"grassyClearMessage": "The grass disappeared from the battlefield.",
"psychic": "Psychic",
"psychicStartMessage": "The battlefield got weird!",
"psychicClearMessage": "The weirdness disappeared from the battlefield!",
"defaultBlockMessage": "{{pokemonNameWithAffix}} is protected by the {{terrainName}} Terrain!"
};

View File

@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = {
"switchQuestion": "{{pokemonName}}[[를]]\n교체하시겠습니까?", "switchQuestion": "{{pokemonName}}[[를]]\n교체하시겠습니까?",
"trainerDefeated": "{{trainerName}}[[와]]의\n승부에서 이겼다!", "trainerDefeated": "{{trainerName}}[[와]]의\n승부에서 이겼다!",
"moneyWon": "상금으로\n₽{{moneyAmount}}을 손에 넣었다!", "moneyWon": "상금으로\n₽{{moneyAmount}}을 손에 넣었다!",
"moneyPickedUp": "₽{{moneyAmount}}을 주웠다!",
"pokemonCaught": "신난다-!\n{{pokemonName}}[[를]] 잡았다!", "pokemonCaught": "신난다-!\n{{pokemonName}}[[를]] 잡았다!",
"addedAsAStarter": "{{pokemonName}}[[가]]\n스타팅 포켓몬에 추가되었다!", "addedAsAStarter": "{{pokemonName}}[[가]]\n스타팅 포켓몬에 추가되었다!",
"partyFull": "지닌 포켓몬이 가득 찼습니다. {{pokemonName}}[[를]]\n대신해 포켓몬을 놓아주시겠습니까?", "partyFull": "지닌 포켓몬이 가득 찼습니다. {{pokemonName}}[[를]]\n대신해 포켓몬을 놓아주시겠습니까?",

View File

@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler";
import { growth } from "./growth"; import { growth } from "./growth";
import { menu } from "./menu"; import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler"; import { menuUiHandler } from "./menu-ui-handler";
import { modifier } from "./modifier";
import { modifierType } from "./modifier-type"; import { modifierType } from "./modifier-type";
import { move } from "./move"; import { move } from "./move";
import { nature } from "./nature"; import { nature } from "./nature";
@ -39,7 +40,7 @@ import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { terrain, weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "./settings.js"; import { settings } from "./settings.js";
import { common } from "./common.js"; import { common } from "./common.js";
@ -73,6 +74,7 @@ export const koConfig = {
growth: growth, growth: growth,
menu: menu, menu: menu,
menuUiHandler: menuUiHandler, menuUiHandler: menuUiHandler,
modifier: modifier,
modifierType: modifierType, modifierType: modifierType,
move: move, move: move,
nature: nature, nature: nature,
@ -85,6 +87,7 @@ export const koConfig = {
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect, statusEffect: statusEffect,
terrain: terrain,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -22,7 +22,7 @@ export const egg: SimpleTranslationEntries = {
"hatchFromTheEgg": "알이 부화해서\n{{pokemonName}}[[가]] 태어났다!", "hatchFromTheEgg": "알이 부화해서\n{{pokemonName}}[[가]] 태어났다!",
"eggMoveUnlock": "알 기술 {{moveName}}[[를]]\n사용할 수 있게 되었다!", "eggMoveUnlock": "알 기술 {{moveName}}[[를]]\n사용할 수 있게 되었다!",
"rareEggMoveUnlock": "레어 알 기술 {{moveName}}[[를]]\n사용할 수 있게 되었다!", "rareEggMoveUnlock": "레어 알 기술 {{moveName}}[[를]]\n사용할 수 있게 되었다!",
"moveUPGacha": "기술 UP!", "moveUPGacha": "기술 UP!",
"shinyUPGacha": "특별색 UP!", "shinyUPGacha": "이 다른 포켓몬\nUP!",
"legendaryUPGacha": "UP!", "legendaryUPGacha": "UP!",
} as const; } as const;

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const modifier: SimpleTranslationEntries = {
"surviveDamageApply": "{{pokemonNameWithAffix}}[[는]]\n{{typeName}}[[로]] 버텼다!!",
"turnHealApply": "{{pokemonNameWithAffix}}[[는]]\n{{typeName}}[[로]] 인해 조금 회복했다.",
"hitHealApply": "{{pokemonNameWithAffix}}[[는]]\n{{typeName}}[[로]] 인해 조금 회복했다.",
"pokemonInstantReviveApply": "{{pokemonNameWithAffix}}[[는]] {{typeName}}[[로]]\n정신을 차려 싸울 수 있게 되었다!",
"moneyInterestApply": "{{typeName}}[[로]]부터\n₽{{moneyAmount}}[[를]] 받았다!",
"turnHeldItemTransferApply": "{{pokemonName}}의 {{typeName}}[[는]]\n{{pokemonNameWithAffix}}의 {{itemName}}[[를]] 흡수했다!",
"contactHeldItemTransferApply": "{{pokemonName}}의 {{typeName}}[[는]]\n{{pokemonNameWithAffix}}의 {{itemName}}[[를]] 가로챘다!",
"enemyTurnHealApply": "{{pokemonNameWithAffix}}의\n체력이 약간 회복되었다!",
} as const;

View File

@ -84,7 +84,7 @@ export const settings: SimpleTranslationEntries = {
"buttonCancel": "취소", "buttonCancel": "취소",
"buttonStats": "스탯", "buttonStats": "스탯",
"buttonCycleForm": "폼 변환", "buttonCycleForm": "폼 변환",
"buttonCycleShiny": "특별한 색 변환", "buttonCycleShiny": "이 다른 변환",
"buttonCycleGender": "성별 변환", "buttonCycleGender": "성별 변환",
"buttonCycleAbility": "특성 변환", "buttonCycleAbility": "특성 변환",
"buttonCycleNature": "성격 변환", "buttonCycleNature": "성격 변환",

View File

@ -32,7 +32,7 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"unlockPassive": "패시브 해금", "unlockPassive": "패시브 해금",
"reduceCost": "코스트 줄이기", "reduceCost": "코스트 줄이기",
"sameSpeciesEgg": "알 구매하기", "sameSpeciesEgg": "알 구매하기",
"cycleShiny": ": 특별한 색", "cycleShiny": ": 이 다른",
"cycleForm": ": 폼", "cycleForm": ": 폼",
"cycleGender": ": 암수", "cycleGender": ": 암수",
"cycleAbility": ": 특성", "cycleAbility": ": 특성",

View File

@ -44,3 +44,24 @@ export const weather: SimpleTranslationEntries = {
"strongWindsEffectMessage": "수수께끼의 난기류가 공격을 약하게 만들었다!", "strongWindsEffectMessage": "수수께끼의 난기류가 공격을 약하게 만들었다!",
"strongWindsClearMessage": "수수께끼의 난기류가 멈췄다!" // 임의번역 "strongWindsClearMessage": "수수께끼의 난기류가 멈췄다!" // 임의번역
}; };
export const terrain: SimpleTranslationEntries = {
"misty": "미스트필드",
"mistyStartMessage": "발밑이 안개로 자욱해졌다!",
"mistyClearMessage": "발밑의 안개가 사라졌다!",
"mistyBlockMessage": "{{pokemonNameWithAffix}}[[를]]\n미스트필드가 지켜주고 있다!",
"electric": "일렉트릭필드",
"electricStartMessage": "발밑에 전기가 흐르기 시작했다!",
"electricClearMessage": "발밑의 전기가 사라졌다!",
"grassy": "그래스필드",
"grassyStartMessage": "발밑에 풀이 무성해졌다!",
"grassyClearMessage": "발밑의 풀이 사라졌다!",
"psychic": "사이코필드",
"psychicStartMessage": "발밑에서 이상한 느낌이 든다!",
"psychicClearMessage": "발밑의 이상한 느낌이 사라졌다!",
"defaultBlockMessage": "{{pokemonNameWithAffix}}[[를]]\n{{terrainName}}[[가]] 지켜주고 있다!"
};

View File

@ -1,7 +1,7 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales"; import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const abilityTriggers: SimpleTranslationEntries = { export const abilityTriggers: SimpleTranslationEntries = {
"blockRecoilDamage" : "{{abilityName}} de {{pokemonName}}\nprotegeu-o do dano de recuo!", "blockRecoilDamage": "{{abilityName}} de {{pokemonName}}\nprotegeu-o do dano reverso!",
"badDreams": "{{pokemonName}} está tendo pesadelos!", "badDreams": "{{pokemonName}} está tendo pesadelos!",
"costar": "{{pokemonName}} copiou as mudanças\nde atributo de {{allyName}}!", "costar": "{{pokemonName}} copiou as mudanças\nde atributo de {{allyName}}!",
"iceFaceAvoidedDamage": "{{pokemonName}} evitou\ndanos com sua {{abilityName}}!", "iceFaceAvoidedDamage": "{{pokemonName}} evitou\ndanos com sua {{abilityName}}!",
@ -9,5 +9,5 @@ export const abilityTriggers: SimpleTranslationEntries = {
"poisonHeal": "{{abilityName}} de {{pokemonName}}\nrestaurou seus PS um pouco!", "poisonHeal": "{{abilityName}} de {{pokemonName}}\nrestaurou seus PS um pouco!",
"trace": "{{pokemonName}} copiou {{abilityName}}\nde {{targetName}}!", "trace": "{{pokemonName}} copiou {{abilityName}}\nde {{targetName}}!",
"windPowerCharged": "Ser atingido por {{moveName}} carregou {{pokemonName}} com poder!", "windPowerCharged": "Ser atingido por {{moveName}} carregou {{pokemonName}} com poder!",
"quickDraw":"{{pokemonName}} pode agir mais rápido que o normal\ngraças ao seu Quick Draw!", "quickDraw": "{{pokemonName}} pode agir mais rápido que o normal\ngraças ao seu Quick Draw!",
} as const; } as const;

View File

@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = {
"switchQuestion": "Quer trocar\nde {{pokemonName}}?", "switchQuestion": "Quer trocar\nde {{pokemonName}}?",
"trainerDefeated": "Você derrotou\n{{trainerName}}!", "trainerDefeated": "Você derrotou\n{{trainerName}}!",
"moneyWon": "Você ganhou\n₽{{moneyAmount}} por ganhar!", "moneyWon": "Você ganhou\n₽{{moneyAmount}} por ganhar!",
"moneyPickedUp": "Você pegou ₽{{moneyAmount}} do chão!",
"pokemonCaught": "{{pokemonName}} foi capturado!", "pokemonCaught": "{{pokemonName}} foi capturado!",
"addedAsAStarter": "{{pokemonName}} foi adicionado\naos seus iniciais!", "addedAsAStarter": "{{pokemonName}} foi adicionado\naos seus iniciais!",
"partyFull": "Sua equipe está cheia.\nSolte um Pokémon para ter espaço para {{pokemonName}}?", "partyFull": "Sua equipe está cheia.\nSolte um Pokémon para ter espaço para {{pokemonName}}?",

View File

@ -1,7 +1,7 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales"; import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const biome: SimpleTranslationEntries = { export const biome: SimpleTranslationEntries = {
"unknownLocation": "Em algum lugar do qual você não se lembra", "unknownLocation": "em algum lugar do qual você não se lembra",
"TOWN": "Cidade", "TOWN": "Cidade",
"PLAINS": "Planície", "PLAINS": "Planície",
"GRASS": "Grama", "GRASS": "Grama",

View File

@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler";
import { growth } from "./growth"; import { growth } from "./growth";
import { menu } from "./menu"; import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler"; import { menuUiHandler } from "./menu-ui-handler";
import { modifier } from "./modifier";
import { modifierType } from "./modifier-type"; import { modifierType } from "./modifier-type";
import { move } from "./move"; import { move } from "./move";
import { nature } from "./nature"; import { nature } from "./nature";
@ -39,7 +40,7 @@ import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { terrain, weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "./settings.js"; import { settings } from "./settings.js";
import { common } from "./common.js"; import { common } from "./common.js";
@ -73,16 +74,17 @@ export const ptBrConfig = {
growth: growth, growth: growth,
menu: menu, menu: menu,
menuUiHandler: menuUiHandler, menuUiHandler: menuUiHandler,
modifier: modifier,
modifierType: modifierType, modifierType: modifierType,
move: move, move: move,
nature: nature, nature: nature,
partyUiHandler: partyUiHandler,
pokeball: pokeball, pokeball: pokeball,
pokemon: pokemon, pokemon: pokemon,
pokemonInfo: pokemonInfo, pokemonInfo: pokemonInfo,
pokemonInfoContainer: pokemonInfoContainer, pokemonInfoContainer: pokemonInfoContainer,
saveSlotSelectUiHandler: saveSlotSelectUiHandler, saveSlotSelectUiHandler: saveSlotSelectUiHandler,
statusEffect: statusEffect, statusEffect: statusEffect,
terrain: terrain,
settings: settings, settings: settings,
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
@ -92,5 +94,6 @@ export const ptBrConfig = {
tutorial: tutorial, tutorial: tutorial,
voucher: voucher, voucher: voucher,
weather: weather, weather: weather,
partyUiHandler: partyUiHandler,
modifierSelectUiHandler: modifierSelectUiHandler modifierSelectUiHandler: modifierSelectUiHandler
}; };

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const modifier: SimpleTranslationEntries = {
"surviveDamageApply": "{{pokemonNameWithAffix}} aguentou o tranco\nusando sua {{typeName}}!",
"turnHealApply": "{{pokemonNameWithAffix}} restaurou um pouco de PS usando\nsuas {{typeName}}!",
"hitHealApply": "{{pokemonNameWithAffix}} restaurou um pouco de PS usando\nsua {{typeName}}!",
"pokemonInstantReviveApply": "{{pokemonNameWithAffix}} foi revivido\npor sua {{typeName}}!",
"moneyInterestApply": "Você recebeu um juros de ₽{{moneyAmount}}\nde sua {{typeName}}!",
"turnHeldItemTransferApply": "{{itemName}} de {{pokemonNameWithAffix}} foi absorvido(a)\npelo {{typeName}} de {{pokemonName}}!",
"contactHeldItemTransferApply": "{{itemName}} de {{pokemonNameWithAffix}} foi pego(a)\npela {{typeName}} de {{pokemonName}}!",
"enemyTurnHealApply": "{{pokemonNameWithAffix}}\nrestaurou um pouco de seus PS!",
} as const;

View File

@ -43,3 +43,24 @@ export const weather: SimpleTranslationEntries = {
"strongWindsEffectMessage": "The mysterious air current weakened the attack!", "strongWindsEffectMessage": "The mysterious air current weakened the attack!",
"strongWindsClearMessage": "Os ventos fortes diminuíram.", "strongWindsClearMessage": "Os ventos fortes diminuíram.",
}; };
export const terrain: SimpleTranslationEntries = {
"misty": "Enevoado",
"mistyStartMessage": "Uma névoa se espalhou pelo campo de batalha!",
"mistyClearMessage": "A névou sumiu do campo de batalha.",
"mistyBlockMessage": "{{pokemonNameWithAffix}} se envolveu com uma névoa protetora!",
"electric": "Elétrico",
"electricStartMessage": "Uma corrente elétrica se espalhou pelo campo de batalha!",
"electricClearMessage": "A eletricidade sumiu do campo de batalha.",
"grassy": "de Plantas",
"grassyStartMessage": "Grama cresceu para cobrir o campo de batalha!",
"grassyClearMessage": "A grama sumiu do campo de batalha.",
"psychic": "Psíquico",
"psychicStartMessage": "O campo de batalha ficou esquisito!",
"psychicClearMessage": "A esquisitice sumiu do campo de batalha",
"defaultBlockMessage": "{{pokemonNameWithAffix}} está protegido pelo Terreno {{terrainName}}!"
};

View File

@ -14,6 +14,7 @@ export const battle: SimpleTranslationEntries = {
"switchQuestion": "要更换\n{{pokemonName}}吗?", "switchQuestion": "要更换\n{{pokemonName}}吗?",
"trainerDefeated": "你击败了\n{{trainerName}}", "trainerDefeated": "你击败了\n{{trainerName}}",
"moneyWon": "你赢得了\n₽{{moneyAmount}}", "moneyWon": "你赢得了\n₽{{moneyAmount}}",
"moneyPickedUp": "捡到了 ₽{{moneyAmount}}",
"pokemonCaught": "{{pokemonName}}被抓住了!", "pokemonCaught": "{{pokemonName}}被抓住了!",
"addedAsAStarter": "增加了{{pokemonName}}作为\n一个新的基础宝可梦", "addedAsAStarter": "增加了{{pokemonName}}作为\n一个新的基础宝可梦",
"partyFull": "你的队伍已满员。是否放生其他宝可梦\n为{{pokemonName}}腾出空间?", "partyFull": "你的队伍已满员。是否放生其他宝可梦\n为{{pokemonName}}腾出空间?",

View File

@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler";
import { growth } from "./growth"; import { growth } from "./growth";
import { menu } from "./menu"; import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler"; import { menuUiHandler } from "./menu-ui-handler";
import { modifier } from "./modifier";
import { modifierType } from "./modifier-type"; import { modifierType } from "./modifier-type";
import { move } from "./move"; import { move } from "./move";
import { nature } from "./nature"; import { nature } from "./nature";
@ -39,7 +40,7 @@ import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { terrain, weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "./settings.js"; import { settings } from "./settings.js";
import { common } from "./common.js"; import { common } from "./common.js";
@ -73,6 +74,7 @@ export const zhCnConfig = {
growth: growth, growth: growth,
menu: menu, menu: menu,
menuUiHandler: menuUiHandler, menuUiHandler: menuUiHandler,
modifier: modifier,
modifierType: modifierType, modifierType: modifierType,
move: move, move: move,
nature: nature, nature: nature,
@ -85,6 +87,7 @@ export const zhCnConfig = {
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect, statusEffect: statusEffect,
terrain: terrain,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const modifier: SimpleTranslationEntries = {
"surviveDamageApply": "{{pokemonNameWithAffix}}用{{typeName}}\n撑住了",
"turnHealApply": "{{pokemonNameWithAffix}}用{{typeName}}\n回复了体力",
"hitHealApply": "{{pokemonNameWithAffix}}用{{typeName}}\n回复了体力",
"pokemonInstantReviveApply": "{{pokemonNameWithAffix}}用{{typeName}}\n恢复了活力",
"moneyInterestApply": "用{{typeName}}\n获得了 ₽{{moneyAmount}} 利息!",
"turnHeldItemTransferApply": "{{pokemonNameWithAffix}}的{{itemName}}被\n{{pokemonName}}的{{typeName}}吸收了!",
"contactHeldItemTransferApply": "{{pokemonNameWithAffix}}的{{itemName}}被\n{{pokemonName}}的{{typeName}}夺取了!",
"enemyTurnHealApply": "{{pokemonNameWithAffix}}\n回复了一些体力",
} as const;

View File

@ -43,3 +43,24 @@ export const weather: SimpleTranslationEntries = {
"strongWindsEffectMessage": "The mysterious air current weakened the attack!", "strongWindsEffectMessage": "The mysterious air current weakened the attack!",
"strongWindsClearMessage": "神秘的乱流停止了。" "strongWindsClearMessage": "神秘的乱流停止了。"
}; };
export const terrain: SimpleTranslationEntries = {
"misty": "薄雾",
"mistyStartMessage": "脚下雾气缭绕!",
"mistyClearMessage": "脚下的雾气消失不见了!",
"mistyBlockMessage": "{{pokemonNameWithAffix}}正受到薄雾场地的保护!",
"electric": "电气",
"electricStartMessage": "脚下电光飞闪!",
"electricClearMessage": "脚下的电光消失不见了!",
"grassy": "青草",
"grassyStartMessage": "脚下青草如茵!",
"grassyClearMessage": "脚下的青草消失不见了!",
"psychic": "精神",
"psychicStartMessage": "脚下传来了奇妙的感觉!",
"psychicClearMessage": "脚下的奇妙感觉消失了!",
"defaultBlockMessage": "{{pokemonNameWithAffix}}正受到{{terrainName}}的的保护!"
};

View File

@ -12,6 +12,7 @@ export const battle: SimpleTranslationEntries = {
"trainerGo": "{{trainerName}} 派出了 {{pokemonName}}", "trainerGo": "{{trainerName}} 派出了 {{pokemonName}}",
"switchQuestion": "要更換\n{{pokemonName}}嗎?", "switchQuestion": "要更換\n{{pokemonName}}嗎?",
"trainerDefeated": "你擊敗了\n{{trainerName}}", "trainerDefeated": "你擊敗了\n{{trainerName}}",
"moneyPickedUp": "撿到了 ₽{{moneyAmount}}",
"pokemonCaught": "{{pokemonName}} 被抓住了!", "pokemonCaught": "{{pokemonName}} 被抓住了!",
"addedAsAStarter": "{{pokemonName}} has been\nadded as a starter!", "addedAsAStarter": "{{pokemonName}} has been\nadded as a starter!",
"pokemon": "寶可夢", "pokemon": "寶可夢",

View File

@ -25,6 +25,7 @@ import { gameStatsUiHandler } from "./game-stats-ui-handler";
import { growth } from "./growth"; import { growth } from "./growth";
import { menu } from "./menu"; import { menu } from "./menu";
import { menuUiHandler } from "./menu-ui-handler"; import { menuUiHandler } from "./menu-ui-handler";
import { modifier } from "./modifier";
import { modifierType } from "./modifier-type"; import { modifierType } from "./modifier-type";
import { move } from "./move"; import { move } from "./move";
import { nature } from "./nature"; import { nature } from "./nature";
@ -39,7 +40,7 @@ import { statusEffect } from "./status-effect";
import { titles, trainerClasses, trainerNames } from "./trainers"; import { titles, trainerClasses, trainerNames } from "./trainers";
import { tutorial } from "./tutorial"; import { tutorial } from "./tutorial";
import { voucher } from "./voucher"; import { voucher } from "./voucher";
import { weather } from "./weather"; import { terrain, weather } from "./weather";
import { partyUiHandler } from "./party-ui-handler"; import { partyUiHandler } from "./party-ui-handler";
import { settings } from "./settings.js"; import { settings } from "./settings.js";
import { common } from "./common.js"; import { common } from "./common.js";
@ -73,6 +74,7 @@ export const zhTwConfig = {
growth: growth, growth: growth,
menu: menu, menu: menu,
menuUiHandler: menuUiHandler, menuUiHandler: menuUiHandler,
modifier: modifier,
modifierType: modifierType, modifierType: modifierType,
move: move, move: move,
nature: nature, nature: nature,
@ -85,6 +87,7 @@ export const zhTwConfig = {
splashMessages: splashMessages, splashMessages: splashMessages,
starterSelectUiHandler: starterSelectUiHandler, starterSelectUiHandler: starterSelectUiHandler,
statusEffect: statusEffect, statusEffect: statusEffect,
terrain: terrain,
titles: titles, titles: titles,
trainerClasses: trainerClasses, trainerClasses: trainerClasses,
trainerNames: trainerNames, trainerNames: trainerNames,

View File

@ -0,0 +1,12 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const modifier: SimpleTranslationEntries = {
"surviveDamageApply": "{{pokemonNameWithAffix}}用{{typeName}}\n撐住了",
"turnHealApply": "{{pokemonNameWithAffix}}用{{typeName}}\n回復了體力",
"hitHealApply": "{{pokemonNameWithAffix}}用{{typeName}}\n回復了體力",
"pokemonInstantReviveApply": "{{pokemonNameWithAffix}}用{{typeName}}\n回復了活力",
"moneyInterestApply": "用{{typeName}}\n獲得了 ₽{{moneyAmount}} 利息!",
"turnHeldItemTransferApply": "{{pokemonNameWithAffix}}的{{itemName}}被\n{{pokemonName}}的{{typeName}}吸收了!",
"contactHeldItemTransferApply": "{{pokemonNameWithAffix}}的{{itemName}}被\n{{pokemonName}}的{{typeName}}奪取了!",
"enemyTurnHealApply": "{{pokemonNameWithAffix}}\n回復了一些體力",
} as const;

View File

@ -43,3 +43,24 @@ export const weather: SimpleTranslationEntries = {
"strongWindsEffectMessage": "The mysterious air current weakened the attack!", "strongWindsEffectMessage": "The mysterious air current weakened the attack!",
"strongWindsClearMessage": "神秘的亂流停止了。" "strongWindsClearMessage": "神秘的亂流停止了。"
}; };
export const terrain: SimpleTranslationEntries = {
"misty": "薄霧",
"mistyStartMessage": "腳下霧氣繚繞!",
"mistyClearMessage": "腳下的霧氣消失不見了!",
"mistyBlockMessage": "{{pokemonNameWithAffix}}正受到薄霧場地的保護!",
"electric": "電氣",
"electricStartMessage": "腳下電流飛閃!",
"electricClearMessage": "腳下的電流消失了!",
"grassy": "青草",
"grassyStartMessage": "腳下青草如茵!",
"grassyClearMessage": "腳下的青草消失不見了!",
"psychic": "精神",
"psychicStartMessage": "腳下傳來了奇妙的感覺!",
"psychicClearMessage": "腳下的奇妙感覺消失了!",
"defaultBlockMessage": "{{pokemonNameWithAffix}}正受到{{terrainName}}的保護!"
};

View File

@ -24,6 +24,7 @@ import * as Overrides from "../overrides";
import { ModifierType, modifierTypes } from "./modifier-type"; import { ModifierType, modifierTypes } from "./modifier-type";
import { Command } from "#app/ui/command-ui-handler.js"; import { Command } from "#app/ui/command-ui-handler.js";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import i18next from "i18next";
import { allMoves } from "#app/data/move.js"; import { allMoves } from "#app/data/move.js";
import { Abilities } from "#app/enums/abilities.js"; import { Abilities } from "#app/enums/abilities.js";
@ -965,7 +966,7 @@ export class SurviveDamageModifier extends PokemonHeldItemModifier {
if (!surviveDamage.value && pokemon.randSeedInt(10) < this.getStackCount()) { if (!surviveDamage.value && pokemon.randSeedInt(10) < this.getStackCount()) {
surviveDamage.value = true; surviveDamage.value = true;
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` hung on\nusing its ${this.type.name}!`)); pokemon.scene.queueMessage(i18next.t("modifier:surviveDamageApply", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), typeName: this.type.name }));
return true; return true;
} }
@ -1070,7 +1071,7 @@ export class TurnHealModifier extends PokemonHeldItemModifier {
if (pokemon.getHpRatio() < 1) { if (pokemon.getHpRatio() < 1) {
const scene = pokemon.scene; const scene = pokemon.scene;
scene.unshiftPhase(new PokemonHealPhase(scene, pokemon.getBattlerIndex(), scene.unshiftPhase(new PokemonHealPhase(scene, pokemon.getBattlerIndex(),
Math.max(Math.floor(pokemon.getMaxHp() / 16) * this.stackCount, 1), getPokemonMessage(pokemon, `'s ${this.type.name}\nrestored its HP a little!`), true)); Math.max(Math.floor(pokemon.getMaxHp() / 16) * this.stackCount, 1), i18next.t("modifier:turnHealApply", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), typeName: this.type.name }), true));
return true; return true;
} }
@ -1161,7 +1162,7 @@ export class HitHealModifier extends PokemonHeldItemModifier {
if (pokemon.turnData.damageDealt && pokemon.getHpRatio() < 1) { if (pokemon.turnData.damageDealt && pokemon.getHpRatio() < 1) {
const scene = pokemon.scene; const scene = pokemon.scene;
scene.unshiftPhase(new PokemonHealPhase(scene, pokemon.getBattlerIndex(), scene.unshiftPhase(new PokemonHealPhase(scene, pokemon.getBattlerIndex(),
Math.max(Math.floor(pokemon.turnData.damageDealt / 8) * this.stackCount, 1), getPokemonMessage(pokemon, `'s ${this.type.name}\nrestored its HP a little!`), true)); Math.max(Math.floor(pokemon.turnData.damageDealt / 8) * this.stackCount, 1), i18next.t("modifier:hitHealApply", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), typeName: this.type.name }), true));
} }
return true; return true;
@ -1296,7 +1297,7 @@ export class PokemonInstantReviveModifier extends PokemonHeldItemModifier {
const pokemon = args[0] as Pokemon; const pokemon = args[0] as Pokemon;
pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, pokemon.getBattlerIndex(), pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, pokemon.getBattlerIndex(),
Math.max(Math.floor(pokemon.getMaxHp() / 2), 1), getPokemonMessage(pokemon, ` was revived\nby its ${this.type.name}!`), false, false, true)); Math.max(Math.floor(pokemon.getMaxHp() / 2), 1), i18next.t("modifier:pokemonInstantReviveApply", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), typeName: this.type.name }), false, false, true));
pokemon.resetStatus(true, false, true); pokemon.resetStatus(true, false, true);
return true; return true;
@ -2010,7 +2011,10 @@ export class MoneyInterestModifier extends PersistentModifier {
const interestAmount = Math.floor(scene.money * 0.1 * this.getStackCount()); const interestAmount = Math.floor(scene.money * 0.1 * this.getStackCount());
scene.addMoney(interestAmount); scene.addMoney(interestAmount);
scene.queueMessage(`You received interest of ₽${interestAmount.toLocaleString("en-US")}\nfrom the ${this.type.name}!`, null, true); const userLocale = navigator.language || "en-US";
const formattedMoneyAmount = interestAmount.toLocaleString(userLocale);
const message = i18next.t("modifier:moneyInterestApply", { moneyAmount: formattedMoneyAmount, typeName: this.type.name });
scene.queueMessage(message, null, true);
return true; return true;
} }
@ -2231,7 +2235,7 @@ export class TurnHeldItemTransferModifier extends HeldItemTransferModifier {
} }
getTransferMessage(pokemon: Pokemon, targetPokemon: Pokemon, item: ModifierTypes.ModifierType): string { getTransferMessage(pokemon: Pokemon, targetPokemon: Pokemon, item: ModifierTypes.ModifierType): string {
return getPokemonMessage(targetPokemon, `'s ${item.name} was absorbed\nby ${pokemon.name}'s ${this.type.name}!`); return i18next.t("modifier:turnHeldItemTransferApply", { pokemonNameWithAffix: getPokemonNameWithAffix(targetPokemon), itemName: item.name, pokemonName: pokemon.name, typeName: this.type.name });
} }
getMaxHeldItemCount(pokemon: Pokemon): integer { getMaxHeldItemCount(pokemon: Pokemon): integer {
@ -2285,7 +2289,7 @@ export class ContactHeldItemTransferChanceModifier extends HeldItemTransferModif
} }
getTransferMessage(pokemon: Pokemon, targetPokemon: Pokemon, item: ModifierTypes.ModifierType): string { getTransferMessage(pokemon: Pokemon, targetPokemon: Pokemon, item: ModifierTypes.ModifierType): string {
return getPokemonMessage(targetPokemon, `'s ${item.name} was snatched\nby ${pokemon.name}'s ${this.type.name}!`); return i18next.t("modifier:contactHeldItemTransferApply", { pokemonNameWithAffix: getPokemonNameWithAffix(targetPokemon), itemName: item.name, pokemonName: pokemon.name, typeName: this.type.name });
} }
getMaxHeldItemCount(pokemon: Pokemon): integer { getMaxHeldItemCount(pokemon: Pokemon): integer {
@ -2443,7 +2447,7 @@ export class EnemyTurnHealModifier extends EnemyPersistentModifier {
if (pokemon.getHpRatio() < 1) { if (pokemon.getHpRatio() < 1) {
const scene = pokemon.scene; const scene = pokemon.scene;
scene.unshiftPhase(new PokemonHealPhase(scene, pokemon.getBattlerIndex(), scene.unshiftPhase(new PokemonHealPhase(scene, pokemon.getBattlerIndex(),
Math.max(Math.floor(pokemon.getMaxHp() / (100 / this.healPercent)) * this.stackCount, 1), getPokemonMessage(pokemon, "\nrestored some HP!"), true, false, false, false, true)); Math.max(Math.floor(pokemon.getMaxHp() / (100 / this.healPercent)) * this.stackCount, 1), i18next.t("modifier:enemyTurnHealApply", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon) }), true, false, false, false, true));
return true; return true;
} }

View File

@ -0,0 +1,52 @@
import { GameMode, GameModes, getGameMode } from "#app/game-mode.js";
import {
afterEach,
beforeAll,
beforeEach,
describe,
expect,
it,
vi,
} from "vitest";
import GameManager from "./utils/gameManager";
import * as Utils from "../utils";
describe("game-mode", () => {
let phaserGame: Phaser.Game;
let game: GameManager;
beforeAll(() => {
phaserGame = new Phaser.Game({
type: Phaser.HEADLESS,
});
});
afterEach(() => {
game.phaseInterceptor.restoreOg();
vi.resetAllMocks();
});
beforeEach(() => {
game = new GameManager(phaserGame);
});
describe("classic", () => {
let classicGameMode: GameMode;
beforeEach(() => {
classicGameMode = getGameMode(GameModes.CLASSIC);
});
it("does NOT spawn trainers within 3 waves of fixed battle", () => {
const { arena } = game.scene;
/** set wave 16 to be a fixed trainer fight meaning wave 13-19 don't allow trainer spawns */
vi.spyOn(classicGameMode, "isFixedBattle").mockImplementation(
(n: number) => (n === 16 ? true : false)
);
vi.spyOn(arena, "getTrainerChance").mockReturnValue(1);
vi.spyOn(Utils, "randSeedInt").mockReturnValue(0);
expect(classicGameMode.isWaveTrainer(11, arena)).toBeFalsy();
expect(classicGameMode.isWaveTrainer(12, arena)).toBeTruthy();
expect(classicGameMode.isWaveTrainer(13, arena)).toBeFalsy();
expect(classicGameMode.isWaveTrainer(14, arena)).toBeFalsy();
expect(classicGameMode.isWaveTrainer(15, arena)).toBeFalsy();
// Wave 16 is a fixed trainer battle
expect(classicGameMode.isWaveTrainer(17, arena)).toBeFalsy();
expect(classicGameMode.isWaveTrainer(18, arena)).toBeFalsy();
expect(classicGameMode.isWaveTrainer(19, arena)).toBeFalsy();
});
});
});

View File

@ -0,0 +1,192 @@
import { beforeAll, describe, beforeEach, afterEach, expect, it, vi } from "vitest";
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import * as overrides from "#app/overrides";
import { Species } from "#enums/species";
import { TerrainType, getTerrainName } from "#app/data/terrain";
import { getTerrainStartMessage, getTerrainClearMessage, getTerrainBlockMessage } from "#app/data/weather";
import i18next from "i18next";
import { mockI18next } from "../utils/testUtils";
describe("terrain", () => {
let phaserGame: Phaser.Game;
let game: GameManager;
beforeAll(() => {
phaserGame = new Phaser.Game({
type: Phaser.HEADLESS,
});
i18next.init();
});
beforeEach(() => {
game = new GameManager(phaserGame);
vi.spyOn(overrides, "SINGLE_BATTLE_OVERRIDE", "get").mockReturnValue(true);
});
describe("NONE", () => {
const terrainType = TerrainType.NONE;
it("should return the obtain text", () => {
mockI18next();
const text = getTerrainName(terrainType);
expect(text).toBe("");
});
it("should return the start text", () => {
mockI18next();
const text = getTerrainStartMessage(terrainType);
expect(text).toBe(undefined);
});
it("should return the clear text", () => {
mockI18next();
const text = getTerrainClearMessage(terrainType);
expect(text).toBe(undefined);
});
it("should return the block text", async () => {
await game.startBattle([Species.MAGIKARP]);
const pokemon = game.scene.getPlayerPokemon();
mockI18next();
const text = getTerrainBlockMessage(pokemon, terrainType);
expect(text).toBe("terrain:defaultBlockMessage");
});
});
describe("MISTY", () => {
const terrainType = TerrainType.MISTY;
it("should return the obtain text", () => {
mockI18next();
const text = getTerrainName(terrainType);
expect(text).toBe("terrain:misty");
});
it("should return the start text", () => {
mockI18next();
const text = getTerrainStartMessage(terrainType);
expect(text).toBe("terrain:mistyStartMessage");
});
it("should return the clear text", () => {
mockI18next();
const text = getTerrainClearMessage(terrainType);
expect(text).toBe("terrain:mistyClearMessage");
});
it("should return the block text", async () => {
await game.startBattle([Species.MAGIKARP]);
const pokemon = game.scene.getPlayerPokemon();
mockI18next();
const text = getTerrainBlockMessage(pokemon, terrainType);
expect(text).toBe("terrain:mistyBlockMessage");
});
});
describe("ELECTRIC", () => {
const terrainType = TerrainType.ELECTRIC;
it("should return the obtain text", () => {
mockI18next();
const text = getTerrainName(terrainType);
expect(text).toBe("terrain:electric");
});
it("should return the start text", () => {
mockI18next();
const text = getTerrainStartMessage(terrainType);
expect(text).toBe("terrain:electricStartMessage");
});
it("should return the clear text", () => {
mockI18next();
const text = getTerrainClearMessage(terrainType);
expect(text).toBe("terrain:electricClearMessage");
});
it("should return the block text", async () => {
await game.startBattle([Species.MAGIKARP]);
const pokemon = game.scene.getPlayerPokemon();
mockI18next();
const text = getTerrainBlockMessage(pokemon, terrainType);
expect(text).toBe("terrain:defaultBlockMessage");
});
});
describe("GRASSY", () => {
const terrainType = TerrainType.GRASSY;
it("should return the obtain text", () => {
mockI18next();
const text = getTerrainName(terrainType);
expect(text).toBe("terrain:grassy");
});
it("should return the start text", () => {
mockI18next();
const text = getTerrainStartMessage(terrainType);
expect(text).toBe("terrain:grassyStartMessage");
});
it("should return the clear text", () => {
mockI18next();
const text = getTerrainClearMessage(terrainType);
expect(text).toBe("terrain:grassyClearMessage");
});
it("should return the block text", async () => {
await game.startBattle([Species.MAGIKARP]);
const pokemon = game.scene.getPlayerPokemon();
mockI18next();
const text = getTerrainBlockMessage(pokemon, terrainType);
expect(text).toBe("terrain:defaultBlockMessage");
});
});
describe("PSYCHIC", () => {
const terrainType = TerrainType.PSYCHIC;
it("should return the obtain text", () => {
mockI18next();
const text = getTerrainName(terrainType);
expect(text).toBe("terrain:psychic");
});
it("should return the start text", () => {
mockI18next();
const text = getTerrainStartMessage(terrainType);
expect(text).toBe("terrain:psychicStartMessage");
});
it("should return the clear text", () => {
mockI18next();
const text = getTerrainClearMessage(terrainType);
expect(text).toBe("terrain:psychicClearMessage");
});
it("should return the block text", async () => {
await game.startBattle([Species.MAGIKARP]);
const pokemon = game.scene.getPlayerPokemon();
mockI18next();
const text = getTerrainBlockMessage(pokemon, terrainType);
expect(text).toBe("terrain:defaultBlockMessage");
});
});
afterEach(() => {
game.phaseInterceptor.restoreOg();
vi.resetAllMocks();
});
});

View File

@ -103,7 +103,7 @@ export default class EggGachaUiHandler extends MessageUiHandler {
let pokemonIconX = -20; let pokemonIconX = -20;
let pokemonIconY = 6; let pokemonIconY = 6;
if (["de", "es", "fr", "pt-BR"].includes(currentLanguage)) { if (["de", "es", "fr", "ko", "pt-BR"].includes(currentLanguage)) {
gachaTextStyle = TextStyle.SMALLER_WINDOW_ALT; gachaTextStyle = TextStyle.SMALLER_WINDOW_ALT;
gachaX = 2; gachaX = 2;
gachaY = 2; gachaY = 2;
@ -155,7 +155,7 @@ export default class EggGachaUiHandler extends MessageUiHandler {
gachaUpLabel.setOrigin(0.5, 0); gachaUpLabel.setOrigin(0.5, 0);
break; break;
case GachaType.SHINY: case GachaType.SHINY:
if (["de", "fr"].includes(currentLanguage)) { if (["de", "fr", "ko"].includes(currentLanguage)) {
gachaUpLabel.setAlign("center"); gachaUpLabel.setAlign("center");
gachaUpLabel.setY(0); gachaUpLabel.setY(0);
} }