mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-13 20:02:19 +02:00
Compare commits
9 Commits
f92b563baa
...
582330df33
Author | SHA1 | Date | |
---|---|---|---|
|
582330df33 | ||
|
4c39bf64c5 | ||
|
674b2257be | ||
|
009d538ac5 | ||
|
bde7620ac0 | ||
|
78ae7c9f0a | ||
|
f22c25d376 | ||
|
80b6001c77 | ||
|
e3c1d08b37 |
@ -2440,6 +2440,27 @@ export class HiddenPowerTypeAttr extends VariableMoveTypeAttr {
|
||||
}
|
||||
}
|
||||
|
||||
export class MatchUserTypeAttr extends VariableMoveTypeAttr {
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
const type = (args[0] as Utils.IntegerHolder);
|
||||
|
||||
const userTypes = user.getTypes(true);
|
||||
|
||||
if(userTypes.includes(Type.STELLAR)) { // will not change to stellar type
|
||||
const nonTeraTypes = user.getTypes();
|
||||
type.value = nonTeraTypes[0];
|
||||
return true;
|
||||
}
|
||||
else if (userTypes.length > 0) {
|
||||
type.value = userTypes[0];
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export class VariableMoveTypeMultiplierAttr extends MoveAttr {
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
return false;
|
||||
@ -5796,7 +5817,7 @@ export function initMoves() {
|
||||
.unimplemented(),
|
||||
new AttackMove(Moves.REVELATION_DANCE, Type.NORMAL, MoveCategory.SPECIAL, 90, 100, 15, -1, 0, 7)
|
||||
.danceMove()
|
||||
.partial(),
|
||||
.attr(MatchUserTypeAttr),
|
||||
new AttackMove(Moves.CORE_ENFORCER, Type.DRAGON, MoveCategory.SPECIAL, 100, 100, 10, -1, 0, 7)
|
||||
.target(MoveTarget.ALL_NEAR_ENEMIES)
|
||||
.partial(),
|
||||
@ -6182,7 +6203,8 @@ export function initMoves() {
|
||||
new AttackMove(Moves.THUNDEROUS_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, 90, 100, 10, 100, 0, 8)
|
||||
.attr(StatChangeAttr, BattleStat.DEF, -1),
|
||||
new AttackMove(Moves.GLACIAL_LANCE, Type.ICE, MoveCategory.PHYSICAL, 120, 100, 5, -1, 0, 8)
|
||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||
.target(MoveTarget.ALL_NEAR_ENEMIES)
|
||||
.makesContact(false),
|
||||
new AttackMove(Moves.ASTRAL_BARRAGE, Type.GHOST, MoveCategory.SPECIAL, 120, 100, 5, -1, 0, 8)
|
||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||
new AttackMove(Moves.EERIE_SPELL, Type.PSYCHIC, MoveCategory.SPECIAL, 80, 100, 5, 100, 0, 8)
|
||||
|
@ -51855,7 +51855,6 @@ export const tmSpecies: TmSpecies = {
|
||||
Species.MABOSSTIFF,
|
||||
Species.BOMBIRDIER,
|
||||
Species.WALKING_WAKE,
|
||||
Species.PIKACHU,
|
||||
Species.ALOLA_SANDSHREW,
|
||||
Species.ALOLA_SANDSLASH,
|
||||
Species.ALOLA_DIGLETT,
|
||||
@ -60029,6 +60028,7 @@ export const tmSpecies: TmSpecies = {
|
||||
Species.SHARPEDO,
|
||||
Species.SEVIPER,
|
||||
Species.SALAMENCE,
|
||||
Species.METAGROSS,
|
||||
Species.SHINX,
|
||||
Species.LUXIO,
|
||||
Species.LUXRAY,
|
||||
|
@ -543,4 +543,4 @@ export function getTypeRgb(type: Type): [ integer, integer, integer ] {
|
||||
default:
|
||||
return [ 0, 0, 0 ];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -778,9 +778,16 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
types.splice(flyingIndex, 1);
|
||||
}
|
||||
|
||||
if (!types.length)
|
||||
if (!types.length) // become UNKNOWN if no types are present
|
||||
types.push(Type.UNKNOWN);
|
||||
|
||||
if (types.length > 1 && types.includes(Type.UNKNOWN)) { // remove UNKNOWN if other types are present
|
||||
const index = types.indexOf(Type.UNKNOWN);
|
||||
if (index !== -1) {
|
||||
types.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return types;
|
||||
}
|
||||
|
||||
|
28
src/locales/de/config.ts
Normal file
28
src/locales/de/config.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import { ability } from "./ability";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
import { menu } from "./menu";
|
||||
import { menuUiHandler } from "./menu-ui-handler";
|
||||
import { move } from "./move";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { pokemonStat } from "./pokemon-stat";
|
||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||
import { tutorial } from "./tutorial";
|
||||
|
||||
|
||||
export const deConfig = {
|
||||
ability: ability,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
fightUiHandler: fightUiHandler,
|
||||
menuUiHandler: menuUiHandler,
|
||||
menu: menu,
|
||||
move: move,
|
||||
pokeball: pokeball,
|
||||
pokemonStat: pokemonStat,
|
||||
pokemon: pokemon,
|
||||
starterSelectUiHandler: starterSelectUiHandler,
|
||||
tutorial: tutorial
|
||||
}
|
@ -43,5 +43,4 @@ export const menu: SimpleTranslationEntries = {
|
||||
"empty":"Empty",
|
||||
"yes":"Yes",
|
||||
"no":"No",
|
||||
"confirmStartTeam":'Begin with these Pokémon?',
|
||||
} as const;
|
32
src/locales/de/starter-select-ui-handler.ts
Normal file
32
src/locales/de/starter-select-ui-handler.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
/**
|
||||
* The menu namespace holds most miscellaneous text that isn't directly part of the game's
|
||||
* contents or directly related to Pokemon data. This includes menu navigation, settings,
|
||||
* account interactions, descriptive text, etc.
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"confirmStartTeam":'Begin with these Pokémon?',
|
||||
"growthRate": "Growth Rate:",
|
||||
"ability": "Ability:",
|
||||
"passive": "Passive:",
|
||||
"nature": "Nature:",
|
||||
"eggMoves": 'Egg Moves',
|
||||
"start": "Start",
|
||||
"addToParty": "Add to Party",
|
||||
"toggleIVs": 'Toggle IVs',
|
||||
"manageMoves": 'Manage Moves',
|
||||
"useCandies": 'Use Candies',
|
||||
"selectMoveSwapOut": "Select a move to swap out.",
|
||||
"selectMoveSwapWith": "Select a move to swap with",
|
||||
"unlockPassive": "Unlock Passive",
|
||||
"reduceCost": "Reduce Cost",
|
||||
"cycleShiny": "R: Cycle Shiny",
|
||||
"cycleForm": 'F: Cycle Form',
|
||||
"cycleGender": 'G: Cycle Gender',
|
||||
"cycleAbility": 'E: Cycle Ability',
|
||||
"cycleNature": 'N: Cycle Nature',
|
||||
"cycleVariant": 'V: Cycle Variant',
|
||||
"enablePassive": "Enable Passive",
|
||||
"disablePassive": "Disable Passive"
|
||||
}
|
28
src/locales/en/config.ts
Normal file
28
src/locales/en/config.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import { ability } from "./ability";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
import { menu } from "./menu";
|
||||
import { menuUiHandler } from "./menu-ui-handler";
|
||||
import { move } from "./move";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { pokemonStat } from "./pokemon-stat";
|
||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||
import { tutorial } from "./tutorial";
|
||||
|
||||
|
||||
export const enConfig = {
|
||||
ability: ability,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
fightUiHandler: fightUiHandler,
|
||||
menuUiHandler: menuUiHandler,
|
||||
menu: menu,
|
||||
move: move,
|
||||
pokeball: pokeball,
|
||||
pokemonStat: pokemonStat,
|
||||
pokemon: pokemon,
|
||||
starterSelectUiHandler: starterSelectUiHandler,
|
||||
tutorial: tutorial
|
||||
}
|
@ -43,5 +43,4 @@ export const menu: SimpleTranslationEntries = {
|
||||
"empty":"Empty",
|
||||
"yes":"Yes",
|
||||
"no":"No",
|
||||
"confirmStartTeam":'Begin with these Pokémon?',
|
||||
} as const;
|
32
src/locales/en/starter-select-ui-handler.ts
Normal file
32
src/locales/en/starter-select-ui-handler.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
/**
|
||||
* The menu namespace holds most miscellaneous text that isn't directly part of the game's
|
||||
* contents or directly related to Pokemon data. This includes menu navigation, settings,
|
||||
* account interactions, descriptive text, etc.
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"confirmStartTeam":'Begin with these Pokémon?',
|
||||
"growthRate": "Growth Rate:",
|
||||
"ability": "Ability:",
|
||||
"passive": "Passive:",
|
||||
"nature": "Nature:",
|
||||
"eggMoves": 'Egg Moves',
|
||||
"start": "Start",
|
||||
"addToParty": "Add to Party",
|
||||
"toggleIVs": 'Toggle IVs',
|
||||
"manageMoves": 'Manage Moves',
|
||||
"useCandies": 'Use Candies',
|
||||
"selectMoveSwapOut": "Select a move to swap out.",
|
||||
"selectMoveSwapWith": "Select a move to swap with",
|
||||
"unlockPassive": "Unlock Passive",
|
||||
"reduceCost": "Reduce Cost",
|
||||
"cycleShiny": "R: Cycle Shiny",
|
||||
"cycleForm": 'F: Cycle Form',
|
||||
"cycleGender": 'G: Cycle Gender',
|
||||
"cycleAbility": 'E: Cycle Ability',
|
||||
"cycleNature": 'N: Cycle Nature',
|
||||
"cycleVariant": 'V: Cycle Variant',
|
||||
"enablePassive": "Enable Passive",
|
||||
"disablePassive": "Disable Passive"
|
||||
}
|
28
src/locales/es/config.ts
Normal file
28
src/locales/es/config.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import { ability } from "./ability";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
import { menu } from "./menu";
|
||||
import { menuUiHandler } from "./menu-ui-handler";
|
||||
import { move } from "./move";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { pokemonStat } from "./pokemon-stat";
|
||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||
import { tutorial } from "./tutorial";
|
||||
|
||||
|
||||
export const esConfig = {
|
||||
ability: ability,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
fightUiHandler: fightUiHandler,
|
||||
menuUiHandler: menuUiHandler,
|
||||
menu: menu,
|
||||
move: move,
|
||||
pokeball: pokeball,
|
||||
pokemonStat: pokemonStat,
|
||||
pokemon: pokemon,
|
||||
starterSelectUiHandler: starterSelectUiHandler,
|
||||
tutorial: tutorial
|
||||
}
|
@ -13,6 +13,22 @@ export const menu: SimpleTranslationEntries = {
|
||||
"newGame": "Nueva partida",
|
||||
"selectGameMode": "Elige un modo de juego.",
|
||||
"logInOrCreateAccount": "Inicia sesión o crea una cuenta para empezar. ¡No se requiere correo electrónico!",
|
||||
"username": "Usuario",
|
||||
"password": "Contraseña",
|
||||
"login": "Iniciar Sesión",
|
||||
"register": "Registrarse",
|
||||
"emptyUsername": "El usuario no puede estar vacío",
|
||||
"invalidLoginUsername": "El usuario no es válido",
|
||||
"invalidRegisterUsername": "El usuario solo puede contener letras, números y guiones bajos",
|
||||
"invalidLoginPassword": "La contraseña no es válida",
|
||||
"invalidRegisterPassword": "Contraseña debe tener 6 o más caracter.",
|
||||
"usernameAlreadyUsed": "El usuario ya está en uso",
|
||||
"accountNonExistent": "El usuario no existe",
|
||||
"unmatchingPassword": "La contraseña no coincide",
|
||||
"passwordNotMatchingConfirmPassword": "Las contraseñas deben coincidir",
|
||||
"confirmPassword": "Confirmar Contra.",
|
||||
"registrationAgeWarning": "Al registrarte, confirmas tener 13 o más años de edad.",
|
||||
"backToLogin": "Volver al Login",
|
||||
"failedToLoadSaveData": "No se ha podido cargar los datos guardados. Por favor, recarga la página.\nSi el fallo continúa, por favor contacta al administrador.",
|
||||
"sessionSuccess": "Sesión cargada con éxito.",
|
||||
"failedToLoadSession": "No se ha podido cargar los datos de tu sesión.\nPuede que estén corruptos.",
|
||||
@ -27,5 +43,4 @@ export const menu: SimpleTranslationEntries = {
|
||||
"empty":"Vacío",
|
||||
"yes":"Sí",
|
||||
"no":"No",
|
||||
"confirmStartTeam":'¿Comenzar con estos Pokémon?',
|
||||
} as const;
|
@ -4,13 +4,13 @@ export const pokemonStat: SimpleTranslationEntries = {
|
||||
"HP": "PV",
|
||||
"HPshortened": "PV",
|
||||
"ATK": "Ataque",
|
||||
"ATKshortened": "Ataque",
|
||||
"ATKshortened": "Ata",
|
||||
"DEF": "Defensa",
|
||||
"DEFshortened": "Defensa",
|
||||
"DEFshortened": "Def",
|
||||
"SPATK": "At. Esp.",
|
||||
"SPATKshortened": "At. Esp.",
|
||||
"SPATKshortened": "AtEsp",
|
||||
"SPDEF": "Def. Esp.",
|
||||
"SPDEFshortened": "Def. Esp.",
|
||||
"SPDEFshortened": "DefEsp",
|
||||
"SPD": "Velocidad",
|
||||
"SPDshortened": "Veloc."
|
||||
} as const;
|
32
src/locales/es/starter-select-ui-handler.ts
Normal file
32
src/locales/es/starter-select-ui-handler.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
/**
|
||||
* The menu namespace holds most miscellaneous text that isn't directly part of the game's
|
||||
* contents or directly related to Pokemon data. This includes menu navigation, settings,
|
||||
* account interactions, descriptive text, etc.
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"confirmStartTeam":'¿Comenzar con estos Pokémon?',
|
||||
"growthRate": "Crecimiento:",
|
||||
"ability": "Habilid:",
|
||||
"passive": "Pasiva:",
|
||||
"nature": "Natur:",
|
||||
"eggMoves": "Mov. Huevo",
|
||||
"start": "Iniciar",
|
||||
"addToParty": "Añadir a Equipo",
|
||||
"toggleIVs": "Mostrar IVs",
|
||||
"manageMoves": "Gestionar Movs.",
|
||||
"useCandies": "Usar Caramelos",
|
||||
"selectMoveSwapOut": "Elige el movimiento que sustituir.",
|
||||
"selectMoveSwapWith": "Elige el movimiento que sustituirá a",
|
||||
"unlockPassive": "Añadir Pasiva",
|
||||
"reduceCost": "Reducir Coste",
|
||||
"cycleShiny": "R: Cambiar Shiny",
|
||||
"cycleForm": 'F: Cambiar Forma',
|
||||
"cycleGender": 'G: Cambiar Género',
|
||||
"cycleAbility": 'E: Cambiar Habilidad',
|
||||
"cycleNature": 'N: Cambiar Naturaleza',
|
||||
"cycleVariant": 'V: Cambiar Variante',
|
||||
"enablePassive": "Activar Pasiva",
|
||||
"disablePassive": "Desactivar Pasiva"
|
||||
}
|
@ -10,9 +10,9 @@ export const tutorial: SimpleTranslationEntries = {
|
||||
$ajustes de tu navegador.`,
|
||||
|
||||
"accessMenu": `Para acceder al menú, pulsa M o Escape cuando\ntengas el control.
|
||||
$El menú contiene la configuración y otras funciones.`,
|
||||
$El menú contiene los ajustes y otras funciones.`,
|
||||
|
||||
"menu": `Desde este menú podrás acceder a la configuración.
|
||||
"menu": `Desde este menú podrás acceder a los ajustes.
|
||||
$Podrás cambiar la velocidad del juego, el estilo de la ventana y demás.
|
||||
$Hay más opciones, ¡así que pruébalas todas!`,
|
||||
|
||||
|
@ -23,7 +23,7 @@ export const battle: SimpleTranslationEntries = {
|
||||
"attackHitsCount": `Touché {{count}} fois !`,
|
||||
"expGain": "{{pokemonName}} gagne\n{{exp}} Points d’Exp !",
|
||||
"levelUp": "{{pokemonName}} monte au\nN. {{level}} !",
|
||||
"learnMove": "{{pokemonName}} apprend \n{{moveName}} !",
|
||||
"learnMove": "{{pokemonName}} apprend\n{{moveName}} !",
|
||||
"learnMovePrompt": "{{pokemonName}} veut apprendre\n{{moveName}}.",
|
||||
"learnMoveLimitReached": "Cependant, {{pokemonName}} connait\ndéjà quatre capacités.",
|
||||
"learnMoveReplaceQuestion": "Voulez-vous oublier une capacité\net la remplacer par {{moveName}} ?",
|
||||
@ -33,7 +33,7 @@ export const battle: SimpleTranslationEntries = {
|
||||
"learnMoveForgetSuccess": "{{pokemonName}} oublie comment\nutiliser {{moveName}}.",
|
||||
"levelCapUp": "La limite de niveau\na été augmentée à {{levelCap}} !",
|
||||
"moveNotImplemented": "{{moveName}} n’est pas encore implémenté et ne peut pas être sélectionné.",
|
||||
"moveNoPP": "There's no PP left for\nthis move!",
|
||||
"moveNoPP": "Il n’y a plus de PP pour\ncette capacité !",
|
||||
"moveDisabled": "{{moveName}} est sous entrave !",
|
||||
"noPokeballForce": "Une force mystérieuse\nempêche l’utilisation des Poké Balls.",
|
||||
"noPokeballTrainer": "Le Dresseur détourne la Ball\nVoler, c’est mal !",
|
||||
|
28
src/locales/fr/config.ts
Normal file
28
src/locales/fr/config.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import { ability } from "./ability";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
import { menu } from "./menu";
|
||||
import { menuUiHandler } from "./menu-ui-handler";
|
||||
import { move } from "./move";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { pokemonStat } from "./pokemon-stat";
|
||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||
import { tutorial } from "./tutorial";
|
||||
|
||||
|
||||
export const frConfig = {
|
||||
ability: ability,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
fightUiHandler: fightUiHandler,
|
||||
menuUiHandler: menuUiHandler,
|
||||
menu: menu,
|
||||
move: move,
|
||||
pokeball: pokeball,
|
||||
pokemonStat: pokemonStat,
|
||||
pokemon: pokemon,
|
||||
starterSelectUiHandler: starterSelectUiHandler,
|
||||
tutorial: tutorial
|
||||
}
|
@ -38,5 +38,4 @@ export const menu: SimpleTranslationEntries = {
|
||||
"empty":"Vide",
|
||||
"yes":"Oui",
|
||||
"no":"Non",
|
||||
"confirmStartTeam":'Commencer avec ces Pokémon ?',
|
||||
} as const;
|
||||
|
32
src/locales/fr/starter-select-ui-handler.ts
Normal file
32
src/locales/fr/starter-select-ui-handler.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
/**
|
||||
* The menu namespace holds most miscellaneous text that isn't directly part of the game's
|
||||
* contents or directly related to Pokemon data. This includes menu navigation, settings,
|
||||
* account interactions, descriptive text, etc.
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"confirmStartTeam":'Commencer avec ces Pokémon ?',
|
||||
"growthRate": "Croissance :",
|
||||
"ability": "Talent :",
|
||||
"passive": "Passif :",
|
||||
"nature": "Nature :",
|
||||
"eggMoves": "Capacités Œuf",
|
||||
"start": "Lancer",
|
||||
"addToParty": "Ajouter à l’équipe",
|
||||
"toggleIVs": "Voir IVs",
|
||||
"manageMoves": "Gérer Capacités",
|
||||
"useCandies": "Utiliser Bonbons",
|
||||
"selectMoveSwapOut": "Sélectionnez la capacité à échanger.",
|
||||
"selectMoveSwapWith": "Sélectionnez laquelle échanger avec",
|
||||
"unlockPassive": "Débloquer Passif",
|
||||
"reduceCost": "Diminuer le cout",
|
||||
"cycleShiny": "R: » Chromatiques",
|
||||
"cycleForm": "F: » Formes",
|
||||
"cycleGender": "G: » Sexes",
|
||||
"cycleAbility": "E: » Talents",
|
||||
"cycleNature": "N: » Natures",
|
||||
"cycleVariant": "V: » Variants",
|
||||
"enablePassive": "Activer Passif",
|
||||
"disablePassive": "Désactiver Passif"
|
||||
}
|
@ -11,18 +11,18 @@ export const battle: SimpleTranslationEntries = {
|
||||
"trainerGo": "{{trainerName}} manda in campo {{pokemonName}}!",
|
||||
"switchQuestion": "Vuoi cambiare\n{{pokemonName}}?",
|
||||
"trainerDefeated": `Hai sconfitto\n{{trainerName}}!`,
|
||||
"pokemonCaught": "{{pokemonName}} è stato catturato!",
|
||||
"pokemonCaught": "Preso! {{pokemonName}} è stato catturato!",
|
||||
"pokemon": "Pokémon",
|
||||
"sendOutPokemon": "Vai! {{pokemonName}}!",
|
||||
"hitResultCriticalHit": "Brutto colpo!",
|
||||
"hitResultSuperEffective": "È superefficace!",
|
||||
"hitResultNotVeryEffective": "Non è molto efficace…",
|
||||
"hitResultNoEffect": "Non ha effetto su {{pokemonName}}!",
|
||||
"hitResultOneHitKO": "È KO con un colpo solo!",
|
||||
"hitResultOneHitKO": "KO con un colpo!",
|
||||
"attackFailed": "Ma ha fallito!",
|
||||
"attackHitsCount": `Colpito {{count}} volta/e!`,
|
||||
"expGain": "{{pokemonName}} ha guadagnato\n{{exp}} Punti Esperienza!",
|
||||
"levelUp": "{{pokemonName}} è salito al \nLivello {{level}}!",
|
||||
"levelUp": "{{pokemonName}} è salito al \nlivello {{level}}!",
|
||||
"learnMove": "{{pokemonName}} impara \n{{moveName}}!",
|
||||
"learnMovePrompt": "{{pokemonName}} vorrebbe imparare\n{{moveName}}.",
|
||||
"learnMoveLimitReached": "Tuttavia, {{pokemonName}} \nconosce già quattro mosse.",
|
||||
@ -33,16 +33,16 @@ export const battle: SimpleTranslationEntries = {
|
||||
"learnMoveForgetSuccess": "{{pokemonName}} ha dimenticato la mossa\n{{moveName}}.",
|
||||
"levelCapUp": "Il livello massimo\nè aumentato a {{levelCap}}!",
|
||||
"moveNotImplemented": "{{moveName}} non è ancora implementata e non può essere selezionata.",
|
||||
"moveNoPP": "There's no PP left for\nthis move!",
|
||||
"moveNoPP": "Non ci sono PP rimanenti\nper questa mossa!",
|
||||
"moveDisabled": "{{moveName}} è disabilitata!",
|
||||
"noPokeballForce": "Una forza misteriosa\nimpedisce l'uso dell Poké Ball.",
|
||||
"noPokeballTrainer": "Non puoi catturare\nPokémon di altri allenatori!",
|
||||
"noPokeballMulti": "Puoi lanciare una Poké Ball\nquando rimane un solo Pokémon!",
|
||||
"noPokeballStrong": "Il Pokémon avversario è troppo forte per essere catturato!\nDevi prima indebolirlo!",
|
||||
"noEscapeForce": "Una forza misteriosa\nimpedisce la fuga.",
|
||||
"noEscapeTrainer": "Non puoi fuggire\nda una battaglia contro un'allenatore!",
|
||||
"noEscapeTrainer": "Non puoi sottrarti\nalla lotta con un'allenatore!",
|
||||
"noEscapePokemon": "{{moveName}} di {{pokemonName}}\npreviene la {{escapeVerb}}!",
|
||||
"runAwaySuccess": "Sei riuscito a fuggire!",
|
||||
"runAwaySuccess": "Scampato pericolo!",
|
||||
"runAwayCannotEscape": 'Non puoi fuggire!',
|
||||
"escapeVerbSwitch": "cambiando",
|
||||
"escapeVerbFlee": "fuggendo",
|
||||
|
28
src/locales/it/config.ts
Normal file
28
src/locales/it/config.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import { ability } from "./ability";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
import { menu } from "./menu";
|
||||
import { menuUiHandler } from "./menu-ui-handler";
|
||||
import { move } from "./move";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { pokemonStat } from "./pokemon-stat";
|
||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||
import { tutorial } from "./tutorial";
|
||||
|
||||
|
||||
export const itConfig = {
|
||||
ability: ability,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
fightUiHandler: fightUiHandler,
|
||||
menuUiHandler: menuUiHandler,
|
||||
menu: menu,
|
||||
move: move,
|
||||
pokeball: pokeball,
|
||||
pokemonStat: pokemonStat,
|
||||
pokemon: pokemon,
|
||||
starterSelectUiHandler: starterSelectUiHandler,
|
||||
tutorial: tutorial
|
||||
}
|
@ -43,5 +43,4 @@ export const menu: SimpleTranslationEntries = {
|
||||
"empty":"Vuoto",
|
||||
"yes":"Si",
|
||||
"no":"No",
|
||||
"confirmStartTeam":'Vuoi iniziare con questi Pokémon?',
|
||||
} as const;
|
32
src/locales/it/starter-select-ui-handler.ts
Normal file
32
src/locales/it/starter-select-ui-handler.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
/**
|
||||
* The menu namespace holds most miscellaneous text that isn't directly part of the game's
|
||||
* contents or directly related to Pokemon data. This includes menu navigation, settings,
|
||||
* account interactions, descriptive text, etc.
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"confirmStartTeam":'Vuoi iniziare con questi Pokémon?',
|
||||
"growthRate": "Vel. Crescita:",
|
||||
"ability": "Abilità:",
|
||||
"passive": "Passiva:",
|
||||
"nature": "Natura:",
|
||||
"eggMoves": 'Mosse delle uova',
|
||||
"start": "Inizia",
|
||||
"addToParty": "Aggiungi al Gruppo",
|
||||
"toggleIVs": 'Vedi/Nascondi IV',
|
||||
"manageMoves": 'Gestisci Mosse',
|
||||
"useCandies": 'Usa Caramelle',
|
||||
"selectMoveSwapOut": "Seleziona una mossa da scambiare.",
|
||||
"selectMoveSwapWith": "Seleziona una mossa da scambiare con",
|
||||
"unlockPassive": "Sblocca Passiva",
|
||||
"reduceCost": "Riduci Costo",
|
||||
"cycleShiny": "R: Alterna Shiny",
|
||||
"cycleForm": 'F: Alterna Forma',
|
||||
"cycleGender": 'G: Alterna Sesso',
|
||||
"cycleAbility": 'E: Alterna Abilità',
|
||||
"cycleNature": 'N: Alterna Natura',
|
||||
"cycleVariant": 'V: Alterna Variante',
|
||||
"enablePassive": "Attiva Passiva",
|
||||
"disablePassive": "Disattiva Passiva"
|
||||
}
|
@ -1,71 +1,11 @@
|
||||
import i18next from 'i18next';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
|
||||
import { menu as enMenu } from '../locales/en/menu';
|
||||
import { menu as esMenu } from '../locales/es/menu';
|
||||
import { menu as itMenu } from '../locales/it/menu';
|
||||
import { menu as frMenu } from '../locales/fr/menu';
|
||||
import { menu as deMenu } from '../locales/de/menu';
|
||||
|
||||
import { menuUiHandler as enMenuUiHandler } from '../locales/en/menu-ui-handler.js';
|
||||
import { menuUiHandler as esMenuUiHandler } from '../locales/es/menu-ui-handler.js';
|
||||
import { menuUiHandler as frMenuUiHandler } from '../locales/fr/menu-ui-handler.js';
|
||||
import { menuUiHandler as itMenuUiHandler } from '../locales/it/menu-ui-handler.js';
|
||||
import { menuUiHandler as deMenuUiHandler } from '../locales/de/menu-ui-handler.js';
|
||||
|
||||
import { battle as enBattle } from '../locales/en/battle';
|
||||
import { battle as esBattle } from '../locales/es/battle';
|
||||
import { battle as itBattle } from '../locales/it/battle';
|
||||
import { battle as frBattle } from '../locales/fr/battle';
|
||||
import { battle as deBattle } from '../locales/de/battle';
|
||||
|
||||
import { move as enMove } from '../locales/en/move';
|
||||
import { move as esMove } from '../locales/es/move';
|
||||
import { move as itMove } from '../locales/it/move';
|
||||
import { move as frMove } from '../locales/fr/move';
|
||||
import { move as deMove } from '../locales/de/move';
|
||||
|
||||
import { ability as enAbility } from '../locales/en/ability';
|
||||
import { ability as esAbility } from '../locales/es/ability';
|
||||
import { ability as itAbility } from '../locales/it/ability';
|
||||
import { ability as frAbility } from '../locales/fr/ability';
|
||||
import { ability as deAbility } from '../locales/de/ability';
|
||||
|
||||
import { pokeball as enPokeball } from '../locales/en/pokeball';
|
||||
import { pokeball as esPokeball } from '../locales/es/pokeball';
|
||||
import { pokeball as itPokeball } from '../locales/it/pokeball';
|
||||
import { pokeball as frPokeball } from '../locales/fr/pokeball';
|
||||
import { pokeball as dePokeball } from '../locales/de/pokeball';
|
||||
|
||||
import { pokemon as enPokemon } from '../locales/en/pokemon';
|
||||
import { pokemon as esPokemon } from '../locales/es/pokemon';
|
||||
import { pokemon as itPokemon } from '../locales/it/pokemon';
|
||||
import { pokemon as frPokemon } from '../locales/fr/pokemon';
|
||||
import { pokemon as dePokemon } from '../locales/de/pokemon';
|
||||
|
||||
import { pokemonStat as enPokemonStat } from '../locales/en/pokemon-stat';
|
||||
import { pokemonStat as esPokemonStat } from '../locales/es/pokemon-stat';
|
||||
import { pokemonStat as frPokemonStat } from '../locales/fr/pokemon-stat';
|
||||
import { pokemonStat as itPokemonStat } from '../locales/it/pokemon-stat';
|
||||
import { pokemonStat as dePokemonStat } from '../locales/de/pokemon-stat';
|
||||
|
||||
import { commandUiHandler as enCommandUiHandler } from '../locales/en/command-ui-handler';
|
||||
import { commandUiHandler as esCommandUiHandler } from '../locales/es/command-ui-handler';
|
||||
import { commandUiHandler as itCommandUiHandler } from '../locales/it/command-ui-handler';
|
||||
import { commandUiHandler as frCommandUiHandler } from '../locales/fr/command-ui-handler';
|
||||
import { commandUiHandler as deCommandUiHandler } from '../locales/de/command-ui-handler';
|
||||
|
||||
import { fightUiHandler as enFightUiHandler } from '../locales/en/fight-ui-handler';
|
||||
import { fightUiHandler as esFightUiHandler } from '../locales/es/fight-ui-handler';
|
||||
import { fightUiHandler as frFightUiHandler } from '../locales/fr/fight-ui-handler';
|
||||
import { fightUiHandler as itFightUiHandler } from '../locales/it/fight-ui-handler';
|
||||
import { fightUiHandler as deFightUiHandler } from '../locales/de/fight-ui-handler';
|
||||
|
||||
import { tutorial as enTutorial } from '../locales/en/tutorial';
|
||||
import { tutorial as esTutorial } from '../locales/es/tutorial';
|
||||
import { tutorial as frTutorial } from '../locales/fr/tutorial';
|
||||
import { tutorial as itTutorial} from '../locales/it/tutorial';
|
||||
import { tutorial as deTutorial } from '../locales/de/tutorial';
|
||||
import { deConfig } from '#app/locales/de/config.js';
|
||||
import { enConfig } from '#app/locales/en/config.js';
|
||||
import { esConfig } from '#app/locales/es/config.js';
|
||||
import { frConfig } from '#app/locales/fr/config.js';
|
||||
import { itConfig } from '#app/locales/it/config.js';
|
||||
|
||||
export interface SimpleTranslationEntries {
|
||||
[key: string]: string
|
||||
@ -125,69 +65,19 @@ export function initI18n(): void {
|
||||
},
|
||||
resources: {
|
||||
en: {
|
||||
menu: enMenu,
|
||||
menuUiHandler: enMenuUiHandler,
|
||||
battle: enBattle,
|
||||
move: enMove,
|
||||
ability: enAbility,
|
||||
pokeball: enPokeball,
|
||||
pokemon: enPokemon,
|
||||
pokemonStat: enPokemonStat,
|
||||
commandUiHandler: enCommandUiHandler,
|
||||
fightUiHandler: enFightUiHandler,
|
||||
tutorial: enTutorial,
|
||||
...enConfig
|
||||
},
|
||||
es: {
|
||||
menu: esMenu,
|
||||
menuUiHandler: esMenuUiHandler,
|
||||
battle: esBattle,
|
||||
move: esMove,
|
||||
ability: esAbility,
|
||||
pokeball: esPokeball,
|
||||
pokemon: esPokemon,
|
||||
pokemonStat: esPokemonStat,
|
||||
commandUiHandler: esCommandUiHandler,
|
||||
fightUiHandler: esFightUiHandler,
|
||||
tutorial: esTutorial,
|
||||
...esConfig
|
||||
},
|
||||
fr: {
|
||||
menu: frMenu,
|
||||
menuUiHandler: frMenuUiHandler,
|
||||
battle: frBattle,
|
||||
move: frMove,
|
||||
ability: frAbility,
|
||||
pokeball: frPokeball,
|
||||
pokemon: frPokemon,
|
||||
pokemonStat: frPokemonStat,
|
||||
commandUiHandler: frCommandUiHandler,
|
||||
fightUiHandler: frFightUiHandler,
|
||||
tutorial: frTutorial,
|
||||
...frConfig
|
||||
},
|
||||
it: {
|
||||
menu: itMenu,
|
||||
menuUiHandler: itMenuUiHandler,
|
||||
battle: itBattle,
|
||||
move: itMove,
|
||||
ability: itAbility,
|
||||
pokeball: itPokeball,
|
||||
pokemon: itPokemon,
|
||||
pokemonStat: itPokemonStat,
|
||||
commandUiHandler: itCommandUiHandler,
|
||||
fightUiHandler: itFightUiHandler,
|
||||
tutorial: itTutorial,
|
||||
...itConfig
|
||||
},
|
||||
de: {
|
||||
menu: deMenu,
|
||||
menuUiHandler: deMenuUiHandler,
|
||||
battle: deBattle,
|
||||
move: deMove,
|
||||
ability: deAbility,
|
||||
pokeball: dePokeball,
|
||||
pokemon: dePokemon,
|
||||
pokemonStat: dePokemonStat,
|
||||
commandUiHandler: deCommandUiHandler,
|
||||
fightUiHandler: deFightUiHandler,
|
||||
tutorial: deTutorial,
|
||||
...deConfig
|
||||
}
|
||||
},
|
||||
});
|
||||
@ -197,17 +87,18 @@ export function initI18n(): void {
|
||||
declare module 'i18next' {
|
||||
interface CustomTypeOptions {
|
||||
resources: {
|
||||
menu: typeof enMenu;
|
||||
menuUiHandler: typeof enMenuUiHandler;
|
||||
move: typeof enMove;
|
||||
battle: typeof enBattle,
|
||||
ability: typeof enAbility;
|
||||
pokeball: typeof enPokeball;
|
||||
pokemon: typeof enPokemon;
|
||||
pokemonStat: typeof enPokemonStat;
|
||||
commandUiHandler: typeof enCommandUiHandler;
|
||||
fightUiHandler: typeof enFightUiHandler;
|
||||
tutorial: typeof enTutorial;
|
||||
menu: SimpleTranslationEntries;
|
||||
menuUiHandler: SimpleTranslationEntries;
|
||||
move: MoveTranslationEntries;
|
||||
battle: SimpleTranslationEntries,
|
||||
ability: AbilityTranslationEntries;
|
||||
pokeball: SimpleTranslationEntries;
|
||||
pokemon: SimpleTranslationEntries;
|
||||
pokemonStat: SimpleTranslationEntries;
|
||||
commandUiHandler: SimpleTranslationEntries;
|
||||
fightUiHandler: SimpleTranslationEntries;
|
||||
tutorial: SimpleTranslationEntries;
|
||||
starterSelectUiHandler: SimpleTranslationEntries;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.pokemonNameText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonNameText);
|
||||
|
||||
this.pokemonGrowthRateLabelText = addTextObject(this.scene, 8, 106, 'Growth Rate:', TextStyle.SUMMARY_ALT, { fontSize: '36px' });
|
||||
this.pokemonGrowthRateLabelText = addTextObject(this.scene, 8, 106, i18next.t("starterSelectUiHandler:growthRate"), TextStyle.SUMMARY_ALT, { fontSize: '36px' });
|
||||
this.pokemonGrowthRateLabelText.setOrigin(0, 0);
|
||||
this.pokemonGrowthRateLabelText.setVisible(false);
|
||||
this.starterSelectContainer.add(this.pokemonGrowthRateLabelText);
|
||||
@ -244,7 +244,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.pokemonUncaughtText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonUncaughtText);
|
||||
|
||||
this.pokemonAbilityLabelText = addTextObject(this.scene, 6, 127, 'Ability:', TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||
this.pokemonAbilityLabelText = addTextObject(this.scene, 6, 127, i18next.t("starterSelectUiHandler:ability"), TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||
this.pokemonAbilityLabelText.setOrigin(0, 0);
|
||||
this.pokemonAbilityLabelText.setVisible(false);
|
||||
this.starterSelectContainer.add(this.pokemonAbilityLabelText);
|
||||
@ -253,7 +253,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.pokemonAbilityText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonAbilityText);
|
||||
|
||||
this.pokemonPassiveLabelText = addTextObject(this.scene, 6, 136, 'Passive:', TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||
this.pokemonPassiveLabelText = addTextObject(this.scene, 6, 136, i18next.t("starterSelectUiHandler:passive"), TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||
this.pokemonPassiveLabelText.setOrigin(0, 0);
|
||||
this.pokemonPassiveLabelText.setVisible(false);
|
||||
this.starterSelectContainer.add(this.pokemonPassiveLabelText);
|
||||
@ -262,7 +262,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.pokemonPassiveText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonPassiveText);
|
||||
|
||||
this.pokemonNatureLabelText = addTextObject(this.scene, 6, 145, 'Nature:', TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||
this.pokemonNatureLabelText = addTextObject(this.scene, 6, 145, i18next.t("starterSelectUiHandler:nature"), TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||
this.pokemonNatureLabelText.setOrigin(0, 0);
|
||||
this.pokemonNatureLabelText.setVisible(false);
|
||||
this.starterSelectContainer.add(this.pokemonNatureLabelText);
|
||||
@ -327,7 +327,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.valueLimitLabel.setOrigin(0.5, 0);
|
||||
this.starterSelectContainer.add(this.valueLimitLabel);
|
||||
|
||||
const startLabel = addTextObject(this.scene, 124, 162, 'Start', TextStyle.TOOLTIP_CONTENT);
|
||||
const startLabel = addTextObject(this.scene, 124, 162, i18next.t("starterSelectUiHandler:start"), TextStyle.TOOLTIP_CONTENT);
|
||||
startLabel.setOrigin(0.5, 0);
|
||||
this.starterSelectContainer.add(startLabel);
|
||||
|
||||
@ -512,7 +512,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.pokemonEggMovesContainer = this.scene.add.container(102, 85);
|
||||
this.pokemonEggMovesContainer.setScale(0.375);
|
||||
|
||||
const eggMovesLabel = addTextObject(this.scene, -46, 0, 'Egg Moves', TextStyle.WINDOW_ALT);
|
||||
const eggMovesLabel = addTextObject(this.scene, -46, 0, i18next.t("starterSelectUiHandler:eggMoves"), TextStyle.WINDOW_ALT);
|
||||
eggMovesLabel.setOrigin(0.5, 0);
|
||||
|
||||
this.pokemonEggMovesContainer.add(eggMovesLabel);
|
||||
@ -734,7 +734,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
else if (this.starterCursors.length < 6) {
|
||||
const options = [
|
||||
{
|
||||
label: 'Add to Party',
|
||||
label: i18next.t("starterSelectUiHandler:addToParty"),
|
||||
handler: () => {
|
||||
ui.setMode(Mode.STARTER_SELECT);
|
||||
let isDupe = false;
|
||||
@ -771,7 +771,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
overrideSound: true
|
||||
},
|
||||
{
|
||||
label: 'Toggle IVs',
|
||||
label: i18next.t("starterSelectUiHandler:toggleIVs"),
|
||||
handler: () => {
|
||||
this.toggleStatsMode();
|
||||
ui.setMode(Mode.STARTER_SELECT);
|
||||
@ -782,14 +782,14 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
if (this.speciesStarterMoves.length > 1) {
|
||||
const showSwapOptions = (moveset: StarterMoveset) => {
|
||||
ui.setMode(Mode.STARTER_SELECT).then(() => {
|
||||
ui.showText('Select a move to swap out.', null, () => {
|
||||
ui.showText(i18next.t("starterSelectUiHandler:selectMoveSwapOut"), null, () => {
|
||||
ui.setModeWithoutClear(Mode.OPTION_SELECT, {
|
||||
options: moveset.map((m: Moves, i: number) => {
|
||||
const option: OptionSelectItem = {
|
||||
label: allMoves[m].name,
|
||||
handler: () => {
|
||||
ui.setMode(Mode.STARTER_SELECT).then(() => {
|
||||
ui.showText(`Select a move to swap with ${allMoves[m].name}.`, null, () => {
|
||||
ui.showText(`${i18next.t("starterSelectUiHandler:selectMoveSwapWith")} ${allMoves[m].name}.`, null, () => {
|
||||
ui.setModeWithoutClear(Mode.OPTION_SELECT, {
|
||||
options: this.speciesStarterMoves.filter((sm: Moves) => sm !== m).map(sm => {
|
||||
// make an option for each available starter move
|
||||
@ -803,7 +803,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
};
|
||||
return option;
|
||||
}).concat({
|
||||
label: 'Cancel',
|
||||
label: i18next.t("menu:cancel"),
|
||||
handler: () => {
|
||||
showSwapOptions(this.starterMoveset);
|
||||
return true;
|
||||
@ -819,7 +819,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
};
|
||||
return option;
|
||||
}).concat({
|
||||
label: 'Cancel',
|
||||
label: i18next.t("menu:cancel"),
|
||||
handler: () => {
|
||||
this.clearText();
|
||||
ui.setMode(Mode.STARTER_SELECT);
|
||||
@ -833,7 +833,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
});
|
||||
};
|
||||
options.push({
|
||||
label: 'Manage Moves',
|
||||
label: i18next.t("starterSelectUiHandler:manageMoves"),
|
||||
handler: () => {
|
||||
showSwapOptions(this.starterMoveset);
|
||||
return true;
|
||||
@ -846,7 +846,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
if (passiveAttr & PassiveAttr.UNLOCKED) {
|
||||
if (!(passiveAttr & PassiveAttr.ENABLED)) {
|
||||
options.push({
|
||||
label: 'Enable Passive',
|
||||
label: i18next.t("starterSelectUiHandler:enablePassive"),
|
||||
handler: () => {
|
||||
starterData.passiveAttr |= PassiveAttr.ENABLED;
|
||||
ui.setMode(Mode.STARTER_SELECT);
|
||||
@ -856,7 +856,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
});
|
||||
} else {
|
||||
options.push({
|
||||
label: 'Disable Passive',
|
||||
label: i18next.t("starterSelectUiHandler:disablePassive"),
|
||||
handler: () => {
|
||||
starterData.passiveAttr ^= PassiveAttr.ENABLED;
|
||||
ui.setMode(Mode.STARTER_SELECT);
|
||||
@ -871,7 +871,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
if (!(passiveAttr & PassiveAttr.UNLOCKED)) {
|
||||
const passiveCost = getPassiveCandyCount(speciesStarters[this.lastSpecies.speciesId]);
|
||||
options.push({
|
||||
label: `x${passiveCost} Unlock Passive (${allAbilities[starterPassiveAbilities[this.lastSpecies.speciesId]].name})`,
|
||||
label: `x${passiveCost} ${i18next.t("starterSelectUiHandler:unlockPassive")} (${allAbilities[starterPassiveAbilities[this.lastSpecies.speciesId]].name})`,
|
||||
handler: () => {
|
||||
if (candyCount >= passiveCost) {
|
||||
starterData.passiveAttr |= PassiveAttr.UNLOCKED | PassiveAttr.ENABLED;
|
||||
@ -895,7 +895,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
if (valueReduction < 2) {
|
||||
const reductionCost = getValueReductionCandyCounts(speciesStarters[this.lastSpecies.speciesId])[valueReduction];
|
||||
options.push({
|
||||
label: `x${reductionCost} Reduce Cost`,
|
||||
label: `x${reductionCost} ${i18next.t("starterSelectUiHandler:reduceCost")}`,
|
||||
handler: () => {
|
||||
if (candyCount >= reductionCost) {
|
||||
starterData.valueReduction++;
|
||||
@ -918,7 +918,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
});
|
||||
}
|
||||
options.push({
|
||||
label: 'Cancel',
|
||||
label: i18next.t("menu:cancel"),
|
||||
handler: () => {
|
||||
ui.setMode(Mode.STARTER_SELECT);
|
||||
return true;
|
||||
@ -931,7 +931,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
};
|
||||
if (!pokemonPrevolutions.hasOwnProperty(this.lastSpecies.speciesId)) {
|
||||
options.push({
|
||||
label: 'Use Candies',
|
||||
label: i18next.t("starterSelectUiHandler:useCandies"),
|
||||
handler: () => {
|
||||
ui.setMode(Mode.STARTER_SELECT).then(() => showUseCandies());
|
||||
return true;
|
||||
@ -939,7 +939,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
});
|
||||
}
|
||||
options.push({
|
||||
label: 'Cancel',
|
||||
label: i18next.t("menu:cancel"),
|
||||
handler: () => {
|
||||
ui.setMode(Mode.STARTER_SELECT);
|
||||
return true;
|
||||
@ -1108,17 +1108,17 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
let cycleInstructionLines = [];
|
||||
if (this.speciesStarterDexEntry?.caughtAttr) {
|
||||
if (this.canCycleShiny)
|
||||
cycleInstructionLines.push('R: Cycle Shiny');
|
||||
cycleInstructionLines.push(i18next.t("starterSelectUiHandler:cycleShiny"));
|
||||
if (this.canCycleForm)
|
||||
cycleInstructionLines.push('F: Cycle Form');
|
||||
cycleInstructionLines.push(i18next.t("starterSelectUiHandler:cycleForm"));
|
||||
if (this.canCycleGender)
|
||||
cycleInstructionLines.push('G: Cycle Gender');
|
||||
cycleInstructionLines.push(i18next.t("starterSelectUiHandler:cycleGender"));
|
||||
if (this.canCycleAbility)
|
||||
cycleInstructionLines.push('E: Cycle Ability');
|
||||
cycleInstructionLines.push(i18next.t("starterSelectUiHandler:cycleAbility"));
|
||||
if (this.canCycleNature)
|
||||
cycleInstructionLines.push('N: Cycle Nature');
|
||||
cycleInstructionLines.push(i18next.t("starterSelectUiHandler:cycleNature"));
|
||||
if (this.canCycleVariant)
|
||||
cycleInstructionLines.push('V: Cycle Variant');
|
||||
cycleInstructionLines.push(i18next.t("starterSelectUiHandler:cycleVariant"));
|
||||
}
|
||||
|
||||
if (cycleInstructionLines.length > 2) {
|
||||
@ -1697,7 +1697,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.clearText();
|
||||
};
|
||||
|
||||
ui.showText(i18next.t("menu:confirmStartTeam"), null, () => {
|
||||
ui.showText(i18next.t("starterSelectUiHandler:confirmStartTeam"), null, () => {
|
||||
ui.setModeWithoutClear(Mode.CONFIRM, () => {
|
||||
const startRun = (gameMode: GameModes) => {
|
||||
this.scene.gameMode = gameModes[gameMode];
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { expect, describe, it } from "vitest";
|
||||
import { randomString } from "./utils";
|
||||
import { randomString, padInt } from "./utils";
|
||||
|
||||
import Phaser from "phaser";
|
||||
|
||||
@ -19,4 +19,26 @@ describe("utils", () => {
|
||||
expect(str1).toBe(str2);
|
||||
});
|
||||
});
|
||||
|
||||
describe("padInt", () => {
|
||||
it("should return a string", () => {
|
||||
const result = padInt(1, 10);
|
||||
expect(typeof result).toBe('string');
|
||||
});
|
||||
|
||||
it("should return a padded result with default padWith", () => {
|
||||
const result = padInt(1, 3);
|
||||
expect(result).toBe('001');
|
||||
});
|
||||
|
||||
it("should return a padded result using a custom padWith", () => {
|
||||
const result = padInt(1, 10, 'yes')
|
||||
expect(result).toBe('yesyesyes1');
|
||||
});
|
||||
|
||||
it("should return inputted value when zero length is entered", () => {
|
||||
const result = padInt(1, 0);
|
||||
expect(result).toBe('1')
|
||||
})
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user