Merge branch 'beta' into assistbug2

This commit is contained in:
NightKev 2024-12-30 22:20:12 -08:00 committed by GitHub
commit c5a944a5ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 32 additions and 14 deletions

@ -1 +1 @@
Subproject commit 6c6f0af398ae11f8d96c6ac064f171d927812c85 Subproject commit b28ba1255c8db12cb07947f88635cb6be0143a15

View File

@ -147,6 +147,7 @@ export default class BattleScene extends SceneBase {
public damageNumbersMode: integer = 0; public damageNumbersMode: integer = 0;
public reroll: boolean = false; public reroll: boolean = false;
public shopCursorTarget: number = ShopCursorTarget.REWARDS; public shopCursorTarget: number = ShopCursorTarget.REWARDS;
public commandCursorMemory: boolean = false;
public showMovesetFlyout: boolean = true; public showMovesetFlyout: boolean = true;
public showArenaFlyout: boolean = true; public showArenaFlyout: boolean = true;
public showTimeOfDayWidget: boolean = true; public showTimeOfDayWidget: boolean = true;
@ -173,7 +174,7 @@ export default class BattleScene extends SceneBase {
public uiTheme: UiTheme = UiTheme.DEFAULT; public uiTheme: UiTheme = UiTheme.DEFAULT;
public windowType: integer = 0; public windowType: integer = 0;
public experimentalSprites: boolean = false; public experimentalSprites: boolean = false;
public musicPreference: number = MusicPreference.MIXED; public musicPreference: number = MusicPreference.ALLGENS;
public moveAnimations: boolean = true; public moveAnimations: boolean = true;
public expGainsSpeed: ExpGainsSpeed = ExpGainsSpeed.DEFAULT; public expGainsSpeed: ExpGainsSpeed = ExpGainsSpeed.DEFAULT;
public skipSeenDialogues: boolean = false; public skipSeenDialogues: boolean = false;

View File

@ -223,7 +223,7 @@ export default class Battle {
if (!this.started && this.trainer?.config.encounterBgm && this.trainer?.getEncounterMessages()?.length) { if (!this.started && this.trainer?.config.encounterBgm && this.trainer?.getEncounterMessages()?.length) {
return `encounter_${this.trainer?.getEncounterBgm()}`; return `encounter_${this.trainer?.getEncounterBgm()}`;
} }
if (scene.musicPreference === MusicPreference.CONSISTENT) { if (scene.musicPreference === MusicPreference.GENFIVE) {
return this.trainer?.getBattleBgm() ?? null; return this.trainer?.getBattleBgm() ?? null;
} else { } else {
return this.trainer?.getMixedBattleBgm() ?? null; return this.trainer?.getMixedBattleBgm() ?? null;
@ -240,7 +240,7 @@ export default class Battle {
return "battle_final_encounter"; return "battle_final_encounter";
} }
if (pokemon.species.legendary || pokemon.species.subLegendary || pokemon.species.mythical) { if (pokemon.species.legendary || pokemon.species.subLegendary || pokemon.species.mythical) {
if (scene.musicPreference === MusicPreference.CONSISTENT) { if (scene.musicPreference === MusicPreference.GENFIVE) {
switch (pokemon.species.speciesId) { switch (pokemon.species.speciesId) {
case Species.REGIROCK: case Species.REGIROCK:
case Species.REGICE: case Species.REGICE:
@ -257,7 +257,7 @@ export default class Battle {
} }
return "battle_legendary_unova"; return "battle_legendary_unova";
} }
} else if (scene.musicPreference === MusicPreference.MIXED) { } else if (scene.musicPreference === MusicPreference.ALLGENS) {
switch (pokemon.species.speciesId) { switch (pokemon.species.speciesId) {
case Species.ARTICUNO: case Species.ARTICUNO:
case Species.ZAPDOS: case Species.ZAPDOS:

View File

@ -107,7 +107,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter =
// Load bgm // Load bgm
let bgmKey: string; let bgmKey: string;
if (scene.musicPreference === MusicPreference.CONSISTENT) { if (scene.musicPreference === MusicPreference.GENFIVE) {
bgmKey = "mystery_encounter_gen_5_gts"; bgmKey = "mystery_encounter_gen_5_gts";
scene.loadBgm(bgmKey, `${bgmKey}.mp3`); scene.loadBgm(bgmKey, `${bgmKey}.mp3`);
} else { } else {

View File

@ -35,8 +35,14 @@ export class CommandPhase extends FieldPhase {
this.scene.updateGameInfo(); this.scene.updateGameInfo();
const commandUiHandler = this.scene.ui.handlers[Mode.COMMAND]; 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 (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); commandUiHandler.setCursor(Command.FIGHT);
} else { } else {
commandUiHandler.setCursor(commandUiHandler.getCursor()); commandUiHandler.setCursor(commandUiHandler.getCursor());

View File

@ -157,6 +157,7 @@ export const SettingKeys = {
Move_Animations: "MOVE_ANIMATIONS", Move_Animations: "MOVE_ANIMATIONS",
Show_Stats_on_Level_Up: "SHOW_LEVEL_UP_STATS", Show_Stats_on_Level_Up: "SHOW_LEVEL_UP_STATS",
Shop_Cursor_Target: "SHOP_CURSOR_TARGET", Shop_Cursor_Target: "SHOP_CURSOR_TARGET",
Command_Cursor_Memory: "COMMAND_CURSOR_MEMORY",
Candy_Upgrade_Notification: "CANDY_UPGRADE_NOTIFICATION", Candy_Upgrade_Notification: "CANDY_UPGRADE_NOTIFICATION",
Candy_Upgrade_Display: "CANDY_UPGRADE_DISPLAY", Candy_Upgrade_Display: "CANDY_UPGRADE_DISPLAY",
Move_Info: "MOVE_INFO", Move_Info: "MOVE_INFO",
@ -180,8 +181,8 @@ export const SettingKeys = {
}; };
export enum MusicPreference { export enum MusicPreference {
CONSISTENT, GENFIVE,
MIXED ALLGENS
} }
/** /**
@ -339,6 +340,13 @@ export const Setting: Array<Setting> = [
default: 0, default: 0,
type: SettingType.GENERAL 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, key: SettingKeys.Enable_Retries,
label: i18next.t("settings:enableRetries"), label: i18next.t("settings:enableRetries"),
@ -662,15 +670,15 @@ export const Setting: Array<Setting> = [
label: i18next.t("settings:musicPreference"), label: i18next.t("settings:musicPreference"),
options: [ options: [
{ {
value: "Consistent", value: "Gen V + PMD",
label: i18next.t("settings:consistent") label: i18next.t("settings:musicGenFive")
}, },
{ {
value: "Mixed", value: "All Gens",
label: i18next.t("settings:mixed") label: i18next.t("settings:musicAllGens")
} }
], ],
default: MusicPreference.MIXED, default: MusicPreference.ALLGENS,
type: SettingType.AUDIO, type: SettingType.AUDIO,
requireReload: true requireReload: true
}, },
@ -827,6 +835,9 @@ export function setSetting(scene: BattleScene, setting: string, value: integer):
const selectedValue = shopCursorTargetIndexMap[value]; const selectedValue = shopCursorTargetIndexMap[value];
scene.shopCursorTarget = selectedValue; scene.shopCursorTarget = selectedValue;
break; break;
case SettingKeys.Command_Cursor_Memory:
scene.commandCursorMemory = Setting[index].options[value].value === "On";
break;
case SettingKeys.EXP_Gains_Speed: case SettingKeys.EXP_Gains_Speed:
scene.expGainsSpeed = value; scene.expGainsSpeed = value;
break; break;