Compare commits

...

15 Commits

Author SHA1 Message Date
podar f9ac4bd666
Merge 1f77955fb0 into ec09186264 2025-01-29 16:53:43 -08:00
Madmadness65 ec09186264
[Audio] Replace Title BGM with custom BGM by Firel (#5189)
* Replace Title BGM with custom BGM by Firel

Also added descriptions for the battle scene and arena's getBgmLoopPoint methods.

---------

Co-authored-by: damocleas <damocleas25@gmail.com>
2025-01-29 17:51:14 -07:00
NightKev e88b8aeb6f
Merge pull request #5212 from pagefaultgames/main
Main to Beta 1.5
2025-01-29 16:37:03 -08:00
AJ Fontaine 8d20b7b5e0
[Hotfix] Fix event encounters not evolving (#5206)
Your snakes shall now evolve properly, wahoo!
2025-01-28 18:53:07 -07:00
damocleas d14a5b8819
[Misc] Update version number to 1.5.1
#5203
2025-01-28 19:28:41 -05:00
NightKev 7563a6cd0b [Misc] Update version number to 1.5.1 2025-01-28 16:24:01 -08:00
AJ Fontaine 9fb9bb7e5d
Specify available langs for yots event banner (#5202) 2025-01-28 18:09:50 -06:00
damocleas 7ee573937e
Release 1.5.0
Merge pull request #5177 from pagefaultgames/beta
2025-01-27 19:03:43 -05:00
NightKev 1f77955fb0
Merge branch 'beta' into keyboard-key-repeat-fix 2024-11-29 14:44:14 -08:00
flx-sta dfe28b2752
Merge branch 'beta' into keyboard-key-repeat-fix 2024-10-22 09:50:55 -07:00
NightKev 8ca9c6a3f8
Merge branch 'beta' into keyboard-key-repeat-fix 2024-10-13 21:57:46 -07:00
podar 1eb062c802
Merge branch 'beta' into keyboard-key-repeat-fix 2024-09-26 13:36:17 -05:00
podar c060ba6e1e
Merge branch 'beta' into keyboard-key-repeat-fix 2024-09-23 03:26:58 -05:00
flx-sta 98e95caebc
Merge branch 'beta' into keyboard-key-repeat-fix 2024-09-16 11:07:44 -07:00
podar 2114c9737f [Bug] Fixing keyboard input repeating indefinitely when meta key is held. 2024-09-16 00:18:27 -05:00
10 changed files with 21 additions and 8 deletions

4
package-lock.json generated
View File

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

View File

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

Binary file not shown.

View File

@ -2084,8 +2084,11 @@ export default class BattleScene extends SceneBase {
return sound;
}
/** The loop point of any given battle, mystery encounter, or title track, read as seconds and milliseconds. */
getBgmLoopPoint(bgmName: string): number {
switch (bgmName) {
case "title": //Firel PokéRogue Title
return 46.500;
case "battle_kanto_champion": //B2W2 Kanto Champion Battle
return 13.950;
case "battle_johto_champion": //B2W2 Johto Champion Battle

View File

@ -890,7 +890,7 @@ export function getRandomEncounterSpecies(level: number, isBoss: boolean = false
if (eventEncounters.length > 0 && randSeedInt(2) === 1) {
const eventEncounter = randSeedItem(eventEncounters);
const levelSpecies = getPokemonSpecies(eventEncounter.species).getWildSpeciesForLevel(level, !isNullOrUndefined(eventEncounter.blockEvolution), isBoss, globalScene.gameMode);
const levelSpecies = getPokemonSpecies(eventEncounter.species).getWildSpeciesForLevel(level, !eventEncounter.blockEvolution, isBoss, globalScene.gameMode);
isEventEncounter = true;
bossSpecies = getPokemonSpecies(levelSpecies);
} else {

View File

@ -695,6 +695,7 @@ export class Arena {
globalScene.loadBgm(this.bgm);
}
/** The loop point of any given biome track, read as seconds and milliseconds. */
getBgmLoopPoint(): number {
switch (this.biomeType) {
case Biome.TOWN:

View File

@ -344,12 +344,16 @@ export class InputsController {
* Handles the keydown event for the keyboard.
*
* @param event The keyboard event.
*
* @remarks On Mac the keyup event for a pressed key is not fired if the meta key is held down. To
* insure that that key is not repeatedly input until the user presses it again only emit events
* when the meta key is not held.
*/
keyboardKeyDown(event): void {
this.lastSource = "keyboard";
this.ensureKeyboardIsInit();
const buttonDown = getButtonWithKeycode(this.getActiveConfig(Device.KEYBOARD), event.keyCode);
if (buttonDown !== undefined) {
if (buttonDown !== undefined && !event.metaKey) {
if (this.buttonLock.includes(buttonDown)) {
return;
}

View File

@ -52,6 +52,11 @@ describe("Inputs", () => {
expect(game.inputsHandler.log.length).toBe(5);
});
it("keyboard - test input holding meta key - 0 input", async() => {
await game.inputsHandler.pressKeyboardKey(cfg_keyboard_qwerty.deviceMapping.KEY_ARROW_UP, 1, true);
expect(game.inputsHandler.log.length).toBe(0);
});
it("keyboard - test input holding for 200ms - 1 input", async() => {
await game.inputsHandler.pressKeyboardKey(cfg_keyboard_qwerty.deviceMapping.KEY_ARROW_UP, 200);
expect(game.inputsHandler.log.length).toBe(1);

View File

@ -48,9 +48,9 @@ export default class InputsHandler {
});
}
pressKeyboardKey(key: integer, duration: integer): Promise<void> {
pressKeyboardKey(key: integer, duration: integer, isMetaPressed: boolean = false): Promise<void> {
return new Promise(async (resolve) => {
this.scene.input.keyboard?.emit("keydown", { keyCode: key });
this.scene.input.keyboard?.emit("keydown", { keyCode: key, metaKey: isMetaPressed });
await holdOn(duration);
this.scene.input.keyboard?.emit("keyup", { keyCode: key });
resolve();

View File

@ -102,7 +102,7 @@ const timedEvents: TimedEvent[] = [
endDate: new Date(Date.UTC(2025, 1, 3, 0)),
bannerKey: "yearofthesnakeevent-",
scale: 0.21,
availableLangs: [],
availableLangs: [ "en", "de", "it", "fr", "ja", "ko", "es-ES", "pt-BR", "zh-CN" ],
eventEncounters: [
{ species: Species.EKANS },
{ species: Species.ONIX },