mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-02 13:42:19 +02:00
Merge branch 'beta' into learn-move
This commit is contained in:
commit
2a9ba820c3
@ -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;
|
||||||
|
@ -4484,6 +4484,7 @@ export class PlayerPokemon extends Pokemon {
|
|||||||
newPokemon.moveset = this.moveset.slice();
|
newPokemon.moveset = this.moveset.slice();
|
||||||
newPokemon.moveset = this.copyMoveset();
|
newPokemon.moveset = this.copyMoveset();
|
||||||
newPokemon.luck = this.luck;
|
newPokemon.luck = this.luck;
|
||||||
|
newPokemon.gender = Gender.GENDERLESS;
|
||||||
newPokemon.metLevel = this.metLevel;
|
newPokemon.metLevel = this.metLevel;
|
||||||
newPokemon.metBiome = this.metBiome;
|
newPokemon.metBiome = this.metBiome;
|
||||||
newPokemon.metSpecies = this.metSpecies;
|
newPokemon.metSpecies = this.metSpecies;
|
||||||
|
@ -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());
|
||||||
|
@ -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",
|
||||||
@ -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"),
|
||||||
@ -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;
|
||||||
|
@ -78,12 +78,15 @@ describe("Evolution", () => {
|
|||||||
const nincada = game.scene.getPlayerPokemon()!;
|
const nincada = game.scene.getPlayerPokemon()!;
|
||||||
nincada.abilityIndex = 2;
|
nincada.abilityIndex = 2;
|
||||||
nincada.metBiome = -1;
|
nincada.metBiome = -1;
|
||||||
|
nincada.gender = 1;
|
||||||
|
|
||||||
nincada.evolve(pokemonEvolutions[Species.NINCADA][0], nincada.getSpeciesForm());
|
nincada.evolve(pokemonEvolutions[Species.NINCADA][0], nincada.getSpeciesForm());
|
||||||
const ninjask = game.scene.getPlayerParty()[0];
|
const ninjask = game.scene.getPlayerParty()[0];
|
||||||
const shedinja = game.scene.getPlayerParty()[1];
|
const shedinja = game.scene.getPlayerParty()[1];
|
||||||
expect(ninjask.abilityIndex).toBe(2);
|
expect(ninjask.abilityIndex).toBe(2);
|
||||||
expect(shedinja.abilityIndex).toBe(1);
|
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
|
// Regression test for https://github.com/pagefaultgames/pokerogue/issues/3842
|
||||||
expect(shedinja.metBiome).toBe(-1);
|
expect(shedinja.metBiome).toBe(-1);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user