diff --git a/src/locales/de/egg.ts b/src/locales/de/egg.ts index 61a2f627aa4..9dc7b10f174 100644 --- a/src/locales/de/egg.ts +++ b/src/locales/de/egg.ts @@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = { "hatchFromTheEgg": "Ein {{pokemonName}} ist aus dem Ei geschlüpft!", "eggMoveUnlock": "Ei-Attacke freigeschaltet: {{moveName}}", "rareEggMoveUnlock": "Seltene Ei-Attacke freigeschaltet: {{moveName}}", + "moveUPGacha": "Mehr\nEi-Attacken!", + "shinyUPGacha": "Mehr\nSchillernde!", + "legendaryUPGacha": "erscheint\nöfter!", } as const; diff --git a/src/locales/en/egg.ts b/src/locales/en/egg.ts index b6e13d26213..9f699ce0fdc 100644 --- a/src/locales/en/egg.ts +++ b/src/locales/en/egg.ts @@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = { "hatchFromTheEgg": "{{pokemonName}} hatched from the egg!", "eggMoveUnlock": "Egg Move unlocked: {{moveName}}", "rareEggMoveUnlock": "Rare Egg Move unlocked: {{moveName}}", + "moveUPGacha": "Move UP!", + "shinyUPGacha": "Shiny UP!", + "legendaryUPGacha": "UP!", } as const; diff --git a/src/locales/es/egg.ts b/src/locales/es/egg.ts index dea466066f1..ab2c3aab903 100644 --- a/src/locales/es/egg.ts +++ b/src/locales/es/egg.ts @@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = { "hatchFromTheEgg": "¡Ha salido un {{pokemonName}} del Huevo!", "eggMoveUnlock": "Mov. Huevo desbloqueado:\n{{moveName}}", "rareEggMoveUnlock": "Mov. Huevo Raro desbloqueado:\n{{moveName}}", + "moveUPGacha": "¡Más Mov.\nHuevo Raro!", + "shinyUPGacha": "¡Más Shiny!", + "legendaryUPGacha": ", ¡mayor\nprob.!", } as const; diff --git a/src/locales/fr/egg.ts b/src/locales/fr/egg.ts index 96fbc4dce15..f63ac3abb0d 100644 --- a/src/locales/fr/egg.ts +++ b/src/locales/fr/egg.ts @@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = { "hatchFromTheEgg": "{{pokemonName}} sort de l’Œuf !", "eggMoveUnlock": "Capacité Œuf débloquée :\n{{moveName}}", "rareEggMoveUnlock": "Capacité Œuf Rare débloquée :\n{{moveName}}", + "moveUPGacha": "Bonus Capacité\nŒuf Rare !", + "shinyUPGacha": "Bonus\nChromatique !", + "legendaryUPGacha": "Bonus !", } as const; diff --git a/src/locales/it/egg.ts b/src/locales/it/egg.ts index 9b60b2f1835..feb148ab990 100644 --- a/src/locales/it/egg.ts +++ b/src/locales/it/egg.ts @@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = { "hatchFromTheEgg": "Dall’Uovo è nato {{pokemonName}}!", "eggMoveUnlock": "Egg Move unlocked: {{moveName}}", "rareEggMoveUnlock": "Rare Egg Move unlocked: {{moveName}}", + "moveUPGacha": "Move UP!", + "shinyUPGacha": "Shiny UP!", + "legendaryUPGacha": "UP!", } as const; diff --git a/src/locales/ko/egg.ts b/src/locales/ko/egg.ts index 88a845c6424..412d97bb7f3 100644 --- a/src/locales/ko/egg.ts +++ b/src/locales/ko/egg.ts @@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = { "hatchFromTheEgg": "알이 부화해서\n{{pokemonName}}[[가]] 태어났다!", "eggMoveUnlock": "알 기술 {{moveName}}[[를]]\n사용할 수 있게 되었다!", "rareEggMoveUnlock": "레어 알 기술 {{moveName}}[[를]]\n사용할 수 있게 되었다!", + "moveUPGacha": "기술 UP!", + "shinyUPGacha": "특별색 UP!", + "legendaryUPGacha": "UP!", } as const; diff --git a/src/locales/pt_BR/egg.ts b/src/locales/pt_BR/egg.ts index 6690c293aaf..fbd13bed4e3 100644 --- a/src/locales/pt_BR/egg.ts +++ b/src/locales/pt_BR/egg.ts @@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = { "hatchFromTheEgg": "{{pokemonName}} nasceu do ovo!", "eggMoveUnlock": "Movimento de Ovo desbloqueado: {{moveName}}", "rareEggMoveUnlock": "Movimento Raro de Ovo desbloqueado: {{moveName}}", + "moveUPGacha": "Movimento\nde Ovo Bônus!", + "shinyUPGacha": "Shiny Bônus!", + "legendaryUPGacha": "Bônus!", } as const; diff --git a/src/locales/zh_CN/egg.ts b/src/locales/zh_CN/egg.ts index 35334d75bdd..454cdb0af52 100644 --- a/src/locales/zh_CN/egg.ts +++ b/src/locales/zh_CN/egg.ts @@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = { "hatchFromTheEgg": "{{pokemonName}} 从蛋中孵化了!", "eggMoveUnlock": "蛋招式已解锁: {{moveName}}", "rareEggMoveUnlock": "稀有蛋招式已解锁: {{moveName}}", + "moveUPGacha": "蛋招式UP!", + "shinyUPGacha": "闪光UP!", + "legendaryUPGacha": "UP!", } as const; diff --git a/src/locales/zh_TW/egg.ts b/src/locales/zh_TW/egg.ts index eecfcf0b735..666f6758d11 100644 --- a/src/locales/zh_TW/egg.ts +++ b/src/locales/zh_TW/egg.ts @@ -22,4 +22,7 @@ export const egg: SimpleTranslationEntries = { "hatchFromTheEgg": "{{pokemonName}} 從蛋中孵化了!", "eggMoveUnlock": "蛋招式已解鎖: {{moveName}}", "rareEggMoveUnlock": "稀有蛋招式已解鎖: {{moveName}}", + "moveUPGacha": "蛋招式UP!", + "shinyUPGacha": "闪光UP!", + "legendaryUPGacha": "UP!", } as const; diff --git a/src/ui/egg-gacha-ui-handler.ts b/src/ui/egg-gacha-ui-handler.ts index 0081b589288..1a9320ac9e9 100644 --- a/src/ui/egg-gacha-ui-handler.ts +++ b/src/ui/egg-gacha-ui-handler.ts @@ -96,25 +96,71 @@ export default class EggGachaUiHandler extends MessageUiHandler { const gachaInfoContainer = this.scene.add.container(160, 46); - const gachaUpLabel = addTextObject(this.scene, 4, 0, "UP!", TextStyle.WINDOW_ALT); + const currentLanguage = i18next.resolvedLanguage; + let gachaTextStyle = TextStyle.WINDOW_ALT; + let gachaX = 4; + let gachaY = 0; + let pokemonIconX = -20; + let pokemonIconY = 6; + + if (["de", "es", "fr", "pt-BR"].includes(currentLanguage)) { + gachaTextStyle = TextStyle.SMALLER_WINDOW_ALT; + gachaX = 2; + gachaY = 2; + } + + let legendaryLabelX = gachaX; + let legendaryLabelY = gachaY; + if (["de", "es"].includes(currentLanguage)) { + pokemonIconX = -25; + pokemonIconY = 10; + legendaryLabelX = -6; + legendaryLabelY = 0; + } + + const gachaUpLabel = addTextObject(this.scene, gachaX, gachaY, i18next.t("egg:legendaryUPGacha"), gachaTextStyle); gachaUpLabel.setOrigin(0, 0); gachaInfoContainer.add(gachaUpLabel); switch (gachaType as GachaType) { case GachaType.LEGENDARY: - const pokemonIcon = this.scene.add.sprite(-20, 6, "pokemon_icons_0"); + if (["de", "es"].includes(currentLanguage)) { + gachaUpLabel.setAlign("center"); + gachaUpLabel.setY(0); + } + if (["pt-BR"].includes(currentLanguage)) { + gachaUpLabel.setX(legendaryLabelX - 2); + } else { + gachaUpLabel.setX(legendaryLabelX); + } + gachaUpLabel.setY(legendaryLabelY); + + const pokemonIcon = this.scene.add.sprite(pokemonIconX, pokemonIconY, "pokemon_icons_0"); + if (["pt-BR"].includes(currentLanguage)) { + pokemonIcon.setX(pokemonIconX - 2); + } pokemonIcon.setScale(0.5); pokemonIcon.setOrigin(0, 0.5); gachaInfoContainer.add(pokemonIcon); break; case GachaType.MOVE: - gachaUpLabel.setText("Move UP!"); + if (["de", "es", "fr", "pt-BR"].includes(currentLanguage)) { + gachaUpLabel.setAlign("center"); + gachaUpLabel.setY(0); + } + + gachaUpLabel.setText(i18next.t("egg:moveUPGacha")); gachaUpLabel.setX(0); gachaUpLabel.setOrigin(0.5, 0); break; case GachaType.SHINY: - gachaUpLabel.setText("Shiny UP!"); + if (["de", "fr"].includes(currentLanguage)) { + gachaUpLabel.setAlign("center"); + gachaUpLabel.setY(0); + } + + gachaUpLabel.setText(i18next.t("egg:shinyUPGacha")); gachaUpLabel.setX(0); gachaUpLabel.setOrigin(0.5, 0); break; diff --git a/src/ui/text.ts b/src/ui/text.ts index d192ae076a7..91ada7f12ad 100644 --- a/src/ui/text.ts +++ b/src/ui/text.ts @@ -1,10 +1,10 @@ +import { EggTier } from "#enums/egg-type"; +import { UiTheme } from "#enums/ui-theme"; +import Phaser from "phaser"; import BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText"; import InputText from "phaser3-rex-plugins/plugins/inputtext"; import BattleScene from "../battle-scene"; import { ModifierTier } from "../modifier/modifier-tier"; -import Phaser from "phaser"; -import { EggTier } from "#enums/egg-type"; -import { UiTheme } from "#enums/ui-theme"; export enum TextStyle { MESSAGE, @@ -33,7 +33,8 @@ export enum TextStyle { MOVE_PP_FULL, MOVE_PP_HALF_FULL, MOVE_PP_NEAR_EMPTY, - MOVE_PP_EMPTY + MOVE_PP_EMPTY, + SMALLER_WINDOW_ALT } export function addTextObject(scene: Phaser.Scene, x: number, y: number, content: string, style: TextStyle, extraStyleOptions?: Phaser.Types.GameObjects.Text.TextStyle): Phaser.GameObjects.Text { @@ -140,6 +141,11 @@ export function getTextStyleOptions(style: TextStyle, uiTheme: UiTheme, extraSty shadowXpos = 3; shadowYpos = 3; break; + case TextStyle.SMALLER_WINDOW_ALT: + styleOptions.fontSize = defaultFontSize - 36; + shadowXpos = 3; + shadowYpos = 3; + break; } const shadowColor = getTextColor(style, true, uiTheme); @@ -227,6 +233,8 @@ export function getTextColor(textStyle: TextStyle, shadow?: boolean, uiTheme: Ui return !shadow ? "#f8b050" : "#c07800"; case TextStyle.SETTINGS_SELECTED: return !shadow ? "#f88880" : "#f83018"; + case TextStyle.SMALLER_WINDOW_ALT: + return !shadow ? "#484848" : "#d0d0c8"; } }