mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 08:22:16 +02:00
Compare commits
18 Commits
3ef495c126
...
dd40c8caa2
Author | SHA1 | Date | |
---|---|---|---|
|
dd40c8caa2 | ||
|
c301a54039 | ||
|
0af0ad5b49 | ||
|
3f9eaf4a5d | ||
|
5e5ece868c | ||
|
281f0df220 | ||
|
751e28d2fc | ||
|
66734c396b | ||
|
40727bdc16 | ||
|
480a2568a9 | ||
|
7cee16cee2 | ||
|
3c94d5aa83 | ||
|
1fdfc6256f | ||
|
a4cb75aaf0 | ||
|
bd5d16802a | ||
|
64d36c9864 | ||
|
2d9f05030b | ||
|
b4cf80a984 |
@ -11,6 +11,7 @@
|
|||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"test:cov": "vitest run --coverage",
|
"test:cov": "vitest run --coverage",
|
||||||
"test:watch": "vitest watch --coverage",
|
"test:watch": "vitest watch --coverage",
|
||||||
|
"test:silent": "vitest run --silent",
|
||||||
"eslint": "eslint --fix .",
|
"eslint": "eslint --fix .",
|
||||||
"eslint-ci": "eslint .",
|
"eslint-ci": "eslint .",
|
||||||
"docs": "typedoc"
|
"docs": "typedoc"
|
||||||
|
@ -155,6 +155,13 @@ export default class BattleScene extends SceneBase {
|
|||||||
*/
|
*/
|
||||||
public battleStyle: integer = 0;
|
public battleStyle: integer = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines whether or not to show type effectiveness hints
|
||||||
|
* - true: No hints
|
||||||
|
* - false: Show hints for moves
|
||||||
|
*/
|
||||||
|
public typeHints: boolean = false;
|
||||||
|
|
||||||
public disableMenu: boolean = false;
|
public disableMenu: boolean = false;
|
||||||
|
|
||||||
public gameData: GameData;
|
public gameData: GameData;
|
||||||
@ -1010,7 +1017,8 @@ export default class BattleScene extends SceneBase {
|
|||||||
if (Overrides.DOUBLE_BATTLE_OVERRIDE) {
|
if (Overrides.DOUBLE_BATTLE_OVERRIDE) {
|
||||||
newDouble = true;
|
newDouble = true;
|
||||||
}
|
}
|
||||||
if (Overrides.SINGLE_BATTLE_OVERRIDE) {
|
/* Override battles into single only if not fighting with trainers */
|
||||||
|
if (newBattleType !== BattleType.TRAINER && Overrides.SINGLE_BATTLE_OVERRIDE) {
|
||||||
newDouble = false;
|
newDouble = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2949,6 +2949,7 @@ export class ArenaTrapAbAttr extends CheckTrappedAbAttr {
|
|||||||
/**
|
/**
|
||||||
* Checks if enemy Pokemon is trapped by an Arena Trap-esque ability
|
* Checks if enemy Pokemon is trapped by an Arena Trap-esque ability
|
||||||
* If the enemy is a Ghost type, it is not trapped
|
* If the enemy is a Ghost type, it is not trapped
|
||||||
|
* If the enemy has the ability Run Away, it is not trapped.
|
||||||
* If the user has Magnet Pull and the enemy is not a Steel type, it is not trapped.
|
* If the user has Magnet Pull and the enemy is not a Steel type, it is not trapped.
|
||||||
* If the user has Arena Trap and the enemy is not grounded, it is not trapped.
|
* If the user has Arena Trap and the enemy is not grounded, it is not trapped.
|
||||||
* @param pokemon The {@link Pokemon} with this {@link AbAttr}
|
* @param pokemon The {@link Pokemon} with this {@link AbAttr}
|
||||||
@ -2963,6 +2964,9 @@ export class ArenaTrapAbAttr extends CheckTrappedAbAttr {
|
|||||||
if (otherPokemon.getTypes(true).includes(Type.GHOST) || (otherPokemon.getTypes(true).includes(Type.STELLAR) && otherPokemon.getTypes().includes(Type.GHOST))) {
|
if (otherPokemon.getTypes(true).includes(Type.GHOST) || (otherPokemon.getTypes(true).includes(Type.STELLAR) && otherPokemon.getTypes().includes(Type.GHOST))) {
|
||||||
trapped.value = false;
|
trapped.value = false;
|
||||||
return false;
|
return false;
|
||||||
|
} else if (otherPokemon.hasAbility(Abilities.RUN_AWAY)) {
|
||||||
|
trapped.value = false;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
trapped.value = true;
|
trapped.value = true;
|
||||||
return true;
|
return true;
|
||||||
|
@ -501,6 +501,52 @@ export function getTypeDamageMultiplier(attackType: integer, defType: integer):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the color corresponding to a specific damage multiplier
|
||||||
|
* @returns A color or undefined if the default color should be used
|
||||||
|
*/
|
||||||
|
export function getTypeDamageMultiplierColor(multiplier: TypeDamageMultiplier, side: "defense" | "offense"): string | undefined {
|
||||||
|
if (side === "offense") {
|
||||||
|
switch (multiplier) {
|
||||||
|
case 0:
|
||||||
|
return "#929292";
|
||||||
|
case 0.125:
|
||||||
|
return "#FF5500";
|
||||||
|
case 0.25:
|
||||||
|
return "#FF7400";
|
||||||
|
case 0.5:
|
||||||
|
return "#FE8E00";
|
||||||
|
case 1:
|
||||||
|
return undefined;
|
||||||
|
case 2:
|
||||||
|
return "#4AA500";
|
||||||
|
case 4:
|
||||||
|
return "#4BB400";
|
||||||
|
case 8:
|
||||||
|
return "#52C200";
|
||||||
|
}
|
||||||
|
} else if (side === "defense") {
|
||||||
|
switch (multiplier) {
|
||||||
|
case 0:
|
||||||
|
return "#B1B100";
|
||||||
|
case 0.125:
|
||||||
|
return "#2DB4FF";
|
||||||
|
case 0.25:
|
||||||
|
return "#00A4FF";
|
||||||
|
case 0.5:
|
||||||
|
return "#0093FF";
|
||||||
|
case 1:
|
||||||
|
return undefined;
|
||||||
|
case 2:
|
||||||
|
return "#FE8E00";
|
||||||
|
case 4:
|
||||||
|
return "#FF7400";
|
||||||
|
case 8:
|
||||||
|
return "#FF5500";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export function getTypeRgb(type: Type): [ integer, integer, integer ] {
|
export function getTypeRgb(type: Type): [ integer, integer, integer ] {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Type.NORMAL:
|
case Type.NORMAL:
|
||||||
|
@ -1069,6 +1069,17 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
return !this.isOfType(Type.FLYING, true, true) && !this.hasAbility(Abilities.LEVITATE);
|
return !this.isOfType(Type.FLYING, true, true) && !this.hasAbility(Abilities.LEVITATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns The type damage multiplier or undefined if it's a status move
|
||||||
|
*/
|
||||||
|
getMoveEffectiveness(source: Pokemon, move: PokemonMove): TypeDamageMultiplier | undefined {
|
||||||
|
if (move.getMove().category === MoveCategory.STATUS) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.getAttackMoveEffectiveness(source, move);
|
||||||
|
}
|
||||||
|
|
||||||
getAttackMoveEffectiveness(source: Pokemon, pokemonMove: PokemonMove): TypeDamageMultiplier {
|
getAttackMoveEffectiveness(source: Pokemon, pokemonMove: PokemonMove): TypeDamageMultiplier {
|
||||||
const move = pokemonMove.getMove();
|
const move = pokemonMove.getMove();
|
||||||
const typeless = move.hasAttr(TypelessAttr);
|
const typeless = move.hasAttr(TypelessAttr);
|
||||||
@ -1588,11 +1599,20 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
return this.battleInfo.updateInfo(this, instant);
|
return this.battleInfo.updateInfo(this, instant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show or hide the type effectiveness multiplier window
|
||||||
|
* Passing undefined will hide the window
|
||||||
|
*/
|
||||||
|
updateEffectiveness(effectiveness?: string) {
|
||||||
|
this.battleInfo.updateEffectiveness(effectiveness);
|
||||||
|
}
|
||||||
|
|
||||||
toggleStats(visible: boolean): void {
|
toggleStats(visible: boolean): void {
|
||||||
this.battleInfo.toggleStats(visible);
|
this.battleInfo.toggleStats(visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleFlyout(visible: boolean): void {
|
toggleFlyout(visible: boolean): void {
|
||||||
this.battleInfo.flyoutMenu?.toggleFlyout(visible);
|
this.battleInfo.toggleFlyout(visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
addExp(exp: integer) {
|
addExp(exp: integer) {
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
|
import i18next from "i18next";
|
||||||
import { classicFixedBattles, FixedBattleConfig, FixedBattleConfigs } from "./battle";
|
import { classicFixedBattles, FixedBattleConfig, FixedBattleConfigs } from "./battle";
|
||||||
import BattleScene from "./battle-scene";
|
import BattleScene from "./battle-scene";
|
||||||
|
import { allChallenges, applyChallenges, Challenge, ChallengeType, copyChallenge } from "./data/challenge";
|
||||||
import { Biome } from "./data/enums/biome";
|
import { Biome } from "./data/enums/biome";
|
||||||
import { Species } from "./data/enums/species";
|
import { Species } from "./data/enums/species";
|
||||||
import PokemonSpecies, { allSpecies } from "./data/pokemon-species";
|
import PokemonSpecies, { allSpecies } from "./data/pokemon-species";
|
||||||
import { Arena } from "./field/arena";
|
import { Arena } from "./field/arena";
|
||||||
import * as Utils from "./utils";
|
|
||||||
import * as Overrides from "./overrides";
|
import * as Overrides from "./overrides";
|
||||||
import { allChallenges, applyChallenges, Challenge, ChallengeType, copyChallenge } from "./data/challenge";
|
import * as Utils from "./utils";
|
||||||
|
|
||||||
export enum GameModes {
|
export enum GameModes {
|
||||||
CLASSIC,
|
CLASSIC,
|
||||||
@ -269,30 +270,30 @@ export class GameMode implements GameModeConfig {
|
|||||||
getName(): string {
|
getName(): string {
|
||||||
switch (this.modeId) {
|
switch (this.modeId) {
|
||||||
case GameModes.CLASSIC:
|
case GameModes.CLASSIC:
|
||||||
return "Classic";
|
return i18next.t("gameMode:classic");
|
||||||
case GameModes.ENDLESS:
|
case GameModes.ENDLESS:
|
||||||
return "Endless";
|
return i18next.t("gameMode:endless");
|
||||||
case GameModes.SPLICED_ENDLESS:
|
case GameModes.SPLICED_ENDLESS:
|
||||||
return "Endless (Spliced)";
|
return i18next.t("gameMode:endlessSpliced");
|
||||||
case GameModes.DAILY:
|
case GameModes.DAILY:
|
||||||
return "Daily Run";
|
return i18next.t("gameMode:dailyRun");
|
||||||
case GameModes.CHALLENGE:
|
case GameModes.CHALLENGE:
|
||||||
return "Challenge";
|
return i18next.t("gameMode:challenge");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static getModeName(modeId: GameModes): string {
|
static getModeName(modeId: GameModes): string {
|
||||||
switch (modeId) {
|
switch (modeId) {
|
||||||
case GameModes.CLASSIC:
|
case GameModes.CLASSIC:
|
||||||
return "Classic";
|
return i18next.t("gameMode:classic");
|
||||||
case GameModes.ENDLESS:
|
case GameModes.ENDLESS:
|
||||||
return "Endless";
|
return i18next.t("gameMode:endless");
|
||||||
case GameModes.SPLICED_ENDLESS:
|
case GameModes.SPLICED_ENDLESS:
|
||||||
return "Endless (Spliced)";
|
return i18next.t("gameMode:endlessSpliced");
|
||||||
case GameModes.DAILY:
|
case GameModes.DAILY:
|
||||||
return "Daily Run";
|
return i18next.t("gameMode:dailyRun");
|
||||||
case GameModes.CHALLENGE:
|
case GameModes.CHALLENGE:
|
||||||
return "Challenge";
|
return i18next.t("gameMode:challenge");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -436,7 +436,7 @@ export class LoadingScene extends SceneBase {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.load.on("fileprogress", file => {
|
this.load.on("fileprogress", file => {
|
||||||
assetText.setText(`Loading asset: ${file.key}`);
|
assetText.setText(i18next.t("menu:loadingAsset", { assetName: file.key }));
|
||||||
});
|
});
|
||||||
|
|
||||||
loadingGraphics.push(bg, graphics, progressBar, progressBox, logo, percentText, assetText);
|
loadingGraphics.push(bg, graphics, progressBar, progressBox, logo, percentText, assetText);
|
||||||
|
@ -19,6 +19,7 @@ import {
|
|||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { egg } from "./egg";
|
import { egg } from "./egg";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { gameMode } from "./game-mode";
|
||||||
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -30,6 +31,7 @@ import { pokeball } from "./pokeball";
|
|||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonInfo } from "./pokemon-info";
|
import { pokemonInfo } from "./pokemon-info";
|
||||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
|
||||||
import { splashMessages } from "./splash-messages";
|
import { splashMessages } from "./splash-messages";
|
||||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||||
import { titles, trainerClasses, trainerNames } from "./trainers";
|
import { titles, trainerClasses, trainerNames } from "./trainers";
|
||||||
@ -58,6 +60,7 @@ export const deConfig = {
|
|||||||
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
||||||
egg: egg,
|
egg: egg,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
gameMode: gameMode,
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
growth: growth,
|
growth: growth,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
@ -69,6 +72,7 @@ export const deConfig = {
|
|||||||
pokemon: pokemon,
|
pokemon: pokemon,
|
||||||
pokemonInfo: pokemonInfo,
|
pokemonInfo: pokemonInfo,
|
||||||
pokemonInfoContainer: pokemonInfoContainer,
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
|
saveSlotSelectUiHandler: saveSlotSelectUiHandler,
|
||||||
splashMessages: splashMessages,
|
splashMessages: splashMessages,
|
||||||
starterSelectUiHandler: starterSelectUiHandler,
|
starterSelectUiHandler: starterSelectUiHandler,
|
||||||
titles: titles,
|
titles: titles,
|
||||||
|
10
src/locales/de/game-mode.ts
Normal file
10
src/locales/de/game-mode.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const gameMode: SimpleTranslationEntries = {
|
||||||
|
"classic": "Klassik",
|
||||||
|
"endless": "Endlos",
|
||||||
|
"endlessSpliced": "Endlos (Fusion)",
|
||||||
|
"dailyRun": "Täglicher Run",
|
||||||
|
"unknown": "Unbekannt",
|
||||||
|
"challenge": "Challenge",
|
||||||
|
} as const;
|
@ -45,8 +45,8 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"weeklyRankings": "Wöchentliche Rangliste",
|
"weeklyRankings": "Wöchentliche Rangliste",
|
||||||
"noRankings": "Keine Rangliste",
|
"noRankings": "Keine Rangliste",
|
||||||
"loading": "Lade…",
|
"loading": "Lade…",
|
||||||
|
"loadingAsset": "Loading asset: {{assetName}}",
|
||||||
"playersOnline": "Spieler Online",
|
"playersOnline": "Spieler Online",
|
||||||
"empty":"Leer",
|
|
||||||
"yes":"Ja",
|
"yes":"Ja",
|
||||||
"no":"Nein",
|
"no":"Nein",
|
||||||
"disclaimer": "DISCLAIMER",
|
"disclaimer": "DISCLAIMER",
|
||||||
|
9
src/locales/de/save-slot-select-ui-handler.ts
Normal file
9
src/locales/de/save-slot-select-ui-handler.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const saveSlotSelectUiHandler: SimpleTranslationEntries = {
|
||||||
|
"overwriteData": "Den ausgewählten Speicherstand überschreiben?",
|
||||||
|
"loading": "Läd...",
|
||||||
|
"wave": "Welle",
|
||||||
|
"lv": "Lvl",
|
||||||
|
"empty": "Leer",
|
||||||
|
} as const;
|
@ -19,6 +19,7 @@ import {
|
|||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { egg } from "./egg";
|
import { egg } from "./egg";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { gameMode } from "./game-mode";
|
||||||
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -30,6 +31,7 @@ import { pokeball } from "./pokeball";
|
|||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonInfo } from "./pokemon-info";
|
import { pokemonInfo } from "./pokemon-info";
|
||||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
|
||||||
import { splashMessages } from "./splash-messages";
|
import { splashMessages } from "./splash-messages";
|
||||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||||
import { titles, trainerClasses, trainerNames } from "./trainers";
|
import { titles, trainerClasses, trainerNames } from "./trainers";
|
||||||
@ -58,6 +60,7 @@ export const enConfig = {
|
|||||||
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
||||||
egg: egg,
|
egg: egg,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
gameMode: gameMode,
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
growth: growth,
|
growth: growth,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
@ -69,6 +72,7 @@ export const enConfig = {
|
|||||||
pokemon: pokemon,
|
pokemon: pokemon,
|
||||||
pokemonInfo: pokemonInfo,
|
pokemonInfo: pokemonInfo,
|
||||||
pokemonInfoContainer: pokemonInfoContainer,
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
|
saveSlotSelectUiHandler: saveSlotSelectUiHandler,
|
||||||
splashMessages: splashMessages,
|
splashMessages: splashMessages,
|
||||||
starterSelectUiHandler: starterSelectUiHandler,
|
starterSelectUiHandler: starterSelectUiHandler,
|
||||||
titles: titles,
|
titles: titles,
|
||||||
|
10
src/locales/en/game-mode.ts
Normal file
10
src/locales/en/game-mode.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const gameMode: SimpleTranslationEntries = {
|
||||||
|
"classic": "Classic",
|
||||||
|
"endless": "Endless",
|
||||||
|
"endlessSpliced": "Endless (Spliced)",
|
||||||
|
"dailyRun": "Daily Run",
|
||||||
|
"unknown": "Unknown",
|
||||||
|
"challenge": "Challenge",
|
||||||
|
} as const;
|
@ -45,8 +45,8 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"weeklyRankings": "Weekly Rankings",
|
"weeklyRankings": "Weekly Rankings",
|
||||||
"noRankings": "No Rankings",
|
"noRankings": "No Rankings",
|
||||||
"loading": "Loading…",
|
"loading": "Loading…",
|
||||||
|
"loadingAsset": "Loading asset: {{assetName}}",
|
||||||
"playersOnline": "Players Online",
|
"playersOnline": "Players Online",
|
||||||
"empty":"Empty",
|
|
||||||
"yes":"Yes",
|
"yes":"Yes",
|
||||||
"no":"No",
|
"no":"No",
|
||||||
"disclaimer": "DISCLAIMER",
|
"disclaimer": "DISCLAIMER",
|
||||||
|
9
src/locales/en/save-slot-select-ui-handler.ts
Normal file
9
src/locales/en/save-slot-select-ui-handler.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const saveSlotSelectUiHandler: SimpleTranslationEntries = {
|
||||||
|
"overwriteData": "Overwrite the data in the selected slot?",
|
||||||
|
"loading": "Loading...",
|
||||||
|
"wave": "Wave",
|
||||||
|
"lv": "Lv",
|
||||||
|
"empty": "Empty",
|
||||||
|
} as const;
|
@ -18,11 +18,11 @@ export const battle: SimpleTranslationEntries = {
|
|||||||
"partyFull": "Tu equipo esta completo.\n¿Quieres liberar un Pokémon para meter a {{pokemonName}}?",
|
"partyFull": "Tu equipo esta completo.\n¿Quieres liberar un Pokémon para meter a {{pokemonName}}?",
|
||||||
"pokemon": "Pokémon",
|
"pokemon": "Pokémon",
|
||||||
"sendOutPokemon": "¡Adelante, {{pokemonName}}!",
|
"sendOutPokemon": "¡Adelante, {{pokemonName}}!",
|
||||||
"hitResultCriticalHit": "!Un golpe crítico!",
|
"hitResultCriticalHit": "¡Un golpe crítico!",
|
||||||
"hitResultSuperEffective": "!Es supereficaz!",
|
"hitResultSuperEffective": "¡Es supereficaz!",
|
||||||
"hitResultNotVeryEffective": "No es muy eficaz…",
|
"hitResultNotVeryEffective": "No es muy eficaz…",
|
||||||
"hitResultNoEffect": "No afecta a {{pokemonName}}!",
|
"hitResultNoEffect": "No afecta a {{pokemonName}}!",
|
||||||
"hitResultOneHitKO": "!KO en 1 golpe!",
|
"hitResultOneHitKO": "¡KO en 1 golpe!",
|
||||||
"attackFailed": "¡Pero ha fallado!",
|
"attackFailed": "¡Pero ha fallado!",
|
||||||
"attackHitsCount": "N.º de golpes: {{count}}.",
|
"attackHitsCount": "N.º de golpes: {{count}}.",
|
||||||
"expGain": "{{pokemonName}} ha ganado\n{{exp}} puntos de experiencia.",
|
"expGain": "{{pokemonName}} ha ganado\n{{exp}} puntos de experiencia.",
|
||||||
@ -56,9 +56,9 @@ export const battle: SimpleTranslationEntries = {
|
|||||||
"skipItemQuestion": "¿Estás seguro de que no quieres coger un objeto?",
|
"skipItemQuestion": "¿Estás seguro de que no quieres coger un objeto?",
|
||||||
"eggHatching": "¿Y esto?",
|
"eggHatching": "¿Y esto?",
|
||||||
"ivScannerUseQuestion": "¿Quieres usar el Escáner de IVs en {{pokemonName}}?",
|
"ivScannerUseQuestion": "¿Quieres usar el Escáner de IVs en {{pokemonName}}?",
|
||||||
"wildPokemonWithAffix": "Wild {{pokemonName}}",
|
"wildPokemonWithAffix": "El {{pokemonName}} salvaje",
|
||||||
"foePokemonWithAffix": "Foe {{pokemonName}}",
|
"foePokemonWithAffix": "El {{pokemonName}} enemigo",
|
||||||
"useMove": "{{pokemonNameWithAffix}} used {{moveName}}!",
|
"useMove": "¡{{pokemonNameWithAffix}} usó {{moveName}}!",
|
||||||
"drainMessage": "{{pokemonName}} had its\nenergy drained!",
|
"drainMessage": "¡{{pokemonName}} tuvo su\nenergía absorbida!",
|
||||||
"regainHealth": "{{pokemonName}} regained\nhealth!"
|
"regainHealth": "¡{{pokemonName}} recuperó\nPS!"
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -1,67 +1,67 @@
|
|||||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
export const challenges: SimpleTranslationEntries = {
|
export const challenges: SimpleTranslationEntries = {
|
||||||
"title": "Challenge Modifiers",
|
"title": "Parámetros de Desafíos",
|
||||||
"points": "Bad Ideas",
|
"points": "Malas Ideas",
|
||||||
"confirm_start": "Proceed with these challenges?",
|
"confirm_start": "¿Continuar con estos desafíos?",
|
||||||
"singleGeneration.name": "Mono Gen",
|
"singleGeneration.name": "Monogeneración",
|
||||||
"singleGeneration.value.0": "Off",
|
"singleGeneration.value.0": "No",
|
||||||
"singleGeneration.desc.0": "You can only use pokemon from the chosen generation.",
|
"singleGeneration.desc.0": "Solo puedes usar Pokémon de la generación elegida.",
|
||||||
"singleGeneration.value.1": "Gen 1",
|
"singleGeneration.value.1": "Gen 1",
|
||||||
"singleGeneration.desc.1": "You can only use pokemon from generation one.",
|
"singleGeneration.desc.1": "Solo puedes usar Pokémon de primera generación.",
|
||||||
"singleGeneration.value.2": "Gen 2",
|
"singleGeneration.value.2": "Gen 2",
|
||||||
"singleGeneration.desc.2": "You can only use pokemon from generation two.",
|
"singleGeneration.desc.2": "Solo puedes usar Pokémon de segunda generación.",
|
||||||
"singleGeneration.value.3": "Gen 3",
|
"singleGeneration.value.3": "Gen 3",
|
||||||
"singleGeneration.desc.3": "You can only use pokemon from generation three.",
|
"singleGeneration.desc.3": "Solo puedes usar Pokémon de tercera generación.",
|
||||||
"singleGeneration.value.4": "Gen 4",
|
"singleGeneration.value.4": "Gen 4",
|
||||||
"singleGeneration.desc.4": "You can only use pokemon from generation four.",
|
"singleGeneration.desc.4": "Solo puedes usar Pokémon de cuarta generación.",
|
||||||
"singleGeneration.value.5": "Gen 5",
|
"singleGeneration.value.5": "Gen 5",
|
||||||
"singleGeneration.desc.5": "You can only use pokemon from generation five.",
|
"singleGeneration.desc.5": "Solo puedes usar Pokémon de quinta generación.",
|
||||||
"singleGeneration.value.6": "Gen 6",
|
"singleGeneration.value.6": "Gen 6",
|
||||||
"singleGeneration.desc.6": "You can only use pokemon from generation six.",
|
"singleGeneration.desc.6": "Solo puedes usar Pokémon de sexta generación.",
|
||||||
"singleGeneration.value.7": "Gen 7",
|
"singleGeneration.value.7": "Gen 7",
|
||||||
"singleGeneration.desc.7": "You can only use pokemon from generation seven.",
|
"singleGeneration.desc.7": "Solo puedes usar Pokémon de séptima generación.",
|
||||||
"singleGeneration.value.8": "Gen 8",
|
"singleGeneration.value.8": "Gen 8",
|
||||||
"singleGeneration.desc.8": "You can only use pokemon from generation eight.",
|
"singleGeneration.desc.8": "Solo puedes usar Pokémon de octava generación.",
|
||||||
"singleGeneration.value.9": "Gen 9",
|
"singleGeneration.value.9": "Gen 9",
|
||||||
"singleGeneration.desc.9": "You can only use pokemon from generation nine.",
|
"singleGeneration.desc.9": "Solo puedes usar Pokémon de novena generación.",
|
||||||
"singleType.name": "Mono Type",
|
"singleType.name": "Monotipo",
|
||||||
"singleType.value.0": "Off",
|
"singleType.value.0": "No",
|
||||||
"singleType.desc.0": "You can only use pokemon of the chosen type.",
|
"singleType.desc.0": "Solo puedes usar Pokémon del tipo elegido",
|
||||||
"singleType.value.1": "Normal",
|
"singleType.value.1": "Normal",
|
||||||
"singleType.desc.1": "You can only use pokemon with the Normal type.",
|
"singleType.desc.1": "Solo puedes usar Pokémon de tipo Normal.",
|
||||||
"singleType.value.2": "Fighting",
|
"singleType.value.2": "Lucha",
|
||||||
"singleType.desc.2": "You can only use pokemon with the Fighting type.",
|
"singleType.desc.2": "Solo puedes usar Pokémon de tipo Lucha.",
|
||||||
"singleType.value.3": "Flying",
|
"singleType.value.3": "Volador",
|
||||||
"singleType.desc.3": "You can only use pokemon with the Flying type.",
|
"singleType.desc.3": "Solo puedes usar Pokémon de tipo Volador.",
|
||||||
"singleType.value.4": "Poison",
|
"singleType.value.4": "Veneno",
|
||||||
"singleType.desc.4": "You can only use pokemon with the Poison type.",
|
"singleType.desc.4": "Solo puedes usar Pokémon de tipo Veneno.",
|
||||||
"singleType.value.5": "Ground",
|
"singleType.value.5": "Tierra",
|
||||||
"singleType.desc.5": "You can only use pokemon with the Ground type.",
|
"singleType.desc.5": "Solo puedes usar Pokémon de tipo Tierra.",
|
||||||
"singleType.value.6": "Rock",
|
"singleType.value.6": "Roca",
|
||||||
"singleType.desc.6": "You can only use pokemon with the Rock type.",
|
"singleType.desc.6": "Solo puedes usar Pokémon de tipo Roca.",
|
||||||
"singleType.value.7": "Bug",
|
"singleType.value.7": "Bicho",
|
||||||
"singleType.desc.7": "You can only use pokemon with the Bug type.",
|
"singleType.desc.7": "Solo puedes usar Pokémon de tipo Bicho.",
|
||||||
"singleType.value.8": "Ghost",
|
"singleType.value.8": "Fantasma",
|
||||||
"singleType.desc.8": "You can only use pokemon with the Ghost type.",
|
"singleType.desc.8": "Solo puedes usar Pokémon de tipo Fantasma.",
|
||||||
"singleType.value.9": "Steel",
|
"singleType.value.9": "Acero",
|
||||||
"singleType.desc.9": "You can only use pokemon with the Steel type.",
|
"singleType.desc.9": "Solo puedes usar Pokémon de tipo Acero.",
|
||||||
"singleType.value.10": "Fire",
|
"singleType.value.10": "Fuego",
|
||||||
"singleType.desc.10": "You can only use pokemon with the Fire type.",
|
"singleType.desc.10": "Solo puedes usar Pokémon de tipo Fuego.",
|
||||||
"singleType.value.11": "Water",
|
"singleType.value.11": "Agua",
|
||||||
"singleType.desc.11": "You can only use pokemon with the Water type.",
|
"singleType.desc.11": "Solo puedes usar Pokémon de tipo Agua.",
|
||||||
"singleType.value.12": "Grass",
|
"singleType.value.12": "Planta",
|
||||||
"singleType.desc.12": "You can only use pokemon with the Grass type.",
|
"singleType.desc.12": "Solo puedes usar Pokémon de tipo Planta.",
|
||||||
"singleType.value.13": "Electric",
|
"singleType.value.13": "Eléctrico",
|
||||||
"singleType.desc.13": "You can only use pokemon with the Electric type.",
|
"singleType.desc.13": "Solo puedes usar Pokémon de tipo Eléctrico.",
|
||||||
"singleType.value.14": "Psychic",
|
"singleType.value.14": "Psíquico",
|
||||||
"singleType.desc.14": "You can only use pokemon with the Psychic type.",
|
"singleType.desc.14": "Solo puedes usar Pokémon de tipo Psíquico.",
|
||||||
"singleType.value.15": "Ice",
|
"singleType.value.15": "Hielo",
|
||||||
"singleType.desc.15": "You can only use pokemon with the Ice type.",
|
"singleType.desc.15": "Solo puedes usar Pokémon de tipo Hielo.",
|
||||||
"singleType.value.16": "Dragon",
|
"singleType.value.16": "Dragón",
|
||||||
"singleType.desc.16": "You can only use pokemon with the Dragon type.",
|
"singleType.desc.16": "Solo puedes usar Pokémon de tipo Dragón.",
|
||||||
"singleType.value.17": "Dark",
|
"singleType.value.17": "Siniestro",
|
||||||
"singleType.desc.17": "You can only use pokemon with the Dark type.",
|
"singleType.desc.17": "Solo puedes usar Pokémon de tipo Siniestro.",
|
||||||
"singleType.value.18": "Fairy",
|
"singleType.value.18": "Hada",
|
||||||
"singleType.desc.18": "You can only use pokemon with the Fairy type.",
|
"singleType.desc.18": "Solo puedes usar Pokémon de tipo Hada.",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -19,6 +19,7 @@ import {
|
|||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { egg } from "./egg";
|
import { egg } from "./egg";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { gameMode } from "./game-mode";
|
||||||
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -30,6 +31,7 @@ import { pokeball } from "./pokeball";
|
|||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonInfo } from "./pokemon-info";
|
import { pokemonInfo } from "./pokemon-info";
|
||||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
|
||||||
import { splashMessages } from "./splash-messages";
|
import { splashMessages } from "./splash-messages";
|
||||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||||
import { titles, trainerClasses, trainerNames } from "./trainers";
|
import { titles, trainerClasses, trainerNames } from "./trainers";
|
||||||
@ -58,6 +60,7 @@ export const esConfig = {
|
|||||||
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
||||||
egg: egg,
|
egg: egg,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
gameMode: gameMode,
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
growth: growth,
|
growth: growth,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
@ -69,6 +72,7 @@ export const esConfig = {
|
|||||||
pokemon: pokemon,
|
pokemon: pokemon,
|
||||||
pokemonInfo: pokemonInfo,
|
pokemonInfo: pokemonInfo,
|
||||||
pokemonInfoContainer: pokemonInfoContainer,
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
|
saveSlotSelectUiHandler: saveSlotSelectUiHandler,
|
||||||
splashMessages: splashMessages,
|
splashMessages: splashMessages,
|
||||||
starterSelectUiHandler: starterSelectUiHandler,
|
starterSelectUiHandler: starterSelectUiHandler,
|
||||||
titles: titles,
|
titles: titles,
|
||||||
|
10
src/locales/es/game-mode.ts
Normal file
10
src/locales/es/game-mode.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const gameMode: SimpleTranslationEntries = {
|
||||||
|
"classic": "Clásica",
|
||||||
|
"endless": "Infinita",
|
||||||
|
"endlessSpliced": "Infinita (Fusión)",
|
||||||
|
"dailyRun": "Diaria",
|
||||||
|
"unknown": "Desconicido",
|
||||||
|
"challenge": "Desafío",
|
||||||
|
} as const;
|
@ -45,10 +45,10 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"weeklyRankings": "Rankings Semanales",
|
"weeklyRankings": "Rankings Semanales",
|
||||||
"noRankings": "Sin Rankings",
|
"noRankings": "Sin Rankings",
|
||||||
"loading": "Cargando…",
|
"loading": "Cargando…",
|
||||||
|
"loadingAsset": "Cargando recurso: {{assetName}}",
|
||||||
"playersOnline": "Jugadores en Línea",
|
"playersOnline": "Jugadores en Línea",
|
||||||
"empty":"Vacío",
|
|
||||||
"yes":"Sí",
|
"yes":"Sí",
|
||||||
"no":"No",
|
"no":"No",
|
||||||
"disclaimer": "DISCLAIMER",
|
"disclaimer": "AVISO",
|
||||||
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed."
|
"disclaimerDescription": "Este juego es un producto inacabado; puede tener problemas de jugabilidad (incluyendo la posible pérdida de datos de guardado),\ncambiar sin avisar, y puede o no puede ser actualizado hasta ser completado."
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -130,7 +130,7 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
"RARE_CANDY": { name: "Carameloraro" },
|
"RARE_CANDY": { name: "Carameloraro" },
|
||||||
"RARER_CANDY": { name: "Rarer Candy" },
|
"RARER_CANDY": { name: "Caramelorarísimo" },
|
||||||
|
|
||||||
"MEGA_BRACELET": { name: "Mega-aro", description: "Las Megapiedras están disponibles" },
|
"MEGA_BRACELET": { name: "Mega-aro", description: "Las Megapiedras están disponibles" },
|
||||||
"DYNAMAX_BAND": { name: "Maximuñequera", description: "Las Maxisetas están disponibles" },
|
"DYNAMAX_BAND": { name: "Maximuñequera", description: "Las Maxisetas están disponibles" },
|
||||||
@ -162,14 +162,14 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"PP_UP": { name: "Más PP" },
|
"PP_UP": { name: "Más PP" },
|
||||||
"PP_MAX": { name: "Máx PP" },
|
"PP_MAX": { name: "Máx PP" },
|
||||||
|
|
||||||
"LURE": { name: "Lure" },
|
"LURE": { name: "Incienso" },
|
||||||
"SUPER_LURE": { name: "Super Lure" },
|
"SUPER_LURE": { name: "Superincienso" },
|
||||||
"MAX_LURE": { name: "Max Lure" },
|
"MAX_LURE": { name: "Incienso Máximo" },
|
||||||
|
|
||||||
"MEMORY_MUSHROOM": { name: "Memory Mushroom", description: "Recall one Pokémon's forgotten move" },
|
"MEMORY_MUSHROOM": { name: "Seta Recuerdo", description: "Recuerda un movimiento olvidado de un Pokémon." },
|
||||||
|
|
||||||
"EXP_SHARE": { name: "Repartir EXP", description: "Los que no combatan reciben el 20% de la EXP" },
|
"EXP_SHARE": { name: "Repartir EXP", description: "Los que no combatan reciben el 20% de la EXP" },
|
||||||
"EXP_BALANCE": { name: "EXP. Balance", description: "Da mayor parte de la EXP recibida a los miembros del equipo que tengan menos nivel" },
|
"EXP_BALANCE": { name: "Equilibrar EXP", description: "Da mayor parte de la EXP recibida a los miembros del equipo que tengan menos nivel" },
|
||||||
|
|
||||||
"OVAL_CHARM": { name: "Amuleto Oval", description: "Cada Pokémon combatiente recibe un 10% adicional de la EXP total" },
|
"OVAL_CHARM": { name: "Amuleto Oval", description: "Cada Pokémon combatiente recibe un 10% adicional de la EXP total" },
|
||||||
|
|
||||||
@ -197,7 +197,7 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"GRIP_CLAW": { name: "Garra Garfio" },
|
"GRIP_CLAW": { name: "Garra Garfio" },
|
||||||
"WIDE_LENS": { name: "Lupa" },
|
"WIDE_LENS": { name: "Lupa" },
|
||||||
|
|
||||||
"MULTI_LENS": { name: "Multi Lens" },
|
"MULTI_LENS": { name: "Multilupa" },
|
||||||
|
|
||||||
"HEALING_CHARM": { name: "Amuleto curación", description: "Aumenta la efectividad de los movimientos y objetos de curacion de PS en un 10% (excepto revivir)" },
|
"HEALING_CHARM": { name: "Amuleto curación", description: "Aumenta la efectividad de los movimientos y objetos de curacion de PS en un 10% (excepto revivir)" },
|
||||||
"CANDY_JAR": { name: "Candy Jar", description: "Aumenta en 1 el número de niveles añadidos por los carameloraros" },
|
"CANDY_JAR": { name: "Candy Jar", description: "Aumenta en 1 el número de niveles añadidos por los carameloraros" },
|
||||||
@ -216,7 +216,7 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
"TOXIC_ORB": { name: "Toxiesfera", description: "Extraña esfera que envenena gravemente a quien la usa en combate" },
|
"TOXIC_ORB": { name: "Toxiesfera", description: "Extraña esfera que envenena gravemente a quien la usa en combate" },
|
||||||
"FLAME_ORB": { name: "Llamasfera", description: "Extraña esfera que causa quemaduras a quien la usa en combate" },
|
"FLAME_ORB": { name: "Llamasfera", description: "Extraña esfera que causa quemaduras a quien la usa en combate" },
|
||||||
|
|
||||||
"BATON": { name: "Baton", description: "Permite pasar los efectos al cambiar de Pokémon, también evita las trampas" },
|
"BATON": { name: "Relevo", description: "Permite pasar los efectos al cambiar de Pokémon, también evita las trampas" },
|
||||||
|
|
||||||
"SHINY_CHARM": { name: "Amuleto Iris", description: "Aumenta drásticamente la posibilidad de que un Pokémon salvaje sea Shiny" },
|
"SHINY_CHARM": { name: "Amuleto Iris", description: "Aumenta drásticamente la posibilidad de que un Pokémon salvaje sea Shiny" },
|
||||||
"ABILITY_CHARM": { name: "Amuleto Habilidad", description: "Aumenta drásticamente la posibilidad de que un Pokémon salvaje tenga una habilidad oculta" },
|
"ABILITY_CHARM": { name: "Amuleto Habilidad", description: "Aumenta drásticamente la posibilidad de que un Pokémon salvaje tenga una habilidad oculta" },
|
||||||
@ -229,15 +229,15 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
|||||||
|
|
||||||
"GOLDEN_POKEBALL": { name: "Poké Ball Dorada", description: "Agrega 1 opción de objeto extra al final de cada combate" },
|
"GOLDEN_POKEBALL": { name: "Poké Ball Dorada", description: "Agrega 1 opción de objeto extra al final de cada combate" },
|
||||||
|
|
||||||
"ENEMY_DAMAGE_BOOSTER": { name: "Damage Token", description: "Aumenta el daño en un 5%" },
|
"ENEMY_DAMAGE_BOOSTER": { name: "Ficha Daño", description: "Aumenta el daño en un 5%" },
|
||||||
"ENEMY_DAMAGE_REDUCTION": { name: "Protection Token", description: "Reduce el daño recibido en un 2,5%" },
|
"ENEMY_DAMAGE_REDUCTION": { name: "Ficha Protección", description: "Reduce el daño recibido en un 2,5%" },
|
||||||
"ENEMY_HEAL": { name: "Recovery Token", description: "Cura el 2% de los PS máximo en cada turno" },
|
"ENEMY_HEAL": { name: "Ficha Curación", description: "Cura el 2% de los PS máximo en cada turno" },
|
||||||
"ENEMY_ATTACK_POISON_CHANCE": { name: "Poison Token" },
|
"ENEMY_ATTACK_POISON_CHANCE": { name: "Ficha Veneno" },
|
||||||
"ENEMY_ATTACK_PARALYZE_CHANCE": { name: "Paralyze Token" },
|
"ENEMY_ATTACK_PARALYZE_CHANCE": { name: "Ficha Parálisis" },
|
||||||
"ENEMY_ATTACK_BURN_CHANCE": { name: "Burn Token" },
|
"ENEMY_ATTACK_BURN_CHANCE": { name: "Ficha Quemadura" },
|
||||||
"ENEMY_STATUS_EFFECT_HEAL_CHANCE": { name: "Full Heal Token", description: "Agrega un 2.5% de probabilidad cada turno de curar un problema de estado" },
|
"ENEMY_STATUS_EFFECT_HEAL_CHANCE": { name: "Ficha Cura Total", description: "Agrega un 2.5% de probabilidad cada turno de curar un problema de estado" },
|
||||||
"ENEMY_ENDURE_CHANCE": { name: "Endure Token" },
|
"ENEMY_ENDURE_CHANCE": { name: "Ficha Aguante" },
|
||||||
"ENEMY_FUSED_CHANCE": { name: "Fusion Token", description: "Agrega un 1% de probabilidad de que un Pokémon salvaje sea una fusión" },
|
"ENEMY_FUSED_CHANCE": { name: "Ficha Fusión", description: "Agrega un 1% de probabilidad de que un Pokémon salvaje sea una fusión" },
|
||||||
},
|
},
|
||||||
TempBattleStatBoosterItem: {
|
TempBattleStatBoosterItem: {
|
||||||
"x_attack": "Ataque X",
|
"x_attack": "Ataque X",
|
||||||
|
9
src/locales/es/save-slot-select-ui-handler.ts
Normal file
9
src/locales/es/save-slot-select-ui-handler.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const saveSlotSelectUiHandler: SimpleTranslationEntries = {
|
||||||
|
"overwriteData": "¿Sobrescribir los datos en la ranura seleccionada?",
|
||||||
|
"loading": "Cargando...",
|
||||||
|
"wave": "Oleada",
|
||||||
|
"lv": "Nv",
|
||||||
|
"empty": "Vacío",
|
||||||
|
} as const;
|
@ -1,67 +1,67 @@
|
|||||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
export const challenges: SimpleTranslationEntries = {
|
export const challenges: SimpleTranslationEntries = {
|
||||||
"title": "Challenge Modifiers",
|
"title": "Paramètres du Challenge",
|
||||||
"points": "Bad Ideas",
|
"points": "Bad Ideas",
|
||||||
"confirm_start": "Proceed with these challenges?",
|
"confirm_start": "Continuer avec ces paramètres ?",
|
||||||
"singleGeneration.name": "Mono Gen",
|
"singleGeneration.name": "Mono-génération",
|
||||||
"singleGeneration.value.0": "Off",
|
"singleGeneration.value.0": "Désactivé",
|
||||||
"singleGeneration.desc.0": "You can only use pokemon from the chosen generation.",
|
"singleGeneration.desc.0": "Vous ne pouvez choisir que des Pokémon de la génération sélectionnée.",
|
||||||
"singleGeneration.value.1": "Gen 1",
|
"singleGeneration.value.1": "1G",
|
||||||
"singleGeneration.desc.1": "You can only use pokemon from generation one.",
|
"singleGeneration.desc.1": "Vous ne pouvez choisir que des Pokémon de 1re génération.",
|
||||||
"singleGeneration.value.2": "Gen 2",
|
"singleGeneration.value.2": "2G",
|
||||||
"singleGeneration.desc.2": "You can only use pokemon from generation two.",
|
"singleGeneration.desc.2": "Vous ne pouvez choisir que des Pokémon de 2e génération.",
|
||||||
"singleGeneration.value.3": "Gen 3",
|
"singleGeneration.value.3": "3G",
|
||||||
"singleGeneration.desc.3": "You can only use pokemon from generation three.",
|
"singleGeneration.desc.3": "Vous ne pouvez choisir que des Pokémon de 3e génération.",
|
||||||
"singleGeneration.value.4": "Gen 4",
|
"singleGeneration.value.4": "4G",
|
||||||
"singleGeneration.desc.4": "You can only use pokemon from generation four.",
|
"singleGeneration.desc.4": "Vous ne pouvez choisir que des Pokémon de 4e génération.",
|
||||||
"singleGeneration.value.5": "Gen 5",
|
"singleGeneration.value.5": "5G",
|
||||||
"singleGeneration.desc.5": "You can only use pokemon from generation five.",
|
"singleGeneration.desc.5": "Vous ne pouvez choisir que des Pokémon de 5e génération.",
|
||||||
"singleGeneration.value.6": "Gen 6",
|
"singleGeneration.value.6": "6G",
|
||||||
"singleGeneration.desc.6": "You can only use pokemon from generation six.",
|
"singleGeneration.desc.6": "Vous ne pouvez choisir que des Pokémon de 6e génération.",
|
||||||
"singleGeneration.value.7": "Gen 7",
|
"singleGeneration.value.7": "7G",
|
||||||
"singleGeneration.desc.7": "You can only use pokemon from generation seven.",
|
"singleGeneration.desc.7": "Vous ne pouvez choisir que des Pokémon de 7e génération.",
|
||||||
"singleGeneration.value.8": "Gen 8",
|
"singleGeneration.value.8": "8G",
|
||||||
"singleGeneration.desc.8": "You can only use pokemon from generation eight.",
|
"singleGeneration.desc.8": "Vous ne pouvez choisir que des Pokémon de 8e génération.",
|
||||||
"singleGeneration.value.9": "Gen 9",
|
"singleGeneration.value.9": "9G",
|
||||||
"singleGeneration.desc.9": "You can only use pokemon from generation nine.",
|
"singleGeneration.desc.9": "Vous ne pouvez choisir que des Pokémon de 9e génération.",
|
||||||
"singleType.name": "Mono Type",
|
"singleType.name": "Mono-type",
|
||||||
"singleType.value.0": "Off",
|
"singleType.value.0": "Désactivé",
|
||||||
"singleType.desc.0": "You can only use pokemon of the chosen type.",
|
"singleType.desc.0": "Vous ne pouvez choisir que des Pokémon du type sélectionné.",
|
||||||
"singleType.value.1": "Normal",
|
"singleType.value.1": "Normal",
|
||||||
"singleType.desc.1": "You can only use pokemon with the Normal type.",
|
"singleType.desc.1": "Vous ne pouvez choisir que des Pokémon de type Normal.",
|
||||||
"singleType.value.2": "Fighting",
|
"singleType.value.2": "Combat",
|
||||||
"singleType.desc.2": "You can only use pokemon with the Fighting type.",
|
"singleType.desc.2": "Vous ne pouvez choisir que des Pokémon de type Combat.",
|
||||||
"singleType.value.3": "Flying",
|
"singleType.value.3": "Vol",
|
||||||
"singleType.desc.3": "You can only use pokemon with the Flying type.",
|
"singleType.desc.3": "Vous ne pouvez choisir que des Pokémon de type Vol.",
|
||||||
"singleType.value.4": "Poison",
|
"singleType.value.4": "Poison",
|
||||||
"singleType.desc.4": "You can only use pokemon with the Poison type.",
|
"singleType.desc.4": "Vous ne pouvez choisir que des Pokémon de type Poison.",
|
||||||
"singleType.value.5": "Ground",
|
"singleType.value.5": "Sol",
|
||||||
"singleType.desc.5": "You can only use pokemon with the Ground type.",
|
"singleType.desc.5": "Vous ne pouvez choisir que des Pokémon de type Sol.",
|
||||||
"singleType.value.6": "Rock",
|
"singleType.value.6": "Roche",
|
||||||
"singleType.desc.6": "You can only use pokemon with the Rock type.",
|
"singleType.desc.6": "Vous ne pouvez choisir que des Pokémon de type Roche.",
|
||||||
"singleType.value.7": "Bug",
|
"singleType.value.7": "Insecte",
|
||||||
"singleType.desc.7": "You can only use pokemon with the Bug type.",
|
"singleType.desc.7": "Vous ne pouvez choisir que des Pokémon de type Insecte.",
|
||||||
"singleType.value.8": "Ghost",
|
"singleType.value.8": "Spectre",
|
||||||
"singleType.desc.8": "You can only use pokemon with the Ghost type.",
|
"singleType.desc.8": "Vous ne pouvez choisir que des Pokémon de type Spectre.",
|
||||||
"singleType.value.9": "Steel",
|
"singleType.value.9": "Acier",
|
||||||
"singleType.desc.9": "You can only use pokemon with the Steel type.",
|
"singleType.desc.9": "Vous ne pouvez choisir que des Pokémon de type Acier.",
|
||||||
"singleType.value.10": "Fire",
|
"singleType.value.10": "Feu",
|
||||||
"singleType.desc.10": "You can only use pokemon with the Fire type.",
|
"singleType.desc.10": "Vous ne pouvez choisir que des Pokémon de type Feu.",
|
||||||
"singleType.value.11": "Water",
|
"singleType.value.11": "Eau",
|
||||||
"singleType.desc.11": "You can only use pokemon with the Water type.",
|
"singleType.desc.11": "Vous ne pouvez choisir que des Pokémon de type Eau.",
|
||||||
"singleType.value.12": "Grass",
|
"singleType.value.12": "Plante",
|
||||||
"singleType.desc.12": "You can only use pokemon with the Grass type.",
|
"singleType.desc.12": "Vous ne pouvez choisir que des Pokémon de type Plante.",
|
||||||
"singleType.value.13": "Electric",
|
"singleType.value.13": "Électrik",
|
||||||
"singleType.desc.13": "You can only use pokemon with the Electric type.",
|
"singleType.desc.13": "Vous ne pouvez choisir que des Pokémon de type Électrik.",
|
||||||
"singleType.value.14": "Psychic",
|
"singleType.value.14": "Psy",
|
||||||
"singleType.desc.14": "You can only use pokemon with the Psychic type.",
|
"singleType.desc.14": "Vous ne pouvez choisir que des Pokémon de type Psy.",
|
||||||
"singleType.value.15": "Ice",
|
"singleType.value.15": "Glace",
|
||||||
"singleType.desc.15": "You can only use pokemon with the Ice type.",
|
"singleType.desc.15": "Vous ne pouvez choisir que des Pokémon de type Glace.",
|
||||||
"singleType.value.16": "Dragon",
|
"singleType.value.16": "Dragon",
|
||||||
"singleType.desc.16": "You can only use pokemon with the Dragon type.",
|
"singleType.desc.16": "Vous ne pouvez choisir que des Pokémon de type Dragon.",
|
||||||
"singleType.value.17": "Dark",
|
"singleType.value.17": "Ténèbres",
|
||||||
"singleType.desc.17": "You can only use pokemon with the Dark type.",
|
"singleType.desc.17": "Vous ne pouvez choisir que des Pokémon de type Ténèbres.",
|
||||||
"singleType.value.18": "Fairy",
|
"singleType.value.18": "Fée",
|
||||||
"singleType.desc.18": "You can only use pokemon with the Fairy type.",
|
"singleType.desc.18": "Vous ne pouvez choisir que des Pokémon de type Fée.",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -19,6 +19,7 @@ import {
|
|||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { egg } from "./egg";
|
import { egg } from "./egg";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { gameMode } from "./game-mode";
|
||||||
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -30,6 +31,7 @@ import { pokeball } from "./pokeball";
|
|||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonInfo } from "./pokemon-info";
|
import { pokemonInfo } from "./pokemon-info";
|
||||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
|
||||||
import { splashMessages } from "./splash-messages";
|
import { splashMessages } from "./splash-messages";
|
||||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||||
import { titles, trainerClasses, trainerNames } from "./trainers";
|
import { titles, trainerClasses, trainerNames } from "./trainers";
|
||||||
@ -58,6 +60,7 @@ export const frConfig = {
|
|||||||
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
||||||
egg: egg,
|
egg: egg,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
gameMode: gameMode,
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
growth: growth,
|
growth: growth,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
@ -69,6 +72,7 @@ export const frConfig = {
|
|||||||
pokemon: pokemon,
|
pokemon: pokemon,
|
||||||
pokemonInfo: pokemonInfo,
|
pokemonInfo: pokemonInfo,
|
||||||
pokemonInfoContainer: pokemonInfoContainer,
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
|
saveSlotSelectUiHandler: saveSlotSelectUiHandler,
|
||||||
splashMessages: splashMessages,
|
splashMessages: splashMessages,
|
||||||
starterSelectUiHandler: starterSelectUiHandler,
|
starterSelectUiHandler: starterSelectUiHandler,
|
||||||
titles: titles,
|
titles: titles,
|
||||||
|
10
src/locales/fr/game-mode.ts
Normal file
10
src/locales/fr/game-mode.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const gameMode: SimpleTranslationEntries = {
|
||||||
|
"classic": "Classique",
|
||||||
|
"endless": "Infini",
|
||||||
|
"endlessSpliced": "Infini (Fusions)",
|
||||||
|
"dailyRun": "Défi du jour",
|
||||||
|
"unknown": "Inconnu",
|
||||||
|
"challenge": "Challenge",
|
||||||
|
} as const;
|
@ -40,10 +40,10 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"weeklyRankings": "Classement de la Semaine",
|
"weeklyRankings": "Classement de la Semaine",
|
||||||
"noRankings": "Pas de Classement",
|
"noRankings": "Pas de Classement",
|
||||||
"loading": "Chargement…",
|
"loading": "Chargement…",
|
||||||
|
"loadingAsset": "Loading asset: {{assetName}}",
|
||||||
"playersOnline": "Joueurs Connectés",
|
"playersOnline": "Joueurs Connectés",
|
||||||
"empty":"Vide",
|
|
||||||
"yes":"Oui",
|
"yes":"Oui",
|
||||||
"no":"Non",
|
"no":"Non",
|
||||||
"disclaimer": "DISCLAIMER",
|
"disclaimer": "AVERTISSEMENT",
|
||||||
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed."
|
"disclaimerDescription": "Ce jeu n’est pas un produit fini et peut contenir des problèmes de jouabilité, dont de possibles pertes de sauvegardes,\ndes modifications sans avertissement et pourrait ou non encore être mis à jour ou terminé."
|
||||||
} as const;
|
} as const;
|
||||||
|
9
src/locales/fr/save-slot-select-ui-handler.ts
Normal file
9
src/locales/fr/save-slot-select-ui-handler.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const saveSlotSelectUiHandler: SimpleTranslationEntries = {
|
||||||
|
"overwriteData": "Effacer les données de l’emplacement sélectionné ?",
|
||||||
|
"loading": "Chargement…",
|
||||||
|
"wave": "Vague",
|
||||||
|
"lv": "N.",
|
||||||
|
"empty": "Vide",
|
||||||
|
} as const;
|
@ -19,6 +19,7 @@ import {
|
|||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { egg } from "./egg";
|
import { egg } from "./egg";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { gameMode } from "./game-mode";
|
||||||
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -30,6 +31,7 @@ import { pokeball } from "./pokeball";
|
|||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonInfo } from "./pokemon-info";
|
import { pokemonInfo } from "./pokemon-info";
|
||||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
|
||||||
import { splashMessages } from "./splash-messages";
|
import { splashMessages } from "./splash-messages";
|
||||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||||
import { titles, trainerClasses, trainerNames } from "./trainers";
|
import { titles, trainerClasses, trainerNames } from "./trainers";
|
||||||
@ -58,6 +60,7 @@ export const itConfig = {
|
|||||||
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
||||||
egg: egg,
|
egg: egg,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
gameMode: gameMode,
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
growth: growth,
|
growth: growth,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
@ -69,6 +72,7 @@ export const itConfig = {
|
|||||||
pokemon: pokemon,
|
pokemon: pokemon,
|
||||||
pokemonInfo: pokemonInfo,
|
pokemonInfo: pokemonInfo,
|
||||||
pokemonInfoContainer: pokemonInfoContainer,
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
|
saveSlotSelectUiHandler: saveSlotSelectUiHandler,
|
||||||
splashMessages: splashMessages,
|
splashMessages: splashMessages,
|
||||||
starterSelectUiHandler: starterSelectUiHandler,
|
starterSelectUiHandler: starterSelectUiHandler,
|
||||||
titles: titles,
|
titles: titles,
|
||||||
|
10
src/locales/it/game-mode.ts
Normal file
10
src/locales/it/game-mode.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const gameMode: SimpleTranslationEntries = {
|
||||||
|
"classic": "Classic",
|
||||||
|
"endless": "Endless",
|
||||||
|
"endlessSpliced": "Endless (Spliced)",
|
||||||
|
"dailyRun": "Daily Run",
|
||||||
|
"unknown": "Unknown",
|
||||||
|
"challenge": "Challenge",
|
||||||
|
} as const;
|
@ -40,13 +40,13 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"weeklyRankings": "Classifica Settimanale",
|
"weeklyRankings": "Classifica Settimanale",
|
||||||
"noRankings": "Nessuna Classifica",
|
"noRankings": "Nessuna Classifica",
|
||||||
"loading": "Caricamento…",
|
"loading": "Caricamento…",
|
||||||
|
"loadingAsset": "Loading asset: {{assetName}}",
|
||||||
"playersOnline": "Giocatori Online",
|
"playersOnline": "Giocatori Online",
|
||||||
"evolving": "Cosa?\n{{pokemonName}} si evolvendo!",
|
"evolving": "Cosa?\n{{pokemonName}} si evolvendo!",
|
||||||
"stoppedEvolving": "{{pokemonName}} ha smesso di evolversi.",
|
"stoppedEvolving": "{{pokemonName}} ha smesso di evolversi.",
|
||||||
"pauseEvolutionsQuestion": "Vuoi sospendere le evoluzioni per {{pokemonName}}?\nLe evoluzioni possono essere riattivate dalla schermata del party.",
|
"pauseEvolutionsQuestion": "Vuoi sospendere le evoluzioni per {{pokemonName}}?\nLe evoluzioni possono essere riattivate dalla schermata del party.",
|
||||||
"evolutionsPaused": "Le evoluzioni sono state sospese per {{pokemonName}}.",
|
"evolutionsPaused": "Le evoluzioni sono state sospese per {{pokemonName}}.",
|
||||||
"evolutionDone": "Congratulazioni!\n{{pokemonName}} si è evoluto in {{evolvedPokemonName}}!",
|
"evolutionDone": "Congratulazioni!\n{{pokemonName}} si è evoluto in {{evolvedPokemonName}}!",
|
||||||
"empty":"Vuoto",
|
|
||||||
"yes":"Si",
|
"yes":"Si",
|
||||||
"no":"No",
|
"no":"No",
|
||||||
"disclaimer": "DISCLAIMER",
|
"disclaimer": "DISCLAIMER",
|
||||||
|
9
src/locales/it/save-slot-select-ui-handler.ts
Normal file
9
src/locales/it/save-slot-select-ui-handler.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const saveSlotSelectUiHandler: SimpleTranslationEntries = {
|
||||||
|
"overwriteData": "Overwrite the data in the selected slot?",
|
||||||
|
"loading": "Loading...",
|
||||||
|
"wave": "Wave",
|
||||||
|
"lv": "Lv",
|
||||||
|
"empty": "Vuoto",
|
||||||
|
} as const;
|
@ -1,67 +1,67 @@
|
|||||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
export const challenges: SimpleTranslationEntries = {
|
export const challenges: SimpleTranslationEntries = {
|
||||||
"title": "Challenge Modifiers",
|
"title": "챌린지 조건 설정",
|
||||||
"points": "Bad Ideas",
|
"points": "Bad Ideas",
|
||||||
"confirm_start": "Proceed with these challenges?",
|
"confirm_start": "이 조건으로 챌린지를 진행하시겠습니까?",
|
||||||
"singleGeneration.name": "Mono Gen",
|
"singleGeneration.name": "단일 세대",
|
||||||
"singleGeneration.value.0": "Off",
|
"singleGeneration.value.0": "설정 안함",
|
||||||
"singleGeneration.desc.0": "You can only use pokemon from the chosen generation.",
|
"singleGeneration.desc.0": "선택한 세대의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleGeneration.value.1": "Gen 1",
|
"singleGeneration.value.1": "1세대",
|
||||||
"singleGeneration.desc.1": "You can only use pokemon from generation one.",
|
"singleGeneration.desc.1": "1세대의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleGeneration.value.2": "Gen 2",
|
"singleGeneration.value.2": "2세대",
|
||||||
"singleGeneration.desc.2": "You can only use pokemon from generation two.",
|
"singleGeneration.desc.2": "2세대의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleGeneration.value.3": "Gen 3",
|
"singleGeneration.value.3": "3세대",
|
||||||
"singleGeneration.desc.3": "You can only use pokemon from generation three.",
|
"singleGeneration.desc.3": "3세대의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleGeneration.value.4": "Gen 4",
|
"singleGeneration.value.4": "4세대",
|
||||||
"singleGeneration.desc.4": "You can only use pokemon from generation four.",
|
"singleGeneration.desc.4": "4세대의 포켓몬만 사용할 수 있습니다r",
|
||||||
"singleGeneration.value.5": "Gen 5",
|
"singleGeneration.value.5": "5세대",
|
||||||
"singleGeneration.desc.5": "You can only use pokemon from generation five.",
|
"singleGeneration.desc.5": "5세대의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleGeneration.value.6": "Gen 6",
|
"singleGeneration.value.6": "6세대",
|
||||||
"singleGeneration.desc.6": "You can only use pokemon from generation six.",
|
"singleGeneration.desc.6": "6세대의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleGeneration.value.7": "Gen 7",
|
"singleGeneration.value.7": "7세대",
|
||||||
"singleGeneration.desc.7": "You can only use pokemon from generation seven.",
|
"singleGeneration.desc.7": "7세대의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleGeneration.value.8": "Gen 8",
|
"singleGeneration.value.8": "8세대",
|
||||||
"singleGeneration.desc.8": "You can only use pokemon from generation eight.",
|
"singleGeneration.desc.8": "8세대의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleGeneration.value.9": "Gen 9",
|
"singleGeneration.value.9": "9세대",
|
||||||
"singleGeneration.desc.9": "You can only use pokemon from generation nine.",
|
"singleGeneration.desc.9": "9세대의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.name": "Mono Type",
|
"singleType.name": "단일 타입",
|
||||||
"singleType.value.0": "Off",
|
"singleType.value.0": "설정 안함",
|
||||||
"singleType.desc.0": "You can only use pokemon of the chosen type.",
|
"singleType.desc.0": "선택한 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.1": "Normal",
|
"singleType.value.1": "노말",
|
||||||
"singleType.desc.1": "You can only use pokemon with the Normal type.",
|
"singleType.desc.1": "노말 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.2": "Fighting",
|
"singleType.value.2": "격투",
|
||||||
"singleType.desc.2": "You can only use pokemon with the Fighting type.",
|
"singleType.desc.2": "격투 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.3": "Flying",
|
"singleType.value.3": "비행",
|
||||||
"singleType.desc.3": "You can only use pokemon with the Flying type.",
|
"singleType.desc.3": "비행 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.4": "Poison",
|
"singleType.value.4": "독",
|
||||||
"singleType.desc.4": "You can only use pokemon with the Poison type.",
|
"singleType.desc.4": "독 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.5": "Ground",
|
"singleType.value.5": "땅",
|
||||||
"singleType.desc.5": "You can only use pokemon with the Ground type.",
|
"singleType.desc.5": "땅 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.6": "Rock",
|
"singleType.value.6": "바위 ",
|
||||||
"singleType.desc.6": "You can only use pokemon with the Rock type.",
|
"singleType.desc.6": "바위 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.7": "Bug",
|
"singleType.value.7": "벌레",
|
||||||
"singleType.desc.7": "You can only use pokemon with the Bug type.",
|
"singleType.desc.7": "벌레 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.8": "Ghost",
|
"singleType.value.8": "고스트",
|
||||||
"singleType.desc.8": "You can only use pokemon with the Ghost type.",
|
"singleType.desc.8": "고스트 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.9": "Steel",
|
"singleType.value.9": "강철",
|
||||||
"singleType.desc.9": "You can only use pokemon with the Steel type.",
|
"singleType.desc.9": "강철 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.10": "Fire",
|
"singleType.value.10": "불꽃",
|
||||||
"singleType.desc.10": "You can only use pokemon with the Fire type.",
|
"singleType.desc.10": "불꽃 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.11": "Water",
|
"singleType.value.11": "물",
|
||||||
"singleType.desc.11": "You can only use pokemon with the Water type.",
|
"singleType.desc.11": "물 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.12": "Grass",
|
"singleType.value.12": "풀",
|
||||||
"singleType.desc.12": "You can only use pokemon with the Grass type.",
|
"singleType.desc.12": "풀 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.13": "Electric",
|
"singleType.value.13": "전기",
|
||||||
"singleType.desc.13": "You can only use pokemon with the Electric type.",
|
"singleType.desc.13": "전기 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.14": "Psychic",
|
"singleType.value.14": "에스퍼",
|
||||||
"singleType.desc.14": "You can only use pokemon with the Psychic type.",
|
"singleType.desc.14": "에스퍼 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.15": "Ice",
|
"singleType.value.15": "얼음",
|
||||||
"singleType.desc.15": "You can only use pokemon with the Ice type.",
|
"singleType.desc.15": "얼음 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.16": "Dragon",
|
"singleType.value.16": "드래곤",
|
||||||
"singleType.desc.16": "You can only use pokemon with the Dragon type.",
|
"singleType.desc.16": "드래곤 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.17": "Dark",
|
"singleType.value.17": "악",
|
||||||
"singleType.desc.17": "You can only use pokemon with the Dark type.",
|
"singleType.desc.17": "악 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
"singleType.value.18": "Fairy",
|
"singleType.value.18": "페어리",
|
||||||
"singleType.desc.18": "You can only use pokemon with the Fairy type.",
|
"singleType.desc.18": "페어리 타입의 포켓몬만 사용할 수 있습니다.",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -19,6 +19,7 @@ import {
|
|||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { egg } from "./egg";
|
import { egg } from "./egg";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { gameMode } from "./game-mode";
|
||||||
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -30,6 +31,7 @@ import { pokeball } from "./pokeball";
|
|||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonInfo } from "./pokemon-info";
|
import { pokemonInfo } from "./pokemon-info";
|
||||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
|
||||||
import { splashMessages } from "./splash-messages";
|
import { splashMessages } from "./splash-messages";
|
||||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||||
import { titles, trainerClasses, trainerNames } from "./trainers";
|
import { titles, trainerClasses, trainerNames } from "./trainers";
|
||||||
@ -58,6 +60,7 @@ export const koConfig = {
|
|||||||
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
||||||
egg: egg,
|
egg: egg,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
gameMode: gameMode,
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
growth: growth,
|
growth: growth,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
@ -69,6 +72,7 @@ export const koConfig = {
|
|||||||
pokemon: pokemon,
|
pokemon: pokemon,
|
||||||
pokemonInfo: pokemonInfo,
|
pokemonInfo: pokemonInfo,
|
||||||
pokemonInfoContainer: pokemonInfoContainer,
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
|
saveSlotSelectUiHandler: saveSlotSelectUiHandler,
|
||||||
splashMessages: splashMessages,
|
splashMessages: splashMessages,
|
||||||
starterSelectUiHandler: starterSelectUiHandler,
|
starterSelectUiHandler: starterSelectUiHandler,
|
||||||
titles: titles,
|
titles: titles,
|
||||||
|
@ -906,51 +906,51 @@ export const PGMdialogue: DialogueTranslationEntries = {
|
|||||||
},
|
},
|
||||||
"crispin": {
|
"crispin": {
|
||||||
"encounter": {
|
"encounter": {
|
||||||
1: "I wanna win, so that's exactly what I'll do!",
|
1: "이기고 싶으니까 이기고 말겠어!",
|
||||||
2: "I battle because I wanna battle! And you know what? That's how it should be!"
|
2: "싸우고 싶으면 싸운다! 이거면 충분하지 않아!?"
|
||||||
},
|
},
|
||||||
"victory": {
|
"victory": {
|
||||||
1: "I wanted to win…but I lost!",
|
1: "이기고 싶었는데…졌잖아!",
|
||||||
2: "I lost…'cause I couldn't win!"
|
2: "이기지 못해서…지고 말았어!"
|
||||||
},
|
},
|
||||||
"defeat": {
|
"defeat": {
|
||||||
1: "Hey, wait a sec. Did I just win? I think I just won! Talk about satisfying!",
|
1: "잠시만. 나 지금 이긴거지? 이긴 거 맞지! 기분 좋은데!",
|
||||||
2: "Wooo! That was amazing!"
|
2: "우와아! 이거 굉장한데!"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"amarys": {
|
"amarys": {
|
||||||
"encounter": {
|
"encounter": {
|
||||||
1: `I want to be the one to help a certain person. That being the case, I cannot afford to lose.
|
1: `네리네는 그 사람을 구원하고 싶습니다. 그렇기에 패배는 용납되지 않습니다.
|
||||||
$… Our battle starts now.`,
|
$… 승부를 시작합니다.`,
|
||||||
},
|
},
|
||||||
"victory": {
|
"victory": {
|
||||||
1: "I am… not enough, I see."
|
1: "네리네는… 안 된다는 건가요."
|
||||||
},
|
},
|
||||||
"defeat": {
|
"defeat": {
|
||||||
1: "Victory belongs to me. Well fought."
|
1: "네리네가 승리했습니다. 수고하셨습니다."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lacey": {
|
"lacey": {
|
||||||
"encounter": {
|
"encounter": {
|
||||||
1: "I'll be facing you with my usual party as a member of the Elite Four."
|
1: "이번에는 사천왕으로서 승부하는 거니까 평소 사용하는 아이들로 상대해 드릴게요!"
|
||||||
},
|
},
|
||||||
"victory": {
|
"victory": {
|
||||||
1: "That was a great battle!"
|
1: "멋진 포켓몬 배틀이었어요!"
|
||||||
},
|
},
|
||||||
"defeat": {
|
"defeat": {
|
||||||
1: "Let's give your Pokémon a nice round of applause for their efforts!"
|
1: "당신의 포켓몬의 노력에 박수를 보내주세요!"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"drayton": {
|
"drayton": {
|
||||||
"encounter": {
|
"encounter": {
|
||||||
1: `Man, I love chairs. Don't you love chairs? What lifesavers.
|
1: `의자는 좋은 거야. 너도 그렇게 생각해? 정말 고마운 물건이지.
|
||||||
$I don't get why everyone doesn't just sit all the time. Standing up's tiring work!`,
|
$왜 다들 앉지 않는 걸까. 서 있는 건 힘들잖아!`,
|
||||||
},
|
},
|
||||||
"victory": {
|
"victory": {
|
||||||
1: "Guess I should've expected that!"
|
1: "전보다 더 강해질 줄이야!"
|
||||||
},
|
},
|
||||||
"defeat": {
|
"defeat": {
|
||||||
1: "Heh heh! Don't mind me, just scooping up a W over here. I get it if you're upset, but don't go full Kieran on me, OK?"
|
1: "헤헤헷! 내 승리야. 분한 건 알겠지만 카지처럼 나가떨어지지마, 응?"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ramos": {
|
"ramos": {
|
||||||
|
10
src/locales/ko/game-mode.ts
Normal file
10
src/locales/ko/game-mode.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const gameMode: SimpleTranslationEntries = {
|
||||||
|
"classic": "클래식",
|
||||||
|
"endless": "엔들리스",
|
||||||
|
"endlessSpliced": "엔들리스(융합체)",
|
||||||
|
"dailyRun": "데일리 런",
|
||||||
|
"unknown": "언노운",
|
||||||
|
"challenge": "챌린지",
|
||||||
|
} as const;
|
@ -45,8 +45,8 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"weeklyRankings": "주간 랭킹",
|
"weeklyRankings": "주간 랭킹",
|
||||||
"noRankings": "랭킹 정보 없음",
|
"noRankings": "랭킹 정보 없음",
|
||||||
"loading": "로딩 중…",
|
"loading": "로딩 중…",
|
||||||
|
"loadingAsset": "Loading asset: {{assetName}}",
|
||||||
"playersOnline": "플레이어 온라인",
|
"playersOnline": "플레이어 온라인",
|
||||||
"empty":"빈 슬롯",
|
|
||||||
"yes":"예",
|
"yes":"예",
|
||||||
"no":"아니오",
|
"no":"아니오",
|
||||||
"disclaimer": "면책 조항",
|
"disclaimer": "면책 조항",
|
||||||
|
@ -3393,7 +3393,7 @@ export const move: MoveTranslationEntries = {
|
|||||||
effect: "무수히 많은 불덩이로 공격한다. 화상 상태로 만들 때가 있다. 상대가 상태 이상인 경우 위력이 2배가 된다."
|
effect: "무수히 많은 불덩이로 공격한다. 화상 상태로 만들 때가 있다. 상대가 상태 이상인 경우 위력이 2배가 된다."
|
||||||
},
|
},
|
||||||
ceaselessEdge: {
|
ceaselessEdge: {
|
||||||
name: "비검천충파",
|
name: "비검천중파",
|
||||||
effect: "조개껍질 검으로 공격한다. 조개껍질 파편은 압정이 되어 상대의 발밑에 흩어진다."
|
effect: "조개껍질 검으로 공격한다. 조개껍질 파편은 압정이 되어 상대의 발밑에 흩어진다."
|
||||||
},
|
},
|
||||||
bleakwindStorm: {
|
bleakwindStorm: {
|
||||||
|
9
src/locales/ko/save-slot-select-ui-handler.ts
Normal file
9
src/locales/ko/save-slot-select-ui-handler.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const saveSlotSelectUiHandler: SimpleTranslationEntries = {
|
||||||
|
"overwriteData": "선택한 슬롯에 데이터를 덮어쓰시겠습니까?",
|
||||||
|
"loading": "로딩 중...",
|
||||||
|
"wave": "웨이브",
|
||||||
|
"lv": "Lv",
|
||||||
|
"empty": "빈 슬롯",
|
||||||
|
} as const;
|
@ -5,7 +5,7 @@ export const battle: SimpleTranslationEntries = {
|
|||||||
"trainerAppeared": "{{trainerName}}\nquer batalhar!",
|
"trainerAppeared": "{{trainerName}}\nquer batalhar!",
|
||||||
"trainerAppearedDouble": "{{trainerName}}\nquerem batalhar!",
|
"trainerAppearedDouble": "{{trainerName}}\nquerem batalhar!",
|
||||||
"singleWildAppeared": "Um {{pokemonName}} selvagem apareceu!",
|
"singleWildAppeared": "Um {{pokemonName}} selvagem apareceu!",
|
||||||
"trainerSendOut": "{{trainerName}} sent out\n{{pokemonName}}!",
|
"trainerSendOut": "{{trainerName}} escolheu\n{{pokemonName}}!",
|
||||||
"multiWildAppeared": "Um {{pokemonName1}} e um {{pokemonName2}} selvagens\napareceram!",
|
"multiWildAppeared": "Um {{pokemonName1}} e um {{pokemonName2}} selvagens\napareceram!",
|
||||||
"playerComeBack": "{{pokemonName}}, retorne!",
|
"playerComeBack": "{{pokemonName}}, retorne!",
|
||||||
"trainerComeBack": "{{trainerName}} retirou {{pokemonName}} da batalha!",
|
"trainerComeBack": "{{trainerName}} retirou {{pokemonName}} da batalha!",
|
||||||
@ -13,9 +13,9 @@ export const battle: SimpleTranslationEntries = {
|
|||||||
"trainerGo": "{{trainerName}} escolheu {{pokemonName}}!",
|
"trainerGo": "{{trainerName}} escolheu {{pokemonName}}!",
|
||||||
"switchQuestion": "Quer trocar\nde {{pokemonName}}?",
|
"switchQuestion": "Quer trocar\nde {{pokemonName}}?",
|
||||||
"trainerDefeated": "Você derrotou\n{{trainerName}}!",
|
"trainerDefeated": "Você derrotou\n{{trainerName}}!",
|
||||||
"moneyWon": "You got\n₽{{moneyAmount}} for winning!",
|
"moneyWon": "Você ganhou\n₽{{moneyAmount}} por ganhar!",
|
||||||
"pokemonCaught": "{{pokemonName}} foi capturado!",
|
"pokemonCaught": "{{pokemonName}} foi capturado!",
|
||||||
"partyFull": "Your party is full.\nRelease a Pokémon to make room for {{pokemonName}}?",
|
"partyFull": "Sua equipe está cheia.\nSolte um Pokémon para ter espaço para {{pokemonName}}?",
|
||||||
"pokemon": "Pokémon",
|
"pokemon": "Pokémon",
|
||||||
"sendOutPokemon": "{{pokemonName}}, eu escolho você!!",
|
"sendOutPokemon": "{{pokemonName}}, eu escolho você!!",
|
||||||
"hitResultCriticalHit": "Um golpe crítico!",
|
"hitResultCriticalHit": "Um golpe crítico!",
|
||||||
|
@ -1,67 +1,67 @@
|
|||||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
export const challenges: SimpleTranslationEntries = {
|
export const challenges: SimpleTranslationEntries = {
|
||||||
"title": "Challenge Modifiers",
|
"title": "Desafios",
|
||||||
"points": "Bad Ideas",
|
"start": "Iniciar",
|
||||||
"confirm_start": "Proceed with these challenges?",
|
"illegalEvolution": "{{pokemon}} não pode ser escolhido\nnesse desafio!",
|
||||||
"singleGeneration.name": "Mono Gen",
|
"singleGeneration.name": "Geração Única",
|
||||||
"singleGeneration.value.0": "Off",
|
"singleGeneration.value.0": "Desligado",
|
||||||
"singleGeneration.desc.0": "You can only use pokemon from the chosen generation.",
|
"singleGeneration.desc.0": "Você só pode user Pokémon de uma única geração.",
|
||||||
"singleGeneration.value.1": "Gen 1",
|
"singleGeneration.value.1": "Geração 1",
|
||||||
"singleGeneration.desc.1": "You can only use pokemon from generation one.",
|
"singleGeneration.desc.1": "Você só pode user Pokémon da primeira geração.",
|
||||||
"singleGeneration.value.2": "Gen 2",
|
"singleGeneration.value.2": "Geração 2",
|
||||||
"singleGeneration.desc.2": "You can only use pokemon from generation two.",
|
"singleGeneration.desc.2": "Você só pode user Pokémon da segunda geração.",
|
||||||
"singleGeneration.value.3": "Gen 3",
|
"singleGeneration.value.3": "Geração 3",
|
||||||
"singleGeneration.desc.3": "You can only use pokemon from generation three.",
|
"singleGeneration.desc.3": "Você só pode user Pokémon da terceira geração.",
|
||||||
"singleGeneration.value.4": "Gen 4",
|
"singleGeneration.value.4": "Geração 4",
|
||||||
"singleGeneration.desc.4": "You can only use pokemon from generation four.",
|
"singleGeneration.desc.4": "Você só pode user Pokémon da quarta geração.",
|
||||||
"singleGeneration.value.5": "Gen 5",
|
"singleGeneration.value.5": "Geração 5",
|
||||||
"singleGeneration.desc.5": "You can only use pokemon from generation five.",
|
"singleGeneration.desc.5": "Você só pode user Pokémon da quinta geração.",
|
||||||
"singleGeneration.value.6": "Gen 6",
|
"singleGeneration.value.6": "Geração 6",
|
||||||
"singleGeneration.desc.6": "You can only use pokemon from generation six.",
|
"singleGeneration.desc.6": "Você só pode user Pokémon da sexta geração.",
|
||||||
"singleGeneration.value.7": "Gen 7",
|
"singleGeneration.value.7": "Geração 7",
|
||||||
"singleGeneration.desc.7": "You can only use pokemon from generation seven.",
|
"singleGeneration.desc.7": "Você só pode user Pokémon da sétima geração.",
|
||||||
"singleGeneration.value.8": "Gen 8",
|
"singleGeneration.value.8": "Geração 8",
|
||||||
"singleGeneration.desc.8": "You can only use pokemon from generation eight.",
|
"singleGeneration.desc.8": "Você só pode user Pokémon da oitava geração.",
|
||||||
"singleGeneration.value.9": "Gen 9",
|
"singleGeneration.value.9": "Geração 9",
|
||||||
"singleGeneration.desc.9": "You can only use pokemon from generation nine.",
|
"singleGeneration.desc.9": "Você só pode user Pokémon da nona geração.",
|
||||||
"singleType.name": "Mono Type",
|
"singleType.name": "Tipo Único",
|
||||||
"singleType.value.0": "Off",
|
"singleType.value.0": "Desligado",
|
||||||
"singleType.desc.0": "You can only use pokemon of the chosen type.",
|
"singleType.desc.0": "Você só pode user Pokémon de um único tipo.",
|
||||||
"singleType.value.1": "Normal",
|
"singleType.value.1": "Normal",
|
||||||
"singleType.desc.1": "You can only use pokemon with the Normal type.",
|
"singleType.desc.1": "Você só pode user Pokémon do tipo Normal.",
|
||||||
"singleType.value.2": "Fighting",
|
"singleType.value.2": "Lutador",
|
||||||
"singleType.desc.2": "You can only use pokemon with the Fighting type.",
|
"singleType.desc.2": "Você só pode user Pokémon do tipo Lutador.",
|
||||||
"singleType.value.3": "Flying",
|
"singleType.value.3": "Voador",
|
||||||
"singleType.desc.3": "You can only use pokemon with the Flying type.",
|
"singleType.desc.3": "Você só pode user Pokémon do tipo Voador.",
|
||||||
"singleType.value.4": "Poison",
|
"singleType.value.4": "Veneno",
|
||||||
"singleType.desc.4": "You can only use pokemon with the Poison type.",
|
"singleType.desc.4": "Você só pode user Pokémon do tipo Veneno.",
|
||||||
"singleType.value.5": "Ground",
|
"singleType.value.5": "Terra",
|
||||||
"singleType.desc.5": "You can only use pokemon with the Ground type.",
|
"singleType.desc.5": "Você só pode user Pokémon do tipo Terra.",
|
||||||
"singleType.value.6": "Rock",
|
"singleType.value.6": "Pedra",
|
||||||
"singleType.desc.6": "You can only use pokemon with the Rock type.",
|
"singleType.desc.6": "Você só pode user Pokémon do tipo Pedra.",
|
||||||
"singleType.value.7": "Bug",
|
"singleType.value.7": "Inseto",
|
||||||
"singleType.desc.7": "You can only use pokemon with the Bug type.",
|
"singleType.desc.7": "Você só pode user Pokémon do tipo Inseto.",
|
||||||
"singleType.value.8": "Ghost",
|
"singleType.value.8": "Fantasma",
|
||||||
"singleType.desc.8": "You can only use pokemon with the Ghost type.",
|
"singleType.desc.8": "Você só pode user Pokémon do tipo Fantasma.",
|
||||||
"singleType.value.9": "Steel",
|
"singleType.value.9": "Aço",
|
||||||
"singleType.desc.9": "You can only use pokemon with the Steel type.",
|
"singleType.desc.9": "Você só pode user Pokémon do tipo Aço.",
|
||||||
"singleType.value.10": "Fire",
|
"singleType.value.10": "Fogo",
|
||||||
"singleType.desc.10": "You can only use pokemon with the Fire type.",
|
"singleType.desc.10": "Você só pode user Pokémon do tipo Fogo.",
|
||||||
"singleType.value.11": "Water",
|
"singleType.value.11": "Água",
|
||||||
"singleType.desc.11": "You can only use pokemon with the Water type.",
|
"singleType.desc.11": "Você só pode user Pokémon do tipo Água.",
|
||||||
"singleType.value.12": "Grass",
|
"singleType.value.12": "Grama",
|
||||||
"singleType.desc.12": "You can only use pokemon with the Grass type.",
|
"singleType.desc.12": "Você só pode user Pokémon do tipo Grama.",
|
||||||
"singleType.value.13": "Electric",
|
"singleType.value.13": "Elétrico",
|
||||||
"singleType.desc.13": "You can only use pokemon with the Electric type.",
|
"singleType.desc.13": "Você só pode user Pokémon do tipo Elétrico.",
|
||||||
"singleType.value.14": "Psychic",
|
"singleType.value.14": "Psíquico",
|
||||||
"singleType.desc.14": "You can only use pokemon with the Psychic type.",
|
"singleType.desc.14": "Você só pode user Pokémon do tipo Psíquico.",
|
||||||
"singleType.value.15": "Ice",
|
"singleType.value.15": "Gelo",
|
||||||
"singleType.desc.15": "You can only use pokemon with the Ice type.",
|
"singleType.desc.15": "Você só pode user Pokémon do tipo Gelo.",
|
||||||
"singleType.value.16": "Dragon",
|
"singleType.value.16": "Dragão",
|
||||||
"singleType.desc.16": "You can only use pokemon with the Dragon type.",
|
"singleType.desc.16": "Você só pode user Pokémon do tipo Dragão.",
|
||||||
"singleType.value.17": "Dark",
|
"singleType.value.17": "Sombrio",
|
||||||
"singleType.desc.17": "You can only use pokemon with the Dark type.",
|
"singleType.desc.17": "Você só pode user Pokémon do tipo Sombrio.",
|
||||||
"singleType.value.18": "Fairy",
|
"singleType.value.18": "Fada",
|
||||||
"singleType.desc.18": "You can only use pokemon with the Fairy type.",
|
"singleType.desc.18": "Você só pode user Pokémon do tipo Fada.",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -19,6 +19,7 @@ import {
|
|||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { egg } from "./egg";
|
import { egg } from "./egg";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { gameMode } from "./game-mode";
|
||||||
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -26,17 +27,18 @@ import { menuUiHandler } from "./menu-ui-handler";
|
|||||||
import { modifierType } from "./modifier-type";
|
import { modifierType } from "./modifier-type";
|
||||||
import { move } from "./move";
|
import { move } from "./move";
|
||||||
import { nature } from "./nature";
|
import { nature } from "./nature";
|
||||||
|
import { partyUiHandler } from "./party-ui-handler";
|
||||||
import { pokeball } from "./pokeball";
|
import { pokeball } from "./pokeball";
|
||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonInfo } from "./pokemon-info";
|
import { pokemonInfo } from "./pokemon-info";
|
||||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
|
||||||
import { splashMessages } from "./splash-messages";
|
import { splashMessages } from "./splash-messages";
|
||||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||||
import { titles, trainerClasses, trainerNames } from "./trainers";
|
import { titles, trainerClasses, trainerNames } from "./trainers";
|
||||||
import { tutorial } from "./tutorial";
|
import { tutorial } from "./tutorial";
|
||||||
import { voucher } from "./voucher";
|
import { voucher } from "./voucher";
|
||||||
import { weather } from "./weather";
|
import { weather } from "./weather";
|
||||||
import { partyUiHandler } from "./party-ui-handler";
|
|
||||||
|
|
||||||
export const ptBrConfig = {
|
export const ptBrConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
@ -58,6 +60,7 @@ export const ptBrConfig = {
|
|||||||
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
||||||
egg: egg,
|
egg: egg,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
gameMode: gameMode,
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
growth: growth,
|
growth: growth,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
@ -65,10 +68,12 @@ export const ptBrConfig = {
|
|||||||
modifierType: modifierType,
|
modifierType: modifierType,
|
||||||
move: move,
|
move: move,
|
||||||
nature: nature,
|
nature: nature,
|
||||||
|
partyUiHandler: partyUiHandler,
|
||||||
pokeball: pokeball,
|
pokeball: pokeball,
|
||||||
pokemon: pokemon,
|
pokemon: pokemon,
|
||||||
pokemonInfo: pokemonInfo,
|
pokemonInfo: pokemonInfo,
|
||||||
pokemonInfoContainer: pokemonInfoContainer,
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
|
saveSlotSelectUiHandler: saveSlotSelectUiHandler,
|
||||||
splashMessages: splashMessages,
|
splashMessages: splashMessages,
|
||||||
starterSelectUiHandler: starterSelectUiHandler,
|
starterSelectUiHandler: starterSelectUiHandler,
|
||||||
titles: titles,
|
titles: titles,
|
||||||
@ -77,5 +82,4 @@ export const ptBrConfig = {
|
|||||||
tutorial: tutorial,
|
tutorial: tutorial,
|
||||||
voucher: voucher,
|
voucher: voucher,
|
||||||
weather: weather,
|
weather: weather,
|
||||||
partyUiHandler: partyUiHandler
|
|
||||||
};
|
};
|
||||||
|
10
src/locales/pt_BR/game-mode.ts
Normal file
10
src/locales/pt_BR/game-mode.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const gameMode: SimpleTranslationEntries = {
|
||||||
|
"classic": "Clássico",
|
||||||
|
"endless": "Infinito",
|
||||||
|
"endlessSpliced": "Infinito (Fusões)",
|
||||||
|
"dailyRun": "Desafio Diário",
|
||||||
|
"unknown": "Desconhecido",
|
||||||
|
"challenge": "Desafio",
|
||||||
|
} as const;
|
@ -1,10 +1,10 @@
|
|||||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
export const growth: SimpleTranslationEntries = {
|
export const growth: SimpleTranslationEntries = {
|
||||||
"Erratic": "Instável",
|
"Erratic": "Muito Rápido",
|
||||||
"Fast": "Rápido",
|
"Fast": "Rápido",
|
||||||
"Medium_Fast": "Meio Rápido",
|
"Medium_Fast": "Meio Rápido",
|
||||||
"Medium_Slow": "Meio Lento",
|
"Medium_Slow": "Meio Lento",
|
||||||
"Slow": "Lento",
|
"Slow": "Lento",
|
||||||
"Fluctuating": "Flutuante"
|
"Fluctuating": "Muito Lento",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -45,8 +45,8 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"weeklyRankings": "Classificação Semanal",
|
"weeklyRankings": "Classificação Semanal",
|
||||||
"noRankings": "Sem Classificação",
|
"noRankings": "Sem Classificação",
|
||||||
"loading": "Carregando…",
|
"loading": "Carregando…",
|
||||||
|
"loadingAsset": "Carregando recurso: {{assetName}}",
|
||||||
"playersOnline": "Jogadores Ativos",
|
"playersOnline": "Jogadores Ativos",
|
||||||
"empty": "Vazio",
|
|
||||||
"yes": "Sim",
|
"yes": "Sim",
|
||||||
"no": "Não",
|
"no": "Não",
|
||||||
"disclaimer": "AVISO",
|
"disclaimer": "AVISO",
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
export const partyUiHandler: SimpleTranslationEntries = {
|
export const partyUiHandler: SimpleTranslationEntries = {
|
||||||
"SEND_OUT": "Send Out",
|
"SEND_OUT": "Trocar",
|
||||||
"SUMMARY": "Summary",
|
"SUMMARY": "Sumário",
|
||||||
"CANCEL": "Cancel",
|
"CANCEL": "Cancelar",
|
||||||
"RELEASE": "Release",
|
"RELEASE": "Soltar",
|
||||||
"APPLY": "Apply",
|
"APPLY": "Aplicar",
|
||||||
"TEACH": "Teach"
|
"TEACH": "Ensinar",
|
||||||
} as const;
|
} as const;
|
||||||
|
9
src/locales/pt_BR/save-slot-select-ui-handler.ts
Normal file
9
src/locales/pt_BR/save-slot-select-ui-handler.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const saveSlotSelectUiHandler: SimpleTranslationEntries = {
|
||||||
|
"overwriteData": "Substituir os dados desse slot?",
|
||||||
|
"loading": "Carregando...",
|
||||||
|
"wave": "Onda",
|
||||||
|
"lv": "Nv",
|
||||||
|
"empty": "Vazio",
|
||||||
|
} as const;
|
@ -19,6 +19,7 @@ import {
|
|||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { egg } from "./egg";
|
import { egg } from "./egg";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { gameMode } from "./game-mode";
|
||||||
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -30,6 +31,7 @@ import { pokeball } from "./pokeball";
|
|||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonInfo } from "./pokemon-info";
|
import { pokemonInfo } from "./pokemon-info";
|
||||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
|
||||||
import { splashMessages } from "./splash-messages";
|
import { splashMessages } from "./splash-messages";
|
||||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||||
import { titles, trainerClasses, trainerNames } from "./trainers";
|
import { titles, trainerClasses, trainerNames } from "./trainers";
|
||||||
@ -58,6 +60,7 @@ export const zhCnConfig = {
|
|||||||
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
||||||
egg: egg,
|
egg: egg,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
gameMode: gameMode,
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
growth: growth,
|
growth: growth,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
@ -69,6 +72,7 @@ export const zhCnConfig = {
|
|||||||
pokemon: pokemon,
|
pokemon: pokemon,
|
||||||
pokemonInfo: pokemonInfo,
|
pokemonInfo: pokemonInfo,
|
||||||
pokemonInfoContainer: pokemonInfoContainer,
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
|
saveSlotSelectUiHandler: saveSlotSelectUiHandler,
|
||||||
splashMessages: splashMessages,
|
splashMessages: splashMessages,
|
||||||
starterSelectUiHandler: starterSelectUiHandler,
|
starterSelectUiHandler: starterSelectUiHandler,
|
||||||
titles: titles,
|
titles: titles,
|
||||||
|
10
src/locales/zh_CN/game-mode.ts
Normal file
10
src/locales/zh_CN/game-mode.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const gameMode: SimpleTranslationEntries = {
|
||||||
|
"classic": "Classic",
|
||||||
|
"endless": "Endless",
|
||||||
|
"endlessSpliced": "Endless (Spliced)",
|
||||||
|
"dailyRun": "Daily Run",
|
||||||
|
"unknown": "Unknown",
|
||||||
|
"challenge": "Challenge",
|
||||||
|
} as const;
|
@ -45,8 +45,8 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"weeklyRankings": "每周排名",
|
"weeklyRankings": "每周排名",
|
||||||
"noRankings": "无排名",
|
"noRankings": "无排名",
|
||||||
"loading": "加载中...",
|
"loading": "加载中...",
|
||||||
|
"loadingAsset": "Loading asset: {{assetName}}",
|
||||||
"playersOnline": "在线玩家",
|
"playersOnline": "在线玩家",
|
||||||
"empty": "空",
|
|
||||||
"yes": "是",
|
"yes": "是",
|
||||||
"no": "否",
|
"no": "否",
|
||||||
"disclaimer": "DISCLAIMER",
|
"disclaimer": "DISCLAIMER",
|
||||||
|
9
src/locales/zh_CN/save-slot-select-ui-handler.ts
Normal file
9
src/locales/zh_CN/save-slot-select-ui-handler.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const saveSlotSelectUiHandler: SimpleTranslationEntries = {
|
||||||
|
"overwriteData": "Overwrite the data in the selected slot?",
|
||||||
|
"loading": "Loading...",
|
||||||
|
"wave": "Wave",
|
||||||
|
"lv": "Lv",
|
||||||
|
"empty": "空",
|
||||||
|
} as const;
|
@ -19,6 +19,7 @@ import {
|
|||||||
} from "./dialogue";
|
} from "./dialogue";
|
||||||
import { egg } from "./egg";
|
import { egg } from "./egg";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { gameMode } from "./game-mode";
|
||||||
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
import { gameStatsUiHandler } from "./game-stats-ui-handler";
|
||||||
import { growth } from "./growth";
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
@ -30,6 +31,7 @@ import { pokeball } from "./pokeball";
|
|||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonInfo } from "./pokemon-info";
|
import { pokemonInfo } from "./pokemon-info";
|
||||||
import { pokemonInfoContainer } from "./pokemon-info-container";
|
import { pokemonInfoContainer } from "./pokemon-info-container";
|
||||||
|
import { saveSlotSelectUiHandler } from "./save-slot-select-ui-handler";
|
||||||
import { splashMessages } from "./splash-messages";
|
import { splashMessages } from "./splash-messages";
|
||||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||||
import { titles, trainerClasses, trainerNames } from "./trainers";
|
import { titles, trainerClasses, trainerNames } from "./trainers";
|
||||||
@ -58,6 +60,7 @@ export const zhTwConfig = {
|
|||||||
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
PGFdoubleBattleDialogue: PGFdoubleBattleDialogue,
|
||||||
egg: egg,
|
egg: egg,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
gameMode: gameMode,
|
||||||
gameStatsUiHandler: gameStatsUiHandler,
|
gameStatsUiHandler: gameStatsUiHandler,
|
||||||
growth: growth,
|
growth: growth,
|
||||||
menu: menu,
|
menu: menu,
|
||||||
@ -69,6 +72,7 @@ export const zhTwConfig = {
|
|||||||
pokemon: pokemon,
|
pokemon: pokemon,
|
||||||
pokemonInfo: pokemonInfo,
|
pokemonInfo: pokemonInfo,
|
||||||
pokemonInfoContainer: pokemonInfoContainer,
|
pokemonInfoContainer: pokemonInfoContainer,
|
||||||
|
saveSlotSelectUiHandler: saveSlotSelectUiHandler,
|
||||||
splashMessages: splashMessages,
|
splashMessages: splashMessages,
|
||||||
starterSelectUiHandler: starterSelectUiHandler,
|
starterSelectUiHandler: starterSelectUiHandler,
|
||||||
titles: titles,
|
titles: titles,
|
||||||
|
10
src/locales/zh_TW/game-mode.ts
Normal file
10
src/locales/zh_TW/game-mode.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const gameMode: SimpleTranslationEntries = {
|
||||||
|
"classic": "Classic",
|
||||||
|
"endless": "Endless",
|
||||||
|
"endlessSpliced": "Endless (Spliced)",
|
||||||
|
"dailyRun": "Daily Run",
|
||||||
|
"unknown": "Unknown",
|
||||||
|
"challenge": "Challenge",
|
||||||
|
} as const;
|
@ -45,8 +45,8 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"weeklyRankings": "每週排名",
|
"weeklyRankings": "每週排名",
|
||||||
"noRankings": "無排名",
|
"noRankings": "無排名",
|
||||||
"loading": "加載中…",
|
"loading": "加載中…",
|
||||||
|
"loadingAsset": "Loading asset: {{assetName}}",
|
||||||
"playersOnline": "在線玩家",
|
"playersOnline": "在線玩家",
|
||||||
"empty":"空",
|
|
||||||
"yes":"是",
|
"yes":"是",
|
||||||
"no":"否",
|
"no":"否",
|
||||||
"disclaimer": "DISCLAIMER",
|
"disclaimer": "DISCLAIMER",
|
||||||
|
9
src/locales/zh_TW/save-slot-select-ui-handler.ts
Normal file
9
src/locales/zh_TW/save-slot-select-ui-handler.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const saveSlotSelectUiHandler: SimpleTranslationEntries = {
|
||||||
|
"overwriteData": "Overwrite the data in the selected slot?",
|
||||||
|
"loading": "Loading...",
|
||||||
|
"wave": "Wave",
|
||||||
|
"lv": "Lv",
|
||||||
|
"empty": "空",
|
||||||
|
} as const;
|
@ -196,36 +196,15 @@ declare module "i18next" {
|
|||||||
interface CustomTypeOptions {
|
interface CustomTypeOptions {
|
||||||
defaultNS: "menu"; // Even if we don't use it, i18next requires a valid default namespace
|
defaultNS: "menu"; // Even if we don't use it, i18next requires a valid default namespace
|
||||||
resources: {
|
resources: {
|
||||||
menu: SimpleTranslationEntries;
|
|
||||||
menuUiHandler: SimpleTranslationEntries;
|
|
||||||
move: MoveTranslationEntries;
|
|
||||||
battle: SimpleTranslationEntries;
|
|
||||||
abilityTriggers: SimpleTranslationEntries;
|
|
||||||
ability: AbilityTranslationEntries;
|
ability: AbilityTranslationEntries;
|
||||||
pokeball: SimpleTranslationEntries;
|
abilityTriggers: SimpleTranslationEntries;
|
||||||
pokemon: SimpleTranslationEntries;
|
achv: AchievementTranslationEntries;
|
||||||
pokemonInfo: PokemonInfoTranslationEntries;
|
battle: SimpleTranslationEntries;
|
||||||
commandUiHandler: SimpleTranslationEntries;
|
|
||||||
fightUiHandler: SimpleTranslationEntries;
|
|
||||||
titles: SimpleTranslationEntries;
|
|
||||||
trainerClasses: SimpleTranslationEntries;
|
|
||||||
trainerNames: SimpleTranslationEntries;
|
|
||||||
tutorial: SimpleTranslationEntries;
|
|
||||||
starterSelectUiHandler: SimpleTranslationEntries;
|
|
||||||
splashMessages: SimpleTranslationEntries;
|
|
||||||
nature: SimpleTranslationEntries;
|
|
||||||
growth: SimpleTranslationEntries;
|
|
||||||
egg: SimpleTranslationEntries;
|
|
||||||
weather: SimpleTranslationEntries;
|
|
||||||
modifierType: ModifierTypeTranslationEntries;
|
|
||||||
battleMessageUiHandler: SimpleTranslationEntries;
|
battleMessageUiHandler: SimpleTranslationEntries;
|
||||||
berry: BerryTranslationEntries;
|
berry: BerryTranslationEntries;
|
||||||
achv: AchievementTranslationEntries;
|
|
||||||
gameStatsUiHandler: SimpleTranslationEntries;
|
|
||||||
challenges: SimpleTranslationEntries;
|
|
||||||
voucher: SimpleTranslationEntries;
|
|
||||||
biome: SimpleTranslationEntries;
|
biome: SimpleTranslationEntries;
|
||||||
pokemonInfoContainer: SimpleTranslationEntries;
|
challenges: SimpleTranslationEntries;
|
||||||
|
commandUiHandler: SimpleTranslationEntries;
|
||||||
PGMdialogue: DialogueTranslationEntries;
|
PGMdialogue: DialogueTranslationEntries;
|
||||||
PGMbattleSpecDialogue: SimpleTranslationEntries;
|
PGMbattleSpecDialogue: SimpleTranslationEntries;
|
||||||
PGMmiscDialogue: SimpleTranslationEntries;
|
PGMmiscDialogue: SimpleTranslationEntries;
|
||||||
@ -234,7 +213,30 @@ declare module "i18next" {
|
|||||||
PGFbattleSpecDialogue: SimpleTranslationEntries;
|
PGFbattleSpecDialogue: SimpleTranslationEntries;
|
||||||
PGFmiscDialogue: SimpleTranslationEntries;
|
PGFmiscDialogue: SimpleTranslationEntries;
|
||||||
PGFdoubleBattleDialogue: DialogueTranslationEntries;
|
PGFdoubleBattleDialogue: DialogueTranslationEntries;
|
||||||
|
egg: SimpleTranslationEntries;
|
||||||
|
fightUiHandler: SimpleTranslationEntries;
|
||||||
|
gameMode: SimpleTranslationEntries;
|
||||||
|
gameStatsUiHandler: SimpleTranslationEntries;
|
||||||
|
growth: SimpleTranslationEntries;
|
||||||
|
menu: SimpleTranslationEntries;
|
||||||
|
menuUiHandler: SimpleTranslationEntries;
|
||||||
|
modifierType: ModifierTypeTranslationEntries;
|
||||||
|
move: MoveTranslationEntries;
|
||||||
|
nature: SimpleTranslationEntries;
|
||||||
partyUiHandler: SimpleTranslationEntries;
|
partyUiHandler: SimpleTranslationEntries;
|
||||||
|
pokeball: SimpleTranslationEntries;
|
||||||
|
pokemon: SimpleTranslationEntries;
|
||||||
|
pokemonInfo: PokemonInfoTranslationEntries;
|
||||||
|
pokemonInfoContainer: SimpleTranslationEntries;
|
||||||
|
saveSlotSelectUiHandler: SimpleTranslationEntries;
|
||||||
|
splashMessages: SimpleTranslationEntries;
|
||||||
|
starterSelectUiHandler: SimpleTranslationEntries;
|
||||||
|
titles: SimpleTranslationEntries;
|
||||||
|
trainerClasses: SimpleTranslationEntries;
|
||||||
|
trainerNames: SimpleTranslationEntries;
|
||||||
|
tutorial: SimpleTranslationEntries;
|
||||||
|
voucher: SimpleTranslationEntries;
|
||||||
|
weather: SimpleTranslationEntries;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,6 +64,7 @@ export const SettingKeys = {
|
|||||||
Sprite_Set: "SPRITE_SET",
|
Sprite_Set: "SPRITE_SET",
|
||||||
Fusion_Palette_Swaps: "FUSION_PALETTE_SWAPS",
|
Fusion_Palette_Swaps: "FUSION_PALETTE_SWAPS",
|
||||||
Player_Gender: "PLAYER_GENDER",
|
Player_Gender: "PLAYER_GENDER",
|
||||||
|
Type_Hints: "TYPE_HINTS",
|
||||||
Master_Volume: "MASTER_VOLUME",
|
Master_Volume: "MASTER_VOLUME",
|
||||||
BGM_Volume: "BGM_VOLUME",
|
BGM_Volume: "BGM_VOLUME",
|
||||||
SE_Volume: "SE_VOLUME",
|
SE_Volume: "SE_VOLUME",
|
||||||
@ -268,6 +269,13 @@ export const Setting: Array<Setting> = [
|
|||||||
default: 0,
|
default: 0,
|
||||||
type: SettingType.DISPLAY
|
type: SettingType.DISPLAY
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: SettingKeys.Type_Hints,
|
||||||
|
label: "Type hints",
|
||||||
|
options: OFF_ON,
|
||||||
|
default: 0,
|
||||||
|
type: SettingType.DISPLAY
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: SettingKeys.Master_Volume,
|
key: SettingKeys.Master_Volume,
|
||||||
label: "Master Volume",
|
label: "Master Volume",
|
||||||
@ -447,6 +455,9 @@ export function setSetting(scene: BattleScene, setting: string, value: integer):
|
|||||||
case SettingKeys.Vibration:
|
case SettingKeys.Vibration:
|
||||||
scene.enableVibration = Setting[index].options[value] !== "Disabled" && hasTouchscreen();
|
scene.enableVibration = Setting[index].options[value] !== "Disabled" && hasTouchscreen();
|
||||||
break;
|
break;
|
||||||
|
case SettingKeys.Type_Hints:
|
||||||
|
scene.typeHints = Setting[index].options[value] === "On";
|
||||||
|
break;
|
||||||
case SettingKeys.Language:
|
case SettingKeys.Language:
|
||||||
if (value) {
|
if (value) {
|
||||||
if (scene.ui) {
|
if (scene.ui) {
|
||||||
|
@ -44,8 +44,8 @@ describe("Abilities - Intrepid Sword", () => {
|
|||||||
expect(game.scene.getParty()[0].summonData).not.toBeUndefined();
|
expect(game.scene.getParty()[0].summonData).not.toBeUndefined();
|
||||||
let battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats;
|
let battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats;
|
||||||
expect(battleStatsPokemon[BattleStat.ATK]).toBe(0);
|
expect(battleStatsPokemon[BattleStat.ATK]).toBe(0);
|
||||||
await game.phaseInterceptor.mustRun(ShowAbilityPhase).catch((error) => expect(error).toBe(ShowAbilityPhase));
|
await game.phaseInterceptor.run(ShowAbilityPhase);
|
||||||
await game.phaseInterceptor.mustRun(StatChangePhase).catch((error) => expect(error).toBe(StatChangePhase));
|
await game.phaseInterceptor.run(StatChangePhase);
|
||||||
battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats;
|
battleStatsPokemon = game.scene.getParty()[0].summonData.battleStats;
|
||||||
expect(battleStatsPokemon[BattleStat.ATK]).toBe(1);
|
expect(battleStatsPokemon[BattleStat.ATK]).toBe(1);
|
||||||
}, 20000);
|
}, 20000);
|
||||||
@ -57,8 +57,8 @@ describe("Abilities - Intrepid Sword", () => {
|
|||||||
let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats;
|
let battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats;
|
||||||
expect(battleStatsOpponent[BattleStat.ATK]).toBe(0);
|
expect(battleStatsOpponent[BattleStat.ATK]).toBe(0);
|
||||||
await game.phaseInterceptor.runFrom(PostSummonPhase).to(ToggleDoublePositionPhase);
|
await game.phaseInterceptor.runFrom(PostSummonPhase).to(ToggleDoublePositionPhase);
|
||||||
await game.phaseInterceptor.mustRun(StatChangePhase).catch((error) => expect(error).toBe(StatChangePhase));
|
await game.phaseInterceptor.run(StatChangePhase);
|
||||||
await game.phaseInterceptor.whenAboutToRun(MessagePhase);
|
await game.phaseInterceptor.run(MessagePhase);
|
||||||
battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats;
|
battleStatsOpponent = game.scene.currentBattle.enemyParty[0].summonData.battleStats;
|
||||||
expect(battleStatsOpponent[BattleStat.ATK]).toBe(1);
|
expect(battleStatsOpponent[BattleStat.ATK]).toBe(1);
|
||||||
}, 20000);
|
}, 20000);
|
||||||
|
@ -5,7 +5,7 @@ import * as overrides from "#app/overrides";
|
|||||||
import {Abilities} from "#app/data/enums/abilities";
|
import {Abilities} from "#app/data/enums/abilities";
|
||||||
import {Species} from "#app/data/enums/species";
|
import {Species} from "#app/data/enums/species";
|
||||||
import {
|
import {
|
||||||
CommandPhase, EnemyCommandPhase,
|
CommandPhase, EnemyCommandPhase, SelectTargetPhase,
|
||||||
TurnStartPhase
|
TurnStartPhase
|
||||||
} from "#app/phases";
|
} from "#app/phases";
|
||||||
import {Mode} from "#app/ui/ui";
|
import {Mode} from "#app/ui/ui";
|
||||||
@ -55,7 +55,6 @@ describe("Battle order", () => {
|
|||||||
(game.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, movePosition, false);
|
(game.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, movePosition, false);
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.run(EnemyCommandPhase);
|
await game.phaseInterceptor.run(EnemyCommandPhase);
|
||||||
await game.phaseInterceptor.whenAboutToRun(TurnStartPhase);
|
|
||||||
const phase = game.scene.getCurrentPhase() as TurnStartPhase;
|
const phase = game.scene.getCurrentPhase() as TurnStartPhase;
|
||||||
const order = phase.getOrder();
|
const order = phase.getOrder();
|
||||||
expect(order[0]).toBe(2);
|
expect(order[0]).toBe(2);
|
||||||
@ -77,7 +76,6 @@ describe("Battle order", () => {
|
|||||||
(game.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, movePosition, false);
|
(game.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, movePosition, false);
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.run(EnemyCommandPhase);
|
await game.phaseInterceptor.run(EnemyCommandPhase);
|
||||||
await game.phaseInterceptor.whenAboutToRun(TurnStartPhase);
|
|
||||||
const phase = game.scene.getCurrentPhase() as TurnStartPhase;
|
const phase = game.scene.getCurrentPhase() as TurnStartPhase;
|
||||||
const order = phase.getOrder();
|
const order = phase.getOrder();
|
||||||
expect(order[0]).toBe(0);
|
expect(order[0]).toBe(0);
|
||||||
@ -118,9 +116,7 @@ describe("Battle order", () => {
|
|||||||
const handler = game.scene.ui.getHandler() as TargetSelectUiHandler;
|
const handler = game.scene.ui.getHandler() as TargetSelectUiHandler;
|
||||||
handler.processInput(Button.ACTION);
|
handler.processInput(Button.ACTION);
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.runFrom(CommandPhase).to(EnemyCommandPhase);
|
await game.phaseInterceptor.runFrom(SelectTargetPhase).to(TurnStartPhase, false);
|
||||||
await game.phaseInterceptor.run(EnemyCommandPhase);
|
|
||||||
await game.phaseInterceptor.whenAboutToRun(TurnStartPhase);
|
|
||||||
const phase = game.scene.getCurrentPhase() as TurnStartPhase;
|
const phase = game.scene.getCurrentPhase() as TurnStartPhase;
|
||||||
const order = phase.getOrder();
|
const order = phase.getOrder();
|
||||||
expect(order.indexOf(0)).toBeGreaterThan(order.indexOf(2));
|
expect(order.indexOf(0)).toBeGreaterThan(order.indexOf(2));
|
||||||
@ -163,9 +159,7 @@ describe("Battle order", () => {
|
|||||||
const handler = game.scene.ui.getHandler() as TargetSelectUiHandler;
|
const handler = game.scene.ui.getHandler() as TargetSelectUiHandler;
|
||||||
handler.processInput(Button.ACTION);
|
handler.processInput(Button.ACTION);
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.runFrom(CommandPhase).to(EnemyCommandPhase);
|
await game.phaseInterceptor.runFrom(SelectTargetPhase).to(TurnStartPhase, false);
|
||||||
await game.phaseInterceptor.run(EnemyCommandPhase);
|
|
||||||
await game.phaseInterceptor.whenAboutToRun(TurnStartPhase);
|
|
||||||
const phase = game.scene.getCurrentPhase() as TurnStartPhase;
|
const phase = game.scene.getCurrentPhase() as TurnStartPhase;
|
||||||
const order = phase.getOrder();
|
const order = phase.getOrder();
|
||||||
expect(order.indexOf(3)).toBeLessThan(order.indexOf(0));
|
expect(order.indexOf(3)).toBeLessThan(order.indexOf(0));
|
||||||
@ -207,9 +201,7 @@ describe("Battle order", () => {
|
|||||||
const handler = game.scene.ui.getHandler() as TargetSelectUiHandler;
|
const handler = game.scene.ui.getHandler() as TargetSelectUiHandler;
|
||||||
handler.processInput(Button.ACTION);
|
handler.processInput(Button.ACTION);
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.runFrom(CommandPhase).to(EnemyCommandPhase);
|
await game.phaseInterceptor.runFrom(SelectTargetPhase).to(TurnStartPhase, false);
|
||||||
await game.phaseInterceptor.run(EnemyCommandPhase);
|
|
||||||
await game.phaseInterceptor.whenAboutToRun(TurnStartPhase);
|
|
||||||
const phase = game.scene.getCurrentPhase() as TurnStartPhase;
|
const phase = game.scene.getCurrentPhase() as TurnStartPhase;
|
||||||
const order = phase.getOrder();
|
const order = phase.getOrder();
|
||||||
expect(order.indexOf(1)).toBeLessThan(order.indexOf(0));
|
expect(order.indexOf(1)).toBeLessThan(order.indexOf(0));
|
||||||
|
@ -1,34 +1,21 @@
|
|||||||
import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest";
|
import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest";
|
||||||
import {generateStarter, getMovePosition, waitUntil,} from "#app/test/utils/gameManagerUtils";
|
import {generateStarter, getMovePosition,} from "#app/test/utils/gameManagerUtils";
|
||||||
import {Mode} from "#app/ui/ui";
|
import {Mode} from "#app/ui/ui";
|
||||||
import {GameModes} from "#app/game-mode";
|
import {GameModes} from "#app/game-mode";
|
||||||
import {Species} from "#app/data/enums/species";
|
import {Species} from "#app/data/enums/species";
|
||||||
import * as overrides from "../../overrides";
|
import * as overrides from "../../overrides";
|
||||||
import {Command} from "#app/ui/command-ui-handler";
|
import {Command} from "#app/ui/command-ui-handler";
|
||||||
import {
|
import {
|
||||||
BattleEndPhase,
|
|
||||||
BerryPhase,
|
|
||||||
CommandPhase,
|
CommandPhase,
|
||||||
DamagePhase,
|
|
||||||
EggLapsePhase,
|
|
||||||
EncounterPhase,
|
EncounterPhase,
|
||||||
EnemyCommandPhase,
|
EnemyCommandPhase,
|
||||||
FaintPhase,
|
|
||||||
LoginPhase,
|
LoginPhase,
|
||||||
MessagePhase,
|
|
||||||
MoveEffectPhase,
|
|
||||||
MoveEndPhase,
|
|
||||||
MovePhase,
|
|
||||||
PostSummonPhase,
|
|
||||||
SelectGenderPhase,
|
SelectGenderPhase,
|
||||||
SelectModifierPhase,
|
SelectModifierPhase,
|
||||||
SelectStarterPhase,
|
SelectStarterPhase,
|
||||||
StatChangePhase,
|
SummonPhase,
|
||||||
TitlePhase,
|
TitlePhase,
|
||||||
TurnEndPhase,
|
|
||||||
TurnInitPhase,
|
TurnInitPhase,
|
||||||
TurnStartPhase,
|
|
||||||
VictoryPhase,
|
|
||||||
} from "#app/phases";
|
} from "#app/phases";
|
||||||
import {Moves} from "#app/data/enums/moves";
|
import {Moves} from "#app/data/enums/moves";
|
||||||
import GameManager from "#app/test/utils/gameManager";
|
import GameManager from "#app/test/utils/gameManager";
|
||||||
@ -36,6 +23,7 @@ import Phaser from "phaser";
|
|||||||
import {allSpecies} from "#app/data/pokemon-species";
|
import {allSpecies} from "#app/data/pokemon-species";
|
||||||
import {PlayerGender} from "#app/data/enums/player-gender";
|
import {PlayerGender} from "#app/data/enums/player-gender";
|
||||||
import { getGameMode } from "#app/game-mode.js";
|
import { getGameMode } from "#app/game-mode.js";
|
||||||
|
import {Abilities} from "#app/data/enums/abilities";
|
||||||
|
|
||||||
describe("Test Battle Phase", () => {
|
describe("Test Battle Phase", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
@ -55,22 +43,6 @@ describe("Test Battle Phase", () => {
|
|||||||
game = new GameManager(phaserGame);
|
game = new GameManager(phaserGame);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("test phase interceptor with remove", async() => {
|
|
||||||
await game.phaseInterceptor.run(LoginPhase);
|
|
||||||
|
|
||||||
await game.phaseInterceptor.run(LoginPhase, () => {
|
|
||||||
return game.phaseInterceptor.log.includes("LoginPhase");
|
|
||||||
});
|
|
||||||
|
|
||||||
game.scene.gameData.gender = PlayerGender.MALE;
|
|
||||||
await game.phaseInterceptor.remove(SelectGenderPhase, () => game.isCurrentPhase(TitlePhase));
|
|
||||||
|
|
||||||
await game.phaseInterceptor.run(TitlePhase);
|
|
||||||
await waitUntil(() => game.scene.ui?.getMode() === Mode.TITLE);
|
|
||||||
|
|
||||||
expect(game.scene.ui?.getMode()).toBe(Mode.TITLE);
|
|
||||||
}, 100000);
|
|
||||||
|
|
||||||
it("test phase interceptor with prompt", async() => {
|
it("test phase interceptor with prompt", async() => {
|
||||||
await game.phaseInterceptor.run(LoginPhase);
|
await game.phaseInterceptor.run(LoginPhase);
|
||||||
|
|
||||||
@ -87,7 +59,7 @@ describe("Test Battle Phase", () => {
|
|||||||
|
|
||||||
expect(game.scene.ui?.getMode()).toBe(Mode.TITLE);
|
expect(game.scene.ui?.getMode()).toBe(Mode.TITLE);
|
||||||
expect(game.scene.gameData.gender).toBe(PlayerGender.MALE);
|
expect(game.scene.gameData.gender).toBe(PlayerGender.MALE);
|
||||||
}, 100000);
|
}, 20000);
|
||||||
|
|
||||||
it("test phase interceptor with prompt with preparation for a future prompt", async() => {
|
it("test phase interceptor with prompt with preparation for a future prompt", async() => {
|
||||||
await game.phaseInterceptor.run(LoginPhase);
|
await game.phaseInterceptor.run(LoginPhase);
|
||||||
@ -109,13 +81,13 @@ describe("Test Battle Phase", () => {
|
|||||||
|
|
||||||
expect(game.scene.ui?.getMode()).toBe(Mode.TITLE);
|
expect(game.scene.ui?.getMode()).toBe(Mode.TITLE);
|
||||||
expect(game.scene.gameData.gender).toBe(PlayerGender.MALE);
|
expect(game.scene.gameData.gender).toBe(PlayerGender.MALE);
|
||||||
}, 100000);
|
}, 20000);
|
||||||
|
|
||||||
it("newGame one-liner", async() => {
|
it("newGame one-liner", async() => {
|
||||||
await game.startBattle();
|
await game.startBattle();
|
||||||
expect(game.scene.ui?.getMode()).toBe(Mode.COMMAND);
|
expect(game.scene.ui?.getMode()).toBe(Mode.COMMAND);
|
||||||
expect(game.scene.getCurrentPhase().constructor.name).toBe(CommandPhase.name);
|
expect(game.scene.getCurrentPhase().constructor.name).toBe(CommandPhase.name);
|
||||||
}, 100000);
|
}, 20000);
|
||||||
|
|
||||||
it("do attack wave 3 - single battle - regular - OHKO", async() => {
|
it("do attack wave 3 - single battle - regular - OHKO", async() => {
|
||||||
vi.spyOn(overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MEWTWO);
|
vi.spyOn(overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MEWTWO);
|
||||||
@ -123,6 +95,8 @@ describe("Test Battle Phase", () => {
|
|||||||
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||||
vi.spyOn(overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
vi.spyOn(overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
|
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
|
||||||
|
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||||
|
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
|
||||||
vi.spyOn(overrides, "SINGLE_BATTLE_OVERRIDE", "get").mockReturnValue(true);
|
vi.spyOn(overrides, "SINGLE_BATTLE_OVERRIDE", "get").mockReturnValue(true);
|
||||||
await game.startBattle();
|
await game.startBattle();
|
||||||
game.onNextPrompt("CommandPhase", Mode.COMMAND, () => {
|
game.onNextPrompt("CommandPhase", Mode.COMMAND, () => {
|
||||||
@ -132,28 +106,10 @@ describe("Test Battle Phase", () => {
|
|||||||
const movePosition = getMovePosition(game.scene, 0, Moves.TACKLE);
|
const movePosition = getMovePosition(game.scene, 0, Moves.TACKLE);
|
||||||
(game.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, movePosition, false);
|
(game.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, movePosition, false);
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.run(EnemyCommandPhase);
|
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(SelectModifierPhase);
|
||||||
await game.phaseInterceptor.run(TurnStartPhase);
|
|
||||||
|
|
||||||
await game.phaseInterceptor.run(MovePhase);
|
|
||||||
await game.phaseInterceptor.run(MessagePhase);
|
|
||||||
await game.phaseInterceptor.run(MoveEffectPhase);
|
|
||||||
await game.phaseInterceptor.run(DamagePhase);
|
|
||||||
await game.phaseInterceptor.run(MessagePhase, () => game.isCurrentPhase(FaintPhase));
|
|
||||||
await game.phaseInterceptor.run(FaintPhase);
|
|
||||||
await game.phaseInterceptor.run(MessagePhase);
|
|
||||||
|
|
||||||
await game.phaseInterceptor.run(VictoryPhase);
|
|
||||||
await game.phaseInterceptor.run(MoveEndPhase);
|
|
||||||
await game.phaseInterceptor.run(MovePhase);
|
|
||||||
await game.phaseInterceptor.run(BerryPhase);
|
|
||||||
await game.phaseInterceptor.run(TurnEndPhase);
|
|
||||||
await game.phaseInterceptor.run(BattleEndPhase);
|
|
||||||
await game.phaseInterceptor.run(EggLapsePhase);
|
|
||||||
await game.phaseInterceptor.run(SelectModifierPhase);
|
|
||||||
expect(game.scene.ui?.getMode()).toBe(Mode.MODIFIER_SELECT);
|
expect(game.scene.ui?.getMode()).toBe(Mode.MODIFIER_SELECT);
|
||||||
expect(game.scene.getCurrentPhase().constructor.name).toBe(SelectModifierPhase.name);
|
expect(game.scene.getCurrentPhase().constructor.name).toBe(SelectModifierPhase.name);
|
||||||
}, 100000);
|
}, 20000);
|
||||||
|
|
||||||
it("do attack wave 3 - single battle - regular - NO OHKO with opponent using non damage attack", async() => {
|
it("do attack wave 3 - single battle - regular - NO OHKO with opponent using non damage attack", async() => {
|
||||||
vi.spyOn(overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MEWTWO);
|
vi.spyOn(overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MEWTWO);
|
||||||
@ -161,7 +117,8 @@ describe("Test Battle Phase", () => {
|
|||||||
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(5);
|
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(5);
|
||||||
vi.spyOn(overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
vi.spyOn(overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
|
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
|
||||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TAIL_WHIP]);
|
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||||
|
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP]);
|
||||||
vi.spyOn(overrides, "SINGLE_BATTLE_OVERRIDE", "get").mockReturnValue(true);
|
vi.spyOn(overrides, "SINGLE_BATTLE_OVERRIDE", "get").mockReturnValue(true);
|
||||||
await game.startBattle();
|
await game.startBattle();
|
||||||
game.onNextPrompt("CommandPhase", Mode.COMMAND, () => {
|
game.onNextPrompt("CommandPhase", Mode.COMMAND, () => {
|
||||||
@ -171,35 +128,8 @@ describe("Test Battle Phase", () => {
|
|||||||
const movePosition = getMovePosition(game.scene, 0, Moves.TACKLE);
|
const movePosition = getMovePosition(game.scene, 0, Moves.TACKLE);
|
||||||
(game.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, movePosition, false);
|
(game.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, movePosition, false);
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.run(EnemyCommandPhase);
|
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase);
|
||||||
await game.phaseInterceptor.run(TurnStartPhase);
|
}, 20000);
|
||||||
|
|
||||||
await game.phaseInterceptor.run(MovePhase);
|
|
||||||
await game.phaseInterceptor.run(MessagePhase);
|
|
||||||
await game.phaseInterceptor.run(MoveEffectPhase);
|
|
||||||
await game.phaseInterceptor.run(DamagePhase);
|
|
||||||
await game.phaseInterceptor.run(MessagePhase, () => game.isCurrentPhase(MoveEndPhase));
|
|
||||||
await game.phaseInterceptor.run(MoveEndPhase);
|
|
||||||
|
|
||||||
await game.phaseInterceptor.run(MovePhase);
|
|
||||||
await game.phaseInterceptor.run(MessagePhase, () => game.isCurrentPhase(MoveEffectPhase));
|
|
||||||
await game.phaseInterceptor.run(MoveEffectPhase);
|
|
||||||
game.scene.moveAnimations = null; // Mandatory to avoid the crash
|
|
||||||
await game.phaseInterceptor.run(StatChangePhase, () => game.isCurrentPhase(MessagePhase) || game.isCurrentPhase(MoveEndPhase) || game.isCurrentPhase(DamagePhase));
|
|
||||||
await game.phaseInterceptor.run(DamagePhase, () => game.isCurrentPhase(MessagePhase) || game.isCurrentPhase(MoveEndPhase));
|
|
||||||
await game.phaseInterceptor.run(MessagePhase, () => game.isCurrentPhase(MoveEndPhase));
|
|
||||||
await game.phaseInterceptor.run(MoveEndPhase);
|
|
||||||
|
|
||||||
await game.phaseInterceptor.run(BerryPhase);
|
|
||||||
await game.phaseInterceptor.run(MessagePhase, () => game.isCurrentPhase(TurnEndPhase));
|
|
||||||
await game.phaseInterceptor.run(TurnEndPhase);
|
|
||||||
|
|
||||||
await game.phaseInterceptor.run(TurnInitPhase);
|
|
||||||
await game.phaseInterceptor.run(CommandPhase);
|
|
||||||
await waitUntil(() => game.scene.ui?.getMode() === Mode.COMMAND);
|
|
||||||
expect(game.scene.ui?.getMode()).toBe(Mode.COMMAND);
|
|
||||||
expect(game.scene.getCurrentPhase().constructor.name).toBe(CommandPhase.name);
|
|
||||||
}, 100000);
|
|
||||||
|
|
||||||
it("load 100% data file", async() => {
|
it("load 100% data file", async() => {
|
||||||
await game.importData("src/test/utils/saves/everything.prsv");
|
await game.importData("src/test/utils/saves/everything.prsv");
|
||||||
@ -208,7 +138,7 @@ describe("Test Battle Phase", () => {
|
|||||||
return species.caughtAttr !== 0n;
|
return species.caughtAttr !== 0n;
|
||||||
}).length;
|
}).length;
|
||||||
expect(caughtCount).toBe(Object.keys(allSpecies).length);
|
expect(caughtCount).toBe(Object.keys(allSpecies).length);
|
||||||
}, 50000);
|
}, 20000);
|
||||||
|
|
||||||
it("start battle with selected team", async() => {
|
it("start battle with selected team", async() => {
|
||||||
await game.startBattle([
|
await game.startBattle([
|
||||||
@ -219,26 +149,7 @@ describe("Test Battle Phase", () => {
|
|||||||
expect(game.scene.getParty()[0].species.speciesId).toBe(Species.CHARIZARD);
|
expect(game.scene.getParty()[0].species.speciesId).toBe(Species.CHARIZARD);
|
||||||
expect(game.scene.getParty()[1].species.speciesId).toBe(Species.CHANSEY);
|
expect(game.scene.getParty()[1].species.speciesId).toBe(Species.CHANSEY);
|
||||||
expect(game.scene.getParty()[2].species.speciesId).toBe(Species.MEW);
|
expect(game.scene.getParty()[2].species.speciesId).toBe(Species.MEW);
|
||||||
}, 50000);
|
}, 20000);
|
||||||
|
|
||||||
it("assert next phase", async() => {
|
|
||||||
await game.phaseInterceptor.run(LoginPhase);
|
|
||||||
game.onNextPrompt("SelectGenderPhase", Mode.OPTION_SELECT, () => {
|
|
||||||
game.scene.gameData.gender = PlayerGender.MALE;
|
|
||||||
game.endPhase();
|
|
||||||
}, () => game.isCurrentPhase(TitlePhase));
|
|
||||||
await game.phaseInterceptor.mustRun(SelectGenderPhase).catch((error) => expect(error).toBe(SelectGenderPhase));
|
|
||||||
await game.phaseInterceptor.mustRun(TitlePhase).catch((error) => expect(error).toBe(TitlePhase));
|
|
||||||
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
|
||||||
game.scene.gameMode = getGameMode(GameModes.CLASSIC);
|
|
||||||
const starters = generateStarter(game.scene);
|
|
||||||
const selectStarterPhase = new SelectStarterPhase(game.scene);
|
|
||||||
game.scene.pushPhase(new EncounterPhase(game.scene, false));
|
|
||||||
selectStarterPhase.initBattle(starters);
|
|
||||||
});
|
|
||||||
await game.phaseInterceptor.mustRun(EncounterPhase).catch((error) => expect(error).toBe(EncounterPhase));
|
|
||||||
await game.phaseInterceptor.mustRun(PostSummonPhase).catch((error) => expect(error).toBe(PostSummonPhase));
|
|
||||||
}, 50000);
|
|
||||||
|
|
||||||
it("test remove random battle seed int", async() => {
|
it("test remove random battle seed int", async() => {
|
||||||
for (let i=0; i<10; i++) {
|
for (let i=0; i<10; i++) {
|
||||||
@ -246,5 +157,107 @@ describe("Test Battle Phase", () => {
|
|||||||
expect(rand).toBe(14);
|
expect(rand).toBe(14);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("wrong phase", async() => {
|
||||||
|
await game.phaseInterceptor.run(LoginPhase);
|
||||||
|
await game.phaseInterceptor.run(LoginPhase).catch((e) => {
|
||||||
|
expect(e).toBe("Wrong phase: this is SelectGenderPhase and not LoginPhase");
|
||||||
|
});
|
||||||
|
}, 20000);
|
||||||
|
|
||||||
|
it("wrong phase but skip", async() => {
|
||||||
|
await game.phaseInterceptor.run(LoginPhase);
|
||||||
|
await game.phaseInterceptor.run(LoginPhase, () => game.isCurrentPhase(SelectGenderPhase));
|
||||||
|
}, 20000);
|
||||||
|
|
||||||
|
it("good run", async() => {
|
||||||
|
await game.phaseInterceptor.run(LoginPhase);
|
||||||
|
game.onNextPrompt("SelectGenderPhase", Mode.OPTION_SELECT, () => {
|
||||||
|
game.scene.gameData.gender = PlayerGender.MALE;
|
||||||
|
game.endPhase();
|
||||||
|
}, () => game.isCurrentPhase(TitlePhase));
|
||||||
|
await game.phaseInterceptor.run(SelectGenderPhase, () => game.isCurrentPhase(TitlePhase));
|
||||||
|
await game.phaseInterceptor.run(TitlePhase);
|
||||||
|
}, 20000);
|
||||||
|
|
||||||
|
it("good run from select gender to title", async() => {
|
||||||
|
await game.phaseInterceptor.run(LoginPhase);
|
||||||
|
game.onNextPrompt("SelectGenderPhase", Mode.OPTION_SELECT, () => {
|
||||||
|
game.scene.gameData.gender = PlayerGender.MALE;
|
||||||
|
game.endPhase();
|
||||||
|
}, () => game.isCurrentPhase(TitlePhase));
|
||||||
|
await game.phaseInterceptor.runFrom(SelectGenderPhase).to(TitlePhase);
|
||||||
|
}, 20000);
|
||||||
|
|
||||||
|
it("good run to SummonPhase phase", async() => {
|
||||||
|
await game.phaseInterceptor.run(LoginPhase);
|
||||||
|
game.onNextPrompt("SelectGenderPhase", Mode.OPTION_SELECT, () => {
|
||||||
|
game.scene.gameData.gender = PlayerGender.MALE;
|
||||||
|
game.endPhase();
|
||||||
|
}, () => game.isCurrentPhase(TitlePhase));
|
||||||
|
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
||||||
|
game.scene.gameMode = getGameMode(GameModes.CLASSIC);
|
||||||
|
const starters = generateStarter(game.scene);
|
||||||
|
const selectStarterPhase = new SelectStarterPhase(game.scene);
|
||||||
|
game.scene.pushPhase(new EncounterPhase(game.scene, false));
|
||||||
|
selectStarterPhase.initBattle(starters);
|
||||||
|
});
|
||||||
|
await game.phaseInterceptor.runFrom(SelectGenderPhase).to(SummonPhase);
|
||||||
|
}, 20000);
|
||||||
|
|
||||||
|
it("2vs1", async() => {
|
||||||
|
vi.spyOn(overrides, "SINGLE_BATTLE_OVERRIDE", "get").mockReturnValue(true);
|
||||||
|
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MIGHTYENA);
|
||||||
|
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||||
|
vi.spyOn(overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||||
|
await game.startBattle([
|
||||||
|
Species.BLASTOISE,
|
||||||
|
Species.CHARIZARD,
|
||||||
|
]);
|
||||||
|
expect(game.scene.ui?.getMode()).toBe(Mode.COMMAND);
|
||||||
|
expect(game.scene.getCurrentPhase().constructor.name).toBe(CommandPhase.name);
|
||||||
|
}, 20000);
|
||||||
|
|
||||||
|
it("1vs1", async() => {
|
||||||
|
vi.spyOn(overrides, "SINGLE_BATTLE_OVERRIDE", "get").mockReturnValue(true);
|
||||||
|
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MIGHTYENA);
|
||||||
|
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||||
|
vi.spyOn(overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||||
|
await game.startBattle([
|
||||||
|
Species.BLASTOISE,
|
||||||
|
]);
|
||||||
|
expect(game.scene.ui?.getMode()).toBe(Mode.COMMAND);
|
||||||
|
expect(game.scene.getCurrentPhase().constructor.name).toBe(CommandPhase.name);
|
||||||
|
}, 20000);
|
||||||
|
|
||||||
|
it("2vs2", async() => {
|
||||||
|
vi.spyOn(overrides, "DOUBLE_BATTLE_OVERRIDE", "get").mockReturnValue(true);
|
||||||
|
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MIGHTYENA);
|
||||||
|
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||||
|
vi.spyOn(overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||||
|
vi.spyOn(overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||||
|
await game.startBattle([
|
||||||
|
Species.BLASTOISE,
|
||||||
|
Species.CHARIZARD,
|
||||||
|
]);
|
||||||
|
expect(game.scene.ui?.getMode()).toBe(Mode.COMMAND);
|
||||||
|
expect(game.scene.getCurrentPhase().constructor.name).toBe(CommandPhase.name);
|
||||||
|
}, 20000);
|
||||||
|
|
||||||
|
it("4vs2", async() => {
|
||||||
|
vi.spyOn(overrides, "DOUBLE_BATTLE_OVERRIDE", "get").mockReturnValue(true);
|
||||||
|
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MIGHTYENA);
|
||||||
|
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||||
|
vi.spyOn(overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||||
|
vi.spyOn(overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||||
|
await game.startBattle([
|
||||||
|
Species.BLASTOISE,
|
||||||
|
Species.CHARIZARD,
|
||||||
|
Species.DARKRAI,
|
||||||
|
Species.GABITE,
|
||||||
|
]);
|
||||||
|
expect(game.scene.ui?.getMode()).toBe(Mode.COMMAND);
|
||||||
|
expect(game.scene.getCurrentPhase().constructor.name).toBe(CommandPhase.name);
|
||||||
|
}, 20000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
39
src/test/battle/error-handling.test.ts
Normal file
39
src/test/battle/error-handling.test.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import {afterEach, beforeAll, beforeEach, describe, it, vi} from "vitest";
|
||||||
|
import GameManager from "#app/test/utils/gameManager";
|
||||||
|
import Phaser from "phaser";
|
||||||
|
import * as overrides from "#app/overrides";
|
||||||
|
import {Species} from "#app/data/enums/species";
|
||||||
|
import {Moves} from "#app/data/enums/moves";
|
||||||
|
import {Abilities} from "#app/data/enums/abilities";
|
||||||
|
|
||||||
|
describe("Test Battle Phase", () => {
|
||||||
|
let phaserGame: Phaser.Game;
|
||||||
|
let game: GameManager;
|
||||||
|
|
||||||
|
beforeAll(() => {
|
||||||
|
phaserGame = new Phaser.Game({
|
||||||
|
type: Phaser.HEADLESS,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
game.phaseInterceptor.restoreOg();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
game = new GameManager(phaserGame);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should start phase", async() => {
|
||||||
|
vi.spyOn(overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MEWTWO);
|
||||||
|
vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.RATTATA);
|
||||||
|
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||||
|
vi.spyOn(overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(3);
|
||||||
|
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
|
||||||
|
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||||
|
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
|
||||||
|
vi.spyOn(overrides, "SINGLE_BATTLE_OVERRIDE", "get").mockReturnValue(true);
|
||||||
|
await game.startBattle();
|
||||||
|
}, 100000);
|
||||||
|
});
|
||||||
|
|
@ -28,7 +28,8 @@ describe("Phases", () => {
|
|||||||
describe("LoginPhase", () => {
|
describe("LoginPhase", () => {
|
||||||
it("should start the login phase", async () => {
|
it("should start the login phase", async () => {
|
||||||
const loginPhase = new LoginPhase(scene);
|
const loginPhase = new LoginPhase(scene);
|
||||||
loginPhase.start();
|
scene.pushPhase(loginPhase);
|
||||||
|
await game.phaseInterceptor.run(LoginPhase);
|
||||||
expect(scene.ui.getMode()).to.equal(Mode.MESSAGE);
|
expect(scene.ui.getMode()).to.equal(Mode.MESSAGE);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -36,16 +37,18 @@ describe("Phases", () => {
|
|||||||
describe("TitlePhase", () => {
|
describe("TitlePhase", () => {
|
||||||
it("should start the title phase", async () => {
|
it("should start the title phase", async () => {
|
||||||
const titlePhase = new TitlePhase(scene);
|
const titlePhase = new TitlePhase(scene);
|
||||||
titlePhase.start();
|
scene.pushPhase(titlePhase);
|
||||||
expect(scene.ui.getMode()).to.equal(Mode.MESSAGE);
|
await game.phaseInterceptor.run(TitlePhase);
|
||||||
|
expect(scene.ui.getMode()).to.equal(Mode.TITLE);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("UnavailablePhase", () => {
|
describe("UnavailablePhase", () => {
|
||||||
it("should start the unavailable phase", async () => {
|
it("should start the unavailable phase", async () => {
|
||||||
const unavailablePhase = new UnavailablePhase(scene);
|
const unavailablePhase = new UnavailablePhase(scene);
|
||||||
unavailablePhase.start();
|
scene.pushPhase(unavailablePhase);
|
||||||
|
await game.phaseInterceptor.run(UnavailablePhase);
|
||||||
expect(scene.ui.getMode()).to.equal(Mode.UNAVAILABLE);
|
expect(scene.ui.getMode()).to.equal(Mode.UNAVAILABLE);
|
||||||
});
|
}, 20000);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -15,9 +15,9 @@ import OptionSelectUiHandler from "#app/ui/settings/option-select-ui-handler";
|
|||||||
import SaveSlotSelectUiHandler from "#app/ui/save-slot-select-ui-handler";
|
import SaveSlotSelectUiHandler from "#app/ui/save-slot-select-ui-handler";
|
||||||
import {OptionSelectItem} from "#app/ui/abstact-option-select-ui-handler";
|
import {OptionSelectItem} from "#app/ui/abstact-option-select-ui-handler";
|
||||||
import {Gender} from "#app/data/gender";
|
import {Gender} from "#app/data/gender";
|
||||||
|
import {allSpecies} from "#app/data/pokemon-species";
|
||||||
import {Nature} from "#app/data/nature";
|
import {Nature} from "#app/data/nature";
|
||||||
import {Abilities} from "#app/data/enums/abilities";
|
import {Abilities} from "#app/data/enums/abilities";
|
||||||
import {allSpecies} from "#app/data/pokemon-species";
|
|
||||||
|
|
||||||
|
|
||||||
describe("UI - Starter select", () => {
|
describe("UI - Starter select", () => {
|
||||||
@ -51,12 +51,13 @@ describe("UI - Starter select", () => {
|
|||||||
currentPhase.gameMode = GameModes.CLASSIC;
|
currentPhase.gameMode = GameModes.CLASSIC;
|
||||||
currentPhase.end();
|
currentPhase.end();
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.mustRun(SelectStarterPhase).catch((error) => expect(error).toBe(SelectStarterPhase));
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
handler.processInput(Button.RIGHT);
|
handler.processInput(Button.RIGHT);
|
||||||
handler.processInput(Button.ACTION);
|
handler.processInput(Button.ACTION);
|
||||||
|
game.phaseInterceptor.unlock();
|
||||||
});
|
});
|
||||||
|
await game.phaseInterceptor.run(SelectStarterPhase);
|
||||||
let options: OptionSelectItem[];
|
let options: OptionSelectItem[];
|
||||||
let optionSelectUiHandler: OptionSelectUiHandler;
|
let optionSelectUiHandler: OptionSelectUiHandler;
|
||||||
await new Promise<void>((resolve) => {
|
await new Promise<void>((resolve) => {
|
||||||
@ -73,21 +74,20 @@ describe("UI - Starter select", () => {
|
|||||||
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
||||||
optionSelectUiHandler.processInput(Button.ACTION);
|
optionSelectUiHandler.processInput(Button.ACTION);
|
||||||
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
await new Promise<void>((resolve) => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
handler.processInput(Button.SUBMIT);
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
});
|
handler.processInput(Button.SUBMIT);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
});
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
||||||
handler.processInput(Button.ACTION);
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
});
|
handler.processInput(Button.ACTION);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
});
|
||||||
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
||||||
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
||||||
});
|
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
resolve();
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
});
|
||||||
handler.processInput(Button.ACTION);
|
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
||||||
|
|
||||||
@ -99,19 +99,25 @@ describe("UI - Starter select", () => {
|
|||||||
|
|
||||||
it("Bulbasaur - shiny - variant 2 female hardy overgrow", async() => {
|
it("Bulbasaur - shiny - variant 2 female hardy overgrow", async() => {
|
||||||
await game.importData("src/test/utils/saves/everything.prsv");
|
await game.importData("src/test/utils/saves/everything.prsv");
|
||||||
|
const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => {
|
||||||
|
const species = game.scene.gameData.dexData[key];
|
||||||
|
return species.caughtAttr !== 0n;
|
||||||
|
}).length;
|
||||||
|
expect(caughtCount).toBe(Object.keys(allSpecies).length);
|
||||||
await game.runToTitle();
|
await game.runToTitle();
|
||||||
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
||||||
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
||||||
currentPhase.gameMode = GameModes.CLASSIC;
|
currentPhase.gameMode = GameModes.CLASSIC;
|
||||||
currentPhase.end();
|
currentPhase.end();
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.mustRun(SelectStarterPhase).catch((error) => expect(error).toBe(SelectStarterPhase));
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
handler.processInput(Button.RIGHT);
|
handler.processInput(Button.RIGHT);
|
||||||
handler.processInput(Button.CYCLE_GENDER);
|
handler.processInput(Button.CYCLE_GENDER);
|
||||||
handler.processInput(Button.ACTION);
|
handler.processInput(Button.ACTION);
|
||||||
|
game.phaseInterceptor.unlock();
|
||||||
});
|
});
|
||||||
|
await game.phaseInterceptor.run(SelectStarterPhase);
|
||||||
let options: OptionSelectItem[];
|
let options: OptionSelectItem[];
|
||||||
let optionSelectUiHandler: OptionSelectUiHandler;
|
let optionSelectUiHandler: OptionSelectUiHandler;
|
||||||
await new Promise<void>((resolve) => {
|
await new Promise<void>((resolve) => {
|
||||||
@ -128,21 +134,20 @@ describe("UI - Starter select", () => {
|
|||||||
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
||||||
optionSelectUiHandler.processInput(Button.ACTION);
|
optionSelectUiHandler.processInput(Button.ACTION);
|
||||||
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
await new Promise<void>((resolve) => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
handler.processInput(Button.SUBMIT);
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
});
|
handler.processInput(Button.SUBMIT);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
});
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
||||||
handler.processInput(Button.ACTION);
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
});
|
handler.processInput(Button.ACTION);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
});
|
||||||
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
||||||
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
||||||
});
|
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
resolve();
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
});
|
||||||
handler.processInput(Button.ACTION);
|
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
||||||
|
|
||||||
@ -153,15 +158,19 @@ describe("UI - Starter select", () => {
|
|||||||
expect(game.scene.getParty()[0].getAbility().id).toBe(Abilities.OVERGROW);
|
expect(game.scene.getParty()[0].getAbility().id).toBe(Abilities.OVERGROW);
|
||||||
}, 20000);
|
}, 20000);
|
||||||
|
|
||||||
it("Bulbasaur - shiny - variant 2 female lonely cholorophyl", async() => {
|
it("Bulbasaur - shiny - variant 2 female lonely chlorophyl", async() => {
|
||||||
await game.importData("src/test/utils/saves/everything.prsv");
|
await game.importData("src/test/utils/saves/everything.prsv");
|
||||||
|
const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => {
|
||||||
|
const species = game.scene.gameData.dexData[key];
|
||||||
|
return species.caughtAttr !== 0n;
|
||||||
|
}).length;
|
||||||
|
expect(caughtCount).toBe(Object.keys(allSpecies).length);
|
||||||
await game.runToTitle();
|
await game.runToTitle();
|
||||||
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
||||||
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
||||||
currentPhase.gameMode = GameModes.CLASSIC;
|
currentPhase.gameMode = GameModes.CLASSIC;
|
||||||
currentPhase.end();
|
currentPhase.end();
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.mustRun(SelectStarterPhase).catch((error) => expect(error).toBe(SelectStarterPhase));
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
handler.processInput(Button.RIGHT);
|
handler.processInput(Button.RIGHT);
|
||||||
@ -169,7 +178,9 @@ describe("UI - Starter select", () => {
|
|||||||
handler.processInput(Button.CYCLE_NATURE);
|
handler.processInput(Button.CYCLE_NATURE);
|
||||||
handler.processInput(Button.CYCLE_ABILITY);
|
handler.processInput(Button.CYCLE_ABILITY);
|
||||||
handler.processInput(Button.ACTION);
|
handler.processInput(Button.ACTION);
|
||||||
|
game.phaseInterceptor.unlock();
|
||||||
});
|
});
|
||||||
|
await game.phaseInterceptor.run(SelectStarterPhase);
|
||||||
let options: OptionSelectItem[];
|
let options: OptionSelectItem[];
|
||||||
let optionSelectUiHandler: OptionSelectUiHandler;
|
let optionSelectUiHandler: OptionSelectUiHandler;
|
||||||
await new Promise<void>((resolve) => {
|
await new Promise<void>((resolve) => {
|
||||||
@ -186,21 +197,20 @@ describe("UI - Starter select", () => {
|
|||||||
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
||||||
optionSelectUiHandler.processInput(Button.ACTION);
|
optionSelectUiHandler.processInput(Button.ACTION);
|
||||||
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
await new Promise<void>((resolve) => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
handler.processInput(Button.SUBMIT);
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
});
|
handler.processInput(Button.SUBMIT);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
});
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
||||||
handler.processInput(Button.ACTION);
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
});
|
handler.processInput(Button.ACTION);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
});
|
||||||
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
||||||
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
||||||
});
|
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
resolve();
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
});
|
||||||
handler.processInput(Button.ACTION);
|
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
||||||
|
|
||||||
@ -211,21 +221,27 @@ describe("UI - Starter select", () => {
|
|||||||
expect(game.scene.getParty()[0].getAbility().id).toBe(Abilities.CHLOROPHYLL);
|
expect(game.scene.getParty()[0].getAbility().id).toBe(Abilities.CHLOROPHYLL);
|
||||||
}, 20000);
|
}, 20000);
|
||||||
|
|
||||||
it("Bulbasaur - shiny - variant 2 female", async() => {
|
it("Bulbasaur - shiny - variant 2 female lonely chlorophyl", async() => {
|
||||||
await game.importData("src/test/utils/saves/everything.prsv");
|
await game.importData("src/test/utils/saves/everything.prsv");
|
||||||
|
const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => {
|
||||||
|
const species = game.scene.gameData.dexData[key];
|
||||||
|
return species.caughtAttr !== 0n;
|
||||||
|
}).length;
|
||||||
|
expect(caughtCount).toBe(Object.keys(allSpecies).length);
|
||||||
await game.runToTitle();
|
await game.runToTitle();
|
||||||
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
||||||
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
||||||
currentPhase.gameMode = GameModes.CLASSIC;
|
currentPhase.gameMode = GameModes.CLASSIC;
|
||||||
currentPhase.end();
|
currentPhase.end();
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.mustRun(SelectStarterPhase).catch((error) => expect(error).toBe(SelectStarterPhase));
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
handler.processInput(Button.RIGHT);
|
handler.processInput(Button.RIGHT);
|
||||||
handler.processInput(Button.CYCLE_GENDER);
|
handler.processInput(Button.CYCLE_GENDER);
|
||||||
handler.processInput(Button.ACTION);
|
handler.processInput(Button.ACTION);
|
||||||
|
game.phaseInterceptor.unlock();
|
||||||
});
|
});
|
||||||
|
await game.phaseInterceptor.run(SelectStarterPhase);
|
||||||
let options: OptionSelectItem[];
|
let options: OptionSelectItem[];
|
||||||
let optionSelectUiHandler: OptionSelectUiHandler;
|
let optionSelectUiHandler: OptionSelectUiHandler;
|
||||||
await new Promise<void>((resolve) => {
|
await new Promise<void>((resolve) => {
|
||||||
@ -242,21 +258,20 @@ describe("UI - Starter select", () => {
|
|||||||
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
||||||
optionSelectUiHandler.processInput(Button.ACTION);
|
optionSelectUiHandler.processInput(Button.ACTION);
|
||||||
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
await new Promise<void>((resolve) => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
handler.processInput(Button.SUBMIT);
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
});
|
handler.processInput(Button.SUBMIT);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
});
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
||||||
handler.processInput(Button.ACTION);
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
});
|
handler.processInput(Button.ACTION);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
});
|
||||||
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
||||||
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
||||||
});
|
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
resolve();
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
});
|
||||||
handler.processInput(Button.ACTION);
|
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
||||||
|
|
||||||
@ -268,19 +283,25 @@ describe("UI - Starter select", () => {
|
|||||||
|
|
||||||
it("Bulbasaur - not shiny", async() => {
|
it("Bulbasaur - not shiny", async() => {
|
||||||
await game.importData("src/test/utils/saves/everything.prsv");
|
await game.importData("src/test/utils/saves/everything.prsv");
|
||||||
|
const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => {
|
||||||
|
const species = game.scene.gameData.dexData[key];
|
||||||
|
return species.caughtAttr !== 0n;
|
||||||
|
}).length;
|
||||||
|
expect(caughtCount).toBe(Object.keys(allSpecies).length);
|
||||||
await game.runToTitle();
|
await game.runToTitle();
|
||||||
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
||||||
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
||||||
currentPhase.gameMode = GameModes.CLASSIC;
|
currentPhase.gameMode = GameModes.CLASSIC;
|
||||||
currentPhase.end();
|
currentPhase.end();
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.mustRun(SelectStarterPhase).catch((error) => expect(error).toBe(SelectStarterPhase));
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
handler.processInput(Button.RIGHT);
|
handler.processInput(Button.RIGHT);
|
||||||
handler.processInput(Button.CYCLE_SHINY);
|
handler.processInput(Button.CYCLE_SHINY);
|
||||||
handler.processInput(Button.ACTION);
|
handler.processInput(Button.ACTION);
|
||||||
|
game.phaseInterceptor.unlock();
|
||||||
});
|
});
|
||||||
|
await game.phaseInterceptor.run(SelectStarterPhase);
|
||||||
let options: OptionSelectItem[];
|
let options: OptionSelectItem[];
|
||||||
let optionSelectUiHandler: OptionSelectUiHandler;
|
let optionSelectUiHandler: OptionSelectUiHandler;
|
||||||
await new Promise<void>((resolve) => {
|
await new Promise<void>((resolve) => {
|
||||||
@ -297,21 +318,20 @@ describe("UI - Starter select", () => {
|
|||||||
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
||||||
optionSelectUiHandler.processInput(Button.ACTION);
|
optionSelectUiHandler.processInput(Button.ACTION);
|
||||||
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
await new Promise<void>((resolve) => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
handler.processInput(Button.SUBMIT);
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
});
|
handler.processInput(Button.SUBMIT);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
});
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
||||||
handler.processInput(Button.ACTION);
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
});
|
handler.processInput(Button.ACTION);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
});
|
||||||
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
||||||
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
||||||
});
|
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
resolve();
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
});
|
||||||
handler.processInput(Button.ACTION);
|
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
||||||
|
|
||||||
@ -320,76 +340,28 @@ describe("UI - Starter select", () => {
|
|||||||
expect(game.scene.getParty()[0].variant).toBe(0);
|
expect(game.scene.getParty()[0].variant).toBe(0);
|
||||||
}, 20000);
|
}, 20000);
|
||||||
|
|
||||||
it("Bulbasaur - shiny - variant 0", async() => {
|
|
||||||
await game.importData("src/test/utils/saves/everything.prsv");
|
|
||||||
await game.runToTitle();
|
|
||||||
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
|
||||||
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
|
||||||
currentPhase.gameMode = GameModes.CLASSIC;
|
|
||||||
currentPhase.end();
|
|
||||||
});
|
|
||||||
await game.phaseInterceptor.mustRun(SelectStarterPhase).catch((error) => expect(error).toBe(SelectStarterPhase));
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
|
||||||
handler.processInput(Button.RIGHT);
|
|
||||||
handler.processInput(Button.V);
|
|
||||||
handler.processInput(Button.ACTION);
|
|
||||||
});
|
|
||||||
let options: OptionSelectItem[];
|
|
||||||
let optionSelectUiHandler: OptionSelectUiHandler;
|
|
||||||
await new Promise<void>((resolve) => {
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.OPTION_SELECT, () => {
|
|
||||||
optionSelectUiHandler = game.scene.ui.getHandler() as OptionSelectUiHandler;
|
|
||||||
options = optionSelectUiHandler.getOptionsWithScroll();
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
expect(options.some(option => option.label === "Add to Party")).toBe(true);
|
|
||||||
expect(options.some(option => option.label === "Toggle IVs")).toBe(true);
|
|
||||||
expect(options.some(option => option.label === "Manage Moves")).toBe(true);
|
|
||||||
expect(options.some(option => option.label === "Use Candies")).toBe(true);
|
|
||||||
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
|
||||||
optionSelectUiHandler.processInput(Button.ACTION);
|
|
||||||
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
|
||||||
handler.processInput(Button.SUBMIT);
|
|
||||||
});
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
|
||||||
handler.processInput(Button.ACTION);
|
|
||||||
});
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
|
||||||
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
|
||||||
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
|
||||||
});
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
|
||||||
handler.processInput(Button.ACTION);
|
|
||||||
});
|
|
||||||
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
|
||||||
|
|
||||||
expect(game.scene.getParty()[0].species.speciesId).toBe(Species.BULBASAUR);
|
|
||||||
expect(game.scene.getParty()[0].shiny).toBe(true);
|
|
||||||
expect(game.scene.getParty()[0].variant).toBe(0);
|
|
||||||
}, 20000);
|
|
||||||
|
|
||||||
it("Bulbasaur - shiny - variant 1", async() => {
|
it("Bulbasaur - shiny - variant 1", async() => {
|
||||||
await game.importData("src/test/utils/saves/everything.prsv");
|
await game.importData("src/test/utils/saves/everything.prsv");
|
||||||
|
const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => {
|
||||||
|
const species = game.scene.gameData.dexData[key];
|
||||||
|
return species.caughtAttr !== 0n;
|
||||||
|
}).length;
|
||||||
|
expect(caughtCount).toBe(Object.keys(allSpecies).length);
|
||||||
await game.runToTitle();
|
await game.runToTitle();
|
||||||
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
||||||
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
||||||
currentPhase.gameMode = GameModes.CLASSIC;
|
currentPhase.gameMode = GameModes.CLASSIC;
|
||||||
currentPhase.end();
|
currentPhase.end();
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.mustRun(SelectStarterPhase).catch((error) => expect(error).toBe(SelectStarterPhase));
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
handler.processInput(Button.RIGHT);
|
handler.processInput(Button.RIGHT);
|
||||||
handler.processInput(Button.V);
|
handler.processInput(Button.V);
|
||||||
handler.processInput(Button.V);
|
handler.processInput(Button.V);
|
||||||
handler.processInput(Button.ACTION);
|
handler.processInput(Button.ACTION);
|
||||||
|
game.phaseInterceptor.unlock();
|
||||||
});
|
});
|
||||||
|
await game.phaseInterceptor.run(SelectStarterPhase);
|
||||||
let options: OptionSelectItem[];
|
let options: OptionSelectItem[];
|
||||||
let optionSelectUiHandler: OptionSelectUiHandler;
|
let optionSelectUiHandler: OptionSelectUiHandler;
|
||||||
await new Promise<void>((resolve) => {
|
await new Promise<void>((resolve) => {
|
||||||
@ -406,21 +378,20 @@ describe("UI - Starter select", () => {
|
|||||||
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
||||||
optionSelectUiHandler.processInput(Button.ACTION);
|
optionSelectUiHandler.processInput(Button.ACTION);
|
||||||
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
await new Promise<void>((resolve) => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
handler.processInput(Button.SUBMIT);
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
});
|
handler.processInput(Button.SUBMIT);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
});
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
||||||
handler.processInput(Button.ACTION);
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
});
|
handler.processInput(Button.ACTION);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
});
|
||||||
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
||||||
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
||||||
});
|
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
resolve();
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
});
|
||||||
handler.processInput(Button.ACTION);
|
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
||||||
|
|
||||||
@ -429,15 +400,19 @@ describe("UI - Starter select", () => {
|
|||||||
expect(game.scene.getParty()[0].variant).toBe(1);
|
expect(game.scene.getParty()[0].variant).toBe(1);
|
||||||
}, 20000);
|
}, 20000);
|
||||||
|
|
||||||
it("Bulbasaur - shiny - variant 1", async() => {
|
it("Bulbasaur - shiny - variant 2", async() => {
|
||||||
await game.importData("src/test/utils/saves/everything.prsv");
|
await game.importData("src/test/utils/saves/everything.prsv");
|
||||||
|
const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => {
|
||||||
|
const species = game.scene.gameData.dexData[key];
|
||||||
|
return species.caughtAttr !== 0n;
|
||||||
|
}).length;
|
||||||
|
expect(caughtCount).toBe(Object.keys(allSpecies).length);
|
||||||
await game.runToTitle();
|
await game.runToTitle();
|
||||||
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
||||||
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
||||||
currentPhase.gameMode = GameModes.CLASSIC;
|
currentPhase.gameMode = GameModes.CLASSIC;
|
||||||
currentPhase.end();
|
currentPhase.end();
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.mustRun(SelectStarterPhase).catch((error) => expect(error).toBe(SelectStarterPhase));
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
handler.processInput(Button.RIGHT);
|
handler.processInput(Button.RIGHT);
|
||||||
@ -445,7 +420,9 @@ describe("UI - Starter select", () => {
|
|||||||
handler.processInput(Button.V);
|
handler.processInput(Button.V);
|
||||||
handler.processInput(Button.V);
|
handler.processInput(Button.V);
|
||||||
handler.processInput(Button.ACTION);
|
handler.processInput(Button.ACTION);
|
||||||
|
game.phaseInterceptor.unlock();
|
||||||
});
|
});
|
||||||
|
await game.phaseInterceptor.run(SelectStarterPhase);
|
||||||
let options: OptionSelectItem[];
|
let options: OptionSelectItem[];
|
||||||
let optionSelectUiHandler: OptionSelectUiHandler;
|
let optionSelectUiHandler: OptionSelectUiHandler;
|
||||||
await new Promise<void>((resolve) => {
|
await new Promise<void>((resolve) => {
|
||||||
@ -462,21 +439,20 @@ describe("UI - Starter select", () => {
|
|||||||
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
expect(options.some(option => option.label === "Cancel")).toBe(true);
|
||||||
optionSelectUiHandler.processInput(Button.ACTION);
|
optionSelectUiHandler.processInput(Button.ACTION);
|
||||||
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
await new Promise<void>((resolve) => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
handler.processInput(Button.SUBMIT);
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
});
|
handler.processInput(Button.SUBMIT);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
});
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
||||||
handler.processInput(Button.ACTION);
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
});
|
handler.processInput(Button.ACTION);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
});
|
||||||
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
game.onNextPrompt("SelectStarterPhase", Mode.SAVE_SLOT, () => {
|
||||||
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
||||||
});
|
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
resolve();
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
});
|
||||||
handler.processInput(Button.ACTION);
|
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
||||||
|
|
||||||
@ -485,15 +461,19 @@ describe("UI - Starter select", () => {
|
|||||||
expect(game.scene.getParty()[0].variant).toBe(2);
|
expect(game.scene.getParty()[0].variant).toBe(2);
|
||||||
}, 20000);
|
}, 20000);
|
||||||
|
|
||||||
it("Check if first pokemon in party is caterpie from gen 1 and 1rd row, 3rd column ", async() => {
|
it("Check if first pokemon in party is caterpie from gen 1 and 1rd row, 3rd column", async() => {
|
||||||
await game.importData("src/test/utils/saves/everything.prsv");
|
await game.importData("src/test/utils/saves/everything.prsv");
|
||||||
|
const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => {
|
||||||
|
const species = game.scene.gameData.dexData[key];
|
||||||
|
return species.caughtAttr !== 0n;
|
||||||
|
}).length;
|
||||||
|
expect(caughtCount).toBe(Object.keys(allSpecies).length);
|
||||||
await game.runToTitle();
|
await game.runToTitle();
|
||||||
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
||||||
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
||||||
currentPhase.gameMode = GameModes.CLASSIC;
|
currentPhase.gameMode = GameModes.CLASSIC;
|
||||||
currentPhase.end();
|
currentPhase.end();
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.mustRun(SelectStarterPhase).catch((error) => expect(error).toBe(SelectStarterPhase));
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
handler.processInput(Button.RIGHT);
|
handler.processInput(Button.RIGHT);
|
||||||
@ -501,7 +481,9 @@ describe("UI - Starter select", () => {
|
|||||||
handler.processInput(Button.RIGHT);
|
handler.processInput(Button.RIGHT);
|
||||||
handler.processInput(Button.RIGHT);
|
handler.processInput(Button.RIGHT);
|
||||||
handler.processInput(Button.ACTION);
|
handler.processInput(Button.ACTION);
|
||||||
|
game.phaseInterceptor.unlock();
|
||||||
});
|
});
|
||||||
|
await game.phaseInterceptor.run(SelectStarterPhase);
|
||||||
let options: OptionSelectItem[];
|
let options: OptionSelectItem[];
|
||||||
let optionSelectUiHandler: OptionSelectUiHandler;
|
let optionSelectUiHandler: OptionSelectUiHandler;
|
||||||
await new Promise<void>((resolve) => {
|
await new Promise<void>((resolve) => {
|
||||||
@ -526,6 +508,7 @@ describe("UI - Starter select", () => {
|
|||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(starterSelectUiHandler.starterGens[0]).toBe(0);
|
expect(starterSelectUiHandler.starterGens[0]).toBe(0);
|
||||||
expect(starterSelectUiHandler.starterCursors[0]).toBe(3);
|
expect(starterSelectUiHandler.starterCursors[0]).toBe(3);
|
||||||
expect(starterSelectUiHandler.cursorObj.x).toBe(132 + 4 * 18);
|
expect(starterSelectUiHandler.cursorObj.x).toBe(132 + 4 * 18);
|
||||||
@ -539,23 +522,23 @@ describe("UI - Starter select", () => {
|
|||||||
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
||||||
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
||||||
});
|
});
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
|
||||||
handler.processInput(Button.ACTION);
|
|
||||||
});
|
|
||||||
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
||||||
expect(game.scene.getParty()[0].species.speciesId).toBe(Species.CATERPIE);
|
expect(game.scene.getParty()[0].species.speciesId).toBe(Species.CATERPIE);
|
||||||
}, 20000);
|
}, 20000);
|
||||||
|
|
||||||
it("Check if first pokemon in party is nidoran_m from gen 1 and 2nd row, 4th column (cursor (9+4)-1) ", async() => {
|
it("Check if first pokemon in party is nidoran_m from gen 1 and 2nd row, 4th column (cursor (9+4)-1)", async() => {
|
||||||
await game.importData("src/test/utils/saves/everything.prsv");
|
await game.importData("src/test/utils/saves/everything.prsv");
|
||||||
|
const caughtCount = Object.keys(game.scene.gameData.dexData).filter((key) => {
|
||||||
|
const species = game.scene.gameData.dexData[key];
|
||||||
|
return species.caughtAttr !== 0n;
|
||||||
|
}).length;
|
||||||
|
expect(caughtCount).toBe(Object.keys(allSpecies).length);
|
||||||
await game.runToTitle();
|
await game.runToTitle();
|
||||||
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
game.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
||||||
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
const currentPhase = game.scene.getCurrentPhase() as TitlePhase;
|
||||||
currentPhase.gameMode = GameModes.CLASSIC;
|
currentPhase.gameMode = GameModes.CLASSIC;
|
||||||
currentPhase.end();
|
currentPhase.end();
|
||||||
});
|
});
|
||||||
await game.phaseInterceptor.mustRun(SelectStarterPhase).catch((error) => expect(error).toBe(SelectStarterPhase));
|
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
game.onNextPrompt("SelectStarterPhase", Mode.STARTER_SELECT, () => {
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
||||||
handler.processInput(Button.RIGHT);
|
handler.processInput(Button.RIGHT);
|
||||||
@ -564,7 +547,9 @@ describe("UI - Starter select", () => {
|
|||||||
handler.processInput(Button.RIGHT);
|
handler.processInput(Button.RIGHT);
|
||||||
handler.processInput(Button.DOWN);
|
handler.processInput(Button.DOWN);
|
||||||
handler.processInput(Button.ACTION);
|
handler.processInput(Button.ACTION);
|
||||||
|
game.phaseInterceptor.unlock();
|
||||||
});
|
});
|
||||||
|
await game.phaseInterceptor.run(SelectStarterPhase);
|
||||||
let options: OptionSelectItem[];
|
let options: OptionSelectItem[];
|
||||||
let optionSelectUiHandler: OptionSelectUiHandler;
|
let optionSelectUiHandler: OptionSelectUiHandler;
|
||||||
await new Promise<void>((resolve) => {
|
await new Promise<void>((resolve) => {
|
||||||
@ -589,6 +574,7 @@ describe("UI - Starter select", () => {
|
|||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(starterSelectUiHandler.starterGens[0]).toBe(0);
|
expect(starterSelectUiHandler.starterGens[0]).toBe(0);
|
||||||
expect(starterSelectUiHandler.starterCursors[0]).toBe(12);
|
expect(starterSelectUiHandler.starterCursors[0]).toBe(12);
|
||||||
expect(starterSelectUiHandler.cursorObj.x).toBe(132 + 4 * 18);
|
expect(starterSelectUiHandler.cursorObj.x).toBe(132 + 4 * 18);
|
||||||
@ -602,10 +588,6 @@ describe("UI - Starter select", () => {
|
|||||||
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
const saveSlotSelectUiHandler = game.scene.ui.getHandler() as SaveSlotSelectUiHandler;
|
||||||
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
saveSlotSelectUiHandler.processInput(Button.ACTION);
|
||||||
});
|
});
|
||||||
game.onNextPrompt("SelectStarterPhase", Mode.CONFIRM, () => {
|
|
||||||
const handler = game.scene.ui.getHandler() as StarterSelectUiHandler;
|
|
||||||
handler.processInput(Button.ACTION);
|
|
||||||
});
|
|
||||||
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
await game.phaseInterceptor.whenAboutToRun(EncounterPhase);
|
||||||
expect(game.scene.getParty()[0].species.speciesId).toBe(Species.NIDORAN_M);
|
expect(game.scene.getParty()[0].species.speciesId).toBe(Species.NIDORAN_M);
|
||||||
}, 20000);
|
}, 20000);
|
||||||
|
50
src/test/utils/errorInterceptor.ts
Normal file
50
src/test/utils/errorInterceptor.ts
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
export default class ErrorInterceptor {
|
||||||
|
private static instance: ErrorInterceptor;
|
||||||
|
public running;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.running = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static getInstance(): ErrorInterceptor {
|
||||||
|
if (!ErrorInterceptor.instance) {
|
||||||
|
ErrorInterceptor.instance = new ErrorInterceptor();
|
||||||
|
}
|
||||||
|
return ErrorInterceptor.instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
clear() {
|
||||||
|
this.running = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
add(obj) {
|
||||||
|
this.running.push(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
remove(obj) {
|
||||||
|
const index = this.running.indexOf(obj);
|
||||||
|
if (index !== -1) {
|
||||||
|
this.running.splice(index, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
process.on("uncaughtException", (error) => {
|
||||||
|
console.log(error);
|
||||||
|
const toStop = ErrorInterceptor.getInstance().running;
|
||||||
|
for (const elm of toStop) {
|
||||||
|
elm.rejectAll(error);
|
||||||
|
}
|
||||||
|
global.testFailed = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Global error handler for unhandled promise rejections
|
||||||
|
process.on("unhandledRejection", (reason, promise) => {
|
||||||
|
console.log(reason);
|
||||||
|
const toStop = ErrorInterceptor.getInstance().running;
|
||||||
|
for (const elm of toStop) {
|
||||||
|
elm.rejectAll(reason);
|
||||||
|
}
|
||||||
|
global.testFailed = true;
|
||||||
|
});
|
@ -2,21 +2,17 @@ import GameWrapper from "#app/test/utils/gameWrapper";
|
|||||||
import {Mode} from "#app/ui/ui";
|
import {Mode} from "#app/ui/ui";
|
||||||
import {generateStarter, waitUntil} from "#app/test/utils/gameManagerUtils";
|
import {generateStarter, waitUntil} from "#app/test/utils/gameManagerUtils";
|
||||||
import {
|
import {
|
||||||
CheckSwitchPhase,
|
|
||||||
CommandPhase,
|
CommandPhase,
|
||||||
EncounterPhase,
|
EncounterPhase,
|
||||||
LoginPhase,
|
LoginPhase,
|
||||||
PostSummonPhase,
|
PostSummonPhase,
|
||||||
SelectGenderPhase,
|
SelectGenderPhase,
|
||||||
SelectStarterPhase,
|
SelectStarterPhase,
|
||||||
SummonPhase,
|
|
||||||
TitlePhase,
|
TitlePhase,
|
||||||
ToggleDoublePositionPhase,
|
|
||||||
} from "#app/phases";
|
} from "#app/phases";
|
||||||
import BattleScene from "#app/battle-scene.js";
|
import BattleScene from "#app/battle-scene.js";
|
||||||
import PhaseInterceptor from "#app/test/utils/phaseInterceptor";
|
import PhaseInterceptor from "#app/test/utils/phaseInterceptor";
|
||||||
import TextInterceptor from "#app/test/utils/TextInterceptor";
|
import TextInterceptor from "#app/test/utils/TextInterceptor";
|
||||||
import {expect} from "vitest";
|
|
||||||
import {GameModes, getGameMode} from "#app/game-mode";
|
import {GameModes, getGameMode} from "#app/game-mode";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import { AES, enc } from "crypto-js";
|
import { AES, enc } from "crypto-js";
|
||||||
@ -26,6 +22,7 @@ import {PlayerGender} from "#app/data/enums/player-gender";
|
|||||||
import {GameDataType} from "#app/data/enums/game-data-type";
|
import {GameDataType} from "#app/data/enums/game-data-type";
|
||||||
import InputsHandler from "#app/test/utils/inputsHandler";
|
import InputsHandler from "#app/test/utils/inputsHandler";
|
||||||
import {ExpNotification} from "#app/enums/exp-notification";
|
import {ExpNotification} from "#app/enums/exp-notification";
|
||||||
|
import ErrorInterceptor from "#app/test/utils/errorInterceptor";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to manage the game state and transitions between phases.
|
* Class to manage the game state and transitions between phases.
|
||||||
@ -43,6 +40,8 @@ export default class GameManager {
|
|||||||
* @param bypassLogin - Whether to bypass the login phase.
|
* @param bypassLogin - Whether to bypass the login phase.
|
||||||
*/
|
*/
|
||||||
constructor(phaserGame: Phaser.Game, bypassLogin: boolean = true) {
|
constructor(phaserGame: Phaser.Game, bypassLogin: boolean = true) {
|
||||||
|
localStorage.clear();
|
||||||
|
ErrorInterceptor.getInstance().clear();
|
||||||
BattleScene.prototype.randBattleSeedInt = (arg) => arg-1;
|
BattleScene.prototype.randBattleSeedInt = (arg) => arg-1;
|
||||||
this.gameWrapper = new GameWrapper(phaserGame, bypassLogin);
|
this.gameWrapper = new GameWrapper(phaserGame, bypassLogin);
|
||||||
this.scene = new BattleScene();
|
this.scene = new BattleScene();
|
||||||
@ -94,14 +93,14 @@ export default class GameManager {
|
|||||||
* @returns A promise that resolves when the title phase is reached.
|
* @returns A promise that resolves when the title phase is reached.
|
||||||
*/
|
*/
|
||||||
runToTitle(): Promise<void> {
|
runToTitle(): Promise<void> {
|
||||||
return new Promise(async(resolve) => {
|
return new Promise(async(resolve, reject) => {
|
||||||
await this.phaseInterceptor.run(LoginPhase);
|
await this.phaseInterceptor.run(LoginPhase).catch((e) => reject(e));
|
||||||
this.onNextPrompt("SelectGenderPhase", Mode.OPTION_SELECT, () => {
|
this.onNextPrompt("SelectGenderPhase", Mode.OPTION_SELECT, () => {
|
||||||
this.scene.gameData.gender = PlayerGender.MALE;
|
this.scene.gameData.gender = PlayerGender.MALE;
|
||||||
this.endPhase();
|
this.endPhase();
|
||||||
}, () => this.isCurrentPhase(TitlePhase));
|
}, () => this.isCurrentPhase(TitlePhase));
|
||||||
await this.phaseInterceptor.run(SelectGenderPhase, () => this.isCurrentPhase(TitlePhase));
|
await this.phaseInterceptor.run(SelectGenderPhase, () => this.isCurrentPhase(TitlePhase)).catch((e) => reject(e));
|
||||||
await this.phaseInterceptor.run(TitlePhase);
|
await this.phaseInterceptor.run(TitlePhase).catch((e) => reject(e));
|
||||||
this.scene.gameSpeed = 5;
|
this.scene.gameSpeed = 5;
|
||||||
this.scene.moveAnimations = false;
|
this.scene.moveAnimations = false;
|
||||||
this.scene.showLevelUpStats = false;
|
this.scene.showLevelUpStats = false;
|
||||||
@ -118,8 +117,8 @@ export default class GameManager {
|
|||||||
* @returns A promise that resolves when the summon phase is reached.
|
* @returns A promise that resolves when the summon phase is reached.
|
||||||
*/
|
*/
|
||||||
runToSummon(species?: Species[]): Promise<void> {
|
runToSummon(species?: Species[]): Promise<void> {
|
||||||
return new Promise(async(resolve) => {
|
return new Promise(async(resolve, reject) => {
|
||||||
await this.runToTitle();
|
await this.runToTitle().catch((e) => reject(e));
|
||||||
this.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
this.onNextPrompt("TitlePhase", Mode.TITLE, () => {
|
||||||
this.scene.gameMode = getGameMode(GameModes.CLASSIC);
|
this.scene.gameMode = getGameMode(GameModes.CLASSIC);
|
||||||
const starters = generateStarter(this.scene, species);
|
const starters = generateStarter(this.scene, species);
|
||||||
@ -127,7 +126,7 @@ export default class GameManager {
|
|||||||
this.scene.pushPhase(new EncounterPhase(this.scene, false));
|
this.scene.pushPhase(new EncounterPhase(this.scene, false));
|
||||||
selectStarterPhase.initBattle(starters);
|
selectStarterPhase.initBattle(starters);
|
||||||
});
|
});
|
||||||
await this.phaseInterceptor.run(EncounterPhase);
|
await this.phaseInterceptor.run(EncounterPhase).catch((e) => reject(e));
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -138,25 +137,18 @@ export default class GameManager {
|
|||||||
* @returns A promise that resolves when the battle is started.
|
* @returns A promise that resolves when the battle is started.
|
||||||
*/
|
*/
|
||||||
startBattle(species?: Species[]): Promise<void> {
|
startBattle(species?: Species[]): Promise<void> {
|
||||||
return new Promise(async(resolve) => {
|
return new Promise(async(resolve, reject) => {
|
||||||
await this.runToSummon(species);
|
await this.runToSummon(species).catch((e) => reject(e));
|
||||||
await this.phaseInterceptor.runFrom(PostSummonPhase).to(ToggleDoublePositionPhase);
|
|
||||||
await this.phaseInterceptor.run(SummonPhase, () => this.isCurrentPhase(CheckSwitchPhase) || this.isCurrentPhase(PostSummonPhase));
|
|
||||||
this.onNextPrompt("CheckSwitchPhase", Mode.CONFIRM, () => {
|
this.onNextPrompt("CheckSwitchPhase", Mode.CONFIRM, () => {
|
||||||
this.setMode(Mode.MESSAGE);
|
this.setMode(Mode.MESSAGE);
|
||||||
this.endPhase();
|
this.endPhase();
|
||||||
}, () => this.isCurrentPhase(PostSummonPhase));
|
}, () => this.isCurrentPhase(CommandPhase));
|
||||||
this.onNextPrompt("CheckSwitchPhase", Mode.CONFIRM, () => {
|
this.onNextPrompt("CheckSwitchPhase", Mode.CONFIRM, () => {
|
||||||
this.setMode(Mode.MESSAGE);
|
this.setMode(Mode.MESSAGE);
|
||||||
this.endPhase();
|
this.endPhase();
|
||||||
}, () => this.isCurrentPhase(PostSummonPhase));
|
}, () => this.isCurrentPhase(CommandPhase));
|
||||||
await this.phaseInterceptor.run(CheckSwitchPhase, () => this.isCurrentPhase(PostSummonPhase));
|
await this.phaseInterceptor.runFrom(PostSummonPhase).to(CommandPhase).catch((e) => reject(e));
|
||||||
await this.phaseInterceptor.run(CheckSwitchPhase, () => this.isCurrentPhase(PostSummonPhase));
|
|
||||||
await this.phaseInterceptor.runFrom(PostSummonPhase).to(CommandPhase);
|
|
||||||
await waitUntil(() => this.scene.ui?.getMode() === Mode.COMMAND);
|
|
||||||
console.log("==================[New Turn]==================");
|
console.log("==================[New Turn]==================");
|
||||||
expect(this.scene.ui?.getMode()).toBe(Mode.COMMAND);
|
|
||||||
expect(this.scene.getCurrentPhase().constructor.name).toBe(CommandPhase.name);
|
|
||||||
return resolve();
|
return resolve();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,6 @@ export default class GameWrapper {
|
|||||||
frames: {},
|
frames: {},
|
||||||
});
|
});
|
||||||
Pokemon.prototype.enableMask = () => null;
|
Pokemon.prototype.enableMask = () => null;
|
||||||
localStorage.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setScene(scene: BattleScene) {
|
setScene(scene: BattleScene) {
|
||||||
|
@ -7,9 +7,11 @@ export default class MockText {
|
|||||||
private scene;
|
private scene;
|
||||||
private textureManager;
|
private textureManager;
|
||||||
public list = [];
|
public list = [];
|
||||||
|
public style;
|
||||||
constructor(textureManager, x, y, content, styleOptions) {
|
constructor(textureManager, x, y, content, styleOptions) {
|
||||||
this.scene = textureManager.scene;
|
this.scene = textureManager.scene;
|
||||||
this.textureManager = textureManager;
|
this.textureManager = textureManager;
|
||||||
|
this.style = {};
|
||||||
// Phaser.GameObjects.TextStyle.prototype.setStyle = () => null;
|
// Phaser.GameObjects.TextStyle.prototype.setStyle = () => null;
|
||||||
// Phaser.GameObjects.Text.prototype.updateText = () => null;
|
// Phaser.GameObjects.Text.prototype.updateText = () => null;
|
||||||
// Phaser.Textures.TextureManager.prototype.addCanvas = () => {};
|
// Phaser.Textures.TextureManager.prototype.addCanvas = () => {};
|
||||||
|
@ -6,10 +6,12 @@ import {
|
|||||||
LoginPhase, MessagePhase, MoveEffectPhase, MoveEndPhase, MovePhase, NewBattlePhase, NextEncounterPhase,
|
LoginPhase, MessagePhase, MoveEffectPhase, MoveEndPhase, MovePhase, NewBattlePhase, NextEncounterPhase,
|
||||||
PostSummonPhase,
|
PostSummonPhase,
|
||||||
SelectGenderPhase, SelectModifierPhase,
|
SelectGenderPhase, SelectModifierPhase,
|
||||||
SelectStarterPhase, ShinySparklePhase, ShowAbilityPhase, StatChangePhase, SummonPhase,
|
SelectStarterPhase, SelectTargetPhase, ShinySparklePhase, ShowAbilityPhase, StatChangePhase, SummonPhase,
|
||||||
TitlePhase, ToggleDoublePositionPhase, TurnEndPhase, TurnInitPhase, TurnStartPhase, VictoryPhase
|
TitlePhase, ToggleDoublePositionPhase, TurnEndPhase, TurnInitPhase, TurnStartPhase, UnavailablePhase, VictoryPhase
|
||||||
} from "#app/phases";
|
} from "#app/phases";
|
||||||
import {Mode} from "#app/ui/ui";
|
import UI, {Mode} from "#app/ui/ui";
|
||||||
|
import {Phase} from "#app/phase";
|
||||||
|
import ErrorInterceptor from "#app/test/utils/errorInterceptor";
|
||||||
|
|
||||||
export default class PhaseInterceptor {
|
export default class PhaseInterceptor {
|
||||||
public scene;
|
public scene;
|
||||||
@ -21,6 +23,9 @@ export default class PhaseInterceptor {
|
|||||||
private intervalRun;
|
private intervalRun;
|
||||||
private prompts;
|
private prompts;
|
||||||
private phaseFrom;
|
private phaseFrom;
|
||||||
|
private inProgress;
|
||||||
|
private originalSetMode;
|
||||||
|
private originalSuperEnd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of phases with their corresponding start methods.
|
* List of phases with their corresponding start methods.
|
||||||
@ -56,6 +61,12 @@ export default class PhaseInterceptor {
|
|||||||
[MoveEndPhase, this.startPhase],
|
[MoveEndPhase, this.startPhase],
|
||||||
[StatChangePhase, this.startPhase],
|
[StatChangePhase, this.startPhase],
|
||||||
[ShinySparklePhase, this.startPhase],
|
[ShinySparklePhase, this.startPhase],
|
||||||
|
[SelectTargetPhase, this.startPhase],
|
||||||
|
[UnavailablePhase, this.startPhase],
|
||||||
|
];
|
||||||
|
|
||||||
|
private endBySetMode = [
|
||||||
|
TitlePhase, SelectGenderPhase, CommandPhase, SelectModifierPhase
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -71,6 +82,15 @@ export default class PhaseInterceptor {
|
|||||||
this.startPromptHander();
|
this.startPromptHander();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rejectAll(error) {
|
||||||
|
if (this.inProgress) {
|
||||||
|
clearInterval(this.promptInterval);
|
||||||
|
clearInterval(this.interval);
|
||||||
|
clearInterval(this.intervalRun);
|
||||||
|
this.inProgress.onError(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to set the starting phase.
|
* Method to set the starting phase.
|
||||||
* @param phaseFrom - The phase to start from.
|
* @param phaseFrom - The phase to start from.
|
||||||
@ -86,20 +106,31 @@ export default class PhaseInterceptor {
|
|||||||
* @param phaseTo - The phase to transition to.
|
* @param phaseTo - The phase to transition to.
|
||||||
* @returns A promise that resolves when the transition is complete.
|
* @returns A promise that resolves when the transition is complete.
|
||||||
*/
|
*/
|
||||||
async to(phaseTo): Promise<void> {
|
async to(phaseTo, runTarget: boolean = true): Promise<void> {
|
||||||
return new Promise(async (resolve) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
await this.run(this.phaseFrom);
|
ErrorInterceptor.getInstance().add(this);
|
||||||
|
await this.run(this.phaseFrom).catch((e) => reject(e));
|
||||||
this.phaseFrom = null;
|
this.phaseFrom = null;
|
||||||
const targetName = typeof phaseTo === "string" ? phaseTo : phaseTo.name;
|
const targetName = typeof phaseTo === "string" ? phaseTo : phaseTo.name;
|
||||||
this.intervalRun = setInterval(async () => {
|
this.intervalRun = setInterval(async() => {
|
||||||
const currentPhase = this.onHold?.length && this.onHold[0];
|
const currentPhase = this.onHold?.length && this.onHold[0];
|
||||||
if (currentPhase && currentPhase.name !== targetName) {
|
if (currentPhase && currentPhase.name === targetName) {
|
||||||
await this.run(currentPhase.name);
|
|
||||||
} else if (currentPhase.name === targetName) {
|
|
||||||
await this.run(currentPhase.name);
|
|
||||||
clearInterval(this.intervalRun);
|
clearInterval(this.intervalRun);
|
||||||
|
if (!runTarget) {
|
||||||
|
return resolve();
|
||||||
|
}
|
||||||
|
await this.run(currentPhase).catch((e) => {
|
||||||
|
clearInterval(this.intervalRun);
|
||||||
|
return reject(e);
|
||||||
|
});
|
||||||
return resolve();
|
return resolve();
|
||||||
}
|
}
|
||||||
|
if (currentPhase && currentPhase.name !== targetName) {
|
||||||
|
await this.run(currentPhase).catch((e) => {
|
||||||
|
clearInterval(this.intervalRun);
|
||||||
|
return reject(e);
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -111,92 +142,53 @@ export default class PhaseInterceptor {
|
|||||||
* @returns A promise that resolves when the phase is run.
|
* @returns A promise that resolves when the phase is run.
|
||||||
*/
|
*/
|
||||||
run(phaseTarget, skipFn?): Promise<void> {
|
run(phaseTarget, skipFn?): Promise<void> {
|
||||||
this.scene.moveAnimations = null; // Mandatory to avoid crash
|
|
||||||
return new Promise(async (resolve) => {
|
|
||||||
this.waitUntil(phaseTarget, skipFn).then(() => {
|
|
||||||
const currentPhase = this.onHold.shift();
|
|
||||||
currentPhase.call();
|
|
||||||
resolve();
|
|
||||||
}).catch(() => {
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method to ensure a phase is run, to throw error on test if not.
|
|
||||||
* @param phaseTarget - The phase to run.
|
|
||||||
* @returns A promise that resolves when the phase is run.
|
|
||||||
*/
|
|
||||||
mustRun(phaseTarget): Promise<void> {
|
|
||||||
const targetName = typeof phaseTarget === "string" ? phaseTarget : phaseTarget.name;
|
const targetName = typeof phaseTarget === "string" ? phaseTarget : phaseTarget.name;
|
||||||
this.scene.moveAnimations = null; // Mandatory to avoid crash
|
this.scene.moveAnimations = null; // Mandatory to avoid crash
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
|
ErrorInterceptor.getInstance().add(this);
|
||||||
const interval = setInterval(async () => {
|
const interval = setInterval(async () => {
|
||||||
const currentPhase = this.onHold?.length && this.onHold[0];
|
const currentPhase = this.onHold.shift();
|
||||||
if (currentPhase && currentPhase.name !== targetName) {
|
if (currentPhase) {
|
||||||
reject(currentPhase);
|
if (currentPhase.name !== targetName) {
|
||||||
} else if (currentPhase && currentPhase.name === targetName) {
|
clearInterval(interval);
|
||||||
|
const skip = skipFn && skipFn(currentPhase.name);
|
||||||
|
if (skip) {
|
||||||
|
this.onHold.unshift(currentPhase);
|
||||||
|
ErrorInterceptor.getInstance().remove(this);
|
||||||
|
return resolve();
|
||||||
|
}
|
||||||
|
clearInterval(interval);
|
||||||
|
return reject(`Wrong phase: this is ${currentPhase.name} and not ${targetName}`);
|
||||||
|
}
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
await this.run(phaseTarget);
|
this.inProgress = {
|
||||||
resolve();
|
name: currentPhase.name,
|
||||||
|
callback: () => {
|
||||||
|
ErrorInterceptor.getInstance().remove(this);
|
||||||
|
resolve();
|
||||||
|
},
|
||||||
|
onError: (error) => reject(error),
|
||||||
|
};
|
||||||
|
currentPhase.call();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Method to execute actions when about to run a phase. Does not run the phase, stop right before.
|
|
||||||
* @param phaseTarget - The phase to run.
|
|
||||||
* @param skipFn - Optional skip function.
|
|
||||||
* @returns A promise that resolves when the phase is about to run.
|
|
||||||
*/
|
|
||||||
whenAboutToRun(phaseTarget, skipFn?): Promise<void> {
|
whenAboutToRun(phaseTarget, skipFn?): Promise<void> {
|
||||||
return new Promise(async (resolve) => {
|
|
||||||
this.waitUntil(phaseTarget, skipFn).then(() => {
|
|
||||||
resolve();
|
|
||||||
}).catch(() => {
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method to remove a phase from the list.
|
|
||||||
* @param phaseTarget - The phase to remove.
|
|
||||||
* @param skipFn - Optional skip function.
|
|
||||||
* @returns A promise that resolves when the phase is removed.
|
|
||||||
*/
|
|
||||||
remove(phaseTarget, skipFn?): Promise<void> {
|
|
||||||
return new Promise(async (resolve) => {
|
|
||||||
this.waitUntil(phaseTarget, skipFn).then(() => {
|
|
||||||
this.onHold.shift();
|
|
||||||
this.scene.getCurrentPhase().end();
|
|
||||||
resolve();
|
|
||||||
}).catch(() => {
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method to wait until a specific phase is reached.
|
|
||||||
* @param phaseTarget - The phase to wait for.
|
|
||||||
* @param skipFn - Optional skip function.
|
|
||||||
* @returns A promise that resolves when the phase is reached.
|
|
||||||
*/
|
|
||||||
waitUntil(phaseTarget, skipFn?): Promise<void> {
|
|
||||||
const targetName = typeof phaseTarget === "string" ? phaseTarget : phaseTarget.name;
|
const targetName = typeof phaseTarget === "string" ? phaseTarget : phaseTarget.name;
|
||||||
return new Promise((resolve, reject) => {
|
this.scene.moveAnimations = null; // Mandatory to avoid crash
|
||||||
this.interval = setInterval(() => {
|
return new Promise(async (resolve, reject) => {
|
||||||
const currentPhase = this.onHold?.length && this.onHold[0] && this.onHold[0].name;
|
ErrorInterceptor.getInstance().add(this);
|
||||||
// if the currentPhase here is not filled, it means it's a phase we haven't added to the list
|
const interval = setInterval(async () => {
|
||||||
if (currentPhase === targetName) {
|
const currentPhase = this.onHold.shift();
|
||||||
clearInterval(this.interval);
|
if (currentPhase) {
|
||||||
return resolve();
|
if (currentPhase.name !== targetName) {
|
||||||
} else if (skipFn && skipFn()) {
|
this.onHold.unshift(currentPhase);
|
||||||
clearInterval(this.interval);
|
} else {
|
||||||
return reject("Skipped phase");
|
clearInterval(interval);
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -206,10 +198,17 @@ export default class PhaseInterceptor {
|
|||||||
* Method to initialize phases and their corresponding methods.
|
* Method to initialize phases and their corresponding methods.
|
||||||
*/
|
*/
|
||||||
initPhases() {
|
initPhases() {
|
||||||
for (const [phase, method] of this.PHASES) {
|
this.originalSetMode = UI.prototype.setMode;
|
||||||
|
this.originalSuperEnd = Phase.prototype.end;
|
||||||
|
UI.prototype.setMode = (mode, ...args) => this.setMode.call(this, mode, ...args);
|
||||||
|
Phase.prototype.end = () => this.superEndPhase.call(this);
|
||||||
|
for (const [phase, methodStart] of this.PHASES) {
|
||||||
const originalStart = phase.prototype.start;
|
const originalStart = phase.prototype.start;
|
||||||
this.phases[phase.name] = originalStart;
|
this.phases[phase.name] = {
|
||||||
phase.prototype.start = () => method.call(this, phase);
|
start: originalStart,
|
||||||
|
endBySetMode: this.endBySetMode.some((elm) => elm.name === phase.name),
|
||||||
|
};
|
||||||
|
phase.prototype.start = () => methodStart.call(this, phase);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,11 +222,44 @@ export default class PhaseInterceptor {
|
|||||||
this.onHold.push({
|
this.onHold.push({
|
||||||
name: phase.name,
|
name: phase.name,
|
||||||
call: () => {
|
call: () => {
|
||||||
this.phases[phase.name].apply(instance);
|
this.phases[phase.name].start.apply(instance);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unlock() {
|
||||||
|
this.inProgress?.callback();
|
||||||
|
this.inProgress = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to end a phase and log it.
|
||||||
|
* @param phase - The phase to start.
|
||||||
|
*/
|
||||||
|
superEndPhase() {
|
||||||
|
const instance = this.scene.getCurrentPhase();
|
||||||
|
console.log(`%c INTERCEPTED Super End Phase ${instance.constructor.name}`, "color:red;");
|
||||||
|
this.originalSuperEnd.apply(instance);
|
||||||
|
this.inProgress?.callback();
|
||||||
|
this.inProgress = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* m2m to set mode.
|
||||||
|
* @param phase - The phase to start.
|
||||||
|
*/
|
||||||
|
setMode(mode: Mode, ...args: any[]): Promise<void> {
|
||||||
|
const currentPhase = this.scene.getCurrentPhase();
|
||||||
|
const instance = this.scene.ui;
|
||||||
|
console.log("setMode", mode, args);
|
||||||
|
const ret = this.originalSetMode.apply(instance, [mode, ...args]);
|
||||||
|
if (this.phases[currentPhase.constructor.name].endBySetMode) {
|
||||||
|
this.inProgress?.callback();
|
||||||
|
this.inProgress = undefined;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to start the prompt handler.
|
* Method to start the prompt handler.
|
||||||
*/
|
*/
|
||||||
@ -271,9 +303,12 @@ export default class PhaseInterceptor {
|
|||||||
*/
|
*/
|
||||||
restoreOg() {
|
restoreOg() {
|
||||||
for (const [phase] of this.PHASES) {
|
for (const [phase] of this.PHASES) {
|
||||||
phase.prototype.start = this.phases[phase.name];
|
phase.prototype.start = this.phases[phase.name].start;
|
||||||
}
|
}
|
||||||
|
UI.prototype.setMode = this.originalSetMode;
|
||||||
|
Phase.prototype.end = this.originalSuperEnd;
|
||||||
clearInterval(this.promptInterval);
|
clearInterval(this.promptInterval);
|
||||||
clearInterval(this.interval);
|
clearInterval(this.interval);
|
||||||
|
clearInterval(this.intervalRun);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,3 +21,5 @@ initPokemonForms();
|
|||||||
initSpecies();
|
initSpecies();
|
||||||
initMoves();
|
initMoves();
|
||||||
initAbilities();
|
initAbilities();
|
||||||
|
|
||||||
|
global.testFailed = false;
|
||||||
|
@ -55,6 +55,9 @@ export default class BattleFlyout extends Phaser.GameObjects.Container {
|
|||||||
/** The array of {@linkcode MoveInfo} used to track moves for the {@linkcode Pokemon} linked to the flyout */
|
/** The array of {@linkcode MoveInfo} used to track moves for the {@linkcode Pokemon} linked to the flyout */
|
||||||
private moveInfo: MoveInfo[] = new Array();
|
private moveInfo: MoveInfo[] = new Array();
|
||||||
|
|
||||||
|
/** Current state of the flyout's visibility */
|
||||||
|
public flyoutVisible: boolean = false;
|
||||||
|
|
||||||
// Stores callbacks in a variable so they can be unsubscribed from when destroyed
|
// Stores callbacks in a variable so they can be unsubscribed from when destroyed
|
||||||
private readonly onMoveUsedEvent = (event: Event) => this.onMoveUsed(event);
|
private readonly onMoveUsedEvent = (event: Event) => this.onMoveUsed(event);
|
||||||
private readonly onBerryUsedEvent = (event: Event) => this.onBerryUsed(event);
|
private readonly onBerryUsedEvent = (event: Event) => this.onBerryUsed(event);
|
||||||
@ -170,6 +173,8 @@ export default class BattleFlyout extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
/** Animates the flyout to either show or hide it by applying a fade and translation */
|
/** Animates the flyout to either show or hide it by applying a fade and translation */
|
||||||
toggleFlyout(visible: boolean): void {
|
toggleFlyout(visible: boolean): void {
|
||||||
|
this.flyoutVisible = visible;
|
||||||
|
|
||||||
this.scene.tweens.add({
|
this.scene.tweens.add({
|
||||||
targets: this.flyoutParent,
|
targets: this.flyoutParent,
|
||||||
x: visible ? this.anchorX : this.anchorX - this.translationX,
|
x: visible ? this.anchorX : this.anchorX - this.translationX,
|
||||||
|
@ -9,6 +9,7 @@ import { Type, getTypeRgb } from "../data/type";
|
|||||||
import { getVariantTint } from "#app/data/variant";
|
import { getVariantTint } from "#app/data/variant";
|
||||||
import { BattleStat } from "#app/data/battle-stat";
|
import { BattleStat } from "#app/data/battle-stat";
|
||||||
import BattleFlyout from "./battle-flyout";
|
import BattleFlyout from "./battle-flyout";
|
||||||
|
import { WindowVariant, addWindow } from "./ui-theme";
|
||||||
|
|
||||||
const battleStatOrder = [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.ACC, BattleStat.EVA, BattleStat.SPD ];
|
const battleStatOrder = [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.ACC, BattleStat.EVA, BattleStat.SPD ];
|
||||||
|
|
||||||
@ -52,6 +53,13 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
private type3Icon: Phaser.GameObjects.Sprite;
|
private type3Icon: Phaser.GameObjects.Sprite;
|
||||||
private expBar: Phaser.GameObjects.Image;
|
private expBar: Phaser.GameObjects.Image;
|
||||||
|
|
||||||
|
// #region Type effectiveness hint objects
|
||||||
|
private effectivenessContainer: Phaser.GameObjects.Container;
|
||||||
|
private effectivenessWindow: Phaser.GameObjects.NineSlice;
|
||||||
|
private effectivenessText: Phaser.GameObjects.Text;
|
||||||
|
private currentEffectiveness?: string;
|
||||||
|
// #endregion
|
||||||
|
|
||||||
public expMaskRect: Phaser.GameObjects.Graphics;
|
public expMaskRect: Phaser.GameObjects.Graphics;
|
||||||
|
|
||||||
private statsContainer: Phaser.GameObjects.Container;
|
private statsContainer: Phaser.GameObjects.Container;
|
||||||
@ -59,7 +67,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
private statValuesContainer: Phaser.GameObjects.Container;
|
private statValuesContainer: Phaser.GameObjects.Container;
|
||||||
private statNumbers: Phaser.GameObjects.Sprite[];
|
private statNumbers: Phaser.GameObjects.Sprite[];
|
||||||
|
|
||||||
public flyoutMenu: BattleFlyout;
|
public flyoutMenu?: BattleFlyout;
|
||||||
|
|
||||||
constructor(scene: Phaser.Scene, x: number, y: number, player: boolean) {
|
constructor(scene: Phaser.Scene, x: number, y: number, player: boolean) {
|
||||||
super(scene, x, y);
|
super(scene, x, y);
|
||||||
@ -250,6 +258,19 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
this.type3Icon.setName("icon_type_3");
|
this.type3Icon.setName("icon_type_3");
|
||||||
this.type3Icon.setOrigin(0, 0);
|
this.type3Icon.setOrigin(0, 0);
|
||||||
this.add(this.type3Icon);
|
this.add(this.type3Icon);
|
||||||
|
|
||||||
|
if (!this.player) {
|
||||||
|
this.effectivenessContainer = this.scene.add.container(0, 0);
|
||||||
|
this.effectivenessContainer.setPositionRelative(this.type1Icon, 22, 4);
|
||||||
|
this.effectivenessContainer.setVisible(false);
|
||||||
|
this.add(this.effectivenessContainer);
|
||||||
|
|
||||||
|
this.effectivenessText = addTextObject(this.scene, 5, 4.5, "", TextStyle.BATTLE_INFO);
|
||||||
|
this.effectivenessWindow = addWindow((this.scene as BattleScene), 0, 0, 0, 20, false, false, null, null, WindowVariant.XTHIN);
|
||||||
|
|
||||||
|
this.effectivenessContainer.add(this.effectivenessWindow);
|
||||||
|
this.effectivenessContainer.add(this.effectivenessText);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
initInfo(pokemon: Pokemon) {
|
initInfo(pokemon: Pokemon) {
|
||||||
@ -711,6 +732,39 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request the flyoutMenu to toggle if available and hides or shows the effectiveness window where necessary
|
||||||
|
*/
|
||||||
|
toggleFlyout(visible: boolean): void {
|
||||||
|
this.flyoutMenu?.toggleFlyout(visible);
|
||||||
|
|
||||||
|
if (visible) {
|
||||||
|
this.effectivenessContainer?.setVisible(false);
|
||||||
|
} else {
|
||||||
|
this.updateEffectiveness(this.currentEffectiveness);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show or hide the type effectiveness multiplier window
|
||||||
|
* Passing undefined will hide the window
|
||||||
|
*/
|
||||||
|
updateEffectiveness(effectiveness?: string) {
|
||||||
|
if (this.player) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.currentEffectiveness = effectiveness;
|
||||||
|
|
||||||
|
if (!(this.scene as BattleScene).typeHints || effectiveness === undefined || this.flyoutMenu.flyoutVisible) {
|
||||||
|
this.effectivenessContainer.setVisible(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.effectivenessText.setText(effectiveness);
|
||||||
|
this.effectivenessWindow.width = 10 + this.effectivenessText.displayWidth;
|
||||||
|
this.effectivenessContainer.setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
getBaseY(): number {
|
getBaseY(): number {
|
||||||
return this.baseY;
|
return this.baseY;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import BattleScene from "../battle-scene";
|
import BattleScene from "../battle-scene";
|
||||||
import { addTextObject, TextStyle } from "./text";
|
import { addTextObject, TextStyle } from "./text";
|
||||||
import { Type } from "../data/type";
|
import { getTypeDamageMultiplierColor, Type } from "../data/type";
|
||||||
import { Command } from "./command-ui-handler";
|
import { Command } from "./command-ui-handler";
|
||||||
import { Mode } from "./ui";
|
import { Mode } from "./ui";
|
||||||
import UiHandler from "./ui-handler";
|
import UiHandler from "./ui-handler";
|
||||||
@ -9,6 +9,7 @@ import { CommandPhase } from "../phases";
|
|||||||
import { MoveCategory } from "#app/data/move.js";
|
import { MoveCategory } from "#app/data/move.js";
|
||||||
import i18next from "../plugins/i18n";
|
import i18next from "../plugins/i18n";
|
||||||
import {Button} from "../enums/buttons";
|
import {Button} from "../enums/buttons";
|
||||||
|
import Pokemon, { PokemonMove } from "#app/field/pokemon.js";
|
||||||
|
|
||||||
export default class FightUiHandler extends UiHandler {
|
export default class FightUiHandler extends UiHandler {
|
||||||
private movesContainer: Phaser.GameObjects.Container;
|
private movesContainer: Phaser.GameObjects.Container;
|
||||||
@ -162,7 +163,8 @@ export default class FightUiHandler extends UiHandler {
|
|||||||
ui.add(this.cursorObj);
|
ui.add(this.cursorObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
const moveset = (this.scene.getCurrentPhase() as CommandPhase).getPokemon().getMoveset();
|
const pokemon = (this.scene.getCurrentPhase() as CommandPhase).getPokemon();
|
||||||
|
const moveset = pokemon.getMoveset();
|
||||||
|
|
||||||
const hasMove = cursor < moveset.length;
|
const hasMove = cursor < moveset.length;
|
||||||
|
|
||||||
@ -179,6 +181,10 @@ export default class FightUiHandler extends UiHandler {
|
|||||||
this.ppText.setText(`${Utils.padInt(pp, 2, " ")}/${Utils.padInt(maxPP, 2, " ")}`);
|
this.ppText.setText(`${Utils.padInt(pp, 2, " ")}/${Utils.padInt(maxPP, 2, " ")}`);
|
||||||
this.powerText.setText(`${power >= 0 ? power : "---"}`);
|
this.powerText.setText(`${power >= 0 ? power : "---"}`);
|
||||||
this.accuracyText.setText(`${accuracy >= 0 ? accuracy : "---"}`);
|
this.accuracyText.setText(`${accuracy >= 0 ? accuracy : "---"}`);
|
||||||
|
|
||||||
|
pokemon.getOpponents().forEach((opponent) => {
|
||||||
|
opponent.updateEffectiveness(this.getEffectivenessText(pokemon, opponent, pokemonMove));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.typeIcon.setVisible(hasMove);
|
this.typeIcon.setVisible(hasMove);
|
||||||
@ -195,17 +201,60 @@ export default class FightUiHandler extends UiHandler {
|
|||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets multiplier text for a pokemon's move against a specific opponent
|
||||||
|
* Returns undefined if it's a status move
|
||||||
|
*/
|
||||||
|
private getEffectivenessText(pokemon: Pokemon, opponent: Pokemon, pokemonMove: PokemonMove): string | undefined {
|
||||||
|
const effectiveness = opponent.getMoveEffectiveness(pokemon, pokemonMove);
|
||||||
|
if (effectiveness === undefined) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
return `${effectiveness}x`;
|
||||||
|
}
|
||||||
|
|
||||||
displayMoves() {
|
displayMoves() {
|
||||||
const moveset = (this.scene.getCurrentPhase() as CommandPhase).getPokemon().getMoveset();
|
const pokemon = (this.scene.getCurrentPhase() as CommandPhase).getPokemon();
|
||||||
for (let m = 0; m < 4; m++) {
|
const moveset = pokemon.getMoveset();
|
||||||
const moveText = addTextObject(this.scene, m % 2 === 0 ? 0 : 100, m < 2 ? 0 : 16, "-", TextStyle.WINDOW);
|
|
||||||
if (m < moveset.length) {
|
for (let moveIndex = 0; moveIndex < 4; moveIndex++) {
|
||||||
moveText.setText(moveset[m].getName());
|
const moveText = addTextObject(this.scene, moveIndex % 2 === 0 ? 0 : 100, moveIndex < 2 ? 0 : 16, "-", TextStyle.WINDOW);
|
||||||
|
|
||||||
|
if (moveIndex < moveset.length) {
|
||||||
|
const pokemonMove = moveset[moveIndex];
|
||||||
|
moveText.setText(pokemonMove.getName());
|
||||||
|
moveText.setColor(this.getMoveColor(pokemon, pokemonMove) ?? moveText.style.color);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.movesContainer.add(moveText);
|
this.movesContainer.add(moveText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a specific move's color based on its type effectiveness against opponents
|
||||||
|
* If there are multiple opponents, the highest effectiveness' color is returned
|
||||||
|
* @returns A color or undefined if the default color should be used
|
||||||
|
*/
|
||||||
|
private getMoveColor(pokemon: Pokemon, pokemonMove: PokemonMove): string | undefined {
|
||||||
|
if (!this.scene.typeHints) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
const opponents = pokemon.getOpponents();
|
||||||
|
if (opponents.length <= 0) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
const moveColors = opponents.map((opponent) => {
|
||||||
|
return opponent.getMoveEffectiveness(pokemon, pokemonMove);
|
||||||
|
}).sort((a, b) => b - a).map((effectiveness) => {
|
||||||
|
return getTypeDamageMultiplierColor(effectiveness, "offense");
|
||||||
|
});
|
||||||
|
|
||||||
|
return moveColors[0];
|
||||||
|
}
|
||||||
|
|
||||||
clear() {
|
clear() {
|
||||||
super.clear();
|
super.clear();
|
||||||
this.clearMoves();
|
this.clearMoves();
|
||||||
@ -222,6 +271,11 @@ export default class FightUiHandler extends UiHandler {
|
|||||||
|
|
||||||
clearMoves() {
|
clearMoves() {
|
||||||
this.movesContainer.removeAll(true);
|
this.movesContainer.removeAll(true);
|
||||||
|
|
||||||
|
const opponents = (this.scene.getCurrentPhase() as CommandPhase).getPokemon().getOpponents();
|
||||||
|
opponents.forEach((opponent) => {
|
||||||
|
opponent.updateEffectiveness(undefined);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
eraseCursor() {
|
eraseCursor() {
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
|
import i18next from "i18next";
|
||||||
import BattleScene from "../battle-scene";
|
import BattleScene from "../battle-scene";
|
||||||
|
import { Button } from "../enums/buttons";
|
||||||
import { GameMode } from "../game-mode";
|
import { GameMode } from "../game-mode";
|
||||||
|
import { PokemonHeldItemModifier } from "../modifier/modifier";
|
||||||
import { SessionSaveData } from "../system/game-data";
|
import { SessionSaveData } from "../system/game-data";
|
||||||
|
import PokemonData from "../system/pokemon-data";
|
||||||
|
import * as Utils from "../utils";
|
||||||
|
import MessageUiHandler from "./message-ui-handler";
|
||||||
import { TextStyle, addTextObject } from "./text";
|
import { TextStyle, addTextObject } from "./text";
|
||||||
import { Mode } from "./ui";
|
import { Mode } from "./ui";
|
||||||
import { addWindow } from "./ui-theme";
|
import { addWindow } from "./ui-theme";
|
||||||
import * as Utils from "../utils";
|
|
||||||
import PokemonData from "../system/pokemon-data";
|
|
||||||
import { PokemonHeldItemModifier } from "../modifier/modifier";
|
|
||||||
import MessageUiHandler from "./message-ui-handler";
|
|
||||||
import i18next from "i18next";
|
|
||||||
import {Button} from "../enums/buttons";
|
|
||||||
|
|
||||||
const sessionSlotCount = 5;
|
const sessionSlotCount = 5;
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ export default class SaveSlotSelectUiHandler extends MessageUiHandler {
|
|||||||
originalCallback(cursor);
|
originalCallback(cursor);
|
||||||
};
|
};
|
||||||
if (this.sessionSlots[cursor].hasData) {
|
if (this.sessionSlots[cursor].hasData) {
|
||||||
ui.showText("Overwrite the data in the selected slot?", null, () => {
|
ui.showText(i18next.t("saveSlotSelectUiHandler:overwriteData"), null, () => {
|
||||||
ui.setOverlayMode(Mode.CONFIRM, () => saveAndCallback(), () => {
|
ui.setOverlayMode(Mode.CONFIRM, () => saveAndCallback(), () => {
|
||||||
ui.revertMode();
|
ui.revertMode();
|
||||||
ui.showText(null, 0);
|
ui.showText(null, 0);
|
||||||
@ -258,7 +258,7 @@ class SessionSlot extends Phaser.GameObjects.Container {
|
|||||||
const slotWindow = addWindow(this.scene, 0, 0, 304, 52);
|
const slotWindow = addWindow(this.scene, 0, 0, 304, 52);
|
||||||
this.add(slotWindow);
|
this.add(slotWindow);
|
||||||
|
|
||||||
this.loadingLabel = addTextObject(this.scene, 152, 26, "Loading…", TextStyle.WINDOW);
|
this.loadingLabel = addTextObject(this.scene, 152, 26, i18next.t("saveSlotSelectUiHandler:loading"), TextStyle.WINDOW);
|
||||||
this.loadingLabel.setOrigin(0.5, 0.5);
|
this.loadingLabel.setOrigin(0.5, 0.5);
|
||||||
this.add(this.loadingLabel);
|
this.add(this.loadingLabel);
|
||||||
}
|
}
|
||||||
@ -266,7 +266,7 @@ class SessionSlot extends Phaser.GameObjects.Container {
|
|||||||
async setupWithData(data: SessionSaveData) {
|
async setupWithData(data: SessionSaveData) {
|
||||||
this.remove(this.loadingLabel, true);
|
this.remove(this.loadingLabel, true);
|
||||||
|
|
||||||
const gameModeLabel = addTextObject(this.scene, 8, 5, `${GameMode.getModeName(data.gameMode) || "Unknown"} - Wave ${data.waveIndex}`, TextStyle.WINDOW);
|
const gameModeLabel = addTextObject(this.scene, 8, 5, `${GameMode.getModeName(data.gameMode) || i18next.t("gameMode:unkown")} - ${i18next.t("saveSlotSelectUiHandler:wave")} ${data.waveIndex}`, TextStyle.WINDOW);
|
||||||
this.add(gameModeLabel);
|
this.add(gameModeLabel);
|
||||||
|
|
||||||
const timestampLabel = addTextObject(this.scene, 8, 19, new Date(data.timestamp).toLocaleString(), TextStyle.WINDOW);
|
const timestampLabel = addTextObject(this.scene, 8, 19, new Date(data.timestamp).toLocaleString(), TextStyle.WINDOW);
|
||||||
@ -283,7 +283,7 @@ class SessionSlot extends Phaser.GameObjects.Container {
|
|||||||
const pokemon = p.toPokemon(this.scene);
|
const pokemon = p.toPokemon(this.scene);
|
||||||
const icon = this.scene.addPokemonIcon(pokemon, 0, 0, 0, 0);
|
const icon = this.scene.addPokemonIcon(pokemon, 0, 0, 0, 0);
|
||||||
|
|
||||||
const text = addTextObject(this.scene, 32, 20, `Lv${Utils.formatLargeNumber(pokemon.level, 1000)}`, TextStyle.PARTY, { fontSize: "54px", color: "#f8f8f8" });
|
const text = addTextObject(this.scene, 32, 20, `${i18next.t("saveSlotSelectUiHandler:lv")}${Utils.formatLargeNumber(pokemon.level, 1000)}`, TextStyle.PARTY, { fontSize: "54px", color: "#f8f8f8" });
|
||||||
text.setShadow(0, 0, null);
|
text.setShadow(0, 0, null);
|
||||||
text.setStroke("#424242", 14);
|
text.setStroke("#424242", 14);
|
||||||
text.setOrigin(1, 0);
|
text.setOrigin(1, 0);
|
||||||
@ -324,7 +324,7 @@ class SessionSlot extends Phaser.GameObjects.Container {
|
|||||||
this.scene.gameData.getSession(this.slotId).then(async sessionData => {
|
this.scene.gameData.getSession(this.slotId).then(async sessionData => {
|
||||||
if (!sessionData) {
|
if (!sessionData) {
|
||||||
this.hasData = false;
|
this.hasData = false;
|
||||||
this.loadingLabel.setText(i18next.t("menu:empty"));
|
this.loadingLabel.setText(i18next.t("saveSlotSelectUiHandler:empty"));
|
||||||
resolve(false);
|
resolve(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ import BattleScene from "../../battle-scene";
|
|||||||
import { Mode } from "../ui";
|
import { Mode } from "../ui";
|
||||||
"#app/inputs-controller.js";
|
"#app/inputs-controller.js";
|
||||||
import AbstractSettingsUiHandler from "./abstract-settings-ui-handler";
|
import AbstractSettingsUiHandler from "./abstract-settings-ui-handler";
|
||||||
import { Setting, SettingType } from "#app/system/settings/settings";
|
import { Setting, SettingKeys, SettingType } from "#app/system/settings/settings";
|
||||||
|
|
||||||
export default class SettingsDisplayUiHandler extends AbstractSettingsUiHandler {
|
export default class SettingsDisplayUiHandler extends AbstractSettingsUiHandler {
|
||||||
/**
|
/**
|
||||||
@ -15,6 +15,48 @@ export default class SettingsDisplayUiHandler extends AbstractSettingsUiHandler
|
|||||||
super(scene, mode);
|
super(scene, mode);
|
||||||
this.title = "Display";
|
this.title = "Display";
|
||||||
this.settings = Setting.filter(s => s.type === SettingType.DISPLAY);
|
this.settings = Setting.filter(s => s.type === SettingType.DISPLAY);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update to current language from default value.
|
||||||
|
* - default value is 'English'
|
||||||
|
*/
|
||||||
|
const languageIndex = this.settings.findIndex(s => s.key === SettingKeys.Language);
|
||||||
|
if (languageIndex >= 0) {
|
||||||
|
const currentLocale = localStorage.getItem("prLang");
|
||||||
|
switch (currentLocale) {
|
||||||
|
case "en":
|
||||||
|
this.settings[languageIndex].options[0] = "English";
|
||||||
|
break;
|
||||||
|
case "es":
|
||||||
|
this.settings[languageIndex].options[0] = "Español";
|
||||||
|
break;
|
||||||
|
case "it":
|
||||||
|
this.settings[languageIndex].options[0] = "Italiano";
|
||||||
|
break;
|
||||||
|
case "fr":
|
||||||
|
this.settings[languageIndex].options[0] = "Français";
|
||||||
|
break;
|
||||||
|
case "de":
|
||||||
|
this.settings[languageIndex].options[0] = "Deutsch";
|
||||||
|
break;
|
||||||
|
case "pt-BR":
|
||||||
|
this.settings[languageIndex].options[0] = "Português (BR)";
|
||||||
|
break;
|
||||||
|
case "zh-CN":
|
||||||
|
this.settings[languageIndex].options[0] = "简体中文";
|
||||||
|
break;
|
||||||
|
case "zh-TW":
|
||||||
|
this.settings[languageIndex].options[0] = "繁體中文";
|
||||||
|
break;
|
||||||
|
case "ko":
|
||||||
|
this.settings[languageIndex].options[0] = "한국어";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.settings[languageIndex].options[0] = "English";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.localStorageKey = "settings";
|
this.localStorageKey = "settings";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user