mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
parent
4a154a7613
commit
245138f74d
@ -14,7 +14,7 @@ import { GameMode } from "../game-mode";
|
||||
import { QuantizerCelebi, argbFromRgba, rgbaFromArgb } from "@material/material-color-utilities";
|
||||
import { VariantSet } from "./variant";
|
||||
import i18next from "i18next";
|
||||
import { Localizable } from "#app/interfaces/locales";
|
||||
import { FusionTranslationEntry, Localizable } from "#app/interfaces/locales";
|
||||
import { Stat } from "./pokemon-stat";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import { PartyMemberStrength } from "#enums/party-member-strength";
|
||||
@ -51,18 +51,15 @@ export function getPokemonSpeciesForm(species: Species, formIndex: integer): Pok
|
||||
}
|
||||
|
||||
export function getFusedSpeciesName(speciesAName: string, speciesBName: string): string {
|
||||
// Get the fusion affixes for the species
|
||||
const speciesAFusionAffixes = fusionAffixes[speciesAName];
|
||||
const speciesBFusionAffixes = fusionAffixes[speciesBName];
|
||||
const speciesA = i18next.t(`fusionAffixes:${speciesAName}`) as FusionTranslationEntry;
|
||||
const speciesB = i18next.t(`fusionAffixes:${speciesBName}`) as FusionTranslationEntry;
|
||||
|
||||
// Get the fusion prefix and suffix for each species
|
||||
const speciesAPrefix = speciesAFusionAffixes.fusionPrefix;
|
||||
const speciesBSuffix = speciesBFusionAffixes.fusionSuffix;
|
||||
if (!speciesA || !speciesB) {
|
||||
throw new Error(`One or both species not found: ${speciesAName}, ${speciesBName}`);
|
||||
}
|
||||
|
||||
// Construct the fused species name
|
||||
const fusedSpeciesName = `${speciesAPrefix}${speciesBSuffix}`;
|
||||
|
||||
return fusedSpeciesName;
|
||||
// Combine the fusionPrefix of speciesA with the fusionSuffix of speciesB using template literals
|
||||
return `${speciesA.fusionPrefix}${speciesB.fusionSuffix}`;
|
||||
}
|
||||
|
||||
export type PokemonSpeciesFilter = (species: PokemonSpecies) => boolean;
|
||||
|
@ -37,6 +37,7 @@ import { nature } from "./nature";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { pokemonForm } from "./pokemon-form";
|
||||
import { fusionAffixes } from "./pokemon-fusion-affixes";
|
||||
import { pokemonInfo } from "./pokemon-info";
|
||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||
import { pokemonSummary } from "./pokemon-summary";
|
||||
@ -94,6 +95,7 @@ export const deConfig = {
|
||||
pokeball: pokeball,
|
||||
pokemon: pokemon,
|
||||
pokemonForm: pokemonForm,
|
||||
fusionAffixes: fusionAffixes,
|
||||
pokemonInfo: pokemonInfo,
|
||||
pokemonInfoContainer: pokemonInfoContainer,
|
||||
pokemonSummary: pokemonSummary,
|
||||
|
@ -40,6 +40,7 @@ import { partyUiHandler } from "./party-ui-handler";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { pokemonForm } from "./pokemon-form";
|
||||
import { fusionAffixes } from "./pokemon-fusion-affixes";
|
||||
import { pokemonInfo } from "./pokemon-info";
|
||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||
import { pokemonSummary } from "./pokemon-summary";
|
||||
@ -94,6 +95,7 @@ export const enConfig = {
|
||||
pokeball: pokeball,
|
||||
pokemon: pokemon,
|
||||
pokemonForm: pokemonForm,
|
||||
fusionAffixes: fusionAffixes,
|
||||
pokemonInfo: pokemonInfo,
|
||||
pokemonInfoContainer: pokemonInfoContainer,
|
||||
pokemonSummary: pokemonSummary,
|
||||
|
@ -37,6 +37,7 @@ import { nature } from "./nature";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { pokemonForm } from "./pokemon-form";
|
||||
import { fusionAffixes } from "./pokemon-fusion-affixes";
|
||||
import { pokemonInfo } from "./pokemon-info";
|
||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||
import { pokemonSummary } from "./pokemon-summary";
|
||||
@ -94,6 +95,7 @@ export const esConfig = {
|
||||
pokeball: pokeball,
|
||||
pokemon: pokemon,
|
||||
pokemonForm: pokemonForm,
|
||||
fusionAffixes: fusionAffixes,
|
||||
pokemonInfo: pokemonInfo,
|
||||
pokemonInfoContainer: pokemonInfoContainer,
|
||||
pokemonSummary: pokemonSummary,
|
||||
|
@ -37,6 +37,7 @@ import { nature } from "./nature";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { pokemonForm } from "./pokemon-form";
|
||||
import { fusionAffixes } from "./pokemon-fusion-affixes";
|
||||
import { pokemonInfo } from "./pokemon-info";
|
||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||
import { pokemonSummary } from "./pokemon-summary";
|
||||
@ -94,6 +95,7 @@ export const frConfig = {
|
||||
pokeball: pokeball,
|
||||
pokemon: pokemon,
|
||||
pokemonForm: pokemonForm,
|
||||
fusionAffixes: fusionAffixes,
|
||||
pokemonInfo: pokemonInfo,
|
||||
pokemonInfoContainer: pokemonInfoContainer,
|
||||
pokemonSummary: pokemonSummary,
|
||||
|
@ -37,6 +37,7 @@ import { nature } from "./nature";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { pokemonForm } from "./pokemon-form";
|
||||
import { fusionAffixes } from "./pokemon-fusion-affixes";
|
||||
import { pokemonInfo } from "./pokemon-info";
|
||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||
import { pokemonSummary } from "./pokemon-summary";
|
||||
@ -94,6 +95,7 @@ export const itConfig = {
|
||||
pokeball: pokeball,
|
||||
pokemon: pokemon,
|
||||
pokemonForm: pokemonForm,
|
||||
fusionAffixes: fusionAffixes,
|
||||
pokemonInfo: pokemonInfo,
|
||||
pokemonInfoContainer: pokemonInfoContainer,
|
||||
pokemonSummary: pokemonSummary,
|
||||
|
@ -37,6 +37,7 @@ import { move } from "./move";
|
||||
import { nature } from "./nature";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { fusionAffixes } from "./pokemon-fusion-affixes";
|
||||
import { pokemonInfo } from "./pokemon-info";
|
||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||
import { pokemonSummary } from "./pokemon-summary";
|
||||
@ -94,6 +95,7 @@ export const koConfig = {
|
||||
pokeball: pokeball,
|
||||
pokemon: pokemon,
|
||||
pokemonForm: pokemonForm,
|
||||
fusionAffixes: fusionAffixes,
|
||||
pokemonInfo: pokemonInfo,
|
||||
pokemonInfoContainer: pokemonInfoContainer,
|
||||
pokemonSummary: pokemonSummary,
|
||||
|
@ -40,6 +40,7 @@ import { partyUiHandler } from "./party-ui-handler";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { pokemonForm } from "./pokemon-form";
|
||||
import { fusionAffixes } from "./pokemon-fusion-affixes";
|
||||
import { pokemonInfo } from "./pokemon-info";
|
||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||
import { pokemonSummary } from "./pokemon-summary";
|
||||
@ -94,6 +95,7 @@ export const ptBrConfig = {
|
||||
pokeball: pokeball,
|
||||
pokemon: pokemon,
|
||||
pokemonForm: pokemonForm,
|
||||
fusionAffixes: fusionAffixes,
|
||||
pokemonInfo: pokemonInfo,
|
||||
pokemonInfoContainer: pokemonInfoContainer,
|
||||
pokemonSummary: pokemonSummary,
|
||||
|
@ -37,6 +37,7 @@ import { nature } from "./nature";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { pokemonForm } from "./pokemon-form";
|
||||
import { fusionAffixes } from "./pokemon-fusion-affixes";
|
||||
import { pokemonInfo } from "./pokemon-info";
|
||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||
import { pokemonSummary } from "./pokemon-summary";
|
||||
@ -94,6 +95,7 @@ export const zhCnConfig = {
|
||||
pokeball: pokeball,
|
||||
pokemon: pokemon,
|
||||
pokemonForm: pokemonForm,
|
||||
fusionAffixes: fusionAffixes,
|
||||
pokemonInfo: pokemonInfo,
|
||||
pokemonInfoContainer: pokemonInfoContainer,
|
||||
pokemonSummary: pokemonSummary,
|
||||
|
@ -37,6 +37,7 @@ import { nature } from "./nature";
|
||||
import { pokeball } from "./pokeball";
|
||||
import { pokemon } from "./pokemon";
|
||||
import { pokemonForm } from "./pokemon-form";
|
||||
import { fusionAffixes } from "./pokemon-fusion-affixes";
|
||||
import { pokemonInfo } from "./pokemon-info";
|
||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||
import { pokemonSummary } from "./pokemon-summary";
|
||||
@ -94,6 +95,7 @@ export const zhTwConfig = {
|
||||
pokeball: pokeball,
|
||||
pokemon: pokemon,
|
||||
pokemonForm: pokemonForm,
|
||||
fusionAffixes: fusionAffixes,
|
||||
pokemonInfo: pokemonInfo,
|
||||
pokemonInfoContainer: pokemonInfoContainer,
|
||||
pokemonSummary: pokemonSummary,
|
||||
|
Loading…
Reference in New Issue
Block a user