Merge branch 'beta' into global-scene

This commit is contained in:
NightKev 2025-01-09 20:46:20 -08:00
commit a4d5d87c96
38 changed files with 225 additions and 97 deletions

View File

@ -372,63 +372,67 @@ In addition to the lists below, please check [the PokéRogue wiki](https://wiki.
- Lily - Lily
- PigeonBar - PigeonBar
## Past Contributors ## Other Code Contributors
- Fontbane - Admiral-Billy
- sodaMelon - allen925
- schmidtc1 - arColm
- shayebeadling - Arxalc
- AsdarDevelops
- bennybroseph
- Brain Frog
- Corrade
- Dakurei
- DustinLin - DustinLin
- lucfd - ElizaAlex
- madibye
- EmberCM - EmberCM
- Mewtwo2387 - EmoUsedHM01
- EvasiveAce
- Fontbane
- francktrouillez
- FredeX
- geeilhan
- Greenlamp
- happinyz
- hayuna - hayuna
- sirzento - InfernoVulpix
- ReneGV
- mattrossdev
- zacharied
- NxKarim
- td76099
- Xiaphear
- j-diefenbach - j-diefenbach
- jaimefd - jaimefd
- EvasiveAce
- EmoUsedHM01
- francktrouillez
- JakubHanko - JakubHanko
- FredeX
- PigeonBar
- prime-dialga
- rnicar245
- rationality6
- Neverblade
- Corrade
- Admiral-Billy
- okimin
- Arxalc
- PrabbyDD
- JonStudders - JonStudders
- karl-police - karl-police
- prateau - lucfd
- meepen - Lugiadrien
- arColm - madibye
- allen925 - mattrossdev
- InfernoVulpix
- snoozbuster
- zaccie
- happinyz
- PyGaVS
- mcmontag - mcmontag
- ElizaAlex - meepen
- AsdarDevelops - Mewtwo2387
- Vassiat - muscode
- RedstonewolfX - Neverblade
- Sam/Flashfyre (initial developer, started PokéRogue) - NxKarim
- Greenlamp - okimin
- bennybroseph
- OrangeRed - OrangeRed
- Dakurei - PigeonBar
- Brain Frog - PrabbyDD
- prateau
- prime-dialga
- PyGaVS
- rationality6
- RedstonewolfX
- ReneGV
- rnicar245
- Sam aka Flashfyre (initial developer, started PokéRogue)
- schmidtc1
- shayebeadling
- sirzento
- snoozbuster
- sodaMelon
- td76099
- Vassiat
- Xiaphear
- zaccie
- zacharied
- Zé Ricardo
# 🌎 Translation # 🌎 Translation

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "pokemon-rogue-battle", "name": "pokemon-rogue-battle",
"version": "1.3.0", "version": "1.4.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "pokemon-rogue-battle", "name": "pokemon-rogue-battle",
"version": "1.3.0", "version": "1.4.3",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"@material/material-color-utilities": "^0.2.7", "@material/material-color-utilities": "^0.2.7",

View File

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -4,6 +4,7 @@
"3f4447": "466698", "3f4447": "466698",
"de3431": "3fca9f", "de3431": "3fca9f",
"f8f8f8": "a1e9f0", "f8f8f8": "a1e9f0",
"f4f4f4": "d7eff4",
"7b282e": "0e3e81", "7b282e": "0e3e81",
"6b1d1d": "206d74", "6b1d1d": "206d74",
"4ebdd9": "41a7b0", "4ebdd9": "41a7b0",
@ -11,7 +12,7 @@
"bfbfbf": "8cc7d4", "bfbfbf": "8cc7d4",
"ffb2bf": "b7e9ff", "ffb2bf": "b7e9ff",
"bf4c60": "4386df", "bf4c60": "4386df",
"fff0a6": "271f4c", "fff0a6": "208698",
"3e7acc": "6b4592", "3e7acc": "6b4592",
"18335c": "170738", "18335c": "170738",
"f2798d": "8dcfff", "f2798d": "8dcfff",
@ -25,6 +26,7 @@
"3f4447": "466698", "3f4447": "466698",
"de3431": "9ceec6", "de3431": "9ceec6",
"f8f8f8": "89d2b8", "f8f8f8": "89d2b8",
"f4f4f4": "d7eff4",
"7b282e": "152a5c", "7b282e": "152a5c",
"6b1d1d": "356e8d", "6b1d1d": "356e8d",
"4ebdd9": "2f6e74", "4ebdd9": "2f6e74",

View File

@ -4,6 +4,7 @@
"3f4447": "466698", "3f4447": "466698",
"de3431": "3fca9f", "de3431": "3fca9f",
"f8f8f8": "a1e9f0", "f8f8f8": "a1e9f0",
"f4f4f4": "d7effa",
"7b282e": "0e3e81", "7b282e": "0e3e81",
"6b1d1d": "206d74", "6b1d1d": "206d74",
"4ebdd9": "41a7b0", "4ebdd9": "41a7b0",
@ -25,6 +26,7 @@
"3f4447": "466698", "3f4447": "466698",
"de3431": "9ceec6", "de3431": "9ceec6",
"f8f8f8": "89d2b8", "f8f8f8": "89d2b8",
"f4f4f4": "d7effa",
"7b282e": "152a5c", "7b282e": "152a5c",
"6b1d1d": "356e8d", "6b1d1d": "356e8d",
"4ebdd9": "2f6e74", "4ebdd9": "2f6e74",

View File

@ -148,6 +148,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;
@ -174,7 +175,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;
@ -1424,6 +1425,8 @@ export default class BattleScene extends SceneBase {
return 0; return 0;
} }
const isEggPhase: boolean = [ "EggLapsePhase", "EggHatchPhase" ].includes(this.getCurrentPhase()?.constructor.name ?? "");
switch (species.speciesId) { switch (species.speciesId) {
case Species.UNOWN: case Species.UNOWN:
case Species.SHELLOS: case Species.SHELLOS:
@ -1455,7 +1458,7 @@ export default class BattleScene extends SceneBase {
} }
return Utils.randSeedInt(8); return Utils.randSeedInt(8);
case Species.EEVEE: case Species.EEVEE:
if (this.currentBattle?.battleType === BattleType.TRAINER && this.currentBattle?.waveIndex < 30) { if (this.currentBattle?.battleType === BattleType.TRAINER && this.currentBattle?.waveIndex < 30 && !isEggPhase) {
return 0; // No Partner Eevee for Wave 12 Preschoolers return 0; // No Partner Eevee for Wave 12 Preschoolers
} }
return Utils.randSeedInt(2); return Utils.randSeedInt(2);
@ -1483,7 +1486,7 @@ export default class BattleScene extends SceneBase {
return 0; return 0;
case Species.GIMMIGHOUL: case Species.GIMMIGHOUL:
// Chest form can only be found in Mysterious Chest Encounter, if this is a game mode with MEs // Chest form can only be found in Mysterious Chest Encounter, if this is a game mode with MEs
if (this.gameMode.hasMysteryEncounters) { if (this.gameMode.hasMysteryEncounters && !isEggPhase) {
return 1; // Wandering form return 1; // Wandering form
} else { } else {
return Utils.randSeedInt(species.forms.length); return Utils.randSeedInt(species.forms.length);

View File

@ -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 (globalScene.musicPreference === MusicPreference.CONSISTENT) { if (globalScene.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 (globalScene.musicPreference === MusicPreference.CONSISTENT) { if (globalScene.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 (globalScene.musicPreference === MusicPreference.MIXED) { } else if (globalScene.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

@ -67148,6 +67148,7 @@ export const tmSpecies: TmSpecies = {
Species.VELUZA, Species.VELUZA,
Species.DONDOZO, Species.DONDOZO,
Species.TATSUGIRI, Species.TATSUGIRI,
Species.ANNIHILAPE,
Species.CLODSIRE, Species.CLODSIRE,
Species.FARIGIRAF, Species.FARIGIRAF,
Species.DUDUNSPARCE, Species.DUDUNSPARCE,

View File

@ -17,7 +17,7 @@ import {
modifierTypes, modifierTypes,
regenerateModifierPoolThresholds, regenerateModifierPoolThresholds,
} from "#app/modifier/modifier-type"; } from "#app/modifier/modifier-type";
import { randSeedInt } from "#app/utils"; import { randSeedInt, randSeedItem } from "#app/utils";
import { BattlerTagType } from "#enums/battler-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type";
import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
@ -35,6 +35,7 @@ import { BerryType } from "#enums/berry-type";
import { PERMANENT_STATS, Stat } from "#enums/stat"; import { PERMANENT_STATS, Stat } from "#enums/stat";
import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase";
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode"; import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
import PokemonSpecies, { getPokemonSpecies } from "#app/data/pokemon-species";
/** the i18n namespace for the encounter */ /** the i18n namespace for the encounter */
const namespace = "mysteryEncounters/berriesAbound"; const namespace = "mysteryEncounters/berriesAbound";
@ -62,7 +63,14 @@ export const BerriesAboundEncounter: MysteryEncounter =
// Calculate boss mon // Calculate boss mon
const level = getEncounterPokemonLevelForWave(STANDARD_ENCOUNTER_BOOSTED_LEVEL_MODIFIER); const level = getEncounterPokemonLevelForWave(STANDARD_ENCOUNTER_BOOSTED_LEVEL_MODIFIER);
const bossSpecies = globalScene.arena.randomSpecies(globalScene.currentBattle.waveIndex, level, 0, getPartyLuckValue(globalScene.getPlayerParty()), true); let bossSpecies: PokemonSpecies;
if (globalScene.eventManager.isEventActive() && globalScene.eventManager.activeEvent()?.uncommonBreedEncounters && randSeedInt(2) === 1) {
const eventEncounter = randSeedItem(globalScene.eventManager.activeEvent()!.uncommonBreedEncounters!);
const levelSpecies = getPokemonSpecies(eventEncounter.species).getWildSpeciesForLevel(level, eventEncounter.allowEvolution ?? false, true, globalScene.gameMode);
bossSpecies = getPokemonSpecies( levelSpecies );
} else {
bossSpecies = globalScene.arena.randomSpecies(globalScene.currentBattle.waveIndex, level, 0, getPartyLuckValue(globalScene.getPlayerParty()), true);
}
const bossPokemon = new EnemyPokemon(bossSpecies, level, TrainerSlot.NONE, true); const bossPokemon = new EnemyPokemon(bossSpecies, level, TrainerSlot.NONE, true);
encounter.setDialogueToken("enemyPokemon", getPokemonNameWithAffix(bossPokemon)); encounter.setDialogueToken("enemyPokemon", getPokemonNameWithAffix(bossPokemon));
const config: EnemyPartyConfig = { const config: EnemyPartyConfig = {

View File

@ -13,6 +13,7 @@ import { modifierTypes, PokemonHeldItemModifierType } from "#app/modifier/modifi
import { ModifierRewardPhase } from "#app/phases/modifier-reward-phase"; import { ModifierRewardPhase } from "#app/phases/modifier-reward-phase";
import i18next from "#app/plugins/i18n"; import i18next from "#app/plugins/i18n";
import { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; import { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler";
import { randSeedItem } from "#app/utils";
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type";
@ -35,6 +36,23 @@ const OPTION_3_DISALLOWED_MODIFIERS = [
const DELIBIRDY_MONEY_PRICE_MULTIPLIER = 2; const DELIBIRDY_MONEY_PRICE_MULTIPLIER = 2;
const doEventReward = (scene: BattleScene) => {
const event_buff = scene.eventManager.activeEvent()?.delibirdyBuff ?? [];
if (event_buff.length > 0) {
const candidates = event_buff.filter((c => {
const mtype = generateModifierType(scene, modifierTypes[c]);
const existingCharm = scene.findModifier(m => m.type.id === mtype?.id);
return !(existingCharm && existingCharm.getStackCount() >= existingCharm.getMaxStackCount(scene));
}));
if (candidates.length > 0) {
scene.unshiftPhase(new ModifierRewardPhase(scene, modifierTypes[randSeedItem(candidates)]));
} else {
// At max stacks, give a Voucher instead
scene.unshiftPhase(new ModifierRewardPhase(scene, modifierTypes.VOUCHER));
}
}
};
/** /**
* Delibird-y encounter. * Delibird-y encounter.
* @see {@link https://github.com/pagefaultgames/pokerogue/issues/3804 | GitHub Issue #3804} * @see {@link https://github.com/pagefaultgames/pokerogue/issues/3804 | GitHub Issue #3804}
@ -136,8 +154,10 @@ export const DelibirdyEncounter: MysteryEncounter =
await applyModifierTypeToPlayerPokemon(globalScene.getPlayerPokemon()!, shellBell); await applyModifierTypeToPlayerPokemon(globalScene.getPlayerPokemon()!, shellBell);
globalScene.playSound("item_fanfare"); globalScene.playSound("item_fanfare");
await showEncounterText(i18next.t("battle:rewardGain", { modifierName: shellBell.name }), null, undefined, true); await showEncounterText(i18next.t("battle:rewardGain", { modifierName: shellBell.name }), null, undefined, true);
doEventReward(scene);
} else { } else {
globalScene.unshiftPhase(new ModifierRewardPhase(modifierTypes.AMULET_COIN)); globalScene.unshiftPhase(new ModifierRewardPhase(modifierTypes.AMULET_COIN));
doEventReward(scene);
} }
leaveEncounterWithoutBattle(true); leaveEncounterWithoutBattle(true);
@ -211,8 +231,10 @@ export const DelibirdyEncounter: MysteryEncounter =
await applyModifierTypeToPlayerPokemon(globalScene.getPlayerPokemon()!, shellBell); await applyModifierTypeToPlayerPokemon(globalScene.getPlayerPokemon()!, shellBell);
globalScene.playSound("item_fanfare"); globalScene.playSound("item_fanfare");
await showEncounterText(i18next.t("battle:rewardGain", { modifierName: shellBell.name }), null, undefined, true); await showEncounterText(i18next.t("battle:rewardGain", { modifierName: shellBell.name }), null, undefined, true);
doEventReward(scene);
} else { } else {
globalScene.unshiftPhase(new ModifierRewardPhase(modifierTypes.CANDY_JAR)); globalScene.unshiftPhase(new ModifierRewardPhase(modifierTypes.CANDY_JAR));
doEventReward(scene);
} }
} else { } else {
// Check if the player has max stacks of that Berry Pouch already // Check if the player has max stacks of that Berry Pouch already
@ -224,8 +246,10 @@ export const DelibirdyEncounter: MysteryEncounter =
await applyModifierTypeToPlayerPokemon(globalScene.getPlayerPokemon()!, shellBell); await applyModifierTypeToPlayerPokemon(globalScene.getPlayerPokemon()!, shellBell);
globalScene.playSound("item_fanfare"); globalScene.playSound("item_fanfare");
await showEncounterText(i18next.t("battle:rewardGain", { modifierName: shellBell.name }), null, undefined, true); await showEncounterText(i18next.t("battle:rewardGain", { modifierName: shellBell.name }), null, undefined, true);
doEventReward(scene);
} else { } else {
globalScene.unshiftPhase(new ModifierRewardPhase(modifierTypes.BERRY_POUCH)); globalScene.unshiftPhase(new ModifierRewardPhase(modifierTypes.BERRY_POUCH));
doEventReward(scene);
} }
} }
@ -300,8 +324,10 @@ export const DelibirdyEncounter: MysteryEncounter =
await applyModifierTypeToPlayerPokemon(globalScene.getPlayerParty()[0], shellBell); await applyModifierTypeToPlayerPokemon(globalScene.getPlayerParty()[0], shellBell);
globalScene.playSound("item_fanfare"); globalScene.playSound("item_fanfare");
await showEncounterText(i18next.t("battle:rewardGain", { modifierName: shellBell.name }), null, undefined, true); await showEncounterText(i18next.t("battle:rewardGain", { modifierName: shellBell.name }), null, undefined, true);
doEventReward(scene);
} else { } else {
globalScene.unshiftPhase(new ModifierRewardPhase(modifierTypes.HEALING_CHARM)); globalScene.unshiftPhase(new ModifierRewardPhase(modifierTypes.HEALING_CHARM));
doEventReward(scene);
} }
chosenPokemon.loseHeldItem(modifier, false); chosenPokemon.loseHeldItem(modifier, false);

View File

@ -27,9 +27,10 @@ import { getEncounterPokemonLevelForWave, getSpriteKeysFromPokemon, STANDARD_ENC
import PokemonData from "#app/system/pokemon-data"; import PokemonData from "#app/system/pokemon-data";
import { BattlerTagType } from "#enums/battler-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type";
import { queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; import { queueEncounterMessage } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils";
import { randSeedInt } from "#app/utils"; import { randSeedInt, randSeedItem } from "#app/utils";
import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase";
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode"; import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
import PokemonSpecies, { getPokemonSpecies } from "#app/data/pokemon-species";
/** the i18n namespace for the encounter */ /** the i18n namespace for the encounter */
const namespace = "mysteryEncounters/fightOrFlight"; const namespace = "mysteryEncounters/fightOrFlight";
@ -57,7 +58,14 @@ export const FightOrFlightEncounter: MysteryEncounter =
// Calculate boss mon // Calculate boss mon
const level = getEncounterPokemonLevelForWave(STANDARD_ENCOUNTER_BOOSTED_LEVEL_MODIFIER); const level = getEncounterPokemonLevelForWave(STANDARD_ENCOUNTER_BOOSTED_LEVEL_MODIFIER);
const bossSpecies = globalScene.arena.randomSpecies(globalScene.currentBattle.waveIndex, level, 0, getPartyLuckValue(globalScene.getPlayerParty()), true); let bossSpecies: PokemonSpecies;
if (globalScene.eventManager.isEventActive() && globalScene.eventManager.activeEvent()?.uncommonBreedEncounters && randSeedInt(2) === 1) {
const eventEncounter = randSeedItem(globalScene.eventManager.activeEvent()!.uncommonBreedEncounters!);
const levelSpecies = getPokemonSpecies(eventEncounter.species).getWildSpeciesForLevel(level, eventEncounter.allowEvolution ?? false, true, globalScene.gameMode);
bossSpecies = getPokemonSpecies( levelSpecies );
} else {
bossSpecies = globalScene.arena.randomSpecies(globalScene.currentBattle.waveIndex, level, 0, getPartyLuckValue(globalScene.getPlayerParty()), true);
}
const bossPokemon = new EnemyPokemon(bossSpecies, level, TrainerSlot.NONE, true); const bossPokemon = new EnemyPokemon(bossSpecies, level, TrainerSlot.NONE, true);
encounter.setDialogueToken("enemyPokemon", bossPokemon.getNameToRender()); encounter.setDialogueToken("enemyPokemon", bossPokemon.getNameToRender());
const config: EnemyPartyConfig = { const config: EnemyPartyConfig = {

View File

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

View File

@ -12,7 +12,7 @@ import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode
import { TrainerSlot } from "#app/data/trainer-config"; import { TrainerSlot } from "#app/data/trainer-config";
import { catchPokemon, getHighestLevelPlayerPokemon, getSpriteKeysFromPokemon } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; import { catchPokemon, getHighestLevelPlayerPokemon, getSpriteKeysFromPokemon } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils";
import PokemonData from "#app/system/pokemon-data"; import PokemonData from "#app/system/pokemon-data";
import { isNullOrUndefined, randSeedInt } from "#app/utils"; import { isNullOrUndefined, randSeedInt, randSeedItem } from "#app/utils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import { BattlerIndex } from "#app/battle"; import { BattlerIndex } from "#app/battle";
import { SelfStatusMove } from "#app/data/move"; import { SelfStatusMove } from "#app/data/move";
@ -23,6 +23,7 @@ import { BerryModifier } from "#app/modifier/modifier";
import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase";
import { Stat } from "#enums/stat"; import { Stat } from "#enums/stat";
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode"; import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
import PokemonSpecies, { getPokemonSpecies } from "#app/data/pokemon-species";
/** the i18n namespace for the encounter */ /** the i18n namespace for the encounter */
const namespace = "mysteryEncounters/uncommonBreed"; const namespace = "mysteryEncounters/uncommonBreed";
@ -51,7 +52,14 @@ export const UncommonBreedEncounter: MysteryEncounter =
// Calculate boss mon // Calculate boss mon
// Level equal to 2 below highest party member // Level equal to 2 below highest party member
const level = getHighestLevelPlayerPokemon(false, true).level - 2; const level = getHighestLevelPlayerPokemon(false, true).level - 2;
const species = globalScene.arena.randomSpecies(globalScene.currentBattle.waveIndex, level, 0, getPartyLuckValue(globalScene.getPlayerParty()), true); let species: PokemonSpecies;
if (globalScene.eventManager.isEventActive() && globalScene.eventManager.activeEvent()?.uncommonBreedEncounters && randSeedInt(2) === 1) {
const eventEncounter = randSeedItem(globalScene.eventManager.activeEvent()!.uncommonBreedEncounters!);
const levelSpecies = getPokemonSpecies(eventEncounter.species).getWildSpeciesForLevel(level, eventEncounter.allowEvolution ?? false, true, globalScene.gameMode);
species = getPokemonSpecies( levelSpecies );
} else {
species = globalScene.arena.randomSpecies(globalScene.currentBattle.waveIndex, level, 0, getPartyLuckValue(globalScene.getPlayerParty()), true);
}
const pokemon = new EnemyPokemon(species, level, TrainerSlot.NONE, true); const pokemon = new EnemyPokemon(species, level, TrainerSlot.NONE, true);
// Pokemon will always have one of its egg moves in its moveset // Pokemon will always have one of its egg moves in its moveset

View File

@ -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, // 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,7 +185,7 @@ 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, // 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
]; ];

View File

@ -771,8 +771,8 @@ export const pokemonFormChanges: PokemonFormChanges = {
new SpeciesFormChange(Species.KYUREM, "", "white", new SpeciesFormChangeItemTrigger(FormChangeItem.LIGHT_STONE), false, getSpeciesDependentFormChangeCondition(Species.RESHIRAM)) new SpeciesFormChange(Species.KYUREM, "", "white", new SpeciesFormChangeItemTrigger(FormChangeItem.LIGHT_STONE), false, getSpeciesDependentFormChangeCondition(Species.RESHIRAM))
], ],
[Species.KELDEO]: [ [Species.KELDEO]: [
new SpeciesFormChange(Species.KELDEO, "ordinary", "resolute", new SpeciesFormChangeMoveLearnedTrigger(Moves.SECRET_SWORD)), new SpeciesFormChange(Species.KELDEO, "ordinary", "resolute", new SpeciesFormChangeMoveLearnedTrigger(Moves.SECRET_SWORD), false, new SpeciesFormChangeCondition((p) => p.scene.gameMode.isDaily !== true)),
new SpeciesFormChange(Species.KELDEO, "resolute", "ordinary", new SpeciesFormChangeMoveLearnedTrigger(Moves.SECRET_SWORD, false)) new SpeciesFormChange(Species.KELDEO, "resolute", "ordinary", new SpeciesFormChangeMoveLearnedTrigger(Moves.SECRET_SWORD, false), false, new SpeciesFormChangeCondition((p) => p.scene.gameMode.isDaily !== true))
], ],
[Species.MELOETTA]: [ [Species.MELOETTA]: [
new SpeciesFormChange(Species.MELOETTA, "aria", "pirouette", new MeloettaFormChangePostMoveTrigger(Moves.RELIC_SONG), true), new SpeciesFormChange(Species.MELOETTA, "aria", "pirouette", new MeloettaFormChangePostMoveTrigger(Moves.RELIC_SONG), true),

View File

@ -1170,6 +1170,9 @@ function getGymLeaderPartyTemplate() {
export function getRandomPartyMemberFunc(speciesPool: Species[], trainerSlot: TrainerSlot = TrainerSlot.TRAINER, ignoreEvolution: boolean = false, postProcess?: (enemyPokemon: EnemyPokemon) => void) { export function getRandomPartyMemberFunc(speciesPool: Species[], trainerSlot: TrainerSlot = TrainerSlot.TRAINER, ignoreEvolution: boolean = false, postProcess?: (enemyPokemon: EnemyPokemon) => void) {
return (level: number, strength: PartyMemberStrength) => { return (level: number, strength: PartyMemberStrength) => {
let species = Utils.randSeedItem(speciesPool); let species = Utils.randSeedItem(speciesPool);
if (scene.gameMode.isClassic && scene.currentBattle.waveIndex === 20) {
ignoreEvolution = true;
}
if (!ignoreEvolution) { if (!ignoreEvolution) {
species = getPokemonSpecies(species).getTrainerSpeciesForLevel(level, true, strength, globalScene.currentBattle.waveIndex); species = getPokemonSpecies(species).getTrainerSpeciesForLevel(level, true, strength, globalScene.currentBattle.waveIndex);
} }
@ -1229,7 +1232,7 @@ export const signatureSpecies: SignatureSpecies = {
GIOVANNI: [ Species.SANDILE, Species.MURKROW, Species.NIDORAN_M, Species.NIDORAN_F ], GIOVANNI: [ Species.SANDILE, Species.MURKROW, Species.NIDORAN_M, Species.NIDORAN_F ],
FALKNER: [ Species.PIDGEY, Species.HOOTHOOT, Species.DODUO ], FALKNER: [ Species.PIDGEY, Species.HOOTHOOT, Species.DODUO ],
BUGSY: [ Species.SCYTHER, Species.HERACROSS, Species.SHUCKLE, Species.PINSIR ], BUGSY: [ Species.SCYTHER, Species.HERACROSS, Species.SHUCKLE, Species.PINSIR ],
WHITNEY: [ Species.GIRAFARIG, Species.MILTANK ], WHITNEY: [ Species.JIGGLYPUFF, Species.MILTANK, Species.AIPOM, Species.GIRAFARIG ],
MORTY: [ Species.GASTLY, Species.MISDREAVUS, Species.SABLEYE ], MORTY: [ Species.GASTLY, Species.MISDREAVUS, Species.SABLEYE ],
CHUCK: [ Species.POLIWRATH, Species.MANKEY ], CHUCK: [ Species.POLIWRATH, Species.MANKEY ],
JASMINE: [ Species.MAGNEMITE, Species.STEELIX ], JASMINE: [ Species.MAGNEMITE, Species.STEELIX ],
@ -1239,7 +1242,7 @@ export const signatureSpecies: SignatureSpecies = {
BRAWLY: [ Species.MACHOP, Species.MAKUHITA ], BRAWLY: [ Species.MACHOP, Species.MAKUHITA ],
WATTSON: [ Species.MAGNEMITE, Species.VOLTORB, Species.ELECTRIKE ], WATTSON: [ Species.MAGNEMITE, Species.VOLTORB, Species.ELECTRIKE ],
FLANNERY: [ Species.SLUGMA, Species.TORKOAL, Species.NUMEL ], FLANNERY: [ Species.SLUGMA, Species.TORKOAL, Species.NUMEL ],
NORMAN: [ Species.SLAKOTH, Species.SPINDA, Species.CHANSEY, Species.KANGASKHAN ], NORMAN: [ Species.SLAKOTH, Species.SPINDA, Species.ZIGZAGOON, Species.KECLEON ],
WINONA: [ Species.SWABLU, Species.WINGULL, Species.TROPIUS, Species.SKARMORY ], WINONA: [ Species.SWABLU, Species.WINGULL, Species.TROPIUS, Species.SKARMORY ],
TATE: [ Species.SOLROCK, Species.NATU, Species.CHIMECHO, Species.GALLADE ], TATE: [ Species.SOLROCK, Species.NATU, Species.CHIMECHO, Species.GALLADE ],
LIZA: [ Species.LUNATONE, Species.SPOINK, Species.BALTOY, Species.GARDEVOIR ], LIZA: [ Species.LUNATONE, Species.SPOINK, Species.BALTOY, Species.GARDEVOIR ],
@ -1247,16 +1250,16 @@ export const signatureSpecies: SignatureSpecies = {
ROARK: [ Species.CRANIDOS, Species.LARVITAR, Species.GEODUDE ], ROARK: [ Species.CRANIDOS, Species.LARVITAR, Species.GEODUDE ],
GARDENIA: [ Species.ROSELIA, Species.TANGELA, Species.TURTWIG ], GARDENIA: [ Species.ROSELIA, Species.TANGELA, Species.TURTWIG ],
MAYLENE: [ Species.LUCARIO, Species.MEDITITE, Species.CHIMCHAR ], MAYLENE: [ Species.LUCARIO, Species.MEDITITE, Species.CHIMCHAR ],
CRASHER_WAKE: [ Species.BUIZEL, Species.MAGIKARP, Species.PIPLUP ], CRASHER_WAKE: [ Species.BUIZEL, Species.WOOPER, Species.PIPLUP, Species.MAGIKARP ],
FANTINA: [ Species.MISDREAVUS, Species.DRIFLOON, Species.SPIRITOMB ], FANTINA: [ Species.MISDREAVUS, Species.DRIFLOON, Species.SPIRITOMB ],
BYRON: [ Species.SHIELDON, Species.BRONZOR, Species.AGGRON ], BYRON: [ Species.SHIELDON, Species.BRONZOR, Species.AGGRON ],
CANDICE: [ Species.SNEASEL, Species.SNOVER, Species.SNORUNT ], CANDICE: [ Species.SNEASEL, Species.SNOVER, Species.SNORUNT ],
VOLKNER: [ Species.SHINX, Species.CHINCHOU, Species.ROTOM ], VOLKNER: [ Species.SHINX, Species.CHINCHOU, Species.ROTOM ],
CILAN: [ Species.PANSAGE, Species.COTTONEE, Species.PETILIL ], CILAN: [ Species.PANSAGE, Species.FOONGUS, Species.PETILIL ],
CHILI: [ Species.PANSEAR, Species.DARUMAKA, Species.HEATMOR ], CHILI: [ Species.PANSEAR, Species.DARUMAKA, Species.NUMEL ],
CRESS: [ Species.PANPOUR, Species.BASCULIN, Species.TYMPOLE ], CRESS: [ Species.PANPOUR, Species.TYMPOLE, Species.SLOWPOKE ],
CHEREN: [ Species.LILLIPUP, Species.MINCCINO, Species.PATRAT ], CHEREN: [ Species.LILLIPUP, Species.MINCCINO, Species.PIDOVE ],
LENORA: [ Species.KANGASKHAN, Species.DEERLING, Species.AUDINO ], LENORA: [ Species.PATRAT, Species.DEERLING, Species.AUDINO ],
ROXIE: [ Species.VENIPEDE, Species.TRUBBISH, Species.SKORUPI ], ROXIE: [ Species.VENIPEDE, Species.TRUBBISH, Species.SKORUPI ],
BURGH: [ Species.SEWADDLE, Species.SHELMET, Species.KARRABLAST ], BURGH: [ Species.SEWADDLE, Species.SHELMET, Species.KARRABLAST ],
ELESA: [ Species.EMOLGA, Species.BLITZLE, Species.JOLTIK ], ELESA: [ Species.EMOLGA, Species.BLITZLE, Species.JOLTIK ],
@ -1289,7 +1292,7 @@ export const signatureSpecies: SignatureSpecies = {
BRASSIUS: [ Species.SMOLIV, Species.SHROOMISH, Species.ODDISH ], BRASSIUS: [ Species.SMOLIV, Species.SHROOMISH, Species.ODDISH ],
IONO: [ Species.TADBULB, Species.WATTREL, Species.VOLTORB ], IONO: [ Species.TADBULB, Species.WATTREL, Species.VOLTORB ],
KOFU: [ Species.VELUZA, Species.WIGLETT, Species.WINGULL ], KOFU: [ Species.VELUZA, Species.WIGLETT, Species.WINGULL ],
LARRY: [ Species.STARLY, Species.DUNSPARCE, Species.KOMALA ], LARRY: [ Species.STARLY, Species.DUNSPARCE, Species.LECHONK, Species.KOMALA ],
RYME: [ Species.GREAVARD, Species.SHUPPET, Species.MIMIKYU ], RYME: [ Species.GREAVARD, Species.SHUPPET, Species.MIMIKYU ],
TULIP: [ Species.GIRAFARIG, Species.FLITTLE, Species.RALTS ], TULIP: [ Species.GIRAFARIG, Species.FLITTLE, Species.RALTS ],
GRUSHA: [ Species.CETODDLE, Species.ALOLA_VULPIX, Species.CUBCHOO ], GRUSHA: [ Species.CETODDLE, Species.ALOLA_VULPIX, Species.CUBCHOO ],
@ -1852,7 +1855,7 @@ export const trainerConfigs: TrainerConfigs = {
[TrainerType.RIVAL]: new TrainerConfig((t = TrainerType.RIVAL)).setName("Finn").setHasGenders("Ivy").setHasCharSprite().setTitle("Rival").setStaticParty().setEncounterBgm(TrainerType.RIVAL).setBattleBgm("battle_rival").setMixedBattleBgm("battle_rival").setPartyTemplates(trainerPartyTemplates.RIVAL) [TrainerType.RIVAL]: new TrainerConfig((t = TrainerType.RIVAL)).setName("Finn").setHasGenders("Ivy").setHasCharSprite().setTitle("Rival").setStaticParty().setEncounterBgm(TrainerType.RIVAL).setBattleBgm("battle_rival").setMixedBattleBgm("battle_rival").setPartyTemplates(trainerPartyTemplates.RIVAL)
.setModifierRewardFuncs(() => modifierTypes.SUPER_EXP_CHARM, () => modifierTypes.EXP_SHARE) .setModifierRewardFuncs(() => modifierTypes.SUPER_EXP_CHARM, () => modifierTypes.EXP_SHARE)
.setEventModifierRewardFuncs(() => modifierTypes.SHINY_CHARM, () => modifierTypes.ABILITY_CHARM) .setEventModifierRewardFuncs(() => modifierTypes.SHINY_CHARM, () => modifierTypes.ABILITY_CHARM, () => modifierTypes.CATCHING_CHARM)
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE, Species.CHIKORITA, Species.CYNDAQUIL, Species.TOTODILE, Species.TREECKO, Species.TORCHIC, Species.MUDKIP, Species.TURTWIG, Species.CHIMCHAR, Species.PIPLUP, Species.SNIVY, Species.TEPIG, Species.OSHAWOTT, Species.CHESPIN, Species.FENNEKIN, Species.FROAKIE, Species.ROWLET, Species.LITTEN, Species.POPPLIO, Species.GROOKEY, Species.SCORBUNNY, Species.SOBBLE, Species.SPRIGATITO, Species.FUECOCO, Species.QUAXLY ], TrainerSlot.TRAINER, true, .setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE, Species.CHIKORITA, Species.CYNDAQUIL, Species.TOTODILE, Species.TREECKO, Species.TORCHIC, Species.MUDKIP, Species.TURTWIG, Species.CHIMCHAR, Species.PIPLUP, Species.SNIVY, Species.TEPIG, Species.OSHAWOTT, Species.CHESPIN, Species.FENNEKIN, Species.FROAKIE, Species.ROWLET, Species.LITTEN, Species.POPPLIO, Species.GROOKEY, Species.SCORBUNNY, Species.SOBBLE, Species.SPRIGATITO, Species.FUECOCO, Species.QUAXLY ], TrainerSlot.TRAINER, true,
(p => p.abilityIndex = 0))) (p => p.abilityIndex = 0)))
.setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.PIDGEY, Species.HOOTHOOT, Species.TAILLOW, Species.STARLY, Species.PIDOVE, Species.FLETCHLING, Species.PIKIPEK, Species.ROOKIDEE, Species.WATTREL ], TrainerSlot.TRAINER, true)), .setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.PIDGEY, Species.HOOTHOOT, Species.TAILLOW, Species.STARLY, Species.PIDOVE, Species.FLETCHLING, Species.PIKIPEK, Species.ROOKIDEE, Species.WATTREL ], TrainerSlot.TRAINER, true)),

View File

@ -242,7 +242,7 @@ export function getTerrainBlockMessage(pokemon: Pokemon, terrainType: TerrainTyp
return i18next.t("terrain:defaultBlockMessage", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), terrainName: getTerrainName(terrainType) }); return i18next.t("terrain:defaultBlockMessage", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), terrainName: getTerrainName(terrainType) });
} }
interface WeatherPoolEntry { export interface WeatherPoolEntry {
weatherType: WeatherType; weatherType: WeatherType;
weight: integer; weight: integer;
} }
@ -373,6 +373,10 @@ export function getRandomWeatherType(arena: any /* Importing from arena causes a
break; break;
} }
if (arena.biomeType === Biome.TOWN && arena.scene.eventManager.isEventActive() && arena.scene.eventManager.activeEvent()?.weather?.length > 0) {
arena.scene.eventManager.activeEvent().weather.map(w => weatherPool.push(w));
}
if (weatherPool.length > 1) { if (weatherPool.length > 1) {
let totalWeight = 0; let totalWeight = 0;
weatherPool.forEach(w => totalWeight += w.weight); weatherPool.forEach(w => totalWeight += w.weight);

View File

@ -4480,6 +4480,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;

View File

@ -246,9 +246,9 @@ export class LoadingScene extends SceneBase {
} }
const availableLangs = [ "en", "de", "it", "fr", "ja", "ko", "es-ES", "pt-BR", "zh-CN" ]; const availableLangs = [ "en", "de", "it", "fr", "ja", "ko", "es-ES", "pt-BR", "zh-CN" ];
if (lang && availableLangs.includes(lang)) { if (lang && availableLangs.includes(lang)) {
this.loadImage("halloween2024-event-" + lang, "events"); this.loadImage("winter_holidays2024-event-" + lang, "events");
} else { } else {
this.loadImage("halloween2024-event-en", "events"); this.loadImage("winter_holidays2024-event-en", "events");
} }
this.loadAtlas("statuses", ""); this.loadAtlas("statuses", "");

View File

@ -1093,7 +1093,10 @@ class TmModifierTypeGenerator extends ModifierTypeGenerator {
if (pregenArgs && (pregenArgs.length === 1) && (pregenArgs[0] in Moves)) { if (pregenArgs && (pregenArgs.length === 1) && (pregenArgs[0] in Moves)) {
return new TmModifierType(pregenArgs[0] as Moves); return new TmModifierType(pregenArgs[0] as Moves);
} }
const partyMemberCompatibleTms = party.map(p => (p as PlayerPokemon).compatibleTms.filter(tm => !p.moveset.find(m => m?.moveId === tm))); const partyMemberCompatibleTms = party.map(p => {
const previousLevelMoves = p.getLearnableLevelMoves();
return (p as PlayerPokemon).compatibleTms.filter(tm => !p.moveset.find(m => m?.moveId === tm) && !previousLevelMoves.find(lm=>lm === tm));
});
const tierUniqueCompatibleTms = partyMemberCompatibleTms.flat().filter(tm => tmPoolTiers[tm] === tier).filter(tm => !allMoves[tm].name.endsWith(" (N)")).filter((tm, i, array) => array.indexOf(tm) === i); const tierUniqueCompatibleTms = partyMemberCompatibleTms.flat().filter(tm => tmPoolTiers[tm] === tier).filter(tm => !allMoves[tm].name.endsWith(" (N)")).filter((tm, i, array) => array.indexOf(tm) === i);
if (!tierUniqueCompatibleTms.length) { if (!tierUniqueCompatibleTms.length) {
return null; return null;
@ -1839,7 +1842,7 @@ const modifierPool: ModifierPool = {
new WeightedModifierType(modifierTypes.BATON, 2), new WeightedModifierType(modifierTypes.BATON, 2),
new WeightedModifierType(modifierTypes.SOUL_DEW, 7), new WeightedModifierType(modifierTypes.SOUL_DEW, 7),
//new WeightedModifierType(modifierTypes.OVAL_CHARM, 6), //new WeightedModifierType(modifierTypes.OVAL_CHARM, 6),
new WeightedModifierType(modifierTypes.CATCHING_CHARM, () => !globalScene.gameMode.isFreshStartChallenge() && globalScene.gameData.getSpeciesCount(d => !!d.caughtAttr) > 100 ? 4 : 0, 4), new WeightedModifierType(modifierTypes.CATCHING_CHARM, () => globalScene.gameMode.isDaily || (!globalScene.gameMode.isFreshStartChallenge() && globalScene.gameData.getSpeciesCount(d => !!d.caughtAttr) > 100) ? 4 : 0, 4),
new WeightedModifierType(modifierTypes.ABILITY_CHARM, skipInClassicAfterWave(189, 6)), new WeightedModifierType(modifierTypes.ABILITY_CHARM, skipInClassicAfterWave(189, 6)),
new WeightedModifierType(modifierTypes.FOCUS_BAND, 5), new WeightedModifierType(modifierTypes.FOCUS_BAND, 5),
new WeightedModifierType(modifierTypes.KINGS_ROCK, 3), new WeightedModifierType(modifierTypes.KINGS_ROCK, 3),

View File

@ -35,8 +35,14 @@ export class CommandPhase extends FieldPhase {
globalScene.updateGameInfo(); globalScene.updateGameInfo();
const commandUiHandler = globalScene.ui.handlers[Mode.COMMAND]; const commandUiHandler = globalScene.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 (globalScene.currentBattle.turn === 1 || commandUiHandler.getCursor() === Command.POKEMON) { if ((globalScene.currentBattle.turn === 1 && (!globalScene.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

@ -149,6 +149,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",
@ -172,8 +173,8 @@ export const SettingKeys = {
}; };
export enum MusicPreference { export enum MusicPreference {
CONSISTENT, GENFIVE,
MIXED ALLGENS
} }
/** /**
@ -331,6 +332,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"),
@ -654,15 +662,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
}, },
@ -817,6 +825,9 @@ export function setSetting(setting: string, value: integer): boolean {
const selectedValue = shopCursorTargetIndexMap[value]; const selectedValue = shopCursorTargetIndexMap[value];
globalScene.shopCursorTarget = selectedValue; globalScene.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:
globalScene.expGainsSpeed = value; globalScene.expGainsSpeed = value;
break; break;

View File

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

View File

@ -2,6 +2,9 @@ import { globalScene } from "#app/global-scene";
import { TextStyle, addTextObject } from "#app/ui/text"; import { TextStyle, addTextObject } from "#app/ui/text";
import { nil } from "#app/utils"; import { nil } from "#app/utils";
import i18next from "i18next"; import i18next from "i18next";
import { Species } from "#enums/species";
import { WeatherPoolEntry } from "#app/data/weather";
import { WeatherType } from "#enums/weather-type";
export enum EventType { export enum EventType {
SHINY, SHINY,
@ -16,6 +19,11 @@ interface EventBanner {
availableLangs?: string[]; availableLangs?: string[];
} }
interface EventEncounter {
species: Species;
allowEvolution?: boolean;
}
interface TimedEvent extends EventBanner { interface TimedEvent extends EventBanner {
name: string; name: string;
eventType: EventType; eventType: EventType;
@ -23,19 +31,46 @@ interface TimedEvent extends EventBanner {
friendshipMultiplier?: number; friendshipMultiplier?: number;
startDate: Date; startDate: Date;
endDate: Date; endDate: Date;
uncommonBreedEncounters?: EventEncounter[];
delibirdyBuff?: string[];
weather?: WeatherPoolEntry[];
} }
const timedEvents: TimedEvent[] = [ const timedEvents: TimedEvent[] = [
{ {
name: "Halloween Update", name: "Winter Holiday Update",
eventType: EventType.SHINY, eventType: EventType.SHINY,
shinyMultiplier: 2, shinyMultiplier: 2,
friendshipMultiplier: 2, friendshipMultiplier: 1,
startDate: new Date(Date.UTC(2024, 9, 27, 0)), startDate: new Date(Date.UTC(2024, 11, 21, 0)),
endDate: new Date(Date.UTC(2024, 10, 4, 0)), endDate: new Date(Date.UTC(2025, 0, 4, 0)),
bannerKey: "halloween2024-event-", bannerKey: "winter_holidays2024-event-",
scale: 0.21, scale: 0.21,
availableLangs: [ "en", "de", "it", "fr", "ja", "ko", "es-ES", "pt-BR", "zh-CN" ] availableLangs: [ "en", "de", "it", "fr", "ja", "ko", "es-ES", "pt-BR", "zh-CN" ],
uncommonBreedEncounters: [
{ species: Species.GIMMIGHOUL },
{ species: Species.DELIBIRD },
{ species: Species.STANTLER, allowEvolution: true },
{ species: Species.CYNDAQUIL, allowEvolution: true },
{ species: Species.PIPLUP, allowEvolution: true },
{ species: Species.CHESPIN, allowEvolution: true },
{ species: Species.BALTOY, allowEvolution: true },
{ species: Species.SNOVER, allowEvolution: true },
{ species: Species.CHINGLING, allowEvolution: true },
{ species: Species.LITWICK, allowEvolution: true },
{ species: Species.CUBCHOO, allowEvolution: true },
{ species: Species.SWIRLIX, allowEvolution: true },
{ species: Species.AMAURA, allowEvolution: true },
{ species: Species.MUDBRAY, allowEvolution: true },
{ species: Species.ROLYCOLY, allowEvolution: true },
{ species: Species.MILCERY, allowEvolution: true },
{ species: Species.SMOLIV, allowEvolution: true },
{ species: Species.ALOLA_VULPIX, allowEvolution: true },
{ species: Species.GALAR_DARUMAKA, allowEvolution: true },
{ species: Species.IRON_BUNDLE }
],
delibirdyBuff: [ "CATCHING_CHARM", "SHINY_CHARM", "ABILITY_CHARM", "EXP_CHARM", "SUPER_EXP_CHARM", "HEALING_CHARM" ],
weather: [{ weatherType: WeatherType.SNOW, weight: 1 }]
} }
]; ];