mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-21 09:02:47 +02:00
Merge branch 'beta' into restore-tiers-in-modifier-select
This commit is contained in:
commit
06574fee39
@ -47,8 +47,8 @@
|
||||
"correctness": {
|
||||
"noUndeclaredVariables": "off",
|
||||
"noUnusedVariables": "error",
|
||||
"noSwitchDeclarations": "warn", // TODO: refactor and make this an error
|
||||
"noVoidTypeReturn": "warn", // TODO: Refactor and make this an error
|
||||
"noSwitchDeclarations": "error",
|
||||
"noVoidTypeReturn": "error",
|
||||
"noUnusedImports": "error"
|
||||
},
|
||||
"style": {
|
||||
@ -85,7 +85,7 @@
|
||||
"useLiteralKeys": "off",
|
||||
"noForEach": "off", // Foreach vs for of is not that simple.
|
||||
"noUselessSwitchCase": "off", // Explicit > Implicit
|
||||
"noUselessConstructor": "warn", // TODO: Refactor and make this an error
|
||||
"noUselessConstructor": "error",
|
||||
"noBannedTypes": "warn" // TODO: Refactor and make this an error
|
||||
},
|
||||
"nursery": {
|
||||
|
@ -18,7 +18,7 @@
|
||||
"eslint": "eslint --fix .",
|
||||
"eslint-ci": "eslint .",
|
||||
"biome": "biome check --write --changed --no-errors-on-unmatched",
|
||||
"biome-ci": "biome ci --diagnostic-level=error --reporter=github --changed --no-errors-on-unmatched",
|
||||
"biome-ci": "biome ci --diagnostic-level=error --reporter=github --no-errors-on-unmatched",
|
||||
"docs": "typedoc",
|
||||
"depcruise": "depcruise src",
|
||||
"depcruise:graph": "depcruise src --output-type dot | node dependency-graph.js > dependency-graph.svg",
|
||||
|
@ -29,4 +29,4 @@ export type ModifierString = keyof ModifierConstructorMap;
|
||||
|
||||
export type ModifierPool = {
|
||||
[tier: string]: WeightedModifierType[];
|
||||
}
|
||||
};
|
||||
|
@ -125,16 +125,6 @@ export interface TerrainBattlerTag {
|
||||
* Players and enemies should not be allowed to select restricted moves.
|
||||
*/
|
||||
export abstract class MoveRestrictionBattlerTag extends BattlerTag {
|
||||
constructor(
|
||||
tagType: BattlerTagType,
|
||||
lapseType: BattlerTagLapseType | BattlerTagLapseType[],
|
||||
turnCount: number,
|
||||
sourceMove?: MoveId,
|
||||
sourceId?: number,
|
||||
) {
|
||||
super(tagType, lapseType, turnCount, sourceMove, sourceId);
|
||||
}
|
||||
|
||||
/** @override */
|
||||
override lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
|
||||
if (lapseType === BattlerTagLapseType.PRE_MOVE) {
|
||||
@ -1470,16 +1460,6 @@ export class WrapTag extends DamagingTrapTag {
|
||||
}
|
||||
|
||||
export abstract class VortexTrapTag extends DamagingTrapTag {
|
||||
constructor(
|
||||
tagType: BattlerTagType,
|
||||
commonAnim: CommonAnim,
|
||||
turnCount: number,
|
||||
sourceMove: MoveId,
|
||||
sourceId: number,
|
||||
) {
|
||||
super(tagType, commonAnim, turnCount, sourceMove, sourceId);
|
||||
}
|
||||
|
||||
getTrapMessage(pokemon: Pokemon): string {
|
||||
return i18next.t("battlerTags:vortexOnTrap", {
|
||||
pokemonNameWithAffix: getPokemonNameWithAffix(pokemon),
|
||||
|
@ -11,10 +11,7 @@ import { STEALING_MOVES } from "#app/data/mystery-encounters/requirements/requir
|
||||
import type Pokemon from "#app/field/pokemon";
|
||||
import { ModifierTier } from "#enums/modifier-tier";
|
||||
import type { ModifierTypeOption } from "#app/modifier/modifier-type";
|
||||
import {
|
||||
getPlayerModifierTypeOptions,
|
||||
regenerateModifierPoolThresholds,
|
||||
} from "#app/modifier/modifier-type";
|
||||
import { getPlayerModifierTypeOptions, regenerateModifierPoolThresholds } from "#app/modifier/modifier-type";
|
||||
import { ModifierPoolType } from "#enums/modifier-pool-type";
|
||||
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||
import { globalScene } from "#app/global-scene";
|
||||
|
@ -7,10 +7,7 @@ import { TrainerSlot } from "#enums/trainer-slot";
|
||||
import { ModifierTier } from "#enums/modifier-tier";
|
||||
import { MusicPreference } from "#app/system/settings/settings";
|
||||
import type { ModifierTypeOption } from "#app/modifier/modifier-type";
|
||||
import {
|
||||
getPlayerModifierTypeOptions,
|
||||
regenerateModifierPoolThresholds,
|
||||
} from "#app/modifier/modifier-type";
|
||||
import { getPlayerModifierTypeOptions, regenerateModifierPoolThresholds } from "#app/modifier/modifier-type";
|
||||
import { ModifierPoolType } from "#enums/modifier-pool-type";
|
||||
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||
import { globalScene } from "#app/global-scene";
|
||||
|
@ -262,7 +262,7 @@ export class Arena {
|
||||
return 5;
|
||||
}
|
||||
break;
|
||||
case SpeciesId.LYCANROC:
|
||||
case SpeciesId.LYCANROC: {
|
||||
const timeOfDay = this.getTimeOfDay();
|
||||
switch (timeOfDay) {
|
||||
case TimeOfDay.DAY:
|
||||
@ -275,6 +275,7 @@ export class Arena {
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -4385,14 +4385,16 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
// biome-ignore lint: there are a ton of issues..
|
||||
faintCry(callback: Function): void {
|
||||
if (this.fusionSpecies && this.getSpeciesForm() !== this.getFusionSpeciesForm()) {
|
||||
return this.fusionFaintCry(callback);
|
||||
this.fusionFaintCry(callback);
|
||||
return;
|
||||
}
|
||||
|
||||
const key = this.species.getCryKey(this.formIndex);
|
||||
let rate = 0.85;
|
||||
const cry = globalScene.playSound(key, { rate: rate }) as AnySound;
|
||||
if (!cry || globalScene.fieldVolume === 0) {
|
||||
return callback();
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
const sprite = this.getSprite();
|
||||
const tintSprite = this.getTintSprite();
|
||||
@ -4460,7 +4462,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
rate: rate,
|
||||
}) as AnySound;
|
||||
if (!cry || !fusionCry || globalScene.fieldVolume === 0) {
|
||||
return callback();
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
fusionCry.stop();
|
||||
duration = Math.min(duration, fusionCry.totalDuration * 1000);
|
||||
|
@ -1,8 +1,5 @@
|
||||
import { ModifierTier } from "#enums/modifier-tier";
|
||||
import {
|
||||
regenerateModifierPoolThresholds,
|
||||
getEnemyBuffModifierForWave,
|
||||
} from "#app/modifier/modifier-type";
|
||||
import { regenerateModifierPoolThresholds, getEnemyBuffModifierForWave } from "#app/modifier/modifier-type";
|
||||
import { ModifierPoolType } from "#enums/modifier-pool-type";
|
||||
import { EnemyPersistentModifier } from "#app/modifier/modifier";
|
||||
import { Phase } from "#app/phase";
|
||||
|
@ -149,7 +149,7 @@ export class CommandPhase extends FieldPhase {
|
||||
|
||||
switch (command) {
|
||||
case Command.TERA:
|
||||
case Command.FIGHT:
|
||||
case Command.FIGHT: {
|
||||
let useStruggle = false;
|
||||
const turnMove: TurnMove | undefined = args.length === 2 ? (args[1] as TurnMove) : undefined;
|
||||
if (
|
||||
@ -233,7 +233,8 @@ export class CommandPhase extends FieldPhase {
|
||||
);
|
||||
}
|
||||
break;
|
||||
case Command.BALL:
|
||||
}
|
||||
case Command.BALL: {
|
||||
const notInDex =
|
||||
globalScene
|
||||
.getEnemyField()
|
||||
@ -337,8 +338,9 @@ export class CommandPhase extends FieldPhase {
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Command.POKEMON:
|
||||
case Command.RUN:
|
||||
case Command.RUN: {
|
||||
const isSwitch = command === Command.POKEMON;
|
||||
const { currentBattle, arena } = globalScene;
|
||||
const mysteryEncounterFleeAllowed = currentBattle.mysteryEncounter?.fleeAllowed;
|
||||
@ -446,6 +448,7 @@ export class CommandPhase extends FieldPhase {
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (success) {
|
||||
this.end();
|
||||
|
@ -135,7 +135,8 @@ export class MovePhase extends BattlePhase {
|
||||
this.showMoveText();
|
||||
this.showFailedText();
|
||||
}
|
||||
return this.end();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
this.pokemon.turnData.acted = true;
|
||||
@ -310,7 +311,8 @@ export class MovePhase extends BattlePhase {
|
||||
if (fail) {
|
||||
this.showMoveText();
|
||||
this.showFailedText();
|
||||
return this.end();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,8 @@ export class PokemonAnimPhase extends BattlePhase {
|
||||
private doSubstituteAddAnim(): void {
|
||||
const substitute = this.pokemon.getTag(SubstituteTag);
|
||||
if (isNullOrUndefined(substitute)) {
|
||||
return this.end();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
const getSprite = () => {
|
||||
@ -116,12 +117,14 @@ export class PokemonAnimPhase extends BattlePhase {
|
||||
|
||||
private doSubstitutePreMoveAnim(): void {
|
||||
if (this.fieldAssets.length !== 1) {
|
||||
return this.end();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
const subSprite = this.fieldAssets[0];
|
||||
if (subSprite === undefined) {
|
||||
return this.end();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
globalScene.tweens.add({
|
||||
@ -145,12 +148,14 @@ export class PokemonAnimPhase extends BattlePhase {
|
||||
|
||||
private doSubstitutePostMoveAnim(): void {
|
||||
if (this.fieldAssets.length !== 1) {
|
||||
return this.end();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
const subSprite = this.fieldAssets[0];
|
||||
if (subSprite === undefined) {
|
||||
return this.end();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
globalScene.tweens.add({
|
||||
@ -174,12 +179,14 @@ export class PokemonAnimPhase extends BattlePhase {
|
||||
|
||||
private doSubstituteRemoveAnim(): void {
|
||||
if (this.fieldAssets.length !== 1) {
|
||||
return this.end();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
const subSprite = this.fieldAssets[0];
|
||||
if (subSprite === undefined) {
|
||||
return this.end();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
const getSprite = () => {
|
||||
@ -244,12 +251,14 @@ export class PokemonAnimPhase extends BattlePhase {
|
||||
|
||||
private doCommanderApplyAnim(): void {
|
||||
if (!globalScene.currentBattle?.double) {
|
||||
return this.end();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
const dondozo = this.pokemon.getAlly();
|
||||
|
||||
if (dondozo?.species?.speciesId !== SpeciesId.DONDOZO) {
|
||||
return this.end();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
const tatsugiriX = this.pokemon.x + this.pokemon.getSprite().x;
|
||||
@ -329,7 +338,8 @@ export class PokemonAnimPhase extends BattlePhase {
|
||||
const tatsugiri = this.pokemon.getAlly();
|
||||
if (isNullOrUndefined(tatsugiri)) {
|
||||
console.warn("Aborting COMMANDER_REMOVE anim: Tatsugiri is undefined");
|
||||
return this.end();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
const tatsuSprite = globalScene.addPokemonSprite(
|
||||
|
@ -29,7 +29,8 @@ export class PokemonTransformPhase extends PokemonPhase {
|
||||
const target = globalScene.getField(true).find(p => p.getBattlerIndex() === this.targetIndex);
|
||||
|
||||
if (!target) {
|
||||
return this.end();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
user.summonData.speciesForm = target.getSpeciesForm();
|
||||
|
@ -29,7 +29,8 @@ export class QuietFormChangePhase extends BattlePhase {
|
||||
super.start();
|
||||
|
||||
if (this.pokemon.formIndex === this.pokemon.species.forms.findIndex(f => f.formKey === this.formChange.formKey)) {
|
||||
return this.end();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
const preName = getPokemonNameWithAffix(this.pokemon);
|
||||
|
@ -174,7 +174,24 @@ export async function initI18n(): Promise<void> {
|
||||
"es-MX": ["es-ES", "en"],
|
||||
default: ["en"],
|
||||
},
|
||||
supportedLngs: ["en", "es-ES", "es-MX", "fr", "it", "de", "zh-CN", "zh-TW", "pt-BR", "ko", "ja", "ca", "da", "tr", "ro", "ru"],
|
||||
supportedLngs: [
|
||||
"en",
|
||||
"es-ES",
|
||||
"es-MX",
|
||||
"fr",
|
||||
"it",
|
||||
"de",
|
||||
"zh-CN",
|
||||
"zh-TW",
|
||||
"pt-BR",
|
||||
"ko",
|
||||
"ja",
|
||||
"ca",
|
||||
"da",
|
||||
"tr",
|
||||
"ro",
|
||||
"ru",
|
||||
],
|
||||
backend: {
|
||||
loadPath(lng: string, [ns]: string[]) {
|
||||
let fileName: string;
|
||||
|
@ -32,7 +32,10 @@ const pressAction = i18next.t("settings:pressActionToAssign");
|
||||
|
||||
export const settingGamepadOptions = {
|
||||
[SettingGamepad.Controller]: [i18next.t("settings:controllerDefault"), i18next.t("settings:controllerChange")],
|
||||
[SettingGamepad.Gamepad_Support]: [i18next.t("settings:gamepadSupportAuto"), i18next.t("settings:gamepadSupportDisabled")],
|
||||
[SettingGamepad.Gamepad_Support]: [
|
||||
i18next.t("settings:gamepadSupportAuto"),
|
||||
i18next.t("settings:gamepadSupportDisabled"),
|
||||
],
|
||||
[SettingGamepad.Button_Up]: [`KEY ${Button.UP.toString()}`, pressAction],
|
||||
[SettingGamepad.Button_Down]: [`KEY ${Button.DOWN.toString()}`, pressAction],
|
||||
[SettingGamepad.Button_Left]: [`KEY ${Button.LEFT.toString()}`, pressAction],
|
||||
|
@ -959,7 +959,7 @@ export function setSetting(setting: string, value: number): boolean {
|
||||
},
|
||||
{
|
||||
label: "Türkçe (Needs Help)",
|
||||
handler: () => changeLocaleHandler("tr")
|
||||
handler: () => changeLocaleHandler("tr"),
|
||||
},
|
||||
{
|
||||
label: "Русский (Needs Help)",
|
||||
@ -967,11 +967,11 @@ export function setSetting(setting: string, value: number): boolean {
|
||||
},
|
||||
{
|
||||
label: "Dansk (Needs Help)",
|
||||
handler: () => changeLocaleHandler("da")
|
||||
handler: () => changeLocaleHandler("da"),
|
||||
},
|
||||
{
|
||||
label: "Română (Needs Help)",
|
||||
handler: () => changeLocaleHandler("ro")
|
||||
handler: () => changeLocaleHandler("ro"),
|
||||
},
|
||||
{
|
||||
label: i18next.t("settings:back"),
|
||||
|
@ -56,10 +56,6 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler {
|
||||
protected defaultTextStyle: TextStyle = TextStyle.WINDOW;
|
||||
protected textContent: string;
|
||||
|
||||
constructor(mode: UiMode | null) {
|
||||
super(mode);
|
||||
}
|
||||
|
||||
abstract getWindowWidth(): number;
|
||||
|
||||
getWindowHeight(): number {
|
||||
|
@ -69,7 +69,7 @@ export default class AdminUiHandler extends FormModalUiHandler {
|
||||
case AdminMode.SEARCH:
|
||||
inputFieldConfigs.push({ label: "Username" });
|
||||
break;
|
||||
case AdminMode.ADMIN:
|
||||
case AdminMode.ADMIN: {
|
||||
const adminResult = this.adminResult ?? {
|
||||
username: "",
|
||||
discordId: "",
|
||||
@ -91,6 +91,7 @@ export default class AdminUiHandler extends FormModalUiHandler {
|
||||
inputFieldConfigs.push({ label: "Registered", isReadOnly: true });
|
||||
break;
|
||||
}
|
||||
}
|
||||
return inputFieldConfigs;
|
||||
}
|
||||
|
||||
|
@ -169,12 +169,13 @@ export class DailyRunScoreboard extends Phaser.GameObjects.Container {
|
||||
entryContainer.add(scoreLabel);
|
||||
|
||||
switch (this.category) {
|
||||
case ScoreboardCategory.DAILY:
|
||||
case ScoreboardCategory.DAILY: {
|
||||
const waveLabel = addTextObject(68, 0, wave, TextStyle.WINDOW, {
|
||||
fontSize: "54px",
|
||||
});
|
||||
entryContainer.add(waveLabel);
|
||||
break;
|
||||
}
|
||||
case ScoreboardCategory.WEEKLY:
|
||||
scoreLabel.x -= 16;
|
||||
break;
|
||||
|
@ -131,7 +131,7 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
gachaInfoContainer.add(gachaUpLabel);
|
||||
|
||||
switch (gachaType as GachaType) {
|
||||
case GachaType.LEGENDARY:
|
||||
case GachaType.LEGENDARY: {
|
||||
if (["de", "es-ES"].includes(currentLanguage)) {
|
||||
gachaUpLabel.setAlign("center");
|
||||
gachaUpLabel.setY(0);
|
||||
@ -152,6 +152,7 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
|
||||
gachaInfoContainer.add(pokemonIcon);
|
||||
break;
|
||||
}
|
||||
case GachaType.MOVE:
|
||||
if (["de", "es-ES", "fr", "pt-BR", "ru"].includes(currentLanguage)) {
|
||||
gachaUpLabel.setAlign("center");
|
||||
@ -623,13 +624,14 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
updateGachaInfo(gachaType: GachaType): void {
|
||||
const infoContainer = this.gachaInfoContainers[gachaType];
|
||||
switch (gachaType as GachaType) {
|
||||
case GachaType.LEGENDARY:
|
||||
case GachaType.LEGENDARY: {
|
||||
const species = getPokemonSpecies(getLegendaryGachaSpeciesForTimestamp(new Date().getTime()));
|
||||
const pokemonIcon = infoContainer.getAt(1) as Phaser.GameObjects.Sprite;
|
||||
pokemonIcon.setTexture(species.getIconAtlasKey(), species.getIconId(false));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
consumeVouchers(voucherType: VoucherType, count: number): void {
|
||||
globalScene.gameData.voucherCounts[voucherType] = Math.max(
|
||||
|
@ -686,7 +686,7 @@ export default class MenuUiHandler extends MessageUiHandler {
|
||||
error = true;
|
||||
}
|
||||
break;
|
||||
case MenuOptions.LOG_OUT:
|
||||
case MenuOptions.LOG_OUT: {
|
||||
success = true;
|
||||
const doLogout = () => {
|
||||
ui.setMode(UiMode.LOADING, {
|
||||
@ -719,6 +719,7 @@ export default class MenuUiHandler extends MessageUiHandler {
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (button === Button.CANCEL) {
|
||||
success = true;
|
||||
ui.revertMode().then(result => {
|
||||
|
@ -1385,7 +1385,7 @@ export default class PartyUiHandler extends MessageUiHandler {
|
||||
case PartyOption.MOVE_1:
|
||||
case PartyOption.MOVE_2:
|
||||
case PartyOption.MOVE_3:
|
||||
case PartyOption.MOVE_4:
|
||||
case PartyOption.MOVE_4: {
|
||||
const move = pokemon.moveset[option - PartyOption.MOVE_1];
|
||||
if (this.showMovePp) {
|
||||
const maxPP = move.getMovePp();
|
||||
@ -1395,7 +1395,8 @@ export default class PartyUiHandler extends MessageUiHandler {
|
||||
optionName = move.getName();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
}
|
||||
default: {
|
||||
const formChangeItemModifiers = this.getFormChangeItemsModifiers(pokemon);
|
||||
if (formChangeItemModifiers && option >= PartyOption.FORM_CHANGE_ITEM) {
|
||||
const modifier = formChangeItemModifiers[option - PartyOption.FORM_CHANGE_ITEM];
|
||||
@ -1411,6 +1412,7 @@ export default class PartyUiHandler extends MessageUiHandler {
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (this.partyUiMode === PartyUiMode.REMEMBER_MOVE_MODIFIER) {
|
||||
const learnableLevelMoves = pokemon.getLearnableLevelMoves();
|
||||
const move = learnableLevelMoves[option];
|
||||
|
@ -567,7 +567,7 @@ export default class RunInfoUiHandler extends UiHandler {
|
||||
case GameModes.SPLICED_ENDLESS:
|
||||
modeText.appendText(`${i18next.t("gameMode:endlessSpliced")}`, false);
|
||||
break;
|
||||
case GameModes.CHALLENGE:
|
||||
case GameModes.CHALLENGE: {
|
||||
modeText.appendText(`${i18next.t("gameMode:challenge")}`, false);
|
||||
modeText.appendText(`${i18next.t("runHistory:challengeRules")}: `);
|
||||
modeText.setWrapMode(1); // wrap by word
|
||||
@ -582,6 +582,7 @@ export default class RunInfoUiHandler extends UiHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GameModes.ENDLESS:
|
||||
modeText.appendText(`${i18next.t("gameMode:endless")}`, false);
|
||||
break;
|
||||
@ -687,7 +688,7 @@ export default class RunInfoUiHandler extends UiHandler {
|
||||
case Challenges.SINGLE_GENERATION:
|
||||
rules.push(i18next.t(`runHistory:challengeMonoGen${this.runInfo.challenges[i].value}`));
|
||||
break;
|
||||
case Challenges.SINGLE_TYPE:
|
||||
case Challenges.SINGLE_TYPE: {
|
||||
const typeRule = PokemonType[this.runInfo.challenges[i].value - 1];
|
||||
const typeTextColor = `[color=${TypeColor[typeRule]}]`;
|
||||
const typeShadowColor = `[shadow=${TypeShadow[typeRule]}]`;
|
||||
@ -695,10 +696,11 @@ export default class RunInfoUiHandler extends UiHandler {
|
||||
typeTextColor + typeShadowColor + i18next.t(`pokemonInfo:Type.${typeRule}`)! + "[/color]" + "[/shadow]";
|
||||
rules.push(typeText);
|
||||
break;
|
||||
}
|
||||
case Challenges.INVERSE_BATTLE:
|
||||
rules.push(i18next.t("challenges:inverseBattle.shortName"));
|
||||
break;
|
||||
default:
|
||||
default: {
|
||||
const localisationKey = Challenges[this.runInfo.challenges[i].id]
|
||||
.split("_")
|
||||
.map((f, i) => (i ? `${f[0]}${f.slice(1).toLowerCase()}` : f.toLowerCase()))
|
||||
@ -708,6 +710,7 @@ export default class RunInfoUiHandler extends UiHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return rules;
|
||||
}
|
||||
|
||||
|
@ -332,7 +332,7 @@ export default class AbstractSettingsUiHandler extends MessageUiHandler {
|
||||
case Button.CYCLE_SHINY:
|
||||
success = this.navigationContainer.navigate(button);
|
||||
break;
|
||||
case Button.ACTION:
|
||||
case Button.ACTION: {
|
||||
const setting: Setting = this.settings[cursor];
|
||||
if (setting?.activatable) {
|
||||
success = this.activateSetting(setting);
|
||||
@ -340,6 +340,7 @@ export default class AbstractSettingsUiHandler extends MessageUiHandler {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Plays a select sound effect if an action was successfully processed.
|
||||
if (success) {
|
||||
|
@ -1763,7 +1763,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
}
|
||||
} else if (this.randomCursorObj.visible) {
|
||||
switch (button) {
|
||||
case Button.ACTION:
|
||||
case Button.ACTION: {
|
||||
if (this.starterSpecies.length >= 6) {
|
||||
error = true;
|
||||
break;
|
||||
@ -1815,6 +1815,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
case Button.UP:
|
||||
this.randomCursorObj.setVisible(false);
|
||||
this.filterBarCursor = this.filterBar.numFilters - 1;
|
||||
|
@ -10,10 +10,6 @@ import { UiMode } from "#enums/ui-mode";
|
||||
export default class TestDialogueUiHandler extends FormModalUiHandler {
|
||||
keys: string[];
|
||||
|
||||
constructor(mode) {
|
||||
super(mode);
|
||||
}
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user