diff --git a/public/images/events/egg-update_de.png b/public/images/events/egg-update_de.png new file mode 100644 index 00000000000..5de94877d5c Binary files /dev/null and b/public/images/events/egg-update_de.png differ diff --git a/public/images/events/egg-update_en.png b/public/images/events/egg-update_en.png new file mode 100644 index 00000000000..7104d340ca0 Binary files /dev/null and b/public/images/events/egg-update_en.png differ diff --git a/public/images/events/egg-update_es.png b/public/images/events/egg-update_es.png new file mode 100644 index 00000000000..ec5f5c46d17 Binary files /dev/null and b/public/images/events/egg-update_es.png differ diff --git a/public/images/events/egg-update_fr.png b/public/images/events/egg-update_fr.png new file mode 100644 index 00000000000..e0505fa96dd Binary files /dev/null and b/public/images/events/egg-update_fr.png differ diff --git a/public/images/events/egg-update_it.png b/public/images/events/egg-update_it.png new file mode 100644 index 00000000000..fc347bce9cf Binary files /dev/null and b/public/images/events/egg-update_it.png differ diff --git a/public/images/events/egg-update_ja.png b/public/images/events/egg-update_ja.png new file mode 100644 index 00000000000..2259cbb4d9a Binary files /dev/null and b/public/images/events/egg-update_ja.png differ diff --git a/public/images/events/egg-update_ko.png b/public/images/events/egg-update_ko.png new file mode 100644 index 00000000000..99dcc662402 Binary files /dev/null and b/public/images/events/egg-update_ko.png differ diff --git a/public/images/events/egg-update_pt-BR.png b/public/images/events/egg-update_pt-BR.png new file mode 100644 index 00000000000..ee347d35654 Binary files /dev/null and b/public/images/events/egg-update_pt-BR.png differ diff --git a/public/images/events/egg-update_zh-CN.png b/public/images/events/egg-update_zh-CN.png new file mode 100644 index 00000000000..02d780fab89 Binary files /dev/null and b/public/images/events/egg-update_zh-CN.png differ diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 72778fa8589..936d0b83253 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -2769,20 +2769,20 @@ export default class BattleScene extends SceneBase { const keys: string[] = []; const playerParty = this.getParty(); playerParty.forEach(p => { - keys.push("pkmn__" + p.species.getSpriteId(p.gender === Gender.FEMALE, p.species.formIndex, p.shiny, p.variant)); - keys.push("pkmn__" + p.species.getSpriteId(p.gender === Gender.FEMALE, p.species.formIndex, p.shiny, p.variant, true)); - keys.push("cry/" + p.species.getCryKey(p.species.formIndex)); - if (p.fusionSpecies && p.getSpeciesForm() !== p.getFusionSpeciesForm()) { - keys.push("cry/"+p.getFusionSpeciesForm().getCryKey(p.fusionSpecies.formIndex)); + keys.push(p.getSpriteKey(true)); + keys.push(p.getBattleSpriteKey(true, true)); + keys.push("cry/" + p.species.getCryKey(p.formIndex)); + if (p.fusionSpecies) { + keys.push("cry/"+p.fusionSpecies.getCryKey(p.fusionFormIndex)); } }); // enemyParty has to be operated on separately from playerParty because playerPokemon =/= enemyPokemon const enemyParty = this.getEnemyParty(); enemyParty.forEach(p => { - keys.push(p.species.getSpriteKey(p.gender === Gender.FEMALE, p.species.formIndex, p.shiny, p.variant)); - keys.push("cry/" + p.species.getCryKey(p.species.formIndex)); - if (p.fusionSpecies && p.getSpeciesForm() !== p.getFusionSpeciesForm()) { - keys.push("cry/"+p.getFusionSpeciesForm().getCryKey(p.fusionSpecies.formIndex)); + keys.push(p.getSpriteKey(true)); + keys.push("cry/" + p.species.getCryKey(p.formIndex)); + if (p.fusionSpecies) { + keys.push("cry/"+p.fusionSpecies.getCryKey(p.fusionFormIndex)); } }); return keys; diff --git a/src/data/dialogue.ts b/src/data/dialogue.ts index a2ba06b657f..355f05523d1 100644 --- a/src/data/dialogue.ts +++ b/src/data/dialogue.ts @@ -1569,8 +1569,7 @@ export const trainerTypeDialogue: TrainerTypeDialogue = { "dialogue:roark.victory.1", "dialogue:roark.victory.2", "dialogue:roark.victory.3", - "dialogue:roark.victory.4", - "dialogue:roark.victory.5" + "dialogue:roark.victory.4" ], defeat: [ "dialogue:roark.defeat.1", diff --git a/src/data/weather.ts b/src/data/weather.ts index 2421f719e6e..afdd0a958cf 100644 --- a/src/data/weather.ts +++ b/src/data/weather.ts @@ -88,12 +88,14 @@ export class Weather { return 1; } - isMoveWeatherCancelled(move: Move): boolean { + isMoveWeatherCancelled(user: Pokemon, move: Move): boolean { + const moveType = user.getMoveType(move); + switch (this.weatherType) { case WeatherType.HARSH_SUN: - return move instanceof AttackMove && move.type === Type.WATER; + return move instanceof AttackMove && moveType === Type.WATER; case WeatherType.HEAVY_RAIN: - return move instanceof AttackMove && move.type === Type.FIRE; + return move instanceof AttackMove && moveType === Type.FIRE; } return false; diff --git a/src/field/arena.ts b/src/field/arena.ts index 5b167791769..9f0a9691dee 100644 --- a/src/field/arena.ts +++ b/src/field/arena.ts @@ -391,8 +391,8 @@ export class Arena { return true; } - isMoveWeatherCancelled(move: Move) { - return this.weather && !this.weather.isEffectSuppressed(this.scene) && this.weather.isMoveWeatherCancelled(move); + isMoveWeatherCancelled(user: Pokemon, move: Move) { + return this.weather && !this.weather.isEffectSuppressed(this.scene) && this.weather.isMoveWeatherCancelled(user, move); } isMoveTerrainCancelled(user: Pokemon, targets: BattlerIndex[], move: Move) { diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 4bc4aca448c..566eecbfeb6 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2790,7 +2790,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return this.fusionFaintCry(callback); } - const key = `cry/${this.getSpeciesForm().getCryKey(this.formIndex)}`; + const key = `cry/${this.species.getCryKey(this.formIndex)}`; //eslint-disable-next-line @typescript-eslint/no-unused-vars let i = 0; let rate = 0.85; @@ -2848,7 +2848,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } private fusionFaintCry(callback: Function): void { - const key = `cry/${this.getSpeciesForm().getCryKey(this.formIndex)}`; + const key = `cry/${this.species.getCryKey(this.formIndex)}`; let i = 0; let rate = 0.85; const cry = this.scene.playSound(key, { rate: rate }) as AnySound; @@ -2856,7 +2856,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const tintSprite = this.getTintSprite(); let duration = cry.totalDuration * 1000; - const fusionCryKey = `cry/${this.getFusionSpeciesForm().getCryKey(this.fusionFormIndex)}`; + const fusionCryKey = `cry/${this.fusionSpecies?.getCryKey(this.fusionFormIndex)}`; let fusionCry = this.scene.playSound(fusionCryKey, { rate: rate }) as AnySound; fusionCry.stop(); duration = Math.min(duration, fusionCry.totalDuration * 1000); @@ -3543,7 +3543,6 @@ export default interface Pokemon { export class PlayerPokemon extends Pokemon { public compatibleTms: Moves[]; - public usedTms: Moves[]; constructor(scene: BattleScene, species: PokemonSpecies, level: integer, abilityIndex?: integer, formIndex?: integer, gender?: Gender, shiny?: boolean, variant?: Variant, ivs?: integer[], nature?: Nature, dataSource?: Pokemon | PokemonData) { super(scene, 106, 148, species, level, abilityIndex, formIndex, gender, shiny, variant, ivs, nature, dataSource); @@ -3567,7 +3566,6 @@ export class PlayerPokemon extends Pokemon { } } this.generateCompatibleTms(); - this.usedTms = []; } initBattleInfo(): void { diff --git a/src/loading-scene.ts b/src/loading-scene.ts index 0fe756ec9a0..6de441fb162 100644 --- a/src/loading-scene.ts +++ b/src/loading-scene.ts @@ -7,15 +7,15 @@ import { WindowVariant, getWindowVariantSuffix } from "./ui/ui-theme"; import { isMobile } from "./touch-controls"; import * as Utils from "./utils"; import { initI18n } from "./plugins/i18n"; -import {initPokemonPrevolutions} from "#app/data/pokemon-evolutions"; -import {initBiomes} from "#app/data/biomes"; -import {initEggMoves} from "#app/data/egg-moves"; -import {initPokemonForms} from "#app/data/pokemon-forms"; -import {initSpecies} from "#app/data/pokemon-species"; -import {initMoves} from "#app/data/move"; -import {initAbilities} from "#app/data/ability"; -import {initAchievements} from "#app/system/achv"; -import {initTrainerTypeDialogue} from "#app/data/dialogue"; +import { initPokemonPrevolutions } from "#app/data/pokemon-evolutions"; +import { initBiomes } from "#app/data/biomes"; +import { initEggMoves } from "#app/data/egg-moves"; +import { initPokemonForms } from "#app/data/pokemon-forms"; +import { initSpecies } from "#app/data/pokemon-species"; +import { initMoves } from "#app/data/move"; +import { initAbilities } from "#app/data/ability"; +import { initAchievements } from "#app/system/achv"; +import { initTrainerTypeDialogue } from "#app/data/dialogue"; import { initChallenges } from "./data/challenge"; import i18next from "i18next"; import { initStatsKeys } from "./ui/game-stats-ui-handler"; @@ -250,9 +250,9 @@ export class LoadingScene extends SceneBase { } const availableLangs = ["en", "de", "it", "fr", "ja", "ko", "es", "pt-BR", "zh-CN"]; if (lang && availableLangs.includes(lang)) { - this.loadImage("september-update-"+lang, "events"); + this.loadImage("egg-update_"+lang, "events"); } else { - this.loadImage("september-update-en", "events"); + this.loadImage("egg-update_en", "events"); } this.loadAtlas("statuses", ""); diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index fdfe60332f5..48c0d66fc45 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -1545,6 +1545,7 @@ const modifierPool: ModifierPool = { new WeightedModifierType(modifierTypes.TEMP_STAT_STAGE_BOOSTER, 4), new WeightedModifierType(modifierTypes.BERRY, 2), new WeightedModifierType(modifierTypes.TM_COMMON, 2), + new WeightedModifierType(modifierTypes.VOUCHER, (party: Pokemon[], rerollCount: integer) => !party[0].scene.gameMode.isDaily ? Math.max(1 - rerollCount, 0) : 0, 1), ].map(m => { m.setTier(ModifierTier.COMMON); return m; }), @@ -1615,7 +1616,7 @@ const modifierPool: ModifierPool = { new WeightedModifierType(modifierTypes.BASE_STAT_BOOSTER, 3), new WeightedModifierType(modifierTypes.TERA_SHARD, 1), new WeightedModifierType(modifierTypes.DNA_SPLICERS, (party: Pokemon[]) => party[0].scene.gameMode.isSplicedOnly && party.filter(p => !p.fusionSpecies).length > 1 ? 4 : 0), - new WeightedModifierType(modifierTypes.VOUCHER, (party: Pokemon[], rerollCount: integer) => !party[0].scene.gameMode.isDaily ? Math.max(1 - rerollCount, 0) : 0, 1), + new WeightedModifierType(modifierTypes.VOUCHER, (party: Pokemon[], rerollCount: integer) => !party[0].scene.gameMode.isDaily ? Math.max(3 - rerollCount * 3, 0) : 0, 3), ].map(m => { m.setTier(ModifierTier.GREAT); return m; }), @@ -1696,7 +1697,7 @@ const modifierPool: ModifierPool = { new WeightedModifierType(modifierTypes.RARE_FORM_CHANGE_ITEM, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 50), 4) * 6, 24), new WeightedModifierType(modifierTypes.MEGA_BRACELET, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 50), 4) * 9, 36), new WeightedModifierType(modifierTypes.DYNAMAX_BAND, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 50), 4) * 9, 36), - new WeightedModifierType(modifierTypes.VOUCHER_PLUS, (party: Pokemon[], rerollCount: integer) => !party[0].scene.gameMode.isDaily ? Math.max(3 - rerollCount * 1, 0) : 0, 3), + new WeightedModifierType(modifierTypes.VOUCHER_PLUS, (party: Pokemon[], rerollCount: integer) => !party[0].scene.gameMode.isDaily ? Math.max(9 - rerollCount * 3, 0) : 0, 9), ].map(m => { m.setTier(ModifierTier.ROGUE); return m; }), @@ -1705,7 +1706,7 @@ const modifierPool: ModifierPool = { new WeightedModifierType(modifierTypes.SHINY_CHARM, 14), new WeightedModifierType(modifierTypes.HEALING_CHARM, 18), new WeightedModifierType(modifierTypes.MULTI_LENS, 18), - new WeightedModifierType(modifierTypes.VOUCHER_PREMIUM, (party: Pokemon[], rerollCount: integer) => !party[0].scene.gameMode.isDaily && !party[0].scene.gameMode.isEndless && !party[0].scene.gameMode.isSplicedOnly ? Math.max(5 - rerollCount * 2, 0) : 0, 5), + new WeightedModifierType(modifierTypes.VOUCHER_PREMIUM, (party: Pokemon[], rerollCount: integer) => !party[0].scene.gameMode.isDaily && !party[0].scene.gameMode.isEndless && !party[0].scene.gameMode.isSplicedOnly ? Math.max(15 - rerollCount * 5, 0) : 0, 15), new WeightedModifierType(modifierTypes.DNA_SPLICERS, (party: Pokemon[]) => !party[0].scene.gameMode.isSplicedOnly && party.filter(p => !p.fusionSpecies).length > 1 ? 24 : 0, 24), new WeightedModifierType(modifierTypes.MINI_BLACK_HOLE, (party: Pokemon[]) => (!party[0].scene.gameMode.isFreshStartChallenge() && party[0].scene.gameData.unlocks[Unlockables.MINI_BLACK_HOLE]) ? 1 : 0, 1), ].map(m => { diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 0b105a0c852..f5c80618396 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -367,6 +367,10 @@ export abstract class LapsingPersistentModifier extends PersistentModifier { return container; } + getIconStackText(_scene: BattleScene, _virtual?: boolean): Phaser.GameObjects.BitmapText | null { + return null; + } + getBattleCount(): number { return this.battleCount; } @@ -384,7 +388,8 @@ export abstract class LapsingPersistentModifier extends PersistentModifier { } getMaxStackCount(_scene: BattleScene, _forThreshold?: boolean): number { - return 1; + // Must be an abitrary number greater than 1 + return 2; } } @@ -787,7 +792,7 @@ export class TerastallizeModifier extends LapsingPokemonHeldItemModifier { /** * Modifier used for held items, specifically vitamins like Carbos, Hp Up, etc., that * increase the value of a given {@linkcode PermanentStat}. - * @extends LapsingPersistentModifier + * @extends PokemonHeldItemModifier * @see {@linkcode apply} */ export class BaseStatModifier extends PokemonHeldItemModifier { diff --git a/src/phases/egg-hatch-phase.ts b/src/phases/egg-hatch-phase.ts index 4b03aa62f02..90aceeb46bc 100644 --- a/src/phases/egg-hatch-phase.ts +++ b/src/phases/egg-hatch-phase.ts @@ -448,6 +448,7 @@ export class EggHatchPhase extends Phase { */ generatePokemon(): PlayerPokemon { this.eggHatchData = this.eggLapsePhase.generatePokemon(this.egg); + this.eggMoveIndex = this.eggHatchData.eggMoveIndex; return this.eggHatchData.pokemon; } } diff --git a/src/phases/egg-summary-phase.ts b/src/phases/egg-summary-phase.ts index 190af17c724..75c6939daf1 100644 --- a/src/phases/egg-summary-phase.ts +++ b/src/phases/egg-summary-phase.ts @@ -43,8 +43,9 @@ export class EggSummaryPhase extends Phase { } end() { - this.eggHatchHandler.clear(); - this.scene.ui.setModeForceTransition(Mode.MESSAGE).then(() => {}); - super.end(); + this.scene.time.delayedCall(250, () => this.scene.setModifiersVisible(true)); + this.scene.ui.setModeForceTransition(Mode.MESSAGE).then(() => { + super.end(); + }); } } diff --git a/src/phases/learn-move-phase.ts b/src/phases/learn-move-phase.ts index fad7eac9b68..5b4b16f3785 100644 --- a/src/phases/learn-move-phase.ts +++ b/src/phases/learn-move-phase.ts @@ -137,6 +137,9 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase { */ async learnMove(index: number, move: Move, pokemon: Pokemon, textMessage?: string) { if (this.fromTM) { + if (!pokemon.usedTMs) { + pokemon.usedTMs = []; + } pokemon.usedTMs.push(this.moveId); } pokemon.setMove(index, this.moveId); diff --git a/src/phases/move-phase.ts b/src/phases/move-phase.ts index 8209bdd44d1..6089e7d3202 100644 --- a/src/phases/move-phase.ts +++ b/src/phases/move-phase.ts @@ -204,7 +204,7 @@ export class MovePhase extends BattlePhase { let success = this.move.getMove().applyConditions(this.pokemon, targets[0], this.move.getMove()); const cancelled = new Utils.BooleanHolder(false); let failedText = this.move.getMove().getFailedText(this.pokemon, targets[0], this.move.getMove(), cancelled); - if (success && this.scene.arena.isMoveWeatherCancelled(this.move.getMove())) { + if (success && this.scene.arena.isMoveWeatherCancelled(this.pokemon, this.move.getMove())) { success = false; } else if (success && this.scene.arena.isMoveTerrainCancelled(this.pokemon, this.targets, this.move.getMove())) { success = false; diff --git a/src/phases/trainer-victory-phase.ts b/src/phases/trainer-victory-phase.ts index e925f0c47d4..55b2a1608c0 100644 --- a/src/phases/trainer-victory-phase.ts +++ b/src/phases/trainer-victory-phase.ts @@ -30,7 +30,7 @@ export class TrainerVictoryPhase extends BattlePhase { const trainerType = this.scene.currentBattle.trainer?.config.trainerType!; // TODO: is this bang correct? if (vouchers.hasOwnProperty(TrainerType[trainerType])) { if (!this.scene.validateVoucher(vouchers[TrainerType[trainerType]]) && this.scene.currentBattle.trainer?.config.isBoss) { - this.scene.unshiftPhase(new ModifierRewardPhase(this.scene, [modifierTypes.VOUCHER, modifierTypes.VOUCHER, modifierTypes.VOUCHER_PLUS, modifierTypes.VOUCHER_PREMIUM][vouchers[TrainerType[trainerType]].voucherType])); + this.scene.unshiftPhase(new ModifierRewardPhase(this.scene, [modifierTypes.VOUCHER_PLUS, modifierTypes.VOUCHER_PLUS, modifierTypes.VOUCHER_PLUS, modifierTypes.VOUCHER_PREMIUM][vouchers[TrainerType[trainerType]].voucherType])); } } diff --git a/src/system/achv.ts b/src/system/achv.ts index 89e5493eb2e..6170fe23e1d 100644 --- a/src/system/achv.ts +++ b/src/system/achv.ts @@ -7,7 +7,7 @@ import * as Utils from "../utils"; import { PlayerGender } from "#enums/player-gender"; import { Challenge, FreshStartChallenge, SingleGenerationChallenge, SingleTypeChallenge, InverseBattleChallenge } from "#app/data/challenge"; import { ConditionFn } from "#app/@types/common"; -import { Stat, getShortenedStatKey } from "#app/enums/stat"; +import { Stat, getShortenedStatKey } from "#app/enums/stat"; import { Challenges } from "#app/enums/challenges"; export enum AchvTier { @@ -197,7 +197,7 @@ export function getAchievementDescription(localizationKey: string): string { case "100_RIBBONS": return i18next.t("achv:RibbonAchv.description", {context: genderStr, "ribbonAmount": achvs._100_RIBBONS.ribbonAmount.toLocaleString("en-US")}); case "TRANSFER_MAX_STAT_STAGE": - return i18next.t("achv:TRANSFER_MAX_BATTLE_STAT.description", { context: genderStr }); + return i18next.t("achv:TRANSFER_MAX_STAT_STAGE.description", { context: genderStr }); case "MAX_FRIENDSHIP": return i18next.t("achv:MAX_FRIENDSHIP.description", { context: genderStr }); case "MEGA_EVOLVE": diff --git a/src/system/version-converter.ts b/src/system/version-converter.ts index 1a7c7b2026a..c297782ba66 100644 --- a/src/system/version-converter.ts +++ b/src/system/version-converter.ts @@ -31,7 +31,7 @@ export function applySessionDataPatches(data: SessionSaveData) { // From [ stat, battlesLeft ] to [ stat, maxBattles, battleCount ] m.args = [ newStat, 5, m.args[1] ]; - } else if (m.className === "DoubleBattleChanceBoosterModifier") { + } else if (m.className === "DoubleBattleChanceBoosterModifier" && m.args.length === 1) { let maxBattles: number; switch (m.typeId) { case "MAX_LURE": @@ -53,6 +53,8 @@ export function applySessionDataPatches(data: SessionSaveData) { data.enemyModifiers.forEach((m) => { if (m.className === "PokemonBaseStatModifier") { m.className = "BaseStatModifier"; + } else if (m.className === "PokemonResetNegativeStatStageModifier") { + m.className = "ResetNegativeStatStageModifier"; } }); } @@ -74,7 +76,7 @@ export function applySystemDataPatches(data: SystemSaveData) { if (data.starterData) { // Migrate ability starter data if empty for caught species Object.keys(data.starterData).forEach(sd => { - if (data.dexData[sd].caughtAttr && !data.starterData[sd].abilityAttr) { + if (data.dexData[sd]?.caughtAttr && (data.starterData[sd] && !data.starterData[sd].abilityAttr)) { data.starterData[sd].abilityAttr = 1; } }); @@ -102,9 +104,11 @@ export function applySystemDataPatches(data: SystemSaveData) { // --- PATCHES --- // Fix Starter Data - if (data.gameVersion) { - for (const starterId of defaultStarterSpecies) { + for (const starterId of defaultStarterSpecies) { + if (data.starterData[starterId]?.abilityAttr) { data.starterData[starterId].abilityAttr |= AbilityAttr.ABILITY_1; + } + if (data.dexData[starterId]?.caughtAttr) { data.dexData[starterId].caughtAttr |= DexAttr.FEMALE; } } diff --git a/src/timed-event-manager.ts b/src/timed-event-manager.ts index 874bf6a8b46..9bfa3bdf54a 100644 --- a/src/timed-event-manager.ts +++ b/src/timed-event-manager.ts @@ -25,14 +25,14 @@ interface TimedEvent extends EventBanner { const timedEvents: TimedEvent[] = [ { - name: "September Update", + name: "Egg Skip Update", eventType: EventType.GENERIC, - startDate: new Date(Date.UTC(2024, 7, 28, 0)), - endDate: new Date(Date.UTC(2024, 8, 15, 0)), - bannerKey: "september-update", + startDate: new Date(Date.UTC(2024, 8, 8, 0)), + endDate: new Date(Date.UTC(2024, 8, 12, 0)), + bannerKey: "egg-update", xPosition: 19, - yPosition: 115, - scale: 0.30, + yPosition: 120, + scale: 0.21, availableLangs: ["en", "de", "it", "fr", "ja", "ko", "es", "pt-BR", "zh-CN"] } ]; @@ -94,9 +94,9 @@ export class TimedEventDisplay extends Phaser.GameObjects.Container { let key = this.event.bannerKey; if (lang && this.event.availableLangs && this.event.availableLangs.length > 0) { if (this.event.availableLangs.includes(lang)) { - key += "-"+lang; + key += "_"+lang; } else { - key += "-en"; + key += "_en"; } } console.log(this.event.bannerKey); diff --git a/src/ui/egg-summary-ui-handler.ts b/src/ui/egg-summary-ui-handler.ts index 1d18e75f530..99fbccb4257 100644 --- a/src/ui/egg-summary-ui-handler.ts +++ b/src/ui/egg-summary-ui-handler.ts @@ -102,6 +102,7 @@ export default class EggSummaryUiHandler extends MessageUiHandler { this.pokemonBackgroundContainer.removeAll(true); this.eggHatchBg.setVisible(false); this.getUi().hideTooltip(); + // Note: Questions on garbage collection go to @frutescens const activeKeys = this.scene.getActiveKeys(); // Removing unnecessary sprites from animation manager @@ -122,7 +123,6 @@ export default class EggSummaryUiHandler extends MessageUiHandler { this.eggHatchData.length = 0; // Removes Pokemon icons in EggSummaryUiHandler this.iconAnimHandler.removeAll(); - console.log("Egg Summary Handler cleared"); } /** @@ -264,7 +264,6 @@ export default class EggSummaryUiHandler extends MessageUiHandler { if (phase instanceof EggSummaryPhase) { phase.end(); } - ui.revertMode(); success = true; } else { const count = this.eggHatchData.length; diff --git a/src/ui/form-modal-ui-handler.ts b/src/ui/form-modal-ui-handler.ts index 8c4ea5f6768..331154263ad 100644 --- a/src/ui/form-modal-ui-handler.ts +++ b/src/ui/form-modal-ui-handler.ts @@ -60,7 +60,7 @@ export abstract class FormModalUiHandler extends ModalUiHandler { const inputBg = addWindow(this.scene, 0, 0, 80, 16, false, false, 0, 0, WindowVariant.XTHIN); const isPassword = field.includes(i18next.t("menu:password")) || field.includes(i18next.t("menu:confirmPassword")); - const input = addTextInputObject(this.scene, 4, -2, 440, 116, TextStyle.TOOLTIP_CONTENT, { type: isPassword ? "password" : "text", maxLength: isPassword ? 64 : 18 }); + const input = addTextInputObject(this.scene, 4, -2, 440, 116, TextStyle.TOOLTIP_CONTENT, { type: isPassword ? "password" : "text", maxLength: isPassword ? 64 : 20 }); input.setOrigin(0, 0); inputContainer.add(inputBg);