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