diff --git a/package-lock.json b/package-lock.json index c3c08a9ec00..52cc628872a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pokemon-rogue-battle", - "version": "1.4.2", + "version": "1.4.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pokemon-rogue-battle", - "version": "1.4.2", + "version": "1.4.3", "hasInstallScript": true, "dependencies": { "@material/material-color-utilities": "^0.2.7", diff --git a/package.json b/package.json index d484927e5fc..e52c5928da7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "pokemon-rogue-battle", "private": true, - "version": "1.4.2", + "version": "1.4.3", "type": "module", "scripts": { "start": "vite", diff --git a/public/locales b/public/locales index 6c6f0af398a..2e03bc8f273 160000 --- a/public/locales +++ b/public/locales @@ -1 +1 @@ -Subproject commit 6c6f0af398ae11f8d96c6ac064f171d927812c85 +Subproject commit 2e03bc8f2736269bfa365faad587c3ec54a37621 diff --git a/src/battle-scene.ts b/src/battle-scene.ts index c430a12ae3e..327ab1cc926 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -147,6 +147,7 @@ export default class BattleScene extends SceneBase { public damageNumbersMode: integer = 0; public reroll: boolean = false; public shopCursorTarget: number = ShopCursorTarget.REWARDS; + public commandCursorMemory: boolean = false; public showMovesetFlyout: boolean = true; public showArenaFlyout: boolean = true; public showTimeOfDayWidget: boolean = true; @@ -173,7 +174,7 @@ export default class BattleScene extends SceneBase { public uiTheme: UiTheme = UiTheme.DEFAULT; public windowType: integer = 0; public experimentalSprites: boolean = false; - public musicPreference: number = MusicPreference.MIXED; + public musicPreference: number = MusicPreference.ALLGENS; public moveAnimations: boolean = true; public expGainsSpeed: ExpGainsSpeed = ExpGainsSpeed.DEFAULT; public skipSeenDialogues: boolean = false; diff --git a/src/battle.ts b/src/battle.ts index 75f0dff2534..38ee7b5eae0 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -222,7 +222,7 @@ export default class Battle { if (!this.started && this.trainer?.config.encounterBgm && this.trainer?.getEncounterMessages()?.length) { return `encounter_${this.trainer?.getEncounterBgm()}`; } - if (scene.musicPreference === MusicPreference.CONSISTENT) { + if (scene.musicPreference === MusicPreference.GENFIVE) { return this.trainer?.getBattleBgm() ?? null; } else { return this.trainer?.getMixedBattleBgm() ?? null; @@ -239,7 +239,7 @@ export default class Battle { return "battle_final_encounter"; } if (pokemon.species.legendary || pokemon.species.subLegendary || pokemon.species.mythical) { - if (scene.musicPreference === MusicPreference.CONSISTENT) { + if (scene.musicPreference === MusicPreference.GENFIVE) { switch (pokemon.species.speciesId) { case Species.REGIROCK: case Species.REGICE: @@ -256,7 +256,7 @@ export default class Battle { } return "battle_legendary_unova"; } - } else if (scene.musicPreference === MusicPreference.MIXED) { + } else if (scene.musicPreference === MusicPreference.ALLGENS) { switch (pokemon.species.speciesId) { case Species.ARTICUNO: case Species.ZAPDOS: diff --git a/src/data/balance/starters.ts b/src/data/balance/starters.ts index abbe3897908..ec66401675b 100644 --- a/src/data/balance/starters.ts +++ b/src/data/balance/starters.ts @@ -4,7 +4,7 @@ export const POKERUS_STARTER_COUNT = 5; // #region Friendship constants export const CLASSIC_CANDY_FRIENDSHIP_MULTIPLIER = 3; -export const FRIENDSHIP_GAIN_FROM_BATTLE = 4; +export const FRIENDSHIP_GAIN_FROM_BATTLE = 3; export const FRIENDSHIP_GAIN_FROM_RARE_CANDY = 6; export const FRIENDSHIP_LOSS_FROM_FAINT = 5; diff --git a/src/data/mystery-encounters/encounters/delibirdy-encounter.ts b/src/data/mystery-encounters/encounters/delibirdy-encounter.ts index 1df87a3d17f..99668c76143 100644 --- a/src/data/mystery-encounters/encounters/delibirdy-encounter.ts +++ b/src/data/mystery-encounters/encounters/delibirdy-encounter.ts @@ -34,7 +34,7 @@ const OPTION_3_DISALLOWED_MODIFIERS = [ "PokemonBaseStatTotalModifier" ]; -const DELIBIRDY_MONEY_PRICE_MULTIPLIER = 1.5; +const DELIBIRDY_MONEY_PRICE_MULTIPLIER = 2; const doEventReward = (scene: BattleScene) => { const event_buff = scene.eventManager.activeEvent()?.delibirdyBuff ?? []; @@ -60,8 +60,7 @@ const doEventReward = (scene: BattleScene) => { */ export const DelibirdyEncounter: MysteryEncounter = MysteryEncounterBuilder.withEncounterType(MysteryEncounterType.DELIBIRDY) - .withMaxAllowedEncounters(4) - .withEncounterTier(MysteryEncounterTier.COMMON) //Change back after event! + .withEncounterTier(MysteryEncounterTier.GREAT) .withSceneWaveRangeRequirement(...CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES) .withSceneRequirement(new MoneyRequirement(0, DELIBIRDY_MONEY_PRICE_MULTIPLIER)) // Must have enough money for it to spawn at the very least .withPrimaryPokemonRequirement( diff --git a/src/data/mystery-encounters/encounters/global-trade-system-encounter.ts b/src/data/mystery-encounters/encounters/global-trade-system-encounter.ts index fa445d75d4f..b7376c2bfd2 100644 --- a/src/data/mystery-encounters/encounters/global-trade-system-encounter.ts +++ b/src/data/mystery-encounters/encounters/global-trade-system-encounter.ts @@ -107,7 +107,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = // Load bgm let bgmKey: string; - if (scene.musicPreference === MusicPreference.CONSISTENT) { + if (scene.musicPreference === MusicPreference.GENFIVE) { bgmKey = "mystery_encounter_gen_5_gts"; scene.loadBgm(bgmKey, `${bgmKey}.mp3`); } else { diff --git a/src/data/mystery-encounters/mystery-encounters.ts b/src/data/mystery-encounters/mystery-encounters.ts index 8a747cd4cd4..44feabeeaea 100644 --- a/src/data/mystery-encounters/mystery-encounters.ts +++ b/src/data/mystery-encounters/mystery-encounters.ts @@ -177,7 +177,7 @@ export const allMysteryEncounters: { [encounterType: number]: MysteryEncounter } const extremeBiomeEncounters: MysteryEncounterType[] = []; const nonExtremeBiomeEncounters: MysteryEncounterType[] = [ - // MysteryEncounterType.FIELD_TRIP, Disabled for holiday event + // MysteryEncounterType.FIELD_TRIP, Disabled MysteryEncounterType.DANCING_LESSONS, // Is also in BADLANDS, DESERT, VOLCANO, WASTELAND, ABYSS ]; @@ -185,14 +185,14 @@ const humanTransitableBiomeEncounters: MysteryEncounterType[] = [ MysteryEncounterType.MYSTERIOUS_CHALLENGERS, MysteryEncounterType.SHADY_VITAMIN_DEALER, MysteryEncounterType.THE_POKEMON_SALESMAN, - // MysteryEncounterType.AN_OFFER_YOU_CANT_REFUSE, Disabled for holiday event + // MysteryEncounterType.AN_OFFER_YOU_CANT_REFUSE, Disabled MysteryEncounterType.THE_WINSTRATE_CHALLENGE, MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER ]; const civilizationBiomeEncounters: MysteryEncounterType[] = [ - // MysteryEncounterType.DEPARTMENT_STORE_SALE, Disabled for holiday event - // MysteryEncounterType.PART_TIMER, Disabled for holiday event + MysteryEncounterType.DEPARTMENT_STORE_SALE, + MysteryEncounterType.PART_TIMER, MysteryEncounterType.FUN_AND_GAMES, MysteryEncounterType.GLOBAL_TRADE_SYSTEM ]; diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index fcfc2ff7536..30856ab416a 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -4484,6 +4484,7 @@ export class PlayerPokemon extends Pokemon { newPokemon.moveset = this.moveset.slice(); newPokemon.moveset = this.copyMoveset(); newPokemon.luck = this.luck; + newPokemon.gender = Gender.GENDERLESS; newPokemon.metLevel = this.metLevel; newPokemon.metBiome = this.metBiome; newPokemon.metSpecies = this.metSpecies; diff --git a/src/phases/command-phase.ts b/src/phases/command-phase.ts index eab76282908..fa85f2427e5 100644 --- a/src/phases/command-phase.ts +++ b/src/phases/command-phase.ts @@ -35,8 +35,14 @@ export class CommandPhase extends FieldPhase { this.scene.updateGameInfo(); const commandUiHandler = this.scene.ui.handlers[Mode.COMMAND]; + + // If one of these conditions is true, we always reset the cursor to Command.FIGHT + const cursorResetEvent = this.scene.currentBattle.battleType === BattleType.MYSTERY_ENCOUNTER || + this.scene.currentBattle.battleType === BattleType.TRAINER || + this.scene.arena.biomeType === Biome.END; + if (commandUiHandler) { - if (this.scene.currentBattle.turn === 1 || commandUiHandler.getCursor() === Command.POKEMON) { + if ((this.scene.currentBattle.turn === 1 && (!this.scene.commandCursorMemory || cursorResetEvent)) || commandUiHandler.getCursor() === Command.POKEMON) { commandUiHandler.setCursor(Command.FIGHT); } else { commandUiHandler.setCursor(commandUiHandler.getCursor()); diff --git a/src/phases/trainer-victory-phase.ts b/src/phases/trainer-victory-phase.ts index 456d548a9ba..d797e4360ac 100644 --- a/src/phases/trainer-victory-phase.ts +++ b/src/phases/trainer-victory-phase.ts @@ -39,7 +39,7 @@ export class TrainerVictoryPhase extends BattlePhase { // Validate Voucher for boss trainers 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_PLUS, modifierTypes.VOUCHER_PLUS, modifierTypes.VOUCHER_PLUS, modifierTypes.VOUCHER_PREMIUM ][vouchers[TrainerType[trainerType]].voucherType])); + this.scene.unshiftPhase(new ModifierRewardPhase(this.scene, [ modifierTypes.VOUCHER, modifierTypes.VOUCHER, modifierTypes.VOUCHER_PLUS, modifierTypes.VOUCHER_PREMIUM ][vouchers[TrainerType[trainerType]].voucherType])); } } // Breeders in Space achievement diff --git a/src/system/settings/settings.ts b/src/system/settings/settings.ts index 64ddfdae5cf..0a11648c171 100644 --- a/src/system/settings/settings.ts +++ b/src/system/settings/settings.ts @@ -157,6 +157,7 @@ export const SettingKeys = { Move_Animations: "MOVE_ANIMATIONS", Show_Stats_on_Level_Up: "SHOW_LEVEL_UP_STATS", Shop_Cursor_Target: "SHOP_CURSOR_TARGET", + Command_Cursor_Memory: "COMMAND_CURSOR_MEMORY", Candy_Upgrade_Notification: "CANDY_UPGRADE_NOTIFICATION", Candy_Upgrade_Display: "CANDY_UPGRADE_DISPLAY", Move_Info: "MOVE_INFO", @@ -180,8 +181,8 @@ export const SettingKeys = { }; export enum MusicPreference { - CONSISTENT, - MIXED + GENFIVE, + ALLGENS } /** @@ -339,6 +340,13 @@ export const Setting: Array = [ default: 0, type: SettingType.GENERAL }, + { + key: SettingKeys.Command_Cursor_Memory, + label: i18next.t("settings:commandCursorMemory"), + options: OFF_ON, + default: 0, + type: SettingType.GENERAL + }, { key: SettingKeys.Enable_Retries, label: i18next.t("settings:enableRetries"), @@ -662,15 +670,15 @@ export const Setting: Array = [ label: i18next.t("settings:musicPreference"), options: [ { - value: "Consistent", - label: i18next.t("settings:consistent") + value: "Gen V + PMD", + label: i18next.t("settings:musicGenFive") }, { - value: "Mixed", - label: i18next.t("settings:mixed") + value: "All Gens", + label: i18next.t("settings:musicAllGens") } ], - default: MusicPreference.MIXED, + default: MusicPreference.ALLGENS, type: SettingType.AUDIO, requireReload: true }, @@ -827,6 +835,9 @@ export function setSetting(scene: BattleScene, setting: string, value: integer): const selectedValue = shopCursorTargetIndexMap[value]; scene.shopCursorTarget = selectedValue; break; + case SettingKeys.Command_Cursor_Memory: + scene.commandCursorMemory = Setting[index].options[value].value === "On"; + break; case SettingKeys.EXP_Gains_Speed: scene.expGainsSpeed = value; break; diff --git a/src/test/evolution.test.ts b/src/test/evolution.test.ts index 3046d103cbc..10748899d59 100644 --- a/src/test/evolution.test.ts +++ b/src/test/evolution.test.ts @@ -78,12 +78,15 @@ describe("Evolution", () => { const nincada = game.scene.getPlayerPokemon()!; nincada.abilityIndex = 2; nincada.metBiome = -1; + nincada.gender = 1; nincada.evolve(pokemonEvolutions[Species.NINCADA][0], nincada.getSpeciesForm()); const ninjask = game.scene.getPlayerParty()[0]; const shedinja = game.scene.getPlayerParty()[1]; expect(ninjask.abilityIndex).toBe(2); expect(shedinja.abilityIndex).toBe(1); + expect(ninjask.gender).toBe(1); + expect(shedinja.gender).toBe(-1); // Regression test for https://github.com/pagefaultgames/pokerogue/issues/3842 expect(shedinja.metBiome).toBe(-1); }); diff --git a/src/test/mystery-encounter/encounters/delibirdy-encounter.test.ts b/src/test/mystery-encounter/encounters/delibirdy-encounter.test.ts index 71fb695111a..c226d60a9b4 100644 --- a/src/test/mystery-encounter/encounters/delibirdy-encounter.test.ts +++ b/src/test/mystery-encounter/encounters/delibirdy-encounter.test.ts @@ -56,7 +56,7 @@ describe("Delibird-y - Mystery Encounter", () => { await game.runToMysteryEncounter(MysteryEncounterType.DELIBIRDY, defaultParty); expect(DelibirdyEncounter.encounterType).toBe(MysteryEncounterType.DELIBIRDY); - expect(DelibirdyEncounter.encounterTier).toBe(MysteryEncounterTier.COMMON); + expect(DelibirdyEncounter.encounterTier).toBe(MysteryEncounterTier.GREAT); expect(DelibirdyEncounter.dialogue).toBeDefined(); expect(DelibirdyEncounter.dialogue.intro).toStrictEqual([{ text: `${namespace}:intro` }]); expect(DelibirdyEncounter.dialogue.outro).toStrictEqual([{ text: `${namespace}:outro` }]);