Go to file
Dean 87e6095a00
[Misc/Feature] Add dynamic turn order (#6036)
* Add new priority queues

* Add dynamic queue manager

* Add timing modifier and fix post speed ordering

* Make `phaseQueue` private

* Fix `gameManager.setTurnOrder`

* Update `findPhase` to also check dynamic queues

* Modify existing phase manager methods to check dynamic queues

* Fix move order persisting through tests

* Fix magic coat/bounce

* Use append for magic coat/bounce

* Remove `getSpeedOrder` from `TurnStartPhase`, fix references to `getCommandOrder` in tests

* Fix round queuing last instead of next

* Add quick draw application

* Add quick claw activation

* Fix turn order tracking

* Add move header queue to fix ordering

* Fix abilities activating immediately on summon

* Fix `postsummonphases` being shuffled (need to handle speed ties differently here)

* Update speed order function

* Add `StaticSwitchSummonPhase`

* Fix magic coat/bounce error from conflict resolution

* Remove conditional queue

* Fix dancer and baton pass tests

* Automatically queue consecutive Pokémon phases as dynamic

* Move turn end phases queuing back to `TurnStartPhase`

* Fix `LearnMovePhase`

* Remove `PrependSplice`

* Move DQM to phase manager

* Fix various phases being pushed instead of unshifted

* Remove `StaticSwitchSummonPhase`

* Ensure the top queue is always at length - 1

* Fix encounter `PostSummonPhase`s and Revival Blessing

* Fix move headers

* Remove implicit ordering from DQM

* Fix `PostSummonPhase`s in encounters running too early

* Fix `tryRemovePhase` usages

* Add `MovePhase` after `MoveEndPhase` automatically

* Implement an `inSpeedOrder` function

* Merge fixes

* Fix encounter rewards

* Defer `FaintPhase`s where splice was used previously

* Separate speed order utils to avoid circular imports

* Temporarily disable lunar dance test

* Simplify deferral

* Remove move priority modifier

* Fix TS errors in code files

* Fix ts errors in tests

* Fix more test files

* Fix postsummon + checkswitch ability activations

* Fix `removeAll`

* Reposition `positionalTagPhase`

* Re-add `startCurrentPhase`

* Avoid overwriting `currentPhase` after `turnStart`

* Delete `switchSummonPhasePriorityQueue`

* Update `phase-manager.ts`

* Remove uses of `isNullOrUndefined`

* Rename deferral methods

* Update docs and use `getPlayerField(true)` in turn start phase

* Use `.getEnemyField(true)`

* Update docs for post summon phase priority queue (psppq)

* Update speed order utils

* Remove null from `nextPhase`

* Update move phase timing modifier docs

* Remove mention of phases from base priority queue class

* Remove and replace `applyInSpeedOrder`

* Don't sort weather effect phases

* Order priority queues before removing

- Add some `readonly` and `public` modifiers

- Remove unused `queuedPhases` field from `MoveEffectPhase`

* Fix linting in `phase-manager.ts`

* Remove unnecessary turn order modification in Rage Fist test

---------

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-09-20 17:49:40 -05:00
.devcontainer [Dev] Added devcontainer.json and VS code config files (#6190) 2025-08-17 13:26:20 -07:00
.github [Dev] Add Podman support (#6150) 2025-09-10 14:23:13 -05:00
.vscode [Dev] Migrated to Biome 2.2.3, added more rules (#6259) 2025-09-08 10:35:18 -05:00
docs [Dev] Add Podman support (#6150) 2025-09-10 14:23:13 -05:00
public [i18n] sync locales 2025-09-10 18:57:59 -05:00
scripts [Dev] Fix + rename test:create boilerplate file (#6560) 2025-09-15 13:51:28 -07:00
src [Misc/Feature] Add dynamic turn order (#6036) 2025-09-20 17:49:40 -05:00
test [Misc/Feature] Add dynamic turn order (#6036) 2025-09-20 17:49:40 -05:00
typedoc-plugins [Misc/Docs] Fix Typedoc workflow to not break the "go to main" link (#6502) 2025-09-06 17:43:26 -05:00
.dependency-cruiser.cjs [Dev] Migrated to Biome 2.2.3, added more rules (#6259) 2025-09-08 10:35:18 -05:00
.dockerignore [Dev] Add Podman support (#6150) 2025-09-10 14:23:13 -05:00
.editorconfig [Dev] Migrated to Biome 2.2.3, added more rules (#6259) 2025-09-08 10:35:18 -05:00
.env Beta Merge 27/07 (#3141) 2024-07-28 00:47:00 +01:00
.env.beta [Misc] Disable some leftover debug code (#4546) 2024-10-02 13:13:16 -04:00
.env.development [Test] Reworked crit override to allow for forced crits (#5738) 2025-06-16 05:36:09 -07:00
.env.production Beta Merge 27/07 (#3141) 2024-07-28 00:47:00 +01:00
.env.test Beta Merge 27/07 (#3141) 2024-07-28 00:47:00 +01:00
.gitattributes [Misc] Add * -crlf to .gitattributes (#5539) 2025-03-18 21:52:49 -04:00
.gitignore [Dev] Migrated to Biome 2.2.3, added more rules (#6259) 2025-09-08 10:35:18 -05:00
.gitmodules [Refactor] External locales (#4529) 2024-10-01 23:41:09 +01:00
.ls-lint.yml [Dev] Added devcontainer.json and VS code config files (#6190) 2025-08-17 13:26:20 -07:00
.nvmrc [Dev][GitHub] Update to node 22 (#5586) 2025-04-14 12:37:26 -05:00
biome.jsonc [Dev] Fix + rename test:create boilerplate file (#6560) 2025-09-15 13:51:28 -07:00
CONTRIBUTING.md [Dev] Add Podman support (#6150) 2025-09-10 14:23:13 -05:00
CREDITS.md [Audio] Add new Wasteland BGM track (#6285) 2025-08-18 09:27:37 -04:00
Dockerfile [Dev] Add Podman support (#6150) 2025-09-10 14:23:13 -05:00
favicon.ico Replace favicon with no BG version 2024-03-25 12:45:45 -04:00
global.d.ts [Dev] Added Typedoc plugins + README badges (#6400) 2025-09-05 11:34:22 -07:00
index.css [UI/UX] Autofill login text color changed to gray (#5523) 2025-03-25 18:06:28 -07:00
index.html [Misc] Remove debug.js reference from index.html 2025-06-07 17:37:09 -07:00
lefthook.yml [Dev] Migrated to Biome 2.2.3, added more rules (#6259) 2025-09-08 10:35:18 -05:00
LICENSE Update license to AGPL 3 2024-03-25 19:22:58 -04:00
package.json [Deps] Bump typedoc version (#6576) 2025-09-19 17:23:50 -07:00
pnpm-lock.yaml [Deps] Bump typedoc version (#6576) 2025-09-19 17:23:50 -07:00
pnpm-workspace.yaml [Dev] Remove warnings from pnpm interactions (#6061) 2025-07-04 04:08:53 +00:00
README.md Center text in README.md 2025-09-07 09:43:01 -05:00
tsconfig.json [Misc] Simplifying imports of UI files (#6542) 2025-09-11 00:30:17 -07:00
tsdoc.json [Docs] Add interface to known tags in tsdoc 2025-09-10 13:46:52 -05:00
typedoc.config.js [Docs] Adjust favicon icon for docs site 2025-09-11 13:48:07 -05:00
vite.config.ts [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
vitest.config.ts [Test] Moved test setup code to its own folder (#6297) 2025-09-10 14:13:48 -05:00

PokéRogue

Discord Static Badge Docs Coverage Static Badge Testing Badge License: GNU AGPL v3

PokéRogue is a browser based Pokémon fangame heavily inspired by the roguelite genre. Battle endlessly while gathering stacking items, exploring many different biomes, fighting trainers, bosses, and more!

Contributing

See CONTRIBUTING.md, this includes instructions on how to set up the game locally.

📝 Credits

If this project contains assets you have produced and you do not see your name, please reach out, either here on GitHub or via Discord.

Thank you to all the wonderful people that have contributed to the PokéRogue project! You can find the credits here.