mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-07 17:02:16 +02:00
Merge branch 'pagefaultgames:main' into flingImplementation
This commit is contained in:
commit
18b8394cb3
@ -7,6 +7,7 @@ export interface UserInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export let loggedInUser: UserInfo = null;
|
export let loggedInUser: UserInfo = null;
|
||||||
|
// This is a random string that is used to identify the client session - unique per session (tab or window) so that the game will only save on the one that the server is expecting
|
||||||
export const clientSessionId = Utils.randomString(32);
|
export const clientSessionId = Utils.randomString(32);
|
||||||
|
|
||||||
export function initLoggedInUser(): void {
|
export function initLoggedInUser(): void {
|
||||||
|
@ -3166,10 +3166,8 @@ export class FriendshipPowerAttr extends VariablePowerAttr {
|
|||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
const power = args[0] as Utils.NumberHolder;
|
const power = args[0] as Utils.NumberHolder;
|
||||||
|
|
||||||
if (user instanceof PlayerPokemon) {
|
const friendshipPower = Math.floor(Math.min(user instanceof PlayerPokemon ? user.friendship : user.species.baseFriendship, 255) / 2.5);
|
||||||
const friendshipPower = Math.floor(Math.min(user.friendship, 255) / 2.5);
|
power.value = Math.max(!this.invert ? friendshipPower : 102 - friendshipPower, 1);
|
||||||
power.value = Math.max(!this.invert ? friendshipPower : 102 - friendshipPower, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -7710,6 +7708,7 @@ export function initMoves() {
|
|||||||
new AttackMove(Moves.BADDY_BAD, Type.DARK, MoveCategory.SPECIAL, 80, 95, 15, -1, 0, 7)
|
new AttackMove(Moves.BADDY_BAD, Type.DARK, MoveCategory.SPECIAL, 80, 95, 15, -1, 0, 7)
|
||||||
.attr(AddArenaTagAttr, ArenaTagType.REFLECT, 5, false, true),
|
.attr(AddArenaTagAttr, ArenaTagType.REFLECT, 5, false, true),
|
||||||
new AttackMove(Moves.SAPPY_SEED, Type.GRASS, MoveCategory.PHYSICAL, 100, 90, 10, 100, 0, 7)
|
new AttackMove(Moves.SAPPY_SEED, Type.GRASS, MoveCategory.PHYSICAL, 100, 90, 10, 100, 0, 7)
|
||||||
|
.makesContact(false)
|
||||||
.attr(AddBattlerTagAttr, BattlerTagType.SEEDED),
|
.attr(AddBattlerTagAttr, BattlerTagType.SEEDED),
|
||||||
new AttackMove(Moves.FREEZY_FROST, Type.ICE, MoveCategory.SPECIAL, 100, 90, 10, -1, 0, 7)
|
new AttackMove(Moves.FREEZY_FROST, Type.ICE, MoveCategory.SPECIAL, 100, 90, 10, -1, 0, 7)
|
||||||
.attr(ResetStatsAttr),
|
.attr(ResetStatsAttr),
|
||||||
|
@ -3795,7 +3795,7 @@ export const starterPassiveAbilities = {
|
|||||||
[Species.IRON_TREADS]: Abilities.STEELY_SPIRIT,
|
[Species.IRON_TREADS]: Abilities.STEELY_SPIRIT,
|
||||||
[Species.IRON_BUNDLE]: Abilities.SNOW_WARNING,
|
[Species.IRON_BUNDLE]: Abilities.SNOW_WARNING,
|
||||||
[Species.IRON_HANDS]: Abilities.IRON_FIST,
|
[Species.IRON_HANDS]: Abilities.IRON_FIST,
|
||||||
[Species.IRON_JUGULIS]: Abilities.AERILATE,
|
[Species.IRON_JUGULIS]: Abilities.LIGHTNING_ROD,
|
||||||
[Species.IRON_MOTH]: Abilities.LEVITATE,
|
[Species.IRON_MOTH]: Abilities.LEVITATE,
|
||||||
[Species.IRON_THORNS]: Abilities.SAND_STREAM,
|
[Species.IRON_THORNS]: Abilities.SAND_STREAM,
|
||||||
[Species.FRIGIBAX]: Abilities.SNOW_WARNING,
|
[Species.FRIGIBAX]: Abilities.SNOW_WARNING,
|
||||||
|
@ -24,6 +24,8 @@ import { Biome } from "#enums/biome";
|
|||||||
import { TrainerType } from "#enums/trainer-type";
|
import { TrainerType } from "#enums/trainer-type";
|
||||||
|
|
||||||
export class LoadingScene extends SceneBase {
|
export class LoadingScene extends SceneBase {
|
||||||
|
readonly LOAD_EVENTS = Phaser.Loader.Events;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super("loading");
|
super("loading");
|
||||||
|
|
||||||
@ -35,10 +37,6 @@ export class LoadingScene extends SceneBase {
|
|||||||
Utils.localPing();
|
Utils.localPing();
|
||||||
this.load["manifest"] = this.game["manifest"];
|
this.load["manifest"] = this.game["manifest"];
|
||||||
|
|
||||||
if (!isMobile()) {
|
|
||||||
this.load.video("intro_dark", "images/intro_dark.mp4", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loadImage("loading_bg", "arenas");
|
this.loadImage("loading_bg", "arenas");
|
||||||
this.loadImage("logo", "");
|
this.loadImage("logo", "");
|
||||||
this.loadImage("pride-update", "events");
|
this.loadImage("pride-update", "events");
|
||||||
@ -421,58 +419,46 @@ export class LoadingScene extends SceneBase {
|
|||||||
});
|
});
|
||||||
disclaimerDescriptionText.setOrigin(0.5, 0.5);
|
disclaimerDescriptionText.setOrigin(0.5, 0.5);
|
||||||
|
|
||||||
disclaimerText.setVisible(false);
|
loadingGraphics.push(bg, graphics, progressBar, progressBox, logo, percentText, assetText, disclaimerText, disclaimerDescriptionText);
|
||||||
disclaimerDescriptionText.setVisible(false);
|
|
||||||
|
|
||||||
const intro = this.add.video(0, 0);
|
|
||||||
intro.setOrigin(0, 0);
|
|
||||||
intro.setScale(3);
|
|
||||||
|
|
||||||
this.load.on("progress", (value: string) => {
|
|
||||||
const parsedValue = parseFloat(value);
|
|
||||||
percentText.setText(`${Math.floor(parsedValue * 100)}%`);
|
|
||||||
progressBar.clear();
|
|
||||||
progressBar.fillStyle(0xffffff, 0.8);
|
|
||||||
progressBar.fillRect(midWidth - 320, 360, 640 * parsedValue, 64);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.load.on("fileprogress", file => {
|
|
||||||
assetText.setText(i18next.t("menu:loadingAsset", { assetName: file.key }));
|
|
||||||
});
|
|
||||||
|
|
||||||
loadingGraphics.push(bg, graphics, progressBar, progressBox, logo, percentText, assetText);
|
|
||||||
|
|
||||||
if (!mobile) {
|
if (!mobile) {
|
||||||
loadingGraphics.map(g => g.setVisible(false));
|
loadingGraphics.map(g => g.setVisible(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
const destroyLoadingAssets = () => {
|
const intro = this.add.video(0, 0);
|
||||||
intro.destroy();
|
intro.on(Phaser.GameObjects.Events.VIDEO_COMPLETE, (video: Phaser.GameObjects.Video) => {
|
||||||
bg.destroy();
|
this.tweens.add({
|
||||||
logo.destroy();
|
targets: intro,
|
||||||
progressBar.destroy();
|
duration: 500,
|
||||||
progressBox.destroy();
|
alpha: 0,
|
||||||
percentText.destroy();
|
ease: "Sine.easeIn",
|
||||||
assetText.destroy();
|
onComplete: () => video.destroy(),
|
||||||
};
|
});
|
||||||
|
loadingGraphics.forEach(g => g.setVisible(true));
|
||||||
|
});
|
||||||
|
intro.setOrigin(0, 0);
|
||||||
|
intro.setScale(3);
|
||||||
|
|
||||||
this.load.on("filecomplete", key => {
|
this.load.once(this.LOAD_EVENTS.START, () => {
|
||||||
|
// videos do not need to be preloaded
|
||||||
|
intro.loadURL("images/intro_dark.mp4", true);
|
||||||
|
if (mobile) {
|
||||||
|
intro.video.setAttribute("webkit-playsinline", "webkit-playsinline");
|
||||||
|
intro.video.setAttribute("playsinline", "playsinline");
|
||||||
|
}
|
||||||
|
intro.play();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.load.on(this.LOAD_EVENTS.PROGRESS , (progress: number) => {
|
||||||
|
percentText.setText(`${Math.floor(progress * 100)}%`);
|
||||||
|
progressBar.clear();
|
||||||
|
progressBar.fillStyle(0xffffff, 0.8);
|
||||||
|
progressBar.fillRect(midWidth - 320, 360, 640 * progress, 64);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.load.on(this.LOAD_EVENTS.FILE_COMPLETE, (key: string) => {
|
||||||
|
assetText.setText(i18next.t("menu:loadingAsset", { assetName: key }));
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case "intro_dark":
|
|
||||||
intro.load("intro_dark");
|
|
||||||
intro.on("complete", () => {
|
|
||||||
this.tweens.add({
|
|
||||||
targets: intro,
|
|
||||||
duration: 500,
|
|
||||||
alpha: 0,
|
|
||||||
ease: "Sine.easeIn"
|
|
||||||
});
|
|
||||||
loadingGraphics.map(g => g.setVisible(true));
|
|
||||||
disclaimerText.setVisible(true);
|
|
||||||
disclaimerDescriptionText.setVisible(true);
|
|
||||||
});
|
|
||||||
intro.play();
|
|
||||||
break;
|
|
||||||
case "loading_bg":
|
case "loading_bg":
|
||||||
bg.setTexture("loading_bg");
|
bg.setTexture("loading_bg");
|
||||||
if (mobile) {
|
if (mobile) {
|
||||||
@ -488,7 +474,7 @@ export class LoadingScene extends SceneBase {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.load.on("complete", () => destroyLoadingAssets());
|
this.load.on(this.LOAD_EVENTS.COMPLETE, () => loadingGraphics.forEach(go => go.destroy()));
|
||||||
}
|
}
|
||||||
|
|
||||||
get gameHeight() {
|
get gameHeight() {
|
||||||
|
@ -4,5 +4,5 @@ export const abilityTriggers: SimpleTranslationEntries = {
|
|||||||
"blockRecoilDamage" : "{{pokemonName}} wurde durch {{abilityName}}\nvor Rückstoß geschützt!",
|
"blockRecoilDamage" : "{{pokemonName}} wurde durch {{abilityName}}\nvor Rückstoß geschützt!",
|
||||||
"badDreams": "{{pokemonName}} ist in einem Alptraum gefangen!",
|
"badDreams": "{{pokemonName}} ist in einem Alptraum gefangen!",
|
||||||
"windPowerCharged": "Der Treffer durch {{moveName}} läd die Stärke von {{pokemonName}} auf!",
|
"windPowerCharged": "Der Treffer durch {{moveName}} läd die Stärke von {{pokemonName}} auf!",
|
||||||
"iceFaceAvoidedDamage": "{{pokemonName}} avoided\ndamage with {{abilityName}}!",
|
"iceFaceAvoidedDamage": "{{pokemonName}} wehrt Schaden\nmit {{abilityName}} ab!",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -62,12 +62,12 @@ export const battle: SimpleTranslationEntries = {
|
|||||||
"drainMessage": "{{pokemonName}} wurde Energie abgesaugt",
|
"drainMessage": "{{pokemonName}} wurde Energie abgesaugt",
|
||||||
"regainHealth": "KP von {{pokemonName}} wurden wieder aufgefrischt!",
|
"regainHealth": "KP von {{pokemonName}} wurden wieder aufgefrischt!",
|
||||||
"fainted": "{{pokemonNameWithAffix}} wurde besiegt!",
|
"fainted": "{{pokemonNameWithAffix}} wurde besiegt!",
|
||||||
"statRose": "rose",
|
"statRose": "steigt",
|
||||||
"statSharplyRose": "sharply rose",
|
"statSharplyRose": "steigt stark",
|
||||||
"statRoseDrastically": "rose drastically",
|
"statRoseDrastically": "steigt drastisch",
|
||||||
"statWontGoAnyHigher": "won't go any higher",
|
"statWontGoAnyHigher": "kann nicht weiter erhöht werden",
|
||||||
"statFell": "fell",
|
"statFell": "sinkt",
|
||||||
"statHarshlyFell": "harshly fell",
|
"statHarshlyFell": "sinkt stark",
|
||||||
"statSeverelyFell": "severely fell",
|
"statSeverelyFell": "sinkt drastisch",
|
||||||
"statWontGoAnyLower": "won't go any lower",
|
"statWontGoAnyLower": "kann nicht weiter sinken",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -44,6 +44,10 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"dailyRankings": "Tägliche Rangliste",
|
"dailyRankings": "Tägliche Rangliste",
|
||||||
"weeklyRankings": "Wöchentliche Rangliste",
|
"weeklyRankings": "Wöchentliche Rangliste",
|
||||||
"noRankings": "Keine Rangliste",
|
"noRankings": "Keine Rangliste",
|
||||||
|
"positionIcon": "#",
|
||||||
|
"usernameScoreboard": "Benutzername",
|
||||||
|
"score": "Punkte",
|
||||||
|
"wave": "Welle",
|
||||||
"loading": "Lade…",
|
"loading": "Lade…",
|
||||||
"loadingAsset": "Loading asset: {{assetName}}",
|
"loadingAsset": "Loading asset: {{assetName}}",
|
||||||
"playersOnline": "Spieler Online",
|
"playersOnline": "Spieler Online",
|
||||||
|
@ -14,8 +14,8 @@ export const pokemonInfo: PokemonInfoTranslationEntries = {
|
|||||||
"SPDEFshortened": "SpVert",
|
"SPDEFshortened": "SpVert",
|
||||||
"SPD": "Initiative",
|
"SPD": "Initiative",
|
||||||
"SPDshortened": "Init",
|
"SPDshortened": "Init",
|
||||||
"ACC": "Accuracy",
|
"ACC": "Genauigkeit",
|
||||||
"EVA": "Evasiveness"
|
"EVA": "Fluchtwert",
|
||||||
},
|
},
|
||||||
|
|
||||||
Type: {
|
Type: {
|
||||||
|
@ -25,7 +25,9 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||||||
"addToParty": "Zum Team hinzufügen",
|
"addToParty": "Zum Team hinzufügen",
|
||||||
"toggleIVs": "DVs anzeigen/verbergen",
|
"toggleIVs": "DVs anzeigen/verbergen",
|
||||||
"manageMoves": "Attacken ändern",
|
"manageMoves": "Attacken ändern",
|
||||||
|
"manageNature": "Wesen ändern",
|
||||||
"useCandies": "Bonbons verwenden",
|
"useCandies": "Bonbons verwenden",
|
||||||
|
"selectNature": "Wähle das neue Wesen.",
|
||||||
"selectMoveSwapOut": "Wähle die zu ersetzende Attacke.",
|
"selectMoveSwapOut": "Wähle die zu ersetzende Attacke.",
|
||||||
"selectMoveSwapWith": "Wähle die gewünschte Attacke.",
|
"selectMoveSwapWith": "Wähle die gewünschte Attacke.",
|
||||||
"unlockPassive": "Passiv-Skill freischalten",
|
"unlockPassive": "Passiv-Skill freischalten",
|
||||||
|
@ -44,6 +44,10 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"dailyRankings": "Daily Rankings",
|
"dailyRankings": "Daily Rankings",
|
||||||
"weeklyRankings": "Weekly Rankings",
|
"weeklyRankings": "Weekly Rankings",
|
||||||
"noRankings": "No Rankings",
|
"noRankings": "No Rankings",
|
||||||
|
"positionIcon": "#",
|
||||||
|
"usernameScoreboard": "Username",
|
||||||
|
"score": "Score",
|
||||||
|
"wave": "Wave",
|
||||||
"loading": "Loading…",
|
"loading": "Loading…",
|
||||||
"loadingAsset": "Loading asset: {{assetName}}",
|
"loadingAsset": "Loading asset: {{assetName}}",
|
||||||
"playersOnline": "Players Online",
|
"playersOnline": "Players Online",
|
||||||
|
@ -25,7 +25,9 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||||||
"addToParty": "Add to Party",
|
"addToParty": "Add to Party",
|
||||||
"toggleIVs": "Toggle IVs",
|
"toggleIVs": "Toggle IVs",
|
||||||
"manageMoves": "Manage Moves",
|
"manageMoves": "Manage Moves",
|
||||||
|
"manageNature": "Manage Nature",
|
||||||
"useCandies": "Use Candies",
|
"useCandies": "Use Candies",
|
||||||
|
"selectNature": "Select nature.",
|
||||||
"selectMoveSwapOut": "Select a move to swap out.",
|
"selectMoveSwapOut": "Select a move to swap out.",
|
||||||
"selectMoveSwapWith": "Select a move to swap with",
|
"selectMoveSwapWith": "Select a move to swap with",
|
||||||
"unlockPassive": "Unlock Passive",
|
"unlockPassive": "Unlock Passive",
|
||||||
|
@ -44,6 +44,10 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"dailyRankings": "Rankings Diarios",
|
"dailyRankings": "Rankings Diarios",
|
||||||
"weeklyRankings": "Rankings Semanales",
|
"weeklyRankings": "Rankings Semanales",
|
||||||
"noRankings": "Sin Rankings",
|
"noRankings": "Sin Rankings",
|
||||||
|
"positionIcon": "#",
|
||||||
|
"usernameScoreboard": "Username",
|
||||||
|
"score": "Score",
|
||||||
|
"wave": "Wave",
|
||||||
"loading": "Cargando…",
|
"loading": "Cargando…",
|
||||||
"loadingAsset": "Cargando recurso: {{assetName}}",
|
"loadingAsset": "Cargando recurso: {{assetName}}",
|
||||||
"playersOnline": "Jugadores en Línea",
|
"playersOnline": "Jugadores en Línea",
|
||||||
|
@ -25,7 +25,9 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||||||
"addToParty": "Añadir a Equipo",
|
"addToParty": "Añadir a Equipo",
|
||||||
"toggleIVs": "Mostrar IVs",
|
"toggleIVs": "Mostrar IVs",
|
||||||
"manageMoves": "Gestionar Movs.",
|
"manageMoves": "Gestionar Movs.",
|
||||||
|
"manageNature": "Gestionar Natur",
|
||||||
"useCandies": "Usar Caramelos",
|
"useCandies": "Usar Caramelos",
|
||||||
|
"selectNature": "Elige Natur.",
|
||||||
"selectMoveSwapOut": "Elige el movimiento que sustituir.",
|
"selectMoveSwapOut": "Elige el movimiento que sustituir.",
|
||||||
"selectMoveSwapWith": "Elige el movimiento que sustituirá a",
|
"selectMoveSwapWith": "Elige el movimiento que sustituirá a",
|
||||||
"unlockPassive": "Añadir Pasiva",
|
"unlockPassive": "Añadir Pasiva",
|
||||||
|
@ -39,6 +39,10 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"dailyRankings": "Classement du Jour",
|
"dailyRankings": "Classement du Jour",
|
||||||
"weeklyRankings": "Classement de la Semaine",
|
"weeklyRankings": "Classement de la Semaine",
|
||||||
"noRankings": "Pas de Classement",
|
"noRankings": "Pas de Classement",
|
||||||
|
"positionIcon": "#",
|
||||||
|
"usernameScoreboard": "Username",
|
||||||
|
"score": "Score",
|
||||||
|
"wave": "Wave",
|
||||||
"loading": "Chargement…",
|
"loading": "Chargement…",
|
||||||
"loadingAsset": "Loading asset: {{assetName}}",
|
"loadingAsset": "Loading asset: {{assetName}}",
|
||||||
"playersOnline": "Joueurs Connectés",
|
"playersOnline": "Joueurs Connectés",
|
||||||
|
@ -23,9 +23,11 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||||||
"eggMoves": "Capacités Œuf",
|
"eggMoves": "Capacités Œuf",
|
||||||
"start": "Lancer",
|
"start": "Lancer",
|
||||||
"addToParty": "Ajouter à l’équipe",
|
"addToParty": "Ajouter à l’équipe",
|
||||||
"toggleIVs": "Voir IVs",
|
"toggleIVs": "Voir les IV",
|
||||||
"manageMoves": "Gérer Capacités",
|
"manageMoves": "Modifier les Capacités",
|
||||||
"useCandies": "Utiliser Bonbons",
|
"manageNature": "Modifier la Nature",
|
||||||
|
"useCandies": "Utiliser des Bonbons",
|
||||||
|
"selectNature": "Sélectionnez une nature.",
|
||||||
"selectMoveSwapOut": "Sélectionnez la capacité à échanger.",
|
"selectMoveSwapOut": "Sélectionnez la capacité à échanger.",
|
||||||
"selectMoveSwapWith": "Sélectionnez laquelle échanger avec",
|
"selectMoveSwapWith": "Sélectionnez laquelle échanger avec",
|
||||||
"unlockPassive": "Débloquer Passif",
|
"unlockPassive": "Débloquer Passif",
|
||||||
|
@ -39,6 +39,10 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"dailyRankings": "Classifica giornaliera",
|
"dailyRankings": "Classifica giornaliera",
|
||||||
"weeklyRankings": "Classifica settimanale",
|
"weeklyRankings": "Classifica settimanale",
|
||||||
"noRankings": "Nessuna classifica",
|
"noRankings": "Nessuna classifica",
|
||||||
|
"positionIcon": "#",
|
||||||
|
"usernameScoreboard": "Username",
|
||||||
|
"score": "Score",
|
||||||
|
"wave": "Wave",
|
||||||
"loading": "Caricamento…",
|
"loading": "Caricamento…",
|
||||||
"loadingAsset": "Caricamento asset: {{assetName}}",
|
"loadingAsset": "Caricamento asset: {{assetName}}",
|
||||||
"playersOnline": "Giocatori online",
|
"playersOnline": "Giocatori online",
|
||||||
|
@ -25,7 +25,9 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||||||
"addToParty": "Aggiungi al gruppo",
|
"addToParty": "Aggiungi al gruppo",
|
||||||
"toggleIVs": "Vedi/Nascondi IV",
|
"toggleIVs": "Vedi/Nascondi IV",
|
||||||
"manageMoves": "Gestisci mosse",
|
"manageMoves": "Gestisci mosse",
|
||||||
|
"manageNature": "Gestisci natura",
|
||||||
"useCandies": "Usa caramelle",
|
"useCandies": "Usa caramelle",
|
||||||
|
"selectNature": "Seleziona natura.",
|
||||||
"selectMoveSwapOut": "Seleziona una mossa da scambiare.",
|
"selectMoveSwapOut": "Seleziona una mossa da scambiare.",
|
||||||
"selectMoveSwapWith": "Seleziona una mossa da scambiare con",
|
"selectMoveSwapWith": "Seleziona una mossa da scambiare con",
|
||||||
"unlockPassive": "Sblocca passiva",
|
"unlockPassive": "Sblocca passiva",
|
||||||
|
@ -2,41 +2,41 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
|||||||
|
|
||||||
export const tutorial: SimpleTranslationEntries = {
|
export const tutorial: SimpleTranslationEntries = {
|
||||||
"intro": `Benvenuto in PokéRogue! Questo gioco si concentra sulle battaglie, con elementi roguelite.
|
"intro": `Benvenuto in PokéRogue! Questo gioco si concentra sulle battaglie, con elementi roguelite.
|
||||||
$Questo gioco non è monetizzato e non siamo proprietari di Pokemon e Assets presenti nel gioco.
|
$Questo gioco non è monetizzato e non siamo proprietari di Pokémon ed assets presenti nel gioco.
|
||||||
$Il gioco è work-in-progress ma giocabile al 100%.\nPer reportare eventuali bugs è possibile discuterne sul nostro Discord.
|
$Il progetto è work-in-progress, ma giocabile al 100%.\nPer segnalare eventuali bug è possibile contattarci al nostro apposito Discord.
|
||||||
$Se il game risulta 'lento', assicurati di aver abilitato l'Accelerazione Hardware nelle impostazioni del tuo Browser`,
|
$Se il gioco risulta 'lento', assicurati di aver abilitato l'accelerazione hardware nelle impostazioni del tuo browser`,
|
||||||
|
|
||||||
"accessMenu": "Per accedere al menù, press M o Esc.\nDal menù puoi cambiare impostazioni, controllare la wiki e accedere a varie features.",
|
"accessMenu": "Per accedere al menu, premi M o esc.\nDal menu puoi modificare le impostazioni, controllare la wiki ed accedere a varie features.",
|
||||||
|
|
||||||
"menu": `Da questo menù puoi accedere alle impostazioni.
|
"menu": `Da questo menu puoi accedere alle impostazioni.
|
||||||
$Dalle impostazioni puoi cambiare velocità di gioco, stile di finestra e altre opzioni.
|
$Esse ti permettono di cambiare velocità di gioco, stile delle finestre ed altre opzioni.
|
||||||
$Ci sono varie funzionalità, controlla bene e non perderti nulla!`,
|
$Ci sono varie funzionalità: controlla bene e non perderti nulla!`,
|
||||||
|
|
||||||
"starterSelect": `Da questa schermata puoi selezionare il tuo starter.\nQuesti sono i membri iniziali del tuo parti.
|
"starterSelect": `Da questa schermata puoi selezionare il tuo starter.\nQuesti sono i membri iniziali della tua squadra.
|
||||||
$Ogni starter ha un valore. Puoi avere fino a \n6 Pokèmon, avendo a disposizione un massimo di 10 punti.
|
$Ogni starter ha un valore. Puoi avere fino a \n6 Pokèmon, avendo a disposizione un massimo di 10 punti.
|
||||||
$Puoi anche selezionare Sesso, Abilità, e Forma a seconda delle\nvarianti che hai catturato o schiuso.
|
$Puoi anche selezionare genere, abilità, e forma a seconda delle\nvarianti che hai catturato o schiuso.
|
||||||
$Le IVs di una specie sono le migliori rispetto a tutte quelle che hai\ncatturato o schiuso, quindi prova a catturarne il piu possibile!`,
|
$Le IVs di una specie sono le migliori rispetto a tutte quelle che hai\ncatturato o schiuso, quindi prova a catturarne il piu possibile!`,
|
||||||
|
|
||||||
"pokerus": `Giornalmente 3 Starter casuali disponibili avranno il bordo viola.
|
"pokerus": `Giornalmente 3 starter casuali disponibili avranno il bordo viola.
|
||||||
$Se possiedi uno di questi starter,\nprova ad aggiungerlo al party. Ricorda di controllare le info!`,
|
$Se possiedi uno di questi starter,\nprova ad aggiungerlo alla squadra. Ricorda di controllarne le info!`,
|
||||||
|
|
||||||
"statChange": `I cambiamenti alle statistiche persistono fintanto che i tuoi pokèmon resteranno in campo.
|
"statChange": `I cambiamenti alle statistiche persistono fintanto che i tuoi pokèmon restano in campo.
|
||||||
$I tuoi pokemon verranno richiamati quando incontrerai un allenatore o al cambiamento di bioma.
|
$I tuoi pokemon verranno richiamati quando incontrerai un allenatore o al cambiamento di bioma.
|
||||||
$Puoi anche vedere i cambiamenti alle statistiche in corso tenendo premuto C o Shift`,
|
$Puoi anche vedere i cambiamenti alle statistiche in corso tenendo premuto C o Shift`,
|
||||||
|
|
||||||
"selectItem": `Dopo ogni battaglia avrai disponibili tre item.\nPotrai prenderne solo uno.
|
"selectItem": `Dopo ogni battaglia potrai scegliere tra 3 oggetti.\nPotrai prenderne solo uno.
|
||||||
$Questi spaziano tra consumabili, item tenuti da Pokèmon o con un effetto passivo permanente.
|
$Questi spaziano tra consumabili, oggetti tenuti da Pokèmon o con un effetto passivo permanente.
|
||||||
$La maggior parte degli Item non Consumabili possono stackare in diversi modi.
|
$La maggior parte degli oggetti non consumabili possono accumulare i loro effetti in diversi modi.
|
||||||
$Alcuni Item risulteranno disponibili solo se possono essere usati, come Item Evolutivi.
|
$Alcuni risulteranno inoltre disponibili solo se possono essere usati, come ad esempio gli oggetti evolutivi.
|
||||||
$Puoi anche passare un Item tenuto da un Pokèmon ad un altro attraverso l'opzione 'trasferisci strumento'.
|
$Puoi anche passare un oggetto tenuto da un Pokèmon a un altro attraverso l'opzione 'trasferisci strumento'.
|
||||||
$L'opzione 'trasferisci strumento' sarà disponibile solo dopo aver assegnato uno strumento ad un Pokèmon.
|
$Quest'ultima sarà disponibile solo dopo aver assegnato uno strumento ad un Pokèmon.
|
||||||
$Puoi acquistare consumabili con le monete, progredendo saranno poi disponibili ulteriori oggetti.
|
$Puoi acquistare consumabili con le monete; progredendo saranno poi disponibili ulteriori oggetti.
|
||||||
$Assicurati di fare un acquisto prima di selezionare un item casuale, poichè passerai subito alla lotta successiva.`,
|
$Assicurati di fare un acquisto prima di selezionare un item casuale, poichè dopo aver fatto ciò passerai subito alla lotta successiva.`,
|
||||||
|
|
||||||
"eggGacha": `Da questa schermata, puoi riscattare i tuoi vouchers in cambio di\nuova Pokèmon.
|
"eggGacha": `Da questa schermata puoi riscattare i tuoi vouchers in cambio di\nuova Pokèmon.
|
||||||
$Le uova vanno schiuse e saranno sempre più vicine alla schiusura dopo\nogni battaglia. Le uova più rare impiegheranno più battaglie per la schiusura.
|
$Le uova vanno schiuse, e saranno sempre più vicine alla schiusura dopo\nogni battaglia. Le uova più rare impiegheranno più battaglie per la schiusura.
|
||||||
$I Pokémon schiusi non verranno aggiunti alla tua squadra, saranno\naggiunti ai tuoi starters.
|
$I Pokémon schiusi non verranno aggiunti alla tua squadra, ma saranno\ninvece aggiunti ai tuoi starters.
|
||||||
$I Pokémon schiusi generalmente hanno IVs migliori rispetto ai\n Pokémon selvatici.
|
$I Pokémon schiusi hanno (generalmente) IVs migliori rispetto ai\n Pokémon selvatici.
|
||||||
$Alcuni Pokémon possono essere ottenuti solo tramite uova.
|
$Inoltre, alcuni Pokémon possono essere ottenuti solo tramite uova.
|
||||||
$Ci sono 3 diversi macchinari con differenti\nbonus, scegli quello che preferisci!`,
|
$Ci sono 3 diversi macchinari con differenti\nbonus, scegli quello che preferisci!`,
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -62,12 +62,12 @@ export const battle: SimpleTranslationEntries = {
|
|||||||
"drainMessage": "{{pokemonName}}[[로]]부터\n체력을 흡수했다!",
|
"drainMessage": "{{pokemonName}}[[로]]부터\n체력을 흡수했다!",
|
||||||
"regainHealth": "{{pokemonName}}[[는]]\n기력을 회복했다!",
|
"regainHealth": "{{pokemonName}}[[는]]\n기력을 회복했다!",
|
||||||
"fainted": "{{pokemonNameWithAffix}}[[는]] 쓰러졌다!",
|
"fainted": "{{pokemonNameWithAffix}}[[는]] 쓰러졌다!",
|
||||||
"statRose": "상승했다",
|
"statRose": "[[가]] 올라갔다!",
|
||||||
"statSharplyRose": "약간 상승했다",
|
"statSharplyRose": "[[가]] 크게 올라갔다!",
|
||||||
"statRoseDrastically": "대폭 상승했다",
|
"statRoseDrastically": "[[가]] 매우 크게 올라갔다!",
|
||||||
"statWontGoAnyHigher": "더 이상 상승할 수 없다",
|
"statWontGoAnyHigher": "[[는]] 더 올라가지 않는다!",
|
||||||
"statFell": "떨어졌다",
|
"statFell": "[[가]] 떨어졌다!",
|
||||||
"statHarshlyFell": "약간 떨어졌다",
|
"statHarshlyFell": "[[가]] 크게 떨어졌다!",
|
||||||
"statSeverelyFell": "대폭 떨어졌다",
|
"statSeverelyFell": "[[가]] 매우 크게 떨어졌다!",
|
||||||
"statWontGoAnyLower": "더 이상 떨어질 수 없다",
|
"statWontGoAnyLower": "[[는]] 더 떨어지지 않는다!",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -44,6 +44,10 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"dailyRankings": "일간 랭킹",
|
"dailyRankings": "일간 랭킹",
|
||||||
"weeklyRankings": "주간 랭킹",
|
"weeklyRankings": "주간 랭킹",
|
||||||
"noRankings": "랭킹 정보 없음",
|
"noRankings": "랭킹 정보 없음",
|
||||||
|
"positionIcon": "#",
|
||||||
|
"usernameScoreboard": "이름",
|
||||||
|
"score": "점수",
|
||||||
|
"wave": "웨이브",
|
||||||
"loading": "로딩 중…",
|
"loading": "로딩 중…",
|
||||||
"loadingAsset": "Loading asset: {{assetName}}",
|
"loadingAsset": "Loading asset: {{assetName}}",
|
||||||
"playersOnline": "플레이어 온라인",
|
"playersOnline": "플레이어 온라인",
|
||||||
|
@ -44,6 +44,10 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"dailyRankings": "Classificação Diária",
|
"dailyRankings": "Classificação Diária",
|
||||||
"weeklyRankings": "Classificação Semanal",
|
"weeklyRankings": "Classificação Semanal",
|
||||||
"noRankings": "Sem Classificação",
|
"noRankings": "Sem Classificação",
|
||||||
|
"positionIcon": "#",
|
||||||
|
"usernameScoreboard": "Usuário",
|
||||||
|
"score": "Pontuação",
|
||||||
|
"wave": "Onda",
|
||||||
"loading": "Carregando…",
|
"loading": "Carregando…",
|
||||||
"loadingAsset": "Carregando recurso: {{assetName}}",
|
"loadingAsset": "Carregando recurso: {{assetName}}",
|
||||||
"playersOnline": "Jogadores Ativos",
|
"playersOnline": "Jogadores Ativos",
|
||||||
|
@ -25,7 +25,9 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||||||
"addToParty": "Adicionar à equipe",
|
"addToParty": "Adicionar à equipe",
|
||||||
"toggleIVs": "Mostrar IVs",
|
"toggleIVs": "Mostrar IVs",
|
||||||
"manageMoves": "Mudar Movimentos",
|
"manageMoves": "Mudar Movimentos",
|
||||||
|
"manageNature": "Mudar Natureza",
|
||||||
"useCandies": "Usar Doces",
|
"useCandies": "Usar Doces",
|
||||||
|
"selectNature": "Escolha Natureza.",
|
||||||
"selectMoveSwapOut": "Escolha um movimento para substituir.",
|
"selectMoveSwapOut": "Escolha um movimento para substituir.",
|
||||||
"selectMoveSwapWith": "Escolha o movimento que substituirá",
|
"selectMoveSwapWith": "Escolha o movimento que substituirá",
|
||||||
"unlockPassive": "Aprender Passiva",
|
"unlockPassive": "Aprender Passiva",
|
||||||
|
@ -2,7 +2,7 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
|||||||
|
|
||||||
export const abilityTriggers: SimpleTranslationEntries = {
|
export const abilityTriggers: SimpleTranslationEntries = {
|
||||||
"blockRecoilDamage" : "{{pokemonName}} 的 {{abilityName}}\n抵消了反作用力!",
|
"blockRecoilDamage" : "{{pokemonName}} 的 {{abilityName}}\n抵消了反作用力!",
|
||||||
"badDreams": "{{pokemonName}} 被折磨着!",
|
"badDreams": "{{pokemonName}} 被折磨着!",
|
||||||
"windPowerCharged": "受 {{moveName}} 的影响, {{pokemonName}} 提升了能力!",
|
"windPowerCharged": "受 {{moveName}} 的影响, {{pokemonName}} 提升了能力!",
|
||||||
"iceFaceAvoidedDamage": "{{pokemonName}} avoided\ndamage with {{abilityName}}!"
|
"iceFaceAvoidedDamage": "{{pokemonName}} 因为 {{abilityName}}\n避免了伤害!"
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -56,18 +56,18 @@ export const battle: SimpleTranslationEntries = {
|
|||||||
"skipItemQuestion": "你确定要跳过拾取道具吗?",
|
"skipItemQuestion": "你确定要跳过拾取道具吗?",
|
||||||
"eggHatching": "咦?",
|
"eggHatching": "咦?",
|
||||||
"ivScannerUseQuestion": "对 {{pokemonName}} 使用个体值扫描仪?",
|
"ivScannerUseQuestion": "对 {{pokemonName}} 使用个体值扫描仪?",
|
||||||
"wildPokemonWithAffix": "Wild {{pokemonName}}",
|
"wildPokemonWithAffix": "野生的 {{pokemonName}}",
|
||||||
"foePokemonWithAffix": "Foe {{pokemonName}}",
|
"foePokemonWithAffix": "对手 {{pokemonName}}",
|
||||||
"useMove": "{{pokemonNameWithAffix}} used {{moveName}}!",
|
"useMove": "{{pokemonNameWithAffix}} 使用了 {{moveName}}!",
|
||||||
"drainMessage": "{{pokemonName}} had its\nenergy drained!",
|
"drainMessage": "{{pokemonName}} 吸取了体力!",
|
||||||
"regainHealth": "{{pokemonName}} regained\nhealth!",
|
"regainHealth": "{{pokemonName}} 回复了体力!",
|
||||||
"fainted": "{{pokemonNameWithAffix}} fainted!",
|
"fainted": "{{pokemonNameWithAffix}} 倒下了!",
|
||||||
"statRose": "rose",
|
"statRose": "提高了!",
|
||||||
"statSharplyRose": "sharply rose",
|
"statSharplyRose": "大幅提高了!",
|
||||||
"statRoseDrastically": "rose drastically",
|
"statRoseDrastically": "极大幅提高了!",
|
||||||
"statWontGoAnyHigher": "won't go any higher",
|
"statWontGoAnyHigher": "已经无法再提高了!",
|
||||||
"statFell": "fell",
|
"statFell": "降低了!",
|
||||||
"statHarshlyFell": "harshly fell",
|
"statHarshlyFell": "大幅降低了!",
|
||||||
"statSeverelyFell": "severely fell",
|
"statSeverelyFell": "极大幅降低了!",
|
||||||
"statWontGoAnyLower": "won't go any lower",
|
"statWontGoAnyLower": "已经无法再降低了!",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -4,6 +4,6 @@ export const fightUiHandler: SimpleTranslationEntries = {
|
|||||||
"pp": "PP",
|
"pp": "PP",
|
||||||
"power": "威力",
|
"power": "威力",
|
||||||
"accuracy": "命中",
|
"accuracy": "命中",
|
||||||
"abilityFlyInText": " {{pokemonName}}'s {{passive}}{{abilityName}}",
|
"abilityFlyInText": " {{pokemonName}} 的 {{passive}}{{abilityName}}",
|
||||||
"passive": "Passive ", // The space at the end is important
|
"passive": "被动 ", // The space at the end is important
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
export const gameMode: SimpleTranslationEntries = {
|
export const gameMode: SimpleTranslationEntries = {
|
||||||
"classic": "Classic",
|
"classic": "经典模式",
|
||||||
"endless": "Endless",
|
"endless": "无尽模式",
|
||||||
"endlessSpliced": "Endless (Spliced)",
|
"endlessSpliced": "融合无尽模式",
|
||||||
"dailyRun": "Daily Run",
|
"dailyRun": "每日挑战",
|
||||||
"unknown": "Unknown",
|
"unknown": "未知",
|
||||||
"challenge": "Challenge",
|
"challenge": "挑战模式",
|
||||||
} as const;
|
} 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": "最快",
|
"Erratic": "非常快",
|
||||||
"Fast": "较快",
|
"Fast": "快",
|
||||||
"Medium_Fast": "快",
|
"Medium_Fast": "较快",
|
||||||
"Medium_Slow": "慢",
|
"Medium_Slow": "较慢",
|
||||||
"Slow": "较慢",
|
"Slow": "慢",
|
||||||
"Fluctuating": "最慢"
|
"Fluctuating": "非常慢"
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -44,6 +44,10 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"dailyRankings": "每日排名",
|
"dailyRankings": "每日排名",
|
||||||
"weeklyRankings": "每周排名",
|
"weeklyRankings": "每周排名",
|
||||||
"noRankings": "无排名",
|
"noRankings": "无排名",
|
||||||
|
"positionIcon": "#",
|
||||||
|
"usernameScoreboard": "Username",
|
||||||
|
"score": "Score",
|
||||||
|
"wave": "Wave",
|
||||||
"loading": "加载中...",
|
"loading": "加载中...",
|
||||||
"loadingAsset": "Loading asset: {{assetName}}",
|
"loadingAsset": "Loading asset: {{assetName}}",
|
||||||
"playersOnline": "在线玩家",
|
"playersOnline": "在线玩家",
|
||||||
|
@ -14,8 +14,8 @@ export const pokemonInfo: PokemonInfoTranslationEntries = {
|
|||||||
"SPDEFshortened": "特防",
|
"SPDEFshortened": "特防",
|
||||||
"SPD": "速度",
|
"SPD": "速度",
|
||||||
"SPDshortened": "速度",
|
"SPDshortened": "速度",
|
||||||
"ACC": "Accuracy",
|
"ACC": "命中率",
|
||||||
"EVA": "Evasiveness"
|
"EVA": "回避率"
|
||||||
},
|
},
|
||||||
|
|
||||||
Type: {
|
Type: {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
export const saveSlotSelectUiHandler: SimpleTranslationEntries = {
|
export const saveSlotSelectUiHandler: SimpleTranslationEntries = {
|
||||||
"overwriteData": "Overwrite the data in the selected slot?",
|
"overwriteData": "要覆盖该槽位的存档吗?",
|
||||||
"loading": "正在加载中...",
|
"loading": "正在加载中...",
|
||||||
"wave": "Wave",
|
"wave": "层数",
|
||||||
"lv": "Lv",
|
"lv": "Lv",
|
||||||
"empty": "空",
|
"empty": "空",
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -25,7 +25,9 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||||||
"addToParty": "加入队伍",
|
"addToParty": "加入队伍",
|
||||||
"toggleIVs": "切换个体值",
|
"toggleIVs": "切换个体值",
|
||||||
"manageMoves": "管理招式",
|
"manageMoves": "管理招式",
|
||||||
|
"manageNature": "管理性格",
|
||||||
"useCandies": "使用糖果",
|
"useCandies": "使用糖果",
|
||||||
|
"selectNature": "选择性格",
|
||||||
"selectMoveSwapOut": "选择要替换的招式。",
|
"selectMoveSwapOut": "选择要替换的招式。",
|
||||||
"selectMoveSwapWith": "选择要替换成的招式",
|
"selectMoveSwapWith": "选择要替换成的招式",
|
||||||
"unlockPassive": "解锁被动",
|
"unlockPassive": "解锁被动",
|
||||||
|
@ -48,7 +48,7 @@ export const trainerClasses: SimpleTranslationEntries = {
|
|||||||
"depot_agent": "铁路员工",
|
"depot_agent": "铁路员工",
|
||||||
"doctor": "医生",
|
"doctor": "医生",
|
||||||
"doctor_female": "医生",
|
"doctor_female": "医生",
|
||||||
"firebreather": "Firebreather",
|
"firebreather": "吹火人",
|
||||||
"fisherman": "垂钓者",
|
"fisherman": "垂钓者",
|
||||||
"fisherman_female": "垂钓者",
|
"fisherman_female": "垂钓者",
|
||||||
"gentleman": "绅士",
|
"gentleman": "绅士",
|
||||||
@ -87,13 +87,13 @@ export const trainerClasses: SimpleTranslationEntries = {
|
|||||||
"pokémon_rangers": "宝可梦巡护员组合",
|
"pokémon_rangers": "宝可梦巡护员组合",
|
||||||
"ranger": "巡护员",
|
"ranger": "巡护员",
|
||||||
"restaurant_staff": "服务生组合",
|
"restaurant_staff": "服务生组合",
|
||||||
"rich": "Rich",
|
"rich": "富豪",
|
||||||
"rich_female": "Rich",
|
"rich_female": "富豪太太",
|
||||||
"rich_boy": "富家少爷",
|
"rich_boy": "富家少爷",
|
||||||
"rich_couple": "富豪夫妇",
|
"rich_couple": "富豪夫妇",
|
||||||
"rich_kid": "Rich Kid",
|
"rich_kid": "富家小孩",
|
||||||
"rich_kid_female": "Rich Kid",
|
"rich_kid_female": "富家小孩",
|
||||||
"rich_kids": "富二代组合",
|
"rich_kids": "富家小孩组合",
|
||||||
"roughneck": "光头男",
|
"roughneck": "光头男",
|
||||||
"sailor": "水手",
|
"sailor": "水手",
|
||||||
"scientist": "研究员",
|
"scientist": "研究员",
|
||||||
|
@ -44,6 +44,10 @@ export const menu: SimpleTranslationEntries = {
|
|||||||
"dailyRankings": "每日排名",
|
"dailyRankings": "每日排名",
|
||||||
"weeklyRankings": "每週排名",
|
"weeklyRankings": "每週排名",
|
||||||
"noRankings": "無排名",
|
"noRankings": "無排名",
|
||||||
|
"positionIcon": "#",
|
||||||
|
"usernameScoreboard": "Username",
|
||||||
|
"score": "Score",
|
||||||
|
"wave": "Wave",
|
||||||
"loading": "加載中…",
|
"loading": "加載中…",
|
||||||
"loadingAsset": "Loading asset: {{assetName}}",
|
"loadingAsset": "Loading asset: {{assetName}}",
|
||||||
"playersOnline": "在線玩家",
|
"playersOnline": "在線玩家",
|
||||||
|
@ -25,7 +25,9 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||||||
"addToParty": "加入隊伍",
|
"addToParty": "加入隊伍",
|
||||||
"toggleIVs": "查看個體值",
|
"toggleIVs": "查看個體值",
|
||||||
"manageMoves": "管理技能",
|
"manageMoves": "管理技能",
|
||||||
|
"manageNature": "管理性格",
|
||||||
"useCandies": "使用糖果",
|
"useCandies": "使用糖果",
|
||||||
|
"selectNature": "選擇性格",
|
||||||
"selectMoveSwapOut": "選擇想要替換走的招式",
|
"selectMoveSwapOut": "選擇想要替換走的招式",
|
||||||
"selectMoveSwapWith": "選擇想要替換成的招式",
|
"selectMoveSwapWith": "選擇想要替換成的招式",
|
||||||
"unlockPassive": "解鎖被動",
|
"unlockPassive": "解鎖被動",
|
||||||
|
@ -1017,6 +1017,30 @@ export class EnemyEndureChanceModifierType extends ModifierType {
|
|||||||
export type ModifierTypeFunc = () => ModifierType;
|
export type ModifierTypeFunc = () => ModifierType;
|
||||||
type WeightedModifierTypeWeightFunc = (party: Pokemon[], rerollCount?: integer) => integer;
|
type WeightedModifierTypeWeightFunc = (party: Pokemon[], rerollCount?: integer) => integer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* High order function that returns a WeightedModifierTypeWeightFunc that will only be applied on
|
||||||
|
* classic and skip an ModifierType if current wave is greater or equal to the one passed down
|
||||||
|
* @param wave - Wave where we should stop showing the modifier
|
||||||
|
* @param defaultWeight - ModifierType default weight
|
||||||
|
* @returns A WeightedModifierTypeWeightFunc
|
||||||
|
*/
|
||||||
|
function skipInClassicAfterWave(wave: integer, defaultWeight: integer): WeightedModifierTypeWeightFunc {
|
||||||
|
return (party: Pokemon[]) => {
|
||||||
|
const gameMode = party[0].scene.gameMode;
|
||||||
|
const currentWave = party[0].scene.currentBattle.waveIndex;
|
||||||
|
return gameMode.isClassic && currentWave >= wave ? 0 : defaultWeight;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* High order function that returns a WeightedModifierTypeWeightFunc that will only be applied on
|
||||||
|
* classic and it will skip a ModifierType if it is the last wave pull.
|
||||||
|
* @param defaultWeight ModifierType default weight
|
||||||
|
* @returns A WeightedModifierTypeWeightFunc
|
||||||
|
*/
|
||||||
|
function skipInLastClassicWaveOrDefault(defaultWeight: integer) : WeightedModifierTypeWeightFunc {
|
||||||
|
return skipInClassicAfterWave(199, defaultWeight);
|
||||||
|
}
|
||||||
class WeightedModifierType {
|
class WeightedModifierType {
|
||||||
public modifierType: ModifierType;
|
public modifierType: ModifierType;
|
||||||
public weight: integer | WeightedModifierTypeWeightFunc;
|
public weight: integer | WeightedModifierTypeWeightFunc;
|
||||||
@ -1313,7 +1337,7 @@ const modifierPool: ModifierPool = {
|
|||||||
}, 3),
|
}, 3),
|
||||||
new WeightedModifierType(modifierTypes.DIRE_HIT, 4),
|
new WeightedModifierType(modifierTypes.DIRE_HIT, 4),
|
||||||
new WeightedModifierType(modifierTypes.SUPER_LURE, 4),
|
new WeightedModifierType(modifierTypes.SUPER_LURE, 4),
|
||||||
new WeightedModifierType(modifierTypes.NUGGET, 5),
|
new WeightedModifierType(modifierTypes.NUGGET, skipInLastClassicWaveOrDefault(5)),
|
||||||
new WeightedModifierType(modifierTypes.EVOLUTION_ITEM, (party: Pokemon[]) => {
|
new WeightedModifierType(modifierTypes.EVOLUTION_ITEM, (party: Pokemon[]) => {
|
||||||
return Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 15), 8);
|
return Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 15), 8);
|
||||||
}, 8),
|
}, 8),
|
||||||
@ -1336,7 +1360,7 @@ const modifierPool: ModifierPool = {
|
|||||||
[ModifierTier.ULTRA]: [
|
[ModifierTier.ULTRA]: [
|
||||||
new WeightedModifierType(modifierTypes.ULTRA_BALL, 24),
|
new WeightedModifierType(modifierTypes.ULTRA_BALL, 24),
|
||||||
new WeightedModifierType(modifierTypes.MAX_LURE, 4),
|
new WeightedModifierType(modifierTypes.MAX_LURE, 4),
|
||||||
new WeightedModifierType(modifierTypes.BIG_NUGGET, 12),
|
new WeightedModifierType(modifierTypes.BIG_NUGGET, skipInLastClassicWaveOrDefault(12)),
|
||||||
new WeightedModifierType(modifierTypes.PP_UP, 9),
|
new WeightedModifierType(modifierTypes.PP_UP, 9),
|
||||||
new WeightedModifierType(modifierTypes.PP_MAX, 3),
|
new WeightedModifierType(modifierTypes.PP_MAX, 3),
|
||||||
new WeightedModifierType(modifierTypes.MINT, 4),
|
new WeightedModifierType(modifierTypes.MINT, 4),
|
||||||
@ -1371,7 +1395,7 @@ const modifierPool: ModifierPool = {
|
|||||||
}),
|
}),
|
||||||
[ModifierTier.ROGUE]: [
|
[ModifierTier.ROGUE]: [
|
||||||
new WeightedModifierType(modifierTypes.ROGUE_BALL, 24),
|
new WeightedModifierType(modifierTypes.ROGUE_BALL, 24),
|
||||||
new WeightedModifierType(modifierTypes.RELIC_GOLD, 2),
|
new WeightedModifierType(modifierTypes.RELIC_GOLD, skipInLastClassicWaveOrDefault(2)),
|
||||||
new WeightedModifierType(modifierTypes.LEFTOVERS, 3),
|
new WeightedModifierType(modifierTypes.LEFTOVERS, 3),
|
||||||
new WeightedModifierType(modifierTypes.SHELL_BELL, 3),
|
new WeightedModifierType(modifierTypes.SHELL_BELL, 3),
|
||||||
new WeightedModifierType(modifierTypes.BERRY_POUCH, 4),
|
new WeightedModifierType(modifierTypes.BERRY_POUCH, 4),
|
||||||
|
@ -94,7 +94,14 @@ export class LoginPhase extends Phase {
|
|||||||
this.scene.playSound("menu_open");
|
this.scene.playSound("menu_open");
|
||||||
|
|
||||||
const loadData = () => {
|
const loadData = () => {
|
||||||
updateUserInfo().then(() => this.scene.gameData.loadSystem().then(() => this.end()));
|
updateUserInfo().then(success => {
|
||||||
|
if (!success[0]) {
|
||||||
|
Utils.setCookie(Utils.sessionIdKey, "");
|
||||||
|
this.scene.reset(true, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.scene.gameData.loadSystem().then(() => this.end());
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.scene.ui.setMode(Mode.LOGIN_FORM, {
|
this.scene.ui.setMode(Mode.LOGIN_FORM, {
|
||||||
@ -108,7 +115,14 @@ export class LoginPhase extends Phase {
|
|||||||
buttonActions: [
|
buttonActions: [
|
||||||
() => {
|
() => {
|
||||||
this.scene.ui.playSelect();
|
this.scene.ui.playSelect();
|
||||||
updateUserInfo().then(() => this.end());
|
updateUserInfo().then(success => {
|
||||||
|
if (!success[0]) {
|
||||||
|
Utils.setCookie(Utils.sessionIdKey, "");
|
||||||
|
this.scene.reset(true, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.end();
|
||||||
|
} );
|
||||||
}, () => {
|
}, () => {
|
||||||
this.scene.unshiftPhase(new LoginPhase(this.scene, false));
|
this.scene.unshiftPhase(new LoginPhase(this.scene, false));
|
||||||
this.end();
|
this.end();
|
||||||
@ -118,6 +132,9 @@ export class LoginPhase extends Phase {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
} else if (statusCode === 401) {
|
||||||
|
Utils.setCookie(Utils.sessionIdKey, "");
|
||||||
|
this.scene.reset(true, true);
|
||||||
} else {
|
} else {
|
||||||
this.scene.unshiftPhase(new UnavailablePhase(this.scene));
|
this.scene.unshiftPhase(new UnavailablePhase(this.scene));
|
||||||
super.end();
|
super.end();
|
||||||
@ -4198,7 +4215,8 @@ export class GameOverPhase extends BattlePhase {
|
|||||||
If Offline, execute offlineNewClear(), a localStorage implementation of newClear daily run checks */
|
If Offline, execute offlineNewClear(), a localStorage implementation of newClear daily run checks */
|
||||||
if (this.victory) {
|
if (this.victory) {
|
||||||
if (!Utils.isLocal) {
|
if (!Utils.isLocal) {
|
||||||
Utils.apiFetch(`savedata/session/newclear?slot=${this.scene.sessionSlotId}&clientSessionId=${clientSessionId}`, true) .then(response => response.json())
|
Utils.apiFetch(`savedata/session/newclear?slot=${this.scene.sessionSlotId}&clientSessionId=${clientSessionId}`, true)
|
||||||
|
.then(response => response.json())
|
||||||
.then(newClear => doGameOver(newClear));
|
.then(newClear => doGameOver(newClear));
|
||||||
} else {
|
} else {
|
||||||
this.scene.gameData.offlineNewClear(this.scene).then(result => {
|
this.scene.gameData.offlineNewClear(this.scene).then(result => {
|
||||||
|
@ -136,7 +136,7 @@ interface VoucherUnlocks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface VoucherCounts {
|
export interface VoucherCounts {
|
||||||
[type: string]: integer;
|
[type: string]: integer;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DexData {
|
export interface DexData {
|
||||||
@ -187,6 +187,46 @@ export interface StarterMoveData {
|
|||||||
[key: integer]: StarterMoveset | StarterFormMoveData
|
[key: integer]: StarterMoveset | StarterFormMoveData
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface StarterAttributes {
|
||||||
|
nature?: integer;
|
||||||
|
ability?: integer;
|
||||||
|
variant?: integer;
|
||||||
|
form?: integer;
|
||||||
|
female?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface StarterPreferences {
|
||||||
|
[key: integer]: StarterAttributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
// the latest data saved/loaded for the Starter Preferences. Required to reduce read/writes. Initialize as "{}", since this is the default value and no data needs to be stored if present.
|
||||||
|
// if they ever add private static variables, move this into StarterPrefs
|
||||||
|
const StarterPrefers_DEFAULT : string = "{}";
|
||||||
|
let StarterPrefers_private_latest : string = StarterPrefers_DEFAULT;
|
||||||
|
|
||||||
|
// This is its own class as StarterPreferences...
|
||||||
|
// - don't need to be loaded on startup
|
||||||
|
// - isn't stored with other data
|
||||||
|
// - don't require to be encrypted
|
||||||
|
// - shouldn't require calls outside of the starter selection
|
||||||
|
export class StarterPrefs {
|
||||||
|
// called on starter selection show once
|
||||||
|
static load(): StarterPreferences {
|
||||||
|
return JSON.parse(
|
||||||
|
StarterPrefers_private_latest = (localStorage.getItem(`starterPrefs_${loggedInUser?.username}`) || StarterPrefers_DEFAULT)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// called on starter selection clear, always
|
||||||
|
static save(prefs: StarterPreferences): void {
|
||||||
|
const pStr : string = JSON.stringify(prefs);
|
||||||
|
if (pStr !== StarterPrefers_private_latest) {
|
||||||
|
// something changed, store the update
|
||||||
|
localStorage.setItem(`starterPrefs_${loggedInUser?.username}`, pStr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export interface StarterDataEntry {
|
export interface StarterDataEntry {
|
||||||
moveset: StarterMoveset | StarterFormMoveData;
|
moveset: StarterMoveset | StarterFormMoveData;
|
||||||
eggMoves: integer;
|
eggMoves: integer;
|
||||||
@ -1261,7 +1301,7 @@ export class GameData {
|
|||||||
|
|
||||||
if (!bypassLogin && dataType < GameDataType.SETTINGS) {
|
if (!bypassLogin && dataType < GameDataType.SETTINGS) {
|
||||||
updateUserInfo().then(success => {
|
updateUserInfo().then(success => {
|
||||||
if (!success) {
|
if (!success[0]) {
|
||||||
return displayError(`Could not contact the server. Your ${dataName} data could not be imported.`);
|
return displayError(`Could not contact the server. Your ${dataName} data could not be imported.`);
|
||||||
}
|
}
|
||||||
let url: string;
|
let url: string;
|
||||||
|
@ -21,6 +21,7 @@ import { pokemonInfo as zhTwPokemonInfo } from "#app/locales/zh_TW/pokemon-info.
|
|||||||
import { battle as zhTwBattleStat } from "#app/locales/zh_TW/battle.js";
|
import { battle as zhTwBattleStat } from "#app/locales/zh_TW/battle.js";
|
||||||
|
|
||||||
import i18next, {initI18n} from "#app/plugins/i18n";
|
import i18next, {initI18n} from "#app/plugins/i18n";
|
||||||
|
import { KoreanPostpositionProcessor } from "i18next-korean-postposition-processor";
|
||||||
|
|
||||||
interface BattleStatTestUnit {
|
interface BattleStatTestUnit {
|
||||||
stat: BattleStat,
|
stat: BattleStat,
|
||||||
@ -198,7 +199,9 @@ describe("Test for BattleStat Localization", () => {
|
|||||||
it("Test getBattleStatLevelChangeDescription() in 한국어", async () => {
|
it("Test getBattleStatLevelChangeDescription() in 한국어", async () => {
|
||||||
i18next.changeLanguage("ko", () => {
|
i18next.changeLanguage("ko", () => {
|
||||||
battleStatLevelUnits.forEach(unit => {
|
battleStatLevelUnits.forEach(unit => {
|
||||||
testBattleStatLevelChangeDescription(unit.levels, unit.up, koBattleStat[unit.key]);
|
const processor = new KoreanPostpositionProcessor();
|
||||||
|
const message = processor.process(koBattleStat[unit.key]);
|
||||||
|
testBattleStatLevelChangeDescription(unit.levels, unit.up, message);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
|
import i18next from "i18next";
|
||||||
import BattleScene from "../battle-scene";
|
import BattleScene from "../battle-scene";
|
||||||
|
import * as Utils from "../utils";
|
||||||
import { TextStyle, addTextObject } from "./text";
|
import { TextStyle, addTextObject } from "./text";
|
||||||
import { WindowVariant, addWindow } from "./ui-theme";
|
import { WindowVariant, addWindow } from "./ui-theme";
|
||||||
import * as Utils from "../utils";
|
|
||||||
import i18next from "i18next";
|
|
||||||
|
|
||||||
interface RankingEntry {
|
interface RankingEntry {
|
||||||
rank: integer,
|
rank: integer,
|
||||||
@ -154,7 +154,7 @@ export class DailyRunScoreboard extends Phaser.GameObjects.Container {
|
|||||||
return entryContainer;
|
return entryContainer;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.rankingsContainer.add(getEntry("#", "Username", "Score", "Wave"));
|
this.rankingsContainer.add(getEntry(i18next.t("menu:positionIcon"), i18next.t("menu:usernameScoreboard"), i18next.t("menu:score"), i18next.t("menu:wave")));
|
||||||
|
|
||||||
rankings.forEach((r: RankingEntry, i: integer) => {
|
rankings.forEach((r: RankingEntry, i: integer) => {
|
||||||
const entryContainer = getEntry(r.rank.toString(), r.username, r.score.toString(), r.wave.toString());
|
const entryContainer = getEntry(r.rank.toString(), r.username, r.score.toString(), r.wave.toString());
|
||||||
|
@ -17,7 +17,7 @@ import PokemonSpecies, { allSpecies, getPokemonSpecies, getPokemonSpeciesForm, g
|
|||||||
import { Type } from "../data/type";
|
import { Type } from "../data/type";
|
||||||
import { GameModes } from "../game-mode";
|
import { GameModes } from "../game-mode";
|
||||||
import { SelectChallengePhase, TitlePhase } from "../phases";
|
import { SelectChallengePhase, TitlePhase } from "../phases";
|
||||||
import { AbilityAttr, DexAttr, DexAttrProps, DexEntry, StarterFormMoveData, StarterMoveset } from "../system/game-data";
|
import { AbilityAttr, DexAttr, DexAttrProps, DexEntry, StarterFormMoveData, StarterMoveset, StarterAttributes, StarterPreferences, StarterPrefs } from "../system/game-data";
|
||||||
import { Tutorial, handleTutorial } from "../tutorial";
|
import { Tutorial, handleTutorial } from "../tutorial";
|
||||||
import * as Utils from "../utils";
|
import * as Utils from "../utils";
|
||||||
import { OptionSelectItem } from "./abstact-option-select-ui-handler";
|
import { OptionSelectItem } from "./abstact-option-select-ui-handler";
|
||||||
@ -270,6 +270,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
private starterSelectCallback: StarterSelectCallback;
|
private starterSelectCallback: StarterSelectCallback;
|
||||||
|
|
||||||
|
private starterPreferences: StarterPreferences;
|
||||||
|
|
||||||
protected blockInput: boolean = false;
|
protected blockInput: boolean = false;
|
||||||
|
|
||||||
constructor(scene: BattleScene) {
|
constructor(scene: BattleScene) {
|
||||||
@ -780,6 +782,10 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
show(args: any[]): boolean {
|
show(args: any[]): boolean {
|
||||||
|
if (!this.starterPreferences) {
|
||||||
|
// starterPreferences haven't been loaded yet
|
||||||
|
this.starterPreferences = StarterPrefs.load();
|
||||||
|
}
|
||||||
this.moveInfoOverlay.clear(); // clear this when removing a menu; the cancel button doesn't seem to trigger this automatically on controllers
|
this.moveInfoOverlay.clear(); // clear this when removing a menu; the cancel button doesn't seem to trigger this automatically on controllers
|
||||||
if (args.length >= 1 && args[0] instanceof Function) {
|
if (args.length >= 1 && args[0] instanceof Function) {
|
||||||
super.show(args);
|
super.show(args);
|
||||||
@ -1223,6 +1229,54 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
const starterData = this.scene.gameData.starterData[this.lastSpecies.speciesId];
|
const starterData = this.scene.gameData.starterData[this.lastSpecies.speciesId];
|
||||||
|
let starterAttributes = this.starterPreferences[this.lastSpecies.speciesId];
|
||||||
|
if (this.canCycleNature) {
|
||||||
|
// if we could cycle natures, enable the improved nature menu
|
||||||
|
const showNatureOptions = () => {
|
||||||
|
ui.setMode(Mode.STARTER_SELECT).then(() => {
|
||||||
|
ui.showText(i18next.t("starterSelectUiHandler:selectNature"), null, () => {
|
||||||
|
const natures = this.scene.gameData.getNaturesForAttr(this.speciesStarterDexEntry.natureAttr);
|
||||||
|
ui.setModeWithoutClear(Mode.OPTION_SELECT, {
|
||||||
|
options: natures.map((n: Nature, i: number) => {
|
||||||
|
const option: OptionSelectItem = {
|
||||||
|
label: getNatureName(n, true, true, true, this.scene.uiTheme),
|
||||||
|
handler: () => {
|
||||||
|
// update default nature in starter save data
|
||||||
|
if (!starterAttributes) {
|
||||||
|
starterAttributes=
|
||||||
|
this.starterPreferences[this.lastSpecies.speciesId] = {};
|
||||||
|
}
|
||||||
|
starterAttributes.nature = n as unknown as integer;
|
||||||
|
this.clearText();
|
||||||
|
ui.setMode(Mode.STARTER_SELECT);
|
||||||
|
// set nature for starter
|
||||||
|
this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, undefined, undefined, n, undefined);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return option;
|
||||||
|
}).concat({
|
||||||
|
label: i18next.t("menu:cancel"),
|
||||||
|
handler: () => {
|
||||||
|
this.clearText();
|
||||||
|
ui.setMode(Mode.STARTER_SELECT);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
maxOptions: 8,
|
||||||
|
yOffset: 19
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
options.push({
|
||||||
|
label: i18next.t("starterSelectUiHandler:manageNature"),
|
||||||
|
handler: () => {
|
||||||
|
showNatureOptions();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
const candyCount = starterData.candyCount;
|
const candyCount = starterData.candyCount;
|
||||||
const passiveAttr = starterData.passiveAttr;
|
const passiveAttr = starterData.passiveAttr;
|
||||||
if (passiveAttr & PassiveAttr.UNLOCKED) {
|
if (passiveAttr & PassiveAttr.UNLOCKED) {
|
||||||
@ -1362,9 +1416,16 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
const rows = Math.ceil(genStarters / 9);
|
const rows = Math.ceil(genStarters / 9);
|
||||||
const row = Math.floor(this.cursor / 9);
|
const row = Math.floor(this.cursor / 9);
|
||||||
const props = this.scene.gameData.getSpeciesDexAttrProps(this.lastSpecies, this.dexAttrCursor);
|
const props = this.scene.gameData.getSpeciesDexAttrProps(this.lastSpecies, this.dexAttrCursor);
|
||||||
|
// prepare persistent starter data to store changes
|
||||||
|
let starterAttributes = this.starterPreferences[this.lastSpecies.speciesId];
|
||||||
|
if (!starterAttributes) {
|
||||||
|
starterAttributes =
|
||||||
|
this.starterPreferences[this.lastSpecies.speciesId] = {};
|
||||||
|
}
|
||||||
switch (button) {
|
switch (button) {
|
||||||
case Button.CYCLE_SHINY:
|
case Button.CYCLE_SHINY:
|
||||||
if (this.canCycleShiny) {
|
if (this.canCycleShiny) {
|
||||||
|
starterAttributes.variant = !props.shiny ? props.variant : -1; // update shiny setting
|
||||||
this.setSpeciesDetails(this.lastSpecies, !props.shiny, undefined, undefined, props.shiny ? 0 : undefined, undefined, undefined);
|
this.setSpeciesDetails(this.lastSpecies, !props.shiny, undefined, undefined, props.shiny ? 0 : undefined, undefined, undefined);
|
||||||
if (this.dexAttrCursor & DexAttr.SHINY) {
|
if (this.dexAttrCursor & DexAttr.SHINY) {
|
||||||
this.scene.playSound("sparkle");
|
this.scene.playSound("sparkle");
|
||||||
@ -1383,12 +1444,14 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while (newFormIndex !== props.formIndex);
|
} while (newFormIndex !== props.formIndex);
|
||||||
|
starterAttributes.form = newFormIndex; // store the selected form
|
||||||
this.setSpeciesDetails(this.lastSpecies, undefined, newFormIndex, undefined, undefined, undefined, undefined);
|
this.setSpeciesDetails(this.lastSpecies, undefined, newFormIndex, undefined, undefined, undefined, undefined);
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Button.CYCLE_GENDER:
|
case Button.CYCLE_GENDER:
|
||||||
if (this.canCycleGender) {
|
if (this.canCycleGender) {
|
||||||
|
starterAttributes.female = !props.female;
|
||||||
this.setSpeciesDetails(this.lastSpecies, undefined, undefined, !props.female, undefined, undefined, undefined);
|
this.setSpeciesDetails(this.lastSpecies, undefined, undefined, !props.female, undefined, undefined, undefined);
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
@ -1414,6 +1477,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (newAbilityIndex !== this.abilityCursor);
|
} while (newAbilityIndex !== this.abilityCursor);
|
||||||
|
starterAttributes.ability = newAbilityIndex; // store the selected ability
|
||||||
this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, undefined, newAbilityIndex, undefined);
|
this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, undefined, newAbilityIndex, undefined);
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
@ -1423,6 +1487,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
const natures = this.scene.gameData.getNaturesForAttr(this.speciesStarterDexEntry.natureAttr);
|
const natures = this.scene.gameData.getNaturesForAttr(this.speciesStarterDexEntry.natureAttr);
|
||||||
const natureIndex = natures.indexOf(this.natureCursor);
|
const natureIndex = natures.indexOf(this.natureCursor);
|
||||||
const newNature = natures[natureIndex < natures.length - 1 ? natureIndex + 1 : 0];
|
const newNature = natures[natureIndex < natures.length - 1 ? natureIndex + 1 : 0];
|
||||||
|
// store cycled nature as default
|
||||||
|
starterAttributes.nature = newNature as unknown as integer;
|
||||||
this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, undefined, undefined, newNature, undefined);
|
this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, undefined, undefined, newNature, undefined);
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
@ -1446,6 +1512,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (newVariant !== props.variant);
|
} while (newVariant !== props.variant);
|
||||||
|
starterAttributes.variant = newVariant; // store the selected variant
|
||||||
this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, newVariant, undefined, undefined);
|
this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, newVariant, undefined, undefined);
|
||||||
|
|
||||||
// Cycle tint based on current sprite tint
|
// Cycle tint based on current sprite tint
|
||||||
@ -1782,6 +1849,60 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.abilityCursor = species ? this.scene.gameData.getStarterSpeciesDefaultAbilityIndex(species) : 0;
|
this.abilityCursor = species ? this.scene.gameData.getStarterSpeciesDefaultAbilityIndex(species) : 0;
|
||||||
this.natureCursor = species ? this.scene.gameData.getSpeciesDefaultNature(species) : 0;
|
this.natureCursor = species ? this.scene.gameData.getSpeciesDefaultNature(species) : 0;
|
||||||
|
|
||||||
|
const starterAttributes : StarterAttributes = species ? {...this.starterPreferences[species.speciesId]} : null;
|
||||||
|
// validate starterAttributes
|
||||||
|
if (starterAttributes) {
|
||||||
|
// this may cause changes so we created a copy of the attributes before
|
||||||
|
if (!isNaN(starterAttributes.variant)) {
|
||||||
|
if (![
|
||||||
|
this.speciesStarterDexEntry.caughtAttr & DexAttr.NON_SHINY,
|
||||||
|
this.speciesStarterDexEntry.caughtAttr & DexAttr.DEFAULT_VARIANT,
|
||||||
|
this.speciesStarterDexEntry.caughtAttr & DexAttr.VARIANT_2,
|
||||||
|
this.speciesStarterDexEntry.caughtAttr & DexAttr.VARIANT_3
|
||||||
|
][starterAttributes.variant+1]) { // add 1 as -1 = non-shiny
|
||||||
|
// requested variant wasn't unlocked, purging setting
|
||||||
|
delete starterAttributes.variant;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof starterAttributes.female !== "boolean" || !(starterAttributes.female ?
|
||||||
|
this.speciesStarterDexEntry.caughtAttr & DexAttr.FEMALE :
|
||||||
|
this.speciesStarterDexEntry.caughtAttr & DexAttr.MALE
|
||||||
|
)) {
|
||||||
|
// requested gender wasn't unlocked, purging setting
|
||||||
|
delete starterAttributes.female;
|
||||||
|
}
|
||||||
|
|
||||||
|
const abilityAttr = this.scene.gameData.starterData[species.speciesId].abilityAttr;
|
||||||
|
if (![
|
||||||
|
abilityAttr & AbilityAttr.ABILITY_1,
|
||||||
|
species.ability2 ? (abilityAttr & AbilityAttr.ABILITY_2) : abilityAttr & AbilityAttr.ABILITY_HIDDEN,
|
||||||
|
species.ability2 && abilityAttr & AbilityAttr.ABILITY_HIDDEN
|
||||||
|
][starterAttributes.ability]) {
|
||||||
|
// requested ability wasn't unlocked, purging setting
|
||||||
|
delete starterAttributes.ability;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(species.forms[starterAttributes.form]?.isStarterSelectable && this.speciesStarterDexEntry.caughtAttr & this.scene.gameData.getFormAttr(starterAttributes.form))) {
|
||||||
|
// requested form wasn't unlocked/isn't a starter form, purging setting
|
||||||
|
delete starterAttributes.form;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.scene.gameData.getNaturesForAttr(this.speciesStarterDexEntry.natureAttr).indexOf(starterAttributes.nature as unknown as Nature) < 0) {
|
||||||
|
// requested nature wasn't unlocked, purging setting
|
||||||
|
delete starterAttributes.nature;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (starterAttributes?.nature) {
|
||||||
|
// load default nature from stater save data, if set
|
||||||
|
this.natureCursor = starterAttributes.nature;
|
||||||
|
}
|
||||||
|
if (!isNaN(starterAttributes?.ability)) {
|
||||||
|
// load default nature from stater save data, if set
|
||||||
|
this.abilityCursor = starterAttributes.ability;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.statsMode) {
|
if (this.statsMode) {
|
||||||
if (this.speciesStarterDexEntry?.caughtAttr) {
|
if (this.speciesStarterDexEntry?.caughtAttr) {
|
||||||
this.statsContainer.setVisible(true);
|
this.statsContainer.setVisible(true);
|
||||||
@ -1920,9 +2041,17 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.setSpeciesDetails(species, props.shiny, props.formIndex, props.female, props.variant, this.starterAbilityIndexes[starterIndex], this.starterNatures[starterIndex]);
|
this.setSpeciesDetails(species, props.shiny, props.formIndex, props.female, props.variant, this.starterAbilityIndexes[starterIndex], this.starterNatures[starterIndex]);
|
||||||
} else {
|
} else {
|
||||||
const defaultDexAttr = this.scene.gameData.getSpeciesDefaultDexAttr(species, false, true);
|
const defaultDexAttr = this.scene.gameData.getSpeciesDefaultDexAttr(species, false, true);
|
||||||
const defaultAbilityIndex = this.scene.gameData.getStarterSpeciesDefaultAbilityIndex(species);
|
const defaultAbilityIndex = starterAttributes?.ability ?? this.scene.gameData.getStarterSpeciesDefaultAbilityIndex(species);
|
||||||
const defaultNature = this.scene.gameData.getSpeciesDefaultNature(species);
|
// load default nature from stater save data, if set
|
||||||
|
const defaultNature = starterAttributes?.nature || this.scene.gameData.getSpeciesDefaultNature(species);
|
||||||
props = this.scene.gameData.getSpeciesDexAttrProps(species, defaultDexAttr);
|
props = this.scene.gameData.getSpeciesDexAttrProps(species, defaultDexAttr);
|
||||||
|
if (!isNaN(starterAttributes?.variant)) {
|
||||||
|
if (props.shiny = (starterAttributes.variant >= 0)) {
|
||||||
|
props.variant = starterAttributes.variant as Variant;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
props.formIndex = starterAttributes?.form ?? props.formIndex;
|
||||||
|
props.female = starterAttributes?.female ?? props.female;
|
||||||
|
|
||||||
this.setSpeciesDetails(species, props.shiny, props.formIndex, props.female, props.variant, defaultAbilityIndex, defaultNature);
|
this.setSpeciesDetails(species, props.shiny, props.formIndex, props.female, props.variant, defaultAbilityIndex, defaultNature);
|
||||||
}
|
}
|
||||||
@ -2417,6 +2546,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
clear(): void {
|
clear(): void {
|
||||||
super.clear();
|
super.clear();
|
||||||
|
|
||||||
|
StarterPrefs.save(this.starterPreferences);
|
||||||
this.cursor = -1;
|
this.cursor = -1;
|
||||||
this.hideInstructions();
|
this.hideInstructions();
|
||||||
this.starterSelectContainer.setVisible(false);
|
this.starterSelectContainer.setVisible(false);
|
||||||
|
@ -3,6 +3,7 @@ import { ModalConfig, ModalUiHandler } from "./modal-ui-handler";
|
|||||||
import { addTextObject, TextStyle } from "./text";
|
import { addTextObject, TextStyle } from "./text";
|
||||||
import { Mode } from "./ui";
|
import { Mode } from "./ui";
|
||||||
import { updateUserInfo } from "#app/account";
|
import { updateUserInfo } from "#app/account";
|
||||||
|
import * as Utils from "#app/utils";
|
||||||
|
|
||||||
export default class UnavailableModalUiHandler extends ModalUiHandler {
|
export default class UnavailableModalUiHandler extends ModalUiHandler {
|
||||||
private reconnectTimer: NodeJS.Timeout;
|
private reconnectTimer: NodeJS.Timeout;
|
||||||
@ -55,6 +56,9 @@ export default class UnavailableModalUiHandler extends ModalUiHandler {
|
|||||||
this.reconnectDuration = this.minTime;
|
this.reconnectDuration = this.minTime;
|
||||||
this.scene.playSound("pb_bounce_1");
|
this.scene.playSound("pb_bounce_1");
|
||||||
this.reconnectCallback();
|
this.reconnectCallback();
|
||||||
|
} else if (response[1] === 401) {
|
||||||
|
Utils.setCookie(Utils.sessionIdKey, "");
|
||||||
|
this.scene.reset(true, true);
|
||||||
} else {
|
} else {
|
||||||
this.reconnectDuration = Math.min(this.reconnectDuration * 2, this.maxTime); // Set a max delay so it isn't infinite
|
this.reconnectDuration = Math.min(this.reconnectDuration * 2, this.maxTime); // Set a max delay so it isn't infinite
|
||||||
this.reconnectTimer =
|
this.reconnectTimer =
|
||||||
|
Loading…
Reference in New Issue
Block a user