Merge branch 'main' into 745-localizedTrainerNames_TrainerClasses_And_Titles
commit
2b3b9aa4a7
|
@ -6362,7 +6362,8 @@ export function initMoves() {
|
||||||
.attr(ConfuseAttr),
|
.attr(ConfuseAttr),
|
||||||
new StatusMove(Moves.LIFE_DEW, Type.WATER, -1, 10, -1, 0, 8)
|
new StatusMove(Moves.LIFE_DEW, Type.WATER, -1, 10, -1, 0, 8)
|
||||||
.attr(HealAttr, 0.25, true, false)
|
.attr(HealAttr, 0.25, true, false)
|
||||||
.target(MoveTarget.USER_AND_ALLIES),
|
.target(MoveTarget.USER_AND_ALLIES)
|
||||||
|
.ignoresProtect(),
|
||||||
new SelfStatusMove(Moves.OBSTRUCT, Type.DARK, 100, 10, -1, 4, 8)
|
new SelfStatusMove(Moves.OBSTRUCT, Type.DARK, 100, 10, -1, 4, 8)
|
||||||
.attr(ProtectAttr, BattlerTagType.OBSTRUCT),
|
.attr(ProtectAttr, BattlerTagType.OBSTRUCT),
|
||||||
new AttackMove(Moves.FALSE_SURRENDER, Type.DARK, MoveCategory.PHYSICAL, 80, -1, 10, -1, 0, 8),
|
new AttackMove(Moves.FALSE_SURRENDER, Type.DARK, MoveCategory.PHYSICAL, 80, -1, 10, -1, 0, 8),
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { Stat, getStatName } from "./pokemon-stat";
|
||||||
import * as Utils from "../utils";
|
import * as Utils from "../utils";
|
||||||
import { TextStyle, getBBCodeFrag } from "../ui/text";
|
import { TextStyle, getBBCodeFrag } from "../ui/text";
|
||||||
import { UiTheme } from "#app/enums/ui-theme";
|
import { UiTheme } from "#app/enums/ui-theme";
|
||||||
|
import i18next from 'i18next';
|
||||||
|
|
||||||
export enum Nature {
|
export enum Nature {
|
||||||
HARDY,
|
HARDY,
|
||||||
|
@ -33,6 +34,10 @@ export enum Nature {
|
||||||
|
|
||||||
export function getNatureName(nature: Nature, includeStatEffects: boolean = false, forStarterSelect: boolean = false, ignoreBBCode: boolean = false, uiTheme: UiTheme = UiTheme.DEFAULT): string {
|
export function getNatureName(nature: Nature, includeStatEffects: boolean = false, forStarterSelect: boolean = false, ignoreBBCode: boolean = false, uiTheme: UiTheme = UiTheme.DEFAULT): string {
|
||||||
let ret = Utils.toReadableString(Nature[nature]);
|
let ret = Utils.toReadableString(Nature[nature]);
|
||||||
|
//Translating nature
|
||||||
|
if(i18next.exists('nature:' + ret)){
|
||||||
|
ret = i18next.t('nature:' + ret as any)
|
||||||
|
}
|
||||||
if (includeStatEffects) {
|
if (includeStatEffects) {
|
||||||
const stats = Utils.getEnumValues(Stat).slice(1);
|
const stats = Utils.getEnumValues(Stat).slice(1);
|
||||||
let increasedStat: Stat = null;
|
let increasedStat: Stat = null;
|
||||||
|
|
|
@ -796,6 +796,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
return !!this.getTypes(true, forDefend).find(t => t === type);
|
return !!this.getTypes(true, forDefend).find(t => t === type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the non-passive ability of the pokemon. This accounts for fusions and ability changing effects.
|
||||||
|
* This should rarely be called, most of the time {@link hasAbility} or {@link hasAbilityWithAttr} are better used as
|
||||||
|
* those check both the passive and non-passive abilities and account for ability suppression.
|
||||||
|
* @see {@link hasAbility} {@link hasAbilityWithAttr} Intended ways to check abilities in most cases
|
||||||
|
* @param {boolean} ignoreOverride If true, ignore ability changing effects
|
||||||
|
* @returns {Ability} The non-passive ability of the pokemon
|
||||||
|
*/
|
||||||
getAbility(ignoreOverride?: boolean): Ability {
|
getAbility(ignoreOverride?: boolean): Ability {
|
||||||
if (!ignoreOverride && this.summonData?.ability)
|
if (!ignoreOverride && this.summonData?.ability)
|
||||||
return allAbilities[this.summonData.ability];
|
return allAbilities[this.summonData.ability];
|
||||||
|
@ -811,6 +819,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
return allAbilities[abilityId];
|
return allAbilities[abilityId];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the passive ability of the pokemon. This should rarely be called, most of the time
|
||||||
|
* {@link hasAbility} or {@link hasAbilityWithAttr} are better used as those check both the passive and
|
||||||
|
* non-passive abilities and account for ability suppression.
|
||||||
|
* @see {@link hasAbility} {@link hasAbilityWithAttr} Intended ways to check abilities in most cases
|
||||||
|
* @returns {Ability} The passive ability of the pokemon
|
||||||
|
*/
|
||||||
getPassiveAbility(): Ability {
|
getPassiveAbility(): Ability {
|
||||||
if (Overrides.PASSIVE_ABILITY_OVERRIDE && this.isPlayer())
|
if (Overrides.PASSIVE_ABILITY_OVERRIDE && this.isPlayer())
|
||||||
return allAbilities[Overrides.PASSIVE_ABILITY_OVERRIDE];
|
return allAbilities[Overrides.PASSIVE_ABILITY_OVERRIDE];
|
||||||
|
@ -838,6 +853,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
return this.passive || this.isBoss();
|
return this.passive || this.isBoss();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether an ability of a pokemon can be currently applied. This should rarely be
|
||||||
|
* directly called, as {@link hasAbility} and {@link hasAbilityWithAttr} already call this.
|
||||||
|
* @see {@link hasAbility} {@link hasAbilityWithAttr} Intended ways to check abilities in most cases
|
||||||
|
* @param {boolean} passive If true, check if passive can be applied instead of non-passive
|
||||||
|
* @returns {Ability} The passive ability of the pokemon
|
||||||
|
*/
|
||||||
canApplyAbility(passive: boolean = false): boolean {
|
canApplyAbility(passive: boolean = false): boolean {
|
||||||
if (passive && !this.hasPassive())
|
if (passive && !this.hasPassive())
|
||||||
return false;
|
return false;
|
||||||
|
@ -862,6 +884,15 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
return (this.hp || ability.isBypassFaint) && !ability.conditions.find(condition => !condition(this));
|
return (this.hp || ability.isBypassFaint) && !ability.conditions.find(condition => !condition(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether a pokemon has the specified ability and it's in effect. Accounts for all the various
|
||||||
|
* effects which can affect whether an ability will be present or in effect, and both passive and
|
||||||
|
* non-passive. This is the primary way to check whether a pokemon has a particular ability.
|
||||||
|
* @param {Abilities} ability The ability to check for
|
||||||
|
* @param {boolean} canApply If false, it doesn't check whether the abiltiy is currently active
|
||||||
|
* @param {boolean} ignoreOverride If true, it ignores ability changing effects
|
||||||
|
* @returns {boolean} Whether the ability is present and active
|
||||||
|
*/
|
||||||
hasAbility(ability: Abilities, canApply: boolean = true, ignoreOverride?: boolean): boolean {
|
hasAbility(ability: Abilities, canApply: boolean = true, ignoreOverride?: boolean): boolean {
|
||||||
if ((!canApply || this.canApplyAbility()) && this.getAbility(ignoreOverride).id === ability)
|
if ((!canApply || this.canApplyAbility()) && this.getAbility(ignoreOverride).id === ability)
|
||||||
return true;
|
return true;
|
||||||
|
@ -870,6 +901,16 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether a pokemon has an ability with the specified attribute and it's in effect.
|
||||||
|
* Accounts for all the various effects which can affect whether an ability will be present or
|
||||||
|
* in effect, and both passive and non-passive. This is one of the two primary ways to check
|
||||||
|
* whether a pokemon has a particular ability.
|
||||||
|
* @param {AbAttr} attrType The ability attribute to check for
|
||||||
|
* @param {boolean} canApply If false, it doesn't check whether the abiltiy is currently active
|
||||||
|
* @param {boolean} ignoreOverride If true, it ignores ability changing effects
|
||||||
|
* @returns {boolean} Whether an ability with that attribute is present and active
|
||||||
|
*/
|
||||||
hasAbilityWithAttr(attrType: { new(...args: any[]): AbAttr }, canApply: boolean = true, ignoreOverride?: boolean): boolean {
|
hasAbilityWithAttr(attrType: { new(...args: any[]): AbAttr }, canApply: boolean = true, ignoreOverride?: boolean): boolean {
|
||||||
if ((!canApply || this.canApplyAbility()) && this.getAbility(ignoreOverride).hasAttr(attrType))
|
if ((!canApply || this.canApplyAbility()) && this.getAbility(ignoreOverride).hasAttr(attrType))
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -2,9 +2,11 @@ import { ability } from "./ability";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
import { menuUiHandler } from "./menu-ui-handler";
|
import { menuUiHandler } from "./menu-ui-handler";
|
||||||
import { move } from "./move";
|
import { move } from "./move";
|
||||||
|
import { nature } from "./nature";
|
||||||
import { pokeball } from "./pokeball";
|
import { pokeball } from "./pokeball";
|
||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonStat } from "./pokemon-stat";
|
import { pokemonStat } from "./pokemon-stat";
|
||||||
|
@ -29,4 +31,6 @@ export const deConfig = {
|
||||||
trainerClasses: trainerClasses,
|
trainerClasses: trainerClasses,
|
||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
tutorial: tutorial
|
tutorial: tutorial
|
||||||
|
nature: nature,
|
||||||
|
growth: growth
|
||||||
}
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const growth: SimpleTranslationEntries = {
|
||||||
|
"Erratic": "Erratic",
|
||||||
|
"Fast": "Fast",
|
||||||
|
"Medium_Fast": "Medium Fast",
|
||||||
|
"Medium_Slow": "Medium Slow",
|
||||||
|
"Slow": "Slow",
|
||||||
|
"Fluctuating": "Fluctuating"
|
||||||
|
} as const;
|
|
@ -0,0 +1,29 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const nature: SimpleTranslationEntries = {
|
||||||
|
"Hardy": "Robust",
|
||||||
|
"Lonely": "Solo",
|
||||||
|
"Brave": "Mutig",
|
||||||
|
"Adamant": "Hart",
|
||||||
|
"Naughty": "Frech",
|
||||||
|
"Bold": "Kühn",
|
||||||
|
"Docile": "Sanft",
|
||||||
|
"Relaxed": "Locker",
|
||||||
|
"Impish": "Pfiffig",
|
||||||
|
"Lax": "Lasch",
|
||||||
|
"Timid": "Scheu",
|
||||||
|
"Hasty": "Hastig",
|
||||||
|
"Serious": "Ernst",
|
||||||
|
"Jolly": "Froh",
|
||||||
|
"Naive": "Naiv",
|
||||||
|
"Modest": "Mäßig",
|
||||||
|
"Mild": "Mild",
|
||||||
|
"Quiet": "Ruhig",
|
||||||
|
"Bashful": "Zaghaft",
|
||||||
|
"Rash": "Hitzig",
|
||||||
|
"Calm": "Still",
|
||||||
|
"Gentle": "Zart",
|
||||||
|
"Sassy": "Forsch",
|
||||||
|
"Careful": "Sacht",
|
||||||
|
"Quirky": "Kauzig"
|
||||||
|
} as const;
|
|
@ -2,9 +2,11 @@ import { ability } from "./ability";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
import { menuUiHandler } from "./menu-ui-handler";
|
import { menuUiHandler } from "./menu-ui-handler";
|
||||||
import { move } from "./move";
|
import { move } from "./move";
|
||||||
|
import { nature } from "./nature";
|
||||||
import { pokeball } from "./pokeball";
|
import { pokeball } from "./pokeball";
|
||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonStat } from "./pokemon-stat";
|
import { pokemonStat } from "./pokemon-stat";
|
||||||
|
@ -29,4 +31,6 @@ export const enConfig = {
|
||||||
trainerClasses: trainerClasses,
|
trainerClasses: trainerClasses,
|
||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
tutorial: tutorial
|
tutorial: tutorial
|
||||||
|
nature: nature,
|
||||||
|
growth: growth
|
||||||
}
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const growth: SimpleTranslationEntries = {
|
||||||
|
"Erratic": "Erratic",
|
||||||
|
"Fast": "Fast",
|
||||||
|
"Medium_Fast": "Medium Fast",
|
||||||
|
"Medium_Slow": "Medium Slow",
|
||||||
|
"Slow": "Slow",
|
||||||
|
"Fluctuating": "Fluctuating"
|
||||||
|
} as const;
|
|
@ -0,0 +1,29 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const nature: SimpleTranslationEntries = {
|
||||||
|
"Hardy": "Hardy",
|
||||||
|
"Lonely": "Lonely",
|
||||||
|
"Brave": "Brave",
|
||||||
|
"Adamant": "Adamant",
|
||||||
|
"Naughty": "Naughty",
|
||||||
|
"Bold": "Bold",
|
||||||
|
"Docile": "Docile",
|
||||||
|
"Relaxed": "Relaxed",
|
||||||
|
"Impish": "Impish",
|
||||||
|
"Lax": "Lax",
|
||||||
|
"Timid": "Timid",
|
||||||
|
"Hasty": "Hasty",
|
||||||
|
"Serious": "Serious",
|
||||||
|
"Jolly": "Jolly",
|
||||||
|
"Naive": "Naive",
|
||||||
|
"Modest": "Modest",
|
||||||
|
"Mild": "Mild",
|
||||||
|
"Quiet": "Quiet",
|
||||||
|
"Bashful": "Bashful",
|
||||||
|
"Rash": "Rash",
|
||||||
|
"Calm": "Calm",
|
||||||
|
"Gentle": "Gentle",
|
||||||
|
"Sassy": "Sassy",
|
||||||
|
"Careful": "Careful",
|
||||||
|
"Quirky": "Quirky"
|
||||||
|
} as const;
|
|
@ -2,9 +2,11 @@ import { ability } from "./ability";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
import { menuUiHandler } from "./menu-ui-handler";
|
import { menuUiHandler } from "./menu-ui-handler";
|
||||||
import { move } from "./move";
|
import { move } from "./move";
|
||||||
|
import { nature } from "./nature";
|
||||||
import { pokeball } from "./pokeball";
|
import { pokeball } from "./pokeball";
|
||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonStat } from "./pokemon-stat";
|
import { pokemonStat } from "./pokemon-stat";
|
||||||
|
@ -29,4 +31,6 @@ export const esConfig = {
|
||||||
trainerClasses: trainerClasses,
|
trainerClasses: trainerClasses,
|
||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
tutorial: tutorial
|
tutorial: tutorial
|
||||||
|
nature: nature,
|
||||||
|
growth: growth
|
||||||
}
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const growth: SimpleTranslationEntries = {
|
||||||
|
"Erratic": "Errático",
|
||||||
|
"Fast": "Rápido",
|
||||||
|
"Medium_Fast": "Medio Rápido",
|
||||||
|
"Medium_Slow": "Medio Lento",
|
||||||
|
"Slow": "Lento",
|
||||||
|
"Fluctuating": "Fluctuante"
|
||||||
|
} as const;
|
|
@ -0,0 +1,29 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const nature: SimpleTranslationEntries = {
|
||||||
|
"Hardy": "Fuerte",
|
||||||
|
"Lonely": "Huraña",
|
||||||
|
"Brave": "Audaz",
|
||||||
|
"Adamant": "Firme",
|
||||||
|
"Naughty": "Pícara",
|
||||||
|
"Bold": "Osada",
|
||||||
|
"Docile": "Dócil",
|
||||||
|
"Relaxed": "Plácida",
|
||||||
|
"Impish": "Agitada",
|
||||||
|
"Lax": "Floja",
|
||||||
|
"Timid": "Miedosa",
|
||||||
|
"Hasty": "Activa",
|
||||||
|
"Serious": "Seria",
|
||||||
|
"Jolly": "Alegre",
|
||||||
|
"Naive": "Ingenua",
|
||||||
|
"Modest": "Modesta",
|
||||||
|
"Mild": "Afable",
|
||||||
|
"Quiet": "Mansa",
|
||||||
|
"Bashful": "Tímida",
|
||||||
|
"Rash": "Alocada",
|
||||||
|
"Calm": "Serena",
|
||||||
|
"Gentle": "Amable",
|
||||||
|
"Sassy": "Grosera",
|
||||||
|
"Careful": "Cauta",
|
||||||
|
"Quirky": "Rara"
|
||||||
|
} as const;
|
|
@ -2,9 +2,11 @@ import { ability } from "./ability";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
import { menuUiHandler } from "./menu-ui-handler";
|
import { menuUiHandler } from "./menu-ui-handler";
|
||||||
import { move } from "./move";
|
import { move } from "./move";
|
||||||
|
import { nature } from "./nature";
|
||||||
import { pokeball } from "./pokeball";
|
import { pokeball } from "./pokeball";
|
||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonStat } from "./pokemon-stat";
|
import { pokemonStat } from "./pokemon-stat";
|
||||||
|
@ -29,4 +31,6 @@ export const frConfig = {
|
||||||
trainerClasses: trainerClasses,
|
trainerClasses: trainerClasses,
|
||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
tutorial: tutorial
|
tutorial: tutorial
|
||||||
|
nature: nature,
|
||||||
|
growth: growth
|
||||||
}
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const growth: SimpleTranslationEntries = {
|
||||||
|
"Erratic": "Erratic",
|
||||||
|
"Fast": "Fast",
|
||||||
|
"Medium_Fast": "Medium Fast",
|
||||||
|
"Medium_Slow": "Medium Slow",
|
||||||
|
"Slow": "Slow",
|
||||||
|
"Fluctuating": "Fluctuating"
|
||||||
|
} as const;
|
|
@ -0,0 +1,29 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const nature: SimpleTranslationEntries = {
|
||||||
|
"Hardy": "Hardi",
|
||||||
|
"Lonely": "Solo",
|
||||||
|
"Brave": "Brave",
|
||||||
|
"Adamant": "Rigide",
|
||||||
|
"Naughty": "Mauvais",
|
||||||
|
"Bold": "Assuré",
|
||||||
|
"Docile": "Docile",
|
||||||
|
"Relaxed": "Relax",
|
||||||
|
"Impish": "Malin",
|
||||||
|
"Lax": "Lâche",
|
||||||
|
"Timid": "Timide",
|
||||||
|
"Hasty": "Pressé",
|
||||||
|
"Serious": "Sérieux",
|
||||||
|
"Jolly": "Jovial",
|
||||||
|
"Naive": "Naïf",
|
||||||
|
"Modest": "Modeste",
|
||||||
|
"Mild": "Doux",
|
||||||
|
"Quiet": "Discret",
|
||||||
|
"Bashful": "Pudique",
|
||||||
|
"Rash": "Foufou",
|
||||||
|
"Calm": "Calme",
|
||||||
|
"Gentle": "Gentil",
|
||||||
|
"Sassy": "Malpoli",
|
||||||
|
"Careful": "Prudent",
|
||||||
|
"Quirky": "Bizarre"
|
||||||
|
} as const;
|
|
@ -2,9 +2,11 @@ import { ability } from "./ability";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { growth } from "./growth";
|
||||||
import { menu } from "./menu";
|
import { menu } from "./menu";
|
||||||
import { menuUiHandler } from "./menu-ui-handler";
|
import { menuUiHandler } from "./menu-ui-handler";
|
||||||
import { move } from "./move";
|
import { move } from "./move";
|
||||||
|
import { nature } from "./nature";
|
||||||
import { pokeball } from "./pokeball";
|
import { pokeball } from "./pokeball";
|
||||||
import { pokemon } from "./pokemon";
|
import { pokemon } from "./pokemon";
|
||||||
import { pokemonStat } from "./pokemon-stat";
|
import { pokemonStat } from "./pokemon-stat";
|
||||||
|
@ -29,4 +31,6 @@ export const itConfig = {
|
||||||
trainerClasses: trainerClasses,
|
trainerClasses: trainerClasses,
|
||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
tutorial: tutorial
|
tutorial: tutorial
|
||||||
|
nature: nature,
|
||||||
|
growth: growth
|
||||||
}
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const growth: SimpleTranslationEntries = {
|
||||||
|
"Erratic": "Erratic",
|
||||||
|
"Fast": "Fast",
|
||||||
|
"Medium_Fast": "Medium Fast",
|
||||||
|
"Medium_Slow": "Medium Slow",
|
||||||
|
"Slow": "Slow",
|
||||||
|
"Fluctuating": "Fluctuating"
|
||||||
|
} as const;
|
|
@ -0,0 +1,29 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const nature: SimpleTranslationEntries = {
|
||||||
|
"Hardy": "Hardy",
|
||||||
|
"Lonely": "Lonely",
|
||||||
|
"Brave": "Brave",
|
||||||
|
"Adamant": "Adamant",
|
||||||
|
"Naughty": "Naughty",
|
||||||
|
"Bold": "Bold",
|
||||||
|
"Docile": "Docile",
|
||||||
|
"Relaxed": "Relaxed",
|
||||||
|
"Impish": "Impish",
|
||||||
|
"Lax": "Lax",
|
||||||
|
"Timid": "Timid",
|
||||||
|
"Hasty": "Hasty",
|
||||||
|
"Serious": "Serious",
|
||||||
|
"Jolly": "Jolly",
|
||||||
|
"Naive": "Naive",
|
||||||
|
"Modest": "Modest",
|
||||||
|
"Mild": "Mild",
|
||||||
|
"Quiet": "Quiet",
|
||||||
|
"Bashful": "Bashful",
|
||||||
|
"Rash": "Rash",
|
||||||
|
"Calm": "Calm",
|
||||||
|
"Gentle": "Gentle",
|
||||||
|
"Sassy": "Sassy",
|
||||||
|
"Careful": "Careful",
|
||||||
|
"Quirky": "Quirky"
|
||||||
|
} as const;
|
|
@ -11,6 +11,7 @@ import { pokemonStat } from "./pokemon-stat";
|
||||||
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||||
import { tutorial } from "./tutorial";
|
import { tutorial } from "./tutorial";
|
||||||
import { titles,trainerClasses,trainerNames } from "./trainers";
|
import { titles,trainerClasses,trainerNames } from "./trainers";
|
||||||
|
import { nature } from "./nature";
|
||||||
|
|
||||||
|
|
||||||
export const zhCnConfig = {
|
export const zhCnConfig = {
|
||||||
|
@ -25,6 +26,7 @@ export const zhCnConfig = {
|
||||||
pokemonStat: pokemonStat,
|
pokemonStat: pokemonStat,
|
||||||
pokemon: pokemon,
|
pokemon: pokemon,
|
||||||
starterSelectUiHandler: starterSelectUiHandler,
|
starterSelectUiHandler: starterSelectUiHandler,
|
||||||
|
nature: nature
|
||||||
titles: titles,
|
titles: titles,
|
||||||
trainerClasses: trainerClasses,
|
trainerClasses: trainerClasses,
|
||||||
trainerNames: trainerNames,
|
trainerNames: trainerNames,
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const nature: SimpleTranslationEntries = {
|
||||||
|
"Hardy": "Hardy",
|
||||||
|
"Lonely": "Lonely",
|
||||||
|
"Brave": "Brave",
|
||||||
|
"Adamant": "Adamant",
|
||||||
|
"Naughty": "Naughty",
|
||||||
|
"Bold": "Bold",
|
||||||
|
"Docile": "Docile",
|
||||||
|
"Relaxed": "Relaxed",
|
||||||
|
"Impish": "Impish",
|
||||||
|
"Lax": "Lax",
|
||||||
|
"Timid": "Timid",
|
||||||
|
"Hasty": "Hasty",
|
||||||
|
"Serious": "Serious",
|
||||||
|
"Jolly": "Jolly",
|
||||||
|
"Naive": "Naive",
|
||||||
|
"Modest": "Modest",
|
||||||
|
"Mild": "Mild",
|
||||||
|
"Quiet": "Quiet",
|
||||||
|
"Bashful": "Bashful",
|
||||||
|
"Rash": "Rash",
|
||||||
|
"Calm": "Calm",
|
||||||
|
"Gentle": "Gentle",
|
||||||
|
"Sassy": "Sassy",
|
||||||
|
"Careful": "Careful",
|
||||||
|
"Quirky": "Quirky"
|
||||||
|
} as const;
|
|
@ -112,6 +112,8 @@ declare module 'i18next' {
|
||||||
trainerNames: SimpleTranslationEntries;
|
trainerNames: SimpleTranslationEntries;
|
||||||
tutorial: SimpleTranslationEntries;
|
tutorial: SimpleTranslationEntries;
|
||||||
starterSelectUiHandler: SimpleTranslationEntries;
|
starterSelectUiHandler: SimpleTranslationEntries;
|
||||||
|
nature: SimpleTranslationEntries;
|
||||||
|
growth: SimpleTranslationEntries;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -754,7 +754,7 @@ export class GameData {
|
||||||
tryClearSession(scene: BattleScene, slotId: integer): Promise<[success: boolean, newClear: boolean]> {
|
tryClearSession(scene: BattleScene, slotId: integer): Promise<[success: boolean, newClear: boolean]> {
|
||||||
return new Promise<[boolean, boolean]>(resolve => {
|
return new Promise<[boolean, boolean]>(resolve => {
|
||||||
if (bypassLogin) {
|
if (bypassLogin) {
|
||||||
localStorage.removeItem('sessionData');
|
localStorage.removeItem(`sessionData${slotId ? slotId : ''}`);
|
||||||
return resolve([true, true]);
|
return resolve([true, true]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1294,7 +1294,14 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
this.pokemonLuckText.setTint(getVariantTint(Math.min(luck - 1, 2) as Variant));
|
this.pokemonLuckText.setTint(getVariantTint(Math.min(luck - 1, 2) as Variant));
|
||||||
this.pokemonLuckLabelText.setVisible(this.pokemonLuckText.visible);
|
this.pokemonLuckLabelText.setVisible(this.pokemonLuckText.visible);
|
||||||
|
|
||||||
this.pokemonGrowthRateText.setText(Utils.toReadableString(GrowthRate[species.growthRate]));
|
//Growth translate
|
||||||
|
let growthReadable = Utils.toReadableString(GrowthRate[species.growthRate]);
|
||||||
|
let growthAux = growthReadable.replace(" ", "_")
|
||||||
|
if(i18next.exists("growth:" + growthAux)){
|
||||||
|
growthReadable = i18next.t("growth:"+ growthAux as any)
|
||||||
|
}
|
||||||
|
this.pokemonGrowthRateText.setText(growthReadable);
|
||||||
|
|
||||||
this.pokemonGrowthRateText.setColor(getGrowthRateColor(species.growthRate));
|
this.pokemonGrowthRateText.setColor(getGrowthRateColor(species.growthRate));
|
||||||
this.pokemonGrowthRateText.setShadowColor(getGrowthRateColor(species.growthRate, true));
|
this.pokemonGrowthRateText.setShadowColor(getGrowthRateColor(species.growthRate, true));
|
||||||
this.pokemonGrowthRateLabelText.setVisible(true);
|
this.pokemonGrowthRateLabelText.setVisible(true);
|
||||||
|
|
Loading…
Reference in New Issue