mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-15 13:31:40 +00:00
commit
bfe0d9bb79
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "pokemon-rogue-battle",
|
"name": "pokemon-rogue-battle",
|
||||||
"version": "1.4.2",
|
"version": "1.4.3",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "pokemon-rogue-battle",
|
"name": "pokemon-rogue-battle",
|
||||||
"version": "1.4.2",
|
"version": "1.4.3",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@material/material-color-utilities": "^0.2.7",
|
"@material/material-color-utilities": "^0.2.7",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "pokemon-rogue-battle",
|
"name": "pokemon-rogue-battle",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.4.2",
|
"version": "1.4.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite",
|
"start": "vite",
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 6c6f0af398ae11f8d96c6ac064f171d927812c85
|
Subproject commit 2e03bc8f2736269bfa365faad587c3ec54a37621
|
@ -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;
|
||||||
|
@ -222,7 +222,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;
|
||||||
@ -239,7 +239,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:
|
||||||
@ -256,7 +256,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:
|
||||||
|
@ -4,7 +4,7 @@ export const POKERUS_STARTER_COUNT = 5;
|
|||||||
|
|
||||||
// #region Friendship constants
|
// #region Friendship constants
|
||||||
export const CLASSIC_CANDY_FRIENDSHIP_MULTIPLIER = 3;
|
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_GAIN_FROM_RARE_CANDY = 6;
|
||||||
export const FRIENDSHIP_LOSS_FROM_FAINT = 5;
|
export const FRIENDSHIP_LOSS_FROM_FAINT = 5;
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ const OPTION_3_DISALLOWED_MODIFIERS = [
|
|||||||
"PokemonBaseStatTotalModifier"
|
"PokemonBaseStatTotalModifier"
|
||||||
];
|
];
|
||||||
|
|
||||||
const DELIBIRDY_MONEY_PRICE_MULTIPLIER = 1.5;
|
const DELIBIRDY_MONEY_PRICE_MULTIPLIER = 2;
|
||||||
|
|
||||||
const doEventReward = (scene: BattleScene) => {
|
const doEventReward = (scene: BattleScene) => {
|
||||||
const event_buff = scene.eventManager.activeEvent()?.delibirdyBuff ?? [];
|
const event_buff = scene.eventManager.activeEvent()?.delibirdyBuff ?? [];
|
||||||
@ -60,8 +60,7 @@ const doEventReward = (scene: BattleScene) => {
|
|||||||
*/
|
*/
|
||||||
export const DelibirdyEncounter: MysteryEncounter =
|
export const DelibirdyEncounter: MysteryEncounter =
|
||||||
MysteryEncounterBuilder.withEncounterType(MysteryEncounterType.DELIBIRDY)
|
MysteryEncounterBuilder.withEncounterType(MysteryEncounterType.DELIBIRDY)
|
||||||
.withMaxAllowedEncounters(4)
|
.withEncounterTier(MysteryEncounterTier.GREAT)
|
||||||
.withEncounterTier(MysteryEncounterTier.COMMON) //Change back after event!
|
|
||||||
.withSceneWaveRangeRequirement(...CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES)
|
.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
|
.withSceneRequirement(new MoneyRequirement(0, DELIBIRDY_MONEY_PRICE_MULTIPLIER)) // Must have enough money for it to spawn at the very least
|
||||||
.withPrimaryPokemonRequirement(
|
.withPrimaryPokemonRequirement(
|
||||||
|
@ -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 {
|
||||||
|
@ -177,7 +177,7 @@ export const allMysteryEncounters: { [encounterType: number]: MysteryEncounter }
|
|||||||
const extremeBiomeEncounters: MysteryEncounterType[] = [];
|
const extremeBiomeEncounters: MysteryEncounterType[] = [];
|
||||||
|
|
||||||
const nonExtremeBiomeEncounters: 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
|
MysteryEncounterType.DANCING_LESSONS, // Is also in BADLANDS, DESERT, VOLCANO, WASTELAND, ABYSS
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -185,14 +185,14 @@ const humanTransitableBiomeEncounters: MysteryEncounterType[] = [
|
|||||||
MysteryEncounterType.MYSTERIOUS_CHALLENGERS,
|
MysteryEncounterType.MYSTERIOUS_CHALLENGERS,
|
||||||
MysteryEncounterType.SHADY_VITAMIN_DEALER,
|
MysteryEncounterType.SHADY_VITAMIN_DEALER,
|
||||||
MysteryEncounterType.THE_POKEMON_SALESMAN,
|
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_WINSTRATE_CHALLENGE,
|
||||||
MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER
|
MysteryEncounterType.THE_EXPERT_POKEMON_BREEDER
|
||||||
];
|
];
|
||||||
|
|
||||||
const civilizationBiomeEncounters: MysteryEncounterType[] = [
|
const civilizationBiomeEncounters: MysteryEncounterType[] = [
|
||||||
// MysteryEncounterType.DEPARTMENT_STORE_SALE, Disabled for holiday event
|
MysteryEncounterType.DEPARTMENT_STORE_SALE,
|
||||||
// MysteryEncounterType.PART_TIMER, Disabled for holiday event
|
MysteryEncounterType.PART_TIMER,
|
||||||
MysteryEncounterType.FUN_AND_GAMES,
|
MysteryEncounterType.FUN_AND_GAMES,
|
||||||
MysteryEncounterType.GLOBAL_TRADE_SYSTEM
|
MysteryEncounterType.GLOBAL_TRADE_SYSTEM
|
||||||
];
|
];
|
||||||
|
@ -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());
|
||||||
|
@ -39,7 +39,7 @@ export class TrainerVictoryPhase extends BattlePhase {
|
|||||||
// Validate Voucher for boss trainers
|
// Validate Voucher for boss trainers
|
||||||
if (vouchers.hasOwnProperty(TrainerType[trainerType])) {
|
if (vouchers.hasOwnProperty(TrainerType[trainerType])) {
|
||||||
if (!this.scene.validateVoucher(vouchers[TrainerType[trainerType]]) && this.scene.currentBattle.trainer?.config.isBoss) {
|
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
|
// Breeders in Space achievement
|
||||||
|
@ -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;
|
||||||
|
@ -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);
|
||||||
});
|
});
|
||||||
|
@ -56,7 +56,7 @@ describe("Delibird-y - Mystery Encounter", () => {
|
|||||||
await game.runToMysteryEncounter(MysteryEncounterType.DELIBIRDY, defaultParty);
|
await game.runToMysteryEncounter(MysteryEncounterType.DELIBIRDY, defaultParty);
|
||||||
|
|
||||||
expect(DelibirdyEncounter.encounterType).toBe(MysteryEncounterType.DELIBIRDY);
|
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).toBeDefined();
|
||||||
expect(DelibirdyEncounter.dialogue.intro).toStrictEqual([{ text: `${namespace}:intro` }]);
|
expect(DelibirdyEncounter.dialogue.intro).toStrictEqual([{ text: `${namespace}:intro` }]);
|
||||||
expect(DelibirdyEncounter.dialogue.outro).toStrictEqual([{ text: `${namespace}:outro` }]);
|
expect(DelibirdyEncounter.dialogue.outro).toStrictEqual([{ text: `${namespace}:outro` }]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user