Skip to content

Commit

Permalink
Merge pull request pagefaultgames#5076 from pagefaultgames/beta
Browse files Browse the repository at this point in the history
Minor Release 1.4.3
  • Loading branch information
damocleas authored Jan 4, 2025
2 parents 14902cd + 355e703 commit bfe0d9b
Show file tree
Hide file tree
Showing 15 changed files with 48 additions and 27 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pokemon-rogue-battle",
"private": true,
"version": "1.4.2",
"version": "1.4.3",
"type": "module",
"scripts": {
"start": "vite",
Expand Down
2 changes: 1 addition & 1 deletion public/locales
Submodule locales updated 82 files
+2 −1 de/arena-flyout.json
+3 −1 de/settings.json
+37 −37 en/ability-trigger.json
+108 −108 en/ability.json
+8 −8 en/achv.json
+3 −2 en/arena-flyout.json
+19 −19 en/arena-tag.json
+40 −40 en/battle.json
+14 −14 en/battler-tags.json
+15 −15 en/bgm-name.json
+2 −2 en/biome.json
+1 −1 en/challenges.json
+9 −9 en/dialogue-double-battle.json
+2 −2 en/dialogue-misc.json
+632 −632 en/dialogue.json
+29 −29 en/modifier-type.json
+4 −4 en/modifier.json
+15 −15 en/move-trigger.json
+302 −302 en/move.json
+15 −15 en/mystery-encounters/a-trainers-test-dialogue.json
+5 −5 en/mystery-encounters/absolute-avarice-dialogue.json
+8 −8 en/mystery-encounters/an-offer-you-cant-refuse-dialogue.json
+2 −2 en/mystery-encounters/berries-abound-dialogue.json
+8 −8 en/mystery-encounters/bug-type-superfan-dialogue.json
+9 −9 en/mystery-encounters/clowning-around-dialogue.json
+4 −4 en/mystery-encounters/dancing-lessons-dialogue.json
+4 −4 en/mystery-encounters/dark-deal-dialogue.json
+2 −2 en/mystery-encounters/delibirdy-dialogue.json
+2 −2 en/mystery-encounters/department-store-sale-dialogue.json
+4 −4 en/mystery-encounters/field-trip-dialogue.json
+4 −4 en/mystery-encounters/fiery-fallout-dialogue.json
+3 −3 en/mystery-encounters/fight-or-flight-dialogue.json
+4 −4 en/mystery-encounters/fun-and-games-dialogue.json
+3 −3 en/mystery-encounters/global-trade-system-dialogue.json
+5 −5 en/mystery-encounters/lost-at-sea-dialogue.json
+4 −4 en/mystery-encounters/part-timer-dialogue.json
+3 −3 en/mystery-encounters/safari-zone-dialogue.json
+3 −3 en/mystery-encounters/shady-vitamin-dealer-dialogue.json
+2 −2 en/mystery-encounters/slumbering-snorlax-dialogue.json
+3 −3 en/mystery-encounters/teleporting-hijinks-dialogue.json
+5 −5 en/mystery-encounters/the-expert-pokemon-breeder-dialogue.json
+5 −5 en/mystery-encounters/the-pokemon-salesman-dialogue.json
+3 −3 en/mystery-encounters/the-strong-stuff-dialogue.json
+7 −7 en/mystery-encounters/the-winstrate-challenge-dialogue.json
+5 −5 en/mystery-encounters/training-session-dialogue.json
+4 −4 en/mystery-encounters/trash-to-treasure-dialogue.json
+3 −3 en/mystery-encounters/uncommon-breed-dialogue.json
+3 −3 en/mystery-encounters/weird-dream-dialogue.json
+6 −6 en/party-ui-handler.json
+4 −4 en/pokemon.json
+3 −1 en/settings.json
+13 −13 en/splash-texts.json
+3 −3 en/tutorial.json
+2 −1 es-ES/arena-flyout.json
+2 −2 es-ES/command-ui-handler.json
+0 −1 es-ES/settings.json
+2 −1 fr/arena-flyout.json
+1 −1 fr/common.json
+1 −1 fr/dialogue-final-boss.json
+1 −1 fr/menu.json
+2 −2 fr/modifier-select-ui-handler.json
+1 −1 fr/mystery-encounters/clowning-around-dialogue.json
+3 −1 fr/settings.json
+54 −1 he/pokemon.json
+2 −1 it/arena-flyout.json
+82 −1 it/bgm-name.json
+5 −3 it/settings.json
+18 −0 it/status-effect.json
+1 −1 ja/achv.json
+2 −1 ja/arena-flyout.json
+1 −1 ja/modifier-type.json
+1 −1 ja/mystery-encounters/bug-type-superfan-dialogue.json
+0 −1 ja/settings.json
+2 −1 ko/arena-flyout.json
+0 −1 ko/settings.json
+2 −1 pt-BR/arena-flyout.json
+0 −1 pt-BR/settings.json
+0 −1 th/settings.json
+2 −1 zh-CN/arena-flyout.json
+0 −1 zh-CN/settings.json
+3 −1 zh-TW/arena-flyout.json
+0 −1 zh-TW/settings.json
3 changes: 2 additions & 1 deletion src/battle-scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/battle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/data/balance/starters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
5 changes: 2 additions & 3 deletions src/data/mystery-encounters/encounters/delibirdy-encounter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? [];
Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions src/data/mystery-encounters/mystery-encounters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,22 +177,22 @@ 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
];

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
];
Expand Down
1 change: 1 addition & 0 deletions src/field/pokemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 7 additions & 1 deletion src/phases/command-phase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion src/phases/trainer-victory-phase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 18 additions & 7 deletions src/system/settings/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -180,8 +181,8 @@ export const SettingKeys = {
};

export enum MusicPreference {
CONSISTENT,
MIXED
GENFIVE,
ALLGENS
}

/**
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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
},
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/test/evolution.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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` }]);
Expand Down

0 comments on commit bfe0d9b

Please sign in to comment.