mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-15 12:52:20 +02:00
Merge branch 'main' into 745-localizedTrainerNames_TrainerClasses_And_Titles
This commit is contained in:
commit
e67c71607c
@ -4,6 +4,7 @@ import BattleScene from "../battle-scene";
|
||||
import { Species } from "./enums/species";
|
||||
import { getPokemonSpecies, speciesStarters } from "./pokemon-species";
|
||||
import { EggTier } from "./enums/egg-type";
|
||||
import i18next from '../plugins/i18n';
|
||||
|
||||
export const EGG_SEED = 1073741824;
|
||||
|
||||
@ -56,34 +57,34 @@ export function getEggDescriptor(egg: Egg): string {
|
||||
return 'Manaphy';
|
||||
switch (egg.tier) {
|
||||
case EggTier.GREAT:
|
||||
return 'Rare';
|
||||
return i18next.t('egg:greatTier');
|
||||
case EggTier.ULTRA:
|
||||
return 'Epic';
|
||||
return i18next.t('egg:ultraTier');
|
||||
case EggTier.MASTER:
|
||||
return 'Legendary';
|
||||
return i18next.t('egg:masterTier');
|
||||
default:
|
||||
return 'Common';
|
||||
return i18next.t('egg:defaultTier');
|
||||
}
|
||||
}
|
||||
|
||||
export function getEggHatchWavesMessage(hatchWaves: integer): string {
|
||||
if (hatchWaves <= 5)
|
||||
return 'Sounds can be heard coming from inside! It will hatch soon!';
|
||||
return i18next.t('egg:hatchWavesMessageSoon');
|
||||
if (hatchWaves <= 15)
|
||||
return 'It appears to move occasionally. It may be close to hatching.';
|
||||
return i18next.t('egg:hatchWavesMessageClose');
|
||||
if (hatchWaves <= 50)
|
||||
return 'What will hatch from this? It doesn\'t seem close to hatching.';
|
||||
return 'It looks like this Egg will take a long time to hatch.';
|
||||
return i18next.t('egg:hatchWavesMessageNotClose');
|
||||
return i18next.t('egg:hatchWavesMessageLongTime');
|
||||
}
|
||||
|
||||
export function getEggGachaTypeDescriptor(scene: BattleScene, egg: Egg): string {
|
||||
switch (egg.gachaType) {
|
||||
case GachaType.LEGENDARY:
|
||||
return `Legendary Rate Up (${getPokemonSpecies(getLegendaryGachaSpeciesForTimestamp(scene, egg.timestamp)).getName()})`;
|
||||
return `${i18next.t('egg:gachaTypeLegendary')} (${getPokemonSpecies(getLegendaryGachaSpeciesForTimestamp(scene, egg.timestamp)).getName()})`;
|
||||
case GachaType.MOVE:
|
||||
return 'Rare Egg Move Rate Up';
|
||||
return i18next.t('egg:gachaTypeMove');
|
||||
case GachaType.SHINY:
|
||||
return 'Shiny Rate Up';
|
||||
return i18next.t('egg:gachaTypeShiny');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,37 +1,45 @@
|
||||
export const battleCountSplashMessage = '{COUNT} Battles Won!';
|
||||
import i18next from "../plugins/i18n";
|
||||
|
||||
export const splashMessages = Array(10).fill(battleCountSplashMessage);
|
||||
export function getBattleCountSplashMessage(): string {
|
||||
return `{COUNT} ${i18next.t('splashMessages:battlesWon')}`;
|
||||
}
|
||||
|
||||
export function getSplashMessages(): string[] {
|
||||
const splashMessages = Array(10).fill(getBattleCountSplashMessage());
|
||||
splashMessages.push(...[
|
||||
'Join the Discord!',
|
||||
'Infinite Levels!',
|
||||
'Everything Stacks!',
|
||||
'Optional Save Scumming!',
|
||||
'35 Biomes!',
|
||||
'Open Source!',
|
||||
'Play with 5x Speed!',
|
||||
'Live Bug Testing!',
|
||||
'Heavy RoR2 Influence!',
|
||||
'Pokémon Risk and Pokémon Rain!',
|
||||
'Now with 33% More Salt!',
|
||||
'Infinite Fusion at Home!',
|
||||
'Broken Egg Moves!',
|
||||
'Magnificent!',
|
||||
'Mubstitute!',
|
||||
'That\'s Crazy!',
|
||||
'Orance Juice!',
|
||||
'Questionable Balancing!',
|
||||
'Cool Shaders!',
|
||||
'AI-Free!',
|
||||
'Sudden Difficulty Spikes!',
|
||||
'Based on an Unfinished Flash Game!',
|
||||
'More Addictive than Intended!',
|
||||
'Mostly Consistent Seeds!',
|
||||
'Achievement Points Don\'t Do Anything!',
|
||||
'You Do Not Start at Level 2000!',
|
||||
'Don\'t Talk About the Manaphy Egg Incident!',
|
||||
'Also Try Pokéngine!',
|
||||
'Also Try Emerald Rogue!',
|
||||
'Also Try Radical Red!',
|
||||
'Eevee Expo!',
|
||||
'YNOproject!'
|
||||
i18next.t('splashMessages:joinTheDiscord'),
|
||||
i18next.t('splashMessages:infiniteLevel'),
|
||||
i18next.t('splashMessages:everythingStacks'),
|
||||
i18next.t('splashMessages:optionalSaveScumming'),
|
||||
i18next.t('splashMessages:biomes'),
|
||||
i18next.t('splashMessages:openSource'),
|
||||
i18next.t('splashMessages:playWith5xSpeed'),
|
||||
i18next.t('splashMessages:liveBugTesting'),
|
||||
i18next.t('splashMessages:heavyRoR2Influence'),
|
||||
i18next.t('splashMessages:pokemonRiskAndPokemonRain'),
|
||||
i18next.t('splashMessages:nowWithMoreSalt'),
|
||||
i18next.t('splashMessages:infiniteFusionAtHome'),
|
||||
i18next.t('splashMessages:brokenEggMoves'),
|
||||
i18next.t('splashMessages:magnificent'),
|
||||
i18next.t('splashMessages:mubstitute'),
|
||||
i18next.t('splashMessages:thatsCrazy'),
|
||||
i18next.t('splashMessages:oranceJuice'),
|
||||
i18next.t('splashMessages:questionableBalancing'),
|
||||
i18next.t('splashMessages:coolShaders'),
|
||||
i18next.t('splashMessages:aiFree'),
|
||||
i18next.t('splashMessages:suddenDifficultySpikes'),
|
||||
i18next.t('splashMessages:basedOnAnUnfinishedFlashGame'),
|
||||
i18next.t('splashMessages:moreAddictiveThanIntended'),
|
||||
i18next.t('splashMessages:mostlyConsistentSeeds'),
|
||||
i18next.t('splashMessages:achievementPointsDontDoAnything'),
|
||||
i18next.t('splashMessages:youDoNotStartAtLevel'),
|
||||
i18next.t('splashMessages:dontTalkAboutTheManaphyEggIncident'),
|
||||
i18next.t('splashMessages:alsoTryPokengine'),
|
||||
i18next.t('splashMessages:alsoTryEmeraldRogue'),
|
||||
i18next.t('splashMessages:alsoTryRadicalRed'),
|
||||
i18next.t('splashMessages:eeveeExpo'),
|
||||
i18next.t('splashMessages:ynoproject'),
|
||||
]);
|
||||
|
||||
return splashMessages
|
||||
}
|
@ -2,6 +2,7 @@ import { ability } from "./ability";
|
||||
import { abilityTriggers } from "./ability-trigger";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { egg } from "./egg";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
import { growth } from "./growth";
|
||||
import { menu } from "./menu";
|
||||
@ -15,6 +16,7 @@ import { pokemonStat } from "./pokemon-stat";
|
||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||
import { tutorial } from "./tutorial";
|
||||
import { titles,trainerClasses,trainerNames } from "./trainers";
|
||||
import { splashMessages } from "./splash-messages"
|
||||
|
||||
|
||||
export const deConfig = {
|
||||
@ -22,6 +24,7 @@ export const deConfig = {
|
||||
abilityTriggers: abilityTriggers,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
egg: egg,
|
||||
fightUiHandler: fightUiHandler,
|
||||
menuUiHandler: menuUiHandler,
|
||||
menu: menu,
|
||||
@ -34,6 +37,7 @@ export const deConfig = {
|
||||
trainerClasses: trainerClasses,
|
||||
trainerNames: trainerNames,
|
||||
tutorial: tutorial,
|
||||
splashMessages: splashMessages,
|
||||
nature: nature,
|
||||
growth: growth,
|
||||
modifierType: modifierType,
|
||||
|
21
src/locales/de/egg.ts
Normal file
21
src/locales/de/egg.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const egg: SimpleTranslationEntries = {
|
||||
"egg": "Egg",
|
||||
"greatTier": "Rare",
|
||||
"ultraTier": "Epic",
|
||||
"masterTier": "Legendary",
|
||||
"defaultTier": "Common",
|
||||
"hatchWavesMessageSoon": "Sounds can be heard coming from inside! It will hatch soon!",
|
||||
"hatchWavesMessageClose": "It appears to move occasionally. It may be close to hatching.",
|
||||
"hatchWavesMessageNotClose": "What will hatch from this? It doesn't seem close to hatching.",
|
||||
"hatchWavesMessageLongTime": "It looks like this Egg will take a long time to hatch.",
|
||||
"gachaTypeLegendary": "Legendary Rate Up",
|
||||
"gachaTypeMove": "Rare Egg Move Rate Up",
|
||||
"gachaTypeShiny": "Shiny Rate Up",
|
||||
"selectMachine": "Select a machine.",
|
||||
"notEnoughVouchers": "You don't have enough vouchers!",
|
||||
"tooManyEggs": "You have too many eggs!",
|
||||
"pull": "Pull",
|
||||
"pulls": "Pulls"
|
||||
} as const;
|
37
src/locales/de/splash-messages.ts
Normal file
37
src/locales/de/splash-messages.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const splashMessages: SimpleTranslationEntries = {
|
||||
"battlesWon": "Battles Won!",
|
||||
"joinTheDiscord": "Join the Discord!",
|
||||
"infiniteLevels": "Infinite Levels!",
|
||||
"everythingStacks": "Everything Stacks!",
|
||||
"optionalSaveScumming": "Optional Save Scumming!",
|
||||
"biomes": "35 Biomes!",
|
||||
"openSource": "Open Source!",
|
||||
"playWithSpeed": "Play with 5x Speed!",
|
||||
"liveBugTesting": "Live Bug Testing!",
|
||||
"heavyInfluence": "Heavy RoR2 Influence!",
|
||||
"pokemonRiskAndPokemonRain": "Pokémon Risk and Pokémon Rain!",
|
||||
"nowWithMoreSalt": "Now with 33% More Salt!",
|
||||
"infiniteFusionAtHome": "Infinite Fusion at Home!",
|
||||
"brokenEggMoves": "Broken Egg Moves!",
|
||||
"magnificent": "Magnificent!",
|
||||
"mubstitute": "Mubstitute!",
|
||||
"thatsCrazy": "That\'s Crazy!",
|
||||
"oranceJuice": "Orance Juice!",
|
||||
"questionableBalancing": "Questionable Balancing!",
|
||||
"coolShaders": "Cool Shaders!",
|
||||
"aiFree": "AI-Free!",
|
||||
"suddenDifficultySpikes": "Sudden Difficulty Spikes!",
|
||||
"basedOnAnUnfinishedFlashGame": "Based on an Unfinished Flash Game!",
|
||||
"moreAddictiveThanIntended": "More Addictive than Intended!",
|
||||
"mostlyConsistentSeeds": "Mostly Consistent Seeds!",
|
||||
"achievementPointsDontDoAnything": "Achievement Points Don\'t Do Anything!",
|
||||
"youDoNotStartAtLevel": "You Do Not Start at Level 2000!",
|
||||
"dontTalkAboutTheManaphyEggIncident": "Don\'t Talk About the Manaphy Egg Incident!",
|
||||
"alsoTryPokengine": "Also Try Pokéngine!",
|
||||
"alsoTryEmeraldRogue": "Also Try Emerald Rogue!",
|
||||
"alsoTryRadicalRed": "Also Try Radical Red!",
|
||||
"eeveeExpo": "Eevee Expo!",
|
||||
"ynoproject": "YNOproject!",
|
||||
} as const;
|
@ -2,6 +2,7 @@ import { ability } from "./ability";
|
||||
import { abilityTriggers } from "./ability-trigger";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { egg } from "./egg";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
import { growth } from "./growth";
|
||||
import { menu } from "./menu";
|
||||
@ -15,6 +16,7 @@ import { pokemonStat } from "./pokemon-stat";
|
||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||
import { tutorial } from "./tutorial";
|
||||
import { titles,trainerClasses,trainerNames } from "./trainers";
|
||||
import { splashMessages } from "./splash-messages"
|
||||
import { weather } from "./weather";
|
||||
|
||||
|
||||
@ -23,6 +25,7 @@ export const enConfig = {
|
||||
abilityTriggers: abilityTriggers,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
egg: egg,
|
||||
fightUiHandler: fightUiHandler,
|
||||
menuUiHandler: menuUiHandler,
|
||||
menu: menu,
|
||||
@ -35,6 +38,7 @@ export const enConfig = {
|
||||
trainerClasses: trainerClasses,
|
||||
trainerNames: trainerNames,
|
||||
tutorial: tutorial,
|
||||
splashMessages: splashMessages,
|
||||
nature: nature,
|
||||
growth: growth,
|
||||
weather: weather,
|
||||
|
21
src/locales/en/egg.ts
Normal file
21
src/locales/en/egg.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const egg: SimpleTranslationEntries = {
|
||||
"egg": "Egg",
|
||||
"greatTier": "Rare",
|
||||
"ultraTier": "Epic",
|
||||
"masterTier": "Legendary",
|
||||
"defaultTier": "Common",
|
||||
"hatchWavesMessageSoon": "Sounds can be heard coming from inside! It will hatch soon!",
|
||||
"hatchWavesMessageClose": "It appears to move occasionally. It may be close to hatching.",
|
||||
"hatchWavesMessageNotClose": "What will hatch from this? It doesn't seem close to hatching.",
|
||||
"hatchWavesMessageLongTime": "It looks like this Egg will take a long time to hatch.",
|
||||
"gachaTypeLegendary": "Legendary Rate Up",
|
||||
"gachaTypeMove": "Rare Egg Move Rate Up",
|
||||
"gachaTypeShiny": "Shiny Rate Up",
|
||||
"selectMachine": "Select a machine.",
|
||||
"notEnoughVouchers": "You don't have enough vouchers!",
|
||||
"tooManyEggs": "You have too many eggs!",
|
||||
"pull": "Pull",
|
||||
"pulls": "Pulls"
|
||||
} as const;
|
37
src/locales/en/splash-messages.ts
Normal file
37
src/locales/en/splash-messages.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const splashMessages: SimpleTranslationEntries = {
|
||||
"battlesWon": "Battles Won!",
|
||||
"joinTheDiscord": "Join the Discord!",
|
||||
"infiniteLevels": "Infinite Levels!",
|
||||
"everythingStacks": "Everything Stacks!",
|
||||
"optionalSaveScumming": "Optional Save Scumming!",
|
||||
"biomes": "35 Biomes!",
|
||||
"openSource": "Open Source!",
|
||||
"playWithSpeed": "Play with 5x Speed!",
|
||||
"liveBugTesting": "Live Bug Testing!",
|
||||
"heavyInfluence": "Heavy RoR2 Influence!",
|
||||
"pokemonRiskAndPokemonRain": "Pokémon Risk and Pokémon Rain!",
|
||||
"nowWithMoreSalt": "Now with 33% More Salt!",
|
||||
"infiniteFusionAtHome": "Infinite Fusion at Home!",
|
||||
"brokenEggMoves": "Broken Egg Moves!",
|
||||
"magnificent": "Magnificent!",
|
||||
"mubstitute": "Mubstitute!",
|
||||
"thatsCrazy": "That\'s Crazy!",
|
||||
"oranceJuice": "Orance Juice!",
|
||||
"questionableBalancing": "Questionable Balancing!",
|
||||
"coolShaders": "Cool Shaders!",
|
||||
"aiFree": "AI-Free!",
|
||||
"suddenDifficultySpikes": "Sudden Difficulty Spikes!",
|
||||
"basedOnAnUnfinishedFlashGame": "Based on an Unfinished Flash Game!",
|
||||
"moreAddictiveThanIntended": "More Addictive than Intended!",
|
||||
"mostlyConsistentSeeds": "Mostly Consistent Seeds!",
|
||||
"achievementPointsDontDoAnything": "Achievement Points Don\'t Do Anything!",
|
||||
"youDoNotStartAtLevel": "You Do Not Start at Level 2000!",
|
||||
"dontTalkAboutTheManaphyEggIncident": "Don\'t Talk About the Manaphy Egg Incident!",
|
||||
"alsoTryPokengine": "Also Try Pokéngine!",
|
||||
"alsoTryEmeraldRogue": "Also Try Emerald Rogue!",
|
||||
"alsoTryRadicalRed": "Also Try Radical Red!",
|
||||
"eeveeExpo": "Eevee Expo!",
|
||||
"ynoproject": "YNOproject!",
|
||||
} as const;
|
@ -2,6 +2,7 @@ import { ability } from "./ability";
|
||||
import { abilityTriggers } from "./ability-trigger";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { egg } from "./egg";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
import { growth } from "./growth";
|
||||
import { menu } from "./menu";
|
||||
@ -15,6 +16,7 @@ import { pokemonStat } from "./pokemon-stat";
|
||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||
import { tutorial } from "./tutorial";
|
||||
import { titles,trainerClasses,trainerNames } from "./trainers";
|
||||
import { splashMessages } from "./splash-messages"
|
||||
import { weather } from "./weather";
|
||||
|
||||
|
||||
@ -23,6 +25,7 @@ export const esConfig = {
|
||||
abilityTriggers: abilityTriggers,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
egg: egg,
|
||||
fightUiHandler: fightUiHandler,
|
||||
menuUiHandler: menuUiHandler,
|
||||
menu: menu,
|
||||
@ -35,6 +38,7 @@ export const esConfig = {
|
||||
trainerClasses: trainerClasses,
|
||||
trainerNames: trainerNames,
|
||||
tutorial: tutorial,
|
||||
splashMessages: splashMessages,
|
||||
nature: nature,
|
||||
growth: growth,
|
||||
weather: weather,
|
||||
|
21
src/locales/es/egg.ts
Normal file
21
src/locales/es/egg.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const egg: SimpleTranslationEntries = {
|
||||
"egg": "Egg",
|
||||
"greatTier": "Rare",
|
||||
"ultraTier": "Epic",
|
||||
"masterTier": "Legendary",
|
||||
"defaultTier": "Common",
|
||||
"hatchWavesMessageSoon": "Sounds can be heard coming from inside! It will hatch soon!",
|
||||
"hatchWavesMessageClose": "It appears to move occasionally. It may be close to hatching.",
|
||||
"hatchWavesMessageNotClose": "What will hatch from this? It doesn't seem close to hatching.",
|
||||
"hatchWavesMessageLongTime": "It looks like this Egg will take a long time to hatch.",
|
||||
"gachaTypeLegendary": "Legendary Rate Up",
|
||||
"gachaTypeMove": "Rare Egg Move Rate Up",
|
||||
"gachaTypeShiny": "Shiny Rate Up",
|
||||
"selectMachine": "Select a machine.",
|
||||
"notEnoughVouchers": "You don't have enough vouchers!",
|
||||
"tooManyEggs": "You have too many eggs!",
|
||||
"pull": "Pull",
|
||||
"pulls": "Pulls"
|
||||
} as const;
|
37
src/locales/es/splash-messages.ts
Normal file
37
src/locales/es/splash-messages.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const splashMessages: SimpleTranslationEntries = {
|
||||
"battlesWon": "Battles Won!",
|
||||
"joinTheDiscord": "Join the Discord!",
|
||||
"infiniteLevels": "Infinite Levels!",
|
||||
"everythingStacks": "Everything Stacks!",
|
||||
"optionalSaveScumming": "Optional Save Scumming!",
|
||||
"biomes": "35 Biomes!",
|
||||
"openSource": "Open Source!",
|
||||
"playWithSpeed": "Play with 5x Speed!",
|
||||
"liveBugTesting": "Live Bug Testing!",
|
||||
"heavyInfluence": "Heavy RoR2 Influence!",
|
||||
"pokemonRiskAndPokemonRain": "Pokémon Risk and Pokémon Rain!",
|
||||
"nowWithMoreSalt": "Now with 33% More Salt!",
|
||||
"infiniteFusionAtHome": "Infinite Fusion at Home!",
|
||||
"brokenEggMoves": "Broken Egg Moves!",
|
||||
"magnificent": "Magnificent!",
|
||||
"mubstitute": "Mubstitute!",
|
||||
"thatsCrazy": "That\'s Crazy!",
|
||||
"oranceJuice": "Orance Juice!",
|
||||
"questionableBalancing": "Questionable Balancing!",
|
||||
"coolShaders": "Cool Shaders!",
|
||||
"aiFree": "AI-Free!",
|
||||
"suddenDifficultySpikes": "Sudden Difficulty Spikes!",
|
||||
"basedOnAnUnfinishedFlashGame": "Based on an Unfinished Flash Game!",
|
||||
"moreAddictiveThanIntended": "More Addictive than Intended!",
|
||||
"mostlyConsistentSeeds": "Mostly Consistent Seeds!",
|
||||
"achievementPointsDontDoAnything": "Achievement Points Don\'t Do Anything!",
|
||||
"youDoNotStartAtLevel": "You Do Not Start at Level 2000!",
|
||||
"dontTalkAboutTheManaphyEggIncident": "Don\'t Talk About the Manaphy Egg Incident!",
|
||||
"alsoTryPokengine": "Also Try Pokéngine!",
|
||||
"alsoTryEmeraldRogue": "Also Try Emerald Rogue!",
|
||||
"alsoTryRadicalRed": "Also Try Radical Red!",
|
||||
"eeveeExpo": "Eevee Expo!",
|
||||
"ynoproject": "YNOproject!",
|
||||
} as const;
|
@ -2,6 +2,7 @@ import { ability } from "./ability";
|
||||
import { abilityTriggers } from "./ability-trigger";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { egg } from "./egg";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
import { growth } from "./growth";
|
||||
import { menu } from "./menu";
|
||||
@ -15,6 +16,7 @@ import { pokemonStat } from "./pokemon-stat";
|
||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||
import { tutorial } from "./tutorial";
|
||||
import { titles,trainerClasses,trainerNames } from "./trainers";
|
||||
import { splashMessages } from "./splash-messages"
|
||||
import { weather } from "./weather";
|
||||
|
||||
|
||||
@ -24,6 +26,7 @@ export const frConfig = {
|
||||
abilityTriggers: abilityTriggers,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
egg: egg,
|
||||
fightUiHandler: fightUiHandler,
|
||||
menuUiHandler: menuUiHandler,
|
||||
menu: menu,
|
||||
@ -36,6 +39,7 @@ export const frConfig = {
|
||||
trainerClasses: trainerClasses,
|
||||
trainerNames: trainerNames,
|
||||
tutorial: tutorial,
|
||||
splashMessages: splashMessages,
|
||||
nature: nature,
|
||||
growth: growth,
|
||||
weather: weather,
|
||||
|
21
src/locales/fr/egg.ts
Normal file
21
src/locales/fr/egg.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const egg: SimpleTranslationEntries = {
|
||||
"egg": "Œuf",
|
||||
"greatTier": "Rare",
|
||||
"ultraTier": "Épique",
|
||||
"masterTier": "Légendaire",
|
||||
"defaultTier": "Commun",
|
||||
"hatchWavesMessageSoon": "Il fait du bruit. Il va éclore !",
|
||||
"hatchWavesMessageClose": "Il bouge de temps en temps. Il devrait bientôt éclore.",
|
||||
"hatchWavesMessageNotClose": "Qu’est-ce qui va en sortir ? Ça va mettre du temps.",
|
||||
"hatchWavesMessageLongTime": "Cet Œuf va sûrement mettre du temps à éclore.",
|
||||
"gachaTypeLegendary": "Taux de Légendaires élevé",
|
||||
"gachaTypeMove": "Taux de Capacité Œuf Rare élevé",
|
||||
"gachaTypeShiny": "Taux de Chromatiques élevé",
|
||||
"selectMachine": "Sélectionnez une machine.",
|
||||
"notEnoughVouchers": "Vous n’avez pas assez de coupons !",
|
||||
"tooManyEggs": "Vous avez trop d’Œufs !",
|
||||
"pull": "Tirage",
|
||||
"pulls": "Tirages"
|
||||
} as const;
|
37
src/locales/fr/splash-messages.ts
Normal file
37
src/locales/fr/splash-messages.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const splashMessages: SimpleTranslationEntries = {
|
||||
"battlesWon": "Battles Won!",
|
||||
"joinTheDiscord": "Join the Discord!",
|
||||
"infiniteLevels": "Infinite Levels!",
|
||||
"everythingStacks": "Everything Stacks!",
|
||||
"optionalSaveScumming": "Optional Save Scumming!",
|
||||
"biomes": "35 Biomes!",
|
||||
"openSource": "Open Source!",
|
||||
"playWithSpeed": "Play with 5x Speed!",
|
||||
"liveBugTesting": "Live Bug Testing!",
|
||||
"heavyInfluence": "Heavy RoR2 Influence!",
|
||||
"pokemonRiskAndPokemonRain": "Pokémon Risk and Pokémon Rain!",
|
||||
"nowWithMoreSalt": "Now with 33% More Salt!",
|
||||
"infiniteFusionAtHome": "Infinite Fusion at Home!",
|
||||
"brokenEggMoves": "Broken Egg Moves!",
|
||||
"magnificent": "Magnificent!",
|
||||
"mubstitute": "Mubstitute!",
|
||||
"thatsCrazy": "That\'s Crazy!",
|
||||
"oranceJuice": "Orance Juice!",
|
||||
"questionableBalancing": "Questionable Balancing!",
|
||||
"coolShaders": "Cool Shaders!",
|
||||
"aiFree": "AI-Free!",
|
||||
"suddenDifficultySpikes": "Sudden Difficulty Spikes!",
|
||||
"basedOnAnUnfinishedFlashGame": "Based on an Unfinished Flash Game!",
|
||||
"moreAddictiveThanIntended": "More Addictive than Intended!",
|
||||
"mostlyConsistentSeeds": "Mostly Consistent Seeds!",
|
||||
"achievementPointsDontDoAnything": "Achievement Points Don\'t Do Anything!",
|
||||
"youDoNotStartAtLevel": "You Do Not Start at Level 2000!",
|
||||
"dontTalkAboutTheManaphyEggIncident": "Don\'t Talk About the Manaphy Egg Incident!",
|
||||
"alsoTryPokengine": "Also Try Pokéngine!",
|
||||
"alsoTryEmeraldRogue": "Also Try Emerald Rogue!",
|
||||
"alsoTryRadicalRed": "Also Try Radical Red!",
|
||||
"eeveeExpo": "Eevee Expo!",
|
||||
"ynoproject": "YNOproject!",
|
||||
} as const;
|
@ -2,6 +2,7 @@ import { ability } from "./ability";
|
||||
import { abilityTriggers } from "./ability-trigger";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { egg } from "./egg";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
import { growth } from "./growth";
|
||||
import { menu } from "./menu";
|
||||
@ -15,6 +16,7 @@ import { pokemonStat } from "./pokemon-stat";
|
||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||
import { tutorial } from "./tutorial";
|
||||
import { titles,trainerClasses,trainerNames } from "./trainers";
|
||||
import { splashMessages } from "./splash-messages"
|
||||
import { weather } from "./weather";
|
||||
|
||||
|
||||
@ -23,6 +25,7 @@ export const itConfig = {
|
||||
abilityTriggers: abilityTriggers,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
egg: egg,
|
||||
fightUiHandler: fightUiHandler,
|
||||
menuUiHandler: menuUiHandler,
|
||||
menu: menu,
|
||||
@ -35,6 +38,7 @@ export const itConfig = {
|
||||
trainerClasses: trainerClasses,
|
||||
trainerNames: trainerNames,
|
||||
tutorial: tutorial,
|
||||
splashMessages: splashMessages,
|
||||
nature: nature,
|
||||
growth: growth,
|
||||
weather: weather,
|
||||
|
21
src/locales/it/egg.ts
Normal file
21
src/locales/it/egg.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const egg: SimpleTranslationEntries = {
|
||||
"egg": "Egg",
|
||||
"greatTier": "Rare",
|
||||
"ultraTier": "Epic",
|
||||
"masterTier": "Legendary",
|
||||
"defaultTier": "Common",
|
||||
"hatchWavesMessageSoon": "Sounds can be heard coming from inside! It will hatch soon!",
|
||||
"hatchWavesMessageClose": "It appears to move occasionally. It may be close to hatching.",
|
||||
"hatchWavesMessageNotClose": "What will hatch from this? It doesn't seem close to hatching.",
|
||||
"hatchWavesMessageLongTime": "It looks like this Egg will take a long time to hatch.",
|
||||
"gachaTypeLegendary": "Legendary Rate Up",
|
||||
"gachaTypeMove": "Rare Egg Move Rate Up",
|
||||
"gachaTypeShiny": "Shiny Rate Up",
|
||||
"selectMachine": "Select a machine.",
|
||||
"notEnoughVouchers": "You don't have enough vouchers!",
|
||||
"tooManyEggs": "You have too many eggs!",
|
||||
"pull": "Pull",
|
||||
"pulls": "Pulls"
|
||||
} as const;
|
37
src/locales/it/splash-messages.ts
Normal file
37
src/locales/it/splash-messages.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const splashMessages: SimpleTranslationEntries = {
|
||||
"battlesWon": "Battaglie Vinte!",
|
||||
"joinTheDiscord": "Entra nel Discord!",
|
||||
"infiniteLevels": "Livelli Infiniti!",
|
||||
"everythingStacks": "Tutto si impila!",
|
||||
"optionalSaveScumming": "Salvataggio Facoltativo!",
|
||||
"biomes": "35 Biomi!",
|
||||
"openSource": "Open Source!",
|
||||
"playWithSpeed": "Gioca con il 5x di Velocità!",
|
||||
"liveBugTesting": "Test dei Bug in Tempo Reale!",
|
||||
"heavyInfluence": "Influenzato da RoR2!",
|
||||
"pokemonRiskAndPokemonRain": "Pokémon Risk e Pokémon Rain!",
|
||||
"nowWithMoreSalt": "Adesso con il 33% di sale in più!",
|
||||
"infiniteFusionAtHome": "Fusioni Infinite a Casa!",
|
||||
"brokenEggMoves": "Mosse delle Uova Rotte!",
|
||||
"magnificent": "Magnifico!",
|
||||
"mubstitute": "Mubstitute!",
|
||||
"thatsCrazy": "È Pazzesco!",
|
||||
"oranceJuice": "Succo d\'Arancia!",
|
||||
"questionableBalancing": "Bilanciamento Discutibile!",
|
||||
"coolShaders": "Shader fantastici!",
|
||||
"aiFree": "Senza Intelligenza Artificiale!",
|
||||
"suddenDifficultySpikes": "Picchi di Difficoltà Improvvisi!",
|
||||
"basedOnAnUnfinishedFlashGame": "Basato su un Gioco Flash Incompiuto!",
|
||||
"moreAddictiveThanIntended": "Crea Dipendeza più del Dovuto!",
|
||||
"mostlyConsistentSeeds": "Seeds Consistenti!",
|
||||
"achievementPointsDontDoAnything": "I Punti Obiettivo non Fanno Nulla!",
|
||||
"youDoNotStartAtLevel": "Non Cominci dal Livello 2000!",
|
||||
"dontTalkAboutTheManaphyEggIncident": "Non Parlare dell'Incidente dell'Uovo di Manaphy!",
|
||||
"alsoTryPokengine": "Prova anche Pokéngine!",
|
||||
"alsoTryEmeraldRogue": "Prova anche Emerald Rogue!",
|
||||
"alsoTryRadicalRed": "Prova anche Radical Red!",
|
||||
"eeveeExpo": "Eevee Expo!",
|
||||
"ynoproject": "YNOproject!",
|
||||
} as const;
|
@ -133,8 +133,10 @@ declare module 'i18next' {
|
||||
trainerNames: SimpleTranslationEntries;
|
||||
tutorial: SimpleTranslationEntries;
|
||||
starterSelectUiHandler: SimpleTranslationEntries;
|
||||
splashMessages: SimpleTranslationEntries;
|
||||
nature: SimpleTranslationEntries;
|
||||
growth: SimpleTranslationEntries;
|
||||
egg: SimpleTranslationEntries;
|
||||
weather: SimpleTranslationEntries;
|
||||
modifierType: ModifierTypeTranslationEntries;
|
||||
};
|
||||
|
@ -10,8 +10,7 @@ import { addWindow } from "./ui-theme";
|
||||
import { Tutorial, handleTutorial } from "../tutorial";
|
||||
import { EggTier } from "../data/enums/egg-type";
|
||||
import {Button} from "../enums/buttons";
|
||||
|
||||
const defaultText = 'Select a machine.';
|
||||
import i18next from '../plugins/i18n';
|
||||
|
||||
export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
private eggGachaContainer: Phaser.GameObjects.Container;
|
||||
@ -33,6 +32,7 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
private cursorObj: Phaser.GameObjects.Image;
|
||||
private transitioning: boolean;
|
||||
private transitionCancelled: boolean;
|
||||
private defaultText: string;
|
||||
|
||||
constructor(scene: BattleScene) {
|
||||
super(scene, Mode.EGG_GACHA);
|
||||
@ -43,6 +43,7 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
this.gachaInfoContainers = [];
|
||||
|
||||
this.voucherCountLabels = [];
|
||||
this.defaultText = i18next.t('egg:selectMachine');
|
||||
}
|
||||
|
||||
setup() {
|
||||
@ -151,8 +152,27 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
this.eggGachaOptionSelectBg.setOrigin(1, 1);
|
||||
this.eggGachaOptionsContainer.add(this.eggGachaOptionSelectBg);
|
||||
|
||||
const optionText = addTextObject(this.scene, 0, 0, ' x1 1 Pull\n x10 10 Pulls\n x1 5 Pulls\n x1 10 Pulls\n x1 25 Pulls\nCancel', TextStyle.WINDOW);
|
||||
optionText.setLineSpacing(12);
|
||||
const pullOptions = [
|
||||
{ multiplier: 'x1', description: `1 ${i18next.t('egg:pull')}` },
|
||||
{ multiplier: 'x10', description: `10 ${i18next.t('egg:pulls')}` },
|
||||
{ multiplier: 'x1', description: `5 ${i18next.t('egg:pulls')}` },
|
||||
{ multiplier: 'x1', description: `10 ${i18next.t('egg:pulls')}` },
|
||||
{ multiplier: 'x1', description: `25 ${i18next.t('egg:pulls')}` }
|
||||
];
|
||||
|
||||
const pullOptionsText = pullOptions.map(option => ` ${option.multiplier.padEnd(4)} ${option.description}`).join('\n');
|
||||
|
||||
const optionText = addTextObject(
|
||||
this.scene,
|
||||
0,
|
||||
0,
|
||||
`${pullOptionsText}\n${i18next.t('menu:cancel')}`,
|
||||
TextStyle.WINDOW,
|
||||
);
|
||||
|
||||
optionText.setLineSpacing(28);
|
||||
optionText.setFontSize('80px');
|
||||
|
||||
this.eggGachaOptionsContainer.add(optionText);
|
||||
|
||||
optionText.setPositionRelative(this.eggGachaOptionSelectBg, 16, 9);
|
||||
@ -223,7 +243,7 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
show(args: any[]): boolean {
|
||||
super.show(args);
|
||||
|
||||
this.getUi().showText(defaultText, 0);
|
||||
this.getUi().showText(this.defaultText, 0);
|
||||
|
||||
this.setGachaCursor(1);
|
||||
|
||||
@ -474,7 +494,7 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
|
||||
showText(text: string, delay?: number, callback?: Function, callbackDelay?: number, prompt?: boolean, promptDelay?: number): void {
|
||||
if (!text)
|
||||
text = defaultText;
|
||||
text = this.defaultText;
|
||||
|
||||
if (text?.indexOf('\n') === -1) {
|
||||
this.eggGachaMessageBox.setSize(320, 32);
|
||||
@ -490,7 +510,7 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
}
|
||||
|
||||
showError(text: string): void {
|
||||
this.showText(text, null, () => this.showText(defaultText), Utils.fixedInt(1500));
|
||||
this.showText(text, null, () => this.showText(this.defaultText), Utils.fixedInt(1500));
|
||||
}
|
||||
|
||||
setTransitioning(transitioning: boolean): void {
|
||||
@ -526,27 +546,27 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
case 0:
|
||||
if (!this.scene.gameData.voucherCounts[VoucherType.REGULAR]) {
|
||||
error = true;
|
||||
this.showError('You don\'t have enough vouchers!');
|
||||
this.showError(i18next.t('egg:notEnoughVouchers'));
|
||||
} else if (this.scene.gameData.eggs.length < 99) {
|
||||
this.consumeVouchers(VoucherType.REGULAR, 1);
|
||||
this.pull();
|
||||
success = true;
|
||||
} else {
|
||||
error = true;
|
||||
this.showError('You have too many eggs!');
|
||||
this.showError(i18next.t('egg:tooManyEggs'));
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!this.scene.gameData.voucherCounts[VoucherType.PLUS]) {
|
||||
error = true;
|
||||
this.showError('You don\'t have enough vouchers!');
|
||||
this.showError(i18next.t('egg:notEnoughVouchers'));
|
||||
} else if (this.scene.gameData.eggs.length < 95) {
|
||||
this.consumeVouchers(VoucherType.PLUS, 1);
|
||||
this.pull(5);
|
||||
success = true;
|
||||
} else {
|
||||
error = true;
|
||||
this.showError('You have too many eggs!');
|
||||
this.showError(i18next.t('egg:tooManyEggs'));
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
@ -554,7 +574,7 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
if ((this.cursor === 1 && this.scene.gameData.voucherCounts[VoucherType.REGULAR] < 10)
|
||||
|| (this.cursor === 3 && !this.scene.gameData.voucherCounts[VoucherType.PREMIUM])) {
|
||||
error = true;
|
||||
this.showError('You don\'t have enough vouchers!');
|
||||
this.showError(i18next.t('egg:notEnoughVouchers'));
|
||||
} else if (this.scene.gameData.eggs.length < 90) {
|
||||
if (this.cursor === 3)
|
||||
this.consumeVouchers(VoucherType.PREMIUM, 1);
|
||||
@ -564,20 +584,20 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
success = true;
|
||||
} else {
|
||||
error = true;
|
||||
this.showError('You have too many eggs!');
|
||||
this.showError(i18next.t('egg:tooManyEggs'));
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (!this.scene.gameData.voucherCounts[VoucherType.GOLDEN]) {
|
||||
error = true;
|
||||
this.showError('You don\'t have enough vouchers!');
|
||||
this.showError(i18next.t('egg:notEnoughVouchers'));
|
||||
} else if (this.scene.gameData.eggs.length < 75) {
|
||||
this.consumeVouchers(VoucherType.GOLDEN, 1);
|
||||
this.pull(25);
|
||||
success = true;
|
||||
} else {
|
||||
error = true;
|
||||
this.showError('You have too many eggs!');
|
||||
this.showError(i18next.t('egg:tooManyEggs'));
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
|
@ -7,6 +7,7 @@ import { EGG_SEED, Egg, GachaType, getEggGachaTypeDescriptor, getEggHatchWavesMe
|
||||
import * as Utils from "../utils";
|
||||
import { addWindow } from "./ui-theme";
|
||||
import {Button} from "../enums/buttons";
|
||||
import i18next from '../plugins/i18n';
|
||||
|
||||
export default class EggListUiHandler extends MessageUiHandler {
|
||||
private eggListContainer: Phaser.GameObjects.Container;
|
||||
@ -165,7 +166,7 @@ export default class EggListUiHandler extends MessageUiHandler {
|
||||
|
||||
setEggDetails(egg: Egg): void {
|
||||
this.eggSprite.setFrame(`egg_${egg.getKey()}`);
|
||||
this.eggNameText.setText(`Egg (${getEggDescriptor(egg)})`);
|
||||
this.eggNameText.setText(`${i18next.t('egg:egg')} (${getEggDescriptor(egg)})`);
|
||||
this.eggDateText.setText(
|
||||
new Date(egg.timestamp).toLocaleString(undefined, {
|
||||
weekday: 'short',
|
||||
|
@ -4,7 +4,7 @@ import OptionSelectUiHandler from "./option-select-ui-handler";
|
||||
import { Mode } from "./ui";
|
||||
import * as Utils from "../utils";
|
||||
import { TextStyle, addTextObject } from "./text";
|
||||
import { battleCountSplashMessage, splashMessages } from "../data/splash-messages";
|
||||
import { getBattleCountSplashMessage, getSplashMessages } from "../data/splash-messages";
|
||||
import i18next from "i18next";
|
||||
|
||||
export default class TitleUiHandler extends OptionSelectUiHandler {
|
||||
@ -63,8 +63,8 @@ export default class TitleUiHandler extends OptionSelectUiHandler {
|
||||
.then(request => request.json())
|
||||
.then(stats => {
|
||||
this.playerCountLabel.setText(`${stats.playerCount} ${i18next.t("menu:playersOnline")}`);
|
||||
if (this.splashMessage === battleCountSplashMessage)
|
||||
this.splashMessageText.setText(battleCountSplashMessage.replace('{COUNT}', stats.battleCount.toLocaleString('en-US')));
|
||||
if (this.splashMessage === getBattleCountSplashMessage())
|
||||
this.splashMessageText.setText(getBattleCountSplashMessage().replace('{COUNT}', stats.battleCount.toLocaleString('en-US')));
|
||||
})
|
||||
.catch(err => {
|
||||
console.error("Failed to fetch title stats:\n", err);
|
||||
@ -75,7 +75,7 @@ export default class TitleUiHandler extends OptionSelectUiHandler {
|
||||
const ret = super.show(args);
|
||||
|
||||
if (ret) {
|
||||
this.splashMessage = Utils.randItem(splashMessages);
|
||||
this.splashMessage = Utils.randItem(getSplashMessages());
|
||||
this.splashMessageText.setText(this.splashMessage.replace('{COUNT}', '?'));
|
||||
|
||||
const ui = this.getUi();
|
||||
|
Loading…
Reference in New Issue
Block a user