Merge pull request #5076 from pagefaultgames/beta

Minor Release 1.4.3
This commit is contained in:
damocleas 2025-01-03 19:35:41 -05:00 committed by GitHub
commit bfe0d9bb79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 48 additions and 27 deletions

4
package-lock.json generated
View File

@ -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",

View File

@ -1,7 +1,7 @@
{
"name": "pokemon-rogue-battle",
"private": true,
"version": "1.4.2",
"version": "1.4.3",
"type": "module",
"scripts": {
"start": "vite",

@ -1 +1 @@
Subproject commit 6c6f0af398ae11f8d96c6ac064f171d927812c85
Subproject commit 2e03bc8f2736269bfa365faad587c3ec54a37621

View File

@ -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;

View File

@ -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:

View File

@ -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;

View File

@ -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(

View File

@ -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 {

View File

@ -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
];

View File

@ -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;

View File

@ -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());

View File

@ -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

View File

@ -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<Setting> = [
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<Setting> = [
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;

View File

@ -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);
});

View File

@ -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` }]);