Commit Graph

70 Commits

Author SHA1 Message Date
Xavion3
696ff6eae3
Add Challenges (#1459)
* Initial challenge framework

* Add type localisation

* Change how challenges are tracked

Also fixes the difficulty total text

* MVP

Renames challenge types, temporarily hides difficulty, and implements challenge saving.

* Attempt to fix one legal pokemon in a double battle

* Make monotype ignore type changing effects

* Make isOfType correctly detect normal types

* Try to fix double battles again

* Make challenge function more like classic

* Add helper function for fainted or not allowed

* Add framework for fresh start challenge and improve comments

* Try to fix evolution issues

* Make form changing items only usable from rewards screen

* Update localisation

* Additional localisation change

* Add achievements for completing challenges

* Fix initialisation bug with challenge achievements

* Add support for gamemode specific fixed battles

Also make monogen challenges face the e4 of their generation

* Add better support for mobile in challenges

* Localise illegal evolution/form change message

* Update achievement names

* Make alternate forms count for monogen

* Update monotype achievement icons

* Add more comments

* Improve comments

* Fix mid battle form changes

* Reorder mode list

* Remove currently unused localisation entry

* Add type overrides for monotype challenges

Meloetta always counts for psychic and castform always counts for normal

* Change how form changes are handled

Now attempts a switch at the start of each turn instead of immediately

* Add start button to challenge select screen

* Make starter select back out to challenge screen if using challenges

* Fix daily runs

* Update tests to new game mode logic
2024-06-08 01:07:23 -04:00
Madmadness65
bf5b6e3f6b
[Enhancement] Add more legendary battle music; add music preference setting (#1753)
* Add more legendary battle music; add music preference setting

* Replace BDSP tracks

"Souless", they say. Naysayers, I say.

* Update for settings menu refactor

* Remove unnecessary Reshiram/Zekrom music calls

The default legendary battle music is the Reshiram & Zekrom battle theme anyways, so removing these lines make it functionally identical.

* Update for settings menu refactor AGAIN
2024-06-07 21:52:14 -05:00
flx-sta
283714bd0f
[Refactor] Move enums from game-data into their respective files in src/data/enums (#1837)
* move PlayerGender enum into src/data/enums/player-gender.ts

this is necessary to avoid circular dependencies which did crash tests in the past (in PRs)

* Update settings.ts

* Update game-data.ts

* Update summary-ui-handler.ts

* Update ui.ts

* move Passive & GameDataType enums into own files
2024-06-05 19:11:07 -05:00
Jannik Tappert
7ee6c979cf
Disables all unique double battles but tate and Liza. And those two will now always have lunatone and the other one (solrock?) as their first pokemon (#1654) 2024-06-02 09:15:17 +10:00
Xavion3
1b7b539d68
Implements Supreme Overlord and fixes Last Respects (#1219)
* Implements Supreme Overlord

Also fixes count for Last Respects

* Add comments
2024-05-29 11:07:59 -04:00
Madmadness65
6f4c087f7a Add Pikachu and Eevee technical forms
This adds Partner Eevee and Partner Pikachu, as well as all Cosplay Pikachu variants. Also included are some minor trainer-related formatting clean ups.

• Partner Pikachu and Eevee have their boosted base stats from the Let's Go games, but are otherwise identical in function and appearance to their regular variants.
• Cosplay Pikachus have their special moves as "evolution" moves and can be relearned if desired.
• Unlike the canon games, Partner Pikachu and Eevee are able to evolve like normal.
2024-05-26 16:15:37 -05:00
Jannik Tappert
aaa96ebe0e
Adding the option to have named trainers be able to have a double battle together (#1318)
* WIP: Adding the option to have named trainers be able to have a double battle together

* The team generation now works.
Also changed it so the special pools are now seperatly defined so we can access it for the team generation of the doubles.

They will happen at a 33% chance.

TODO: Option for seperate double dialogue (because for example the dialogue for tate and liza dont make sense since they reference their other sibling not beeing there...)

* Obviously didnt mean to push changes to battle.ts... (I made this change for a test)

* The doubles now have victory and encounter dialogue (the dialogue itself isnt THAT good since english isnt my first language)

* Changed signatureSpecies for the new galar elite 4

* Added Marnie & Piers as a double

* ESLint

---------

Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
2024-05-25 07:47:18 -05:00
Jannik Tappert
b524be1db1
Issue #1118 Added Galar Elite 4 (#1246)
Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
2024-05-25 06:38:59 -05:00
Greenlamp2
e2be6ba002
added rule no-trailing-spaces (#1307) 2024-05-23 18:45:04 -05:00
Greenlamp2
bac6c22973
ESLint - The Essential Linter and Formatter for JavaScript and TypeScript (#1224)
* eslint config + packages

* updated eslint config

* fix the issue eslint adding ;;;; at interfaces

* first round with eslint --fix .

* removed config for unused export

* Revert "first round with eslint --fix ."

This reverts commit 77a88e0895.

* removed config for camelCase

* for real this time, first round of eslint --fix .

* halfway to manual eslint fix

* eslint done

* added "how to setup" the hook to eslint --fix each new file before commit (if wanted)

* removed eslintrc config file duplicat

* fix human error + ignore build folder + merge overrides

* added curly brace style + eslint

* applied double quote linter rule

* added lefthook

* test precommit

* test precommit

* test precommit

* test precommit

* test precommit

* test precommit

* test precommit

* github action to run eslint

* added node_modules to ignore eslint

* different action for typescript

* no need for different glob (default src)

* node 20

* node 20

* removed no longer needed install file

* remove hooks part from README

* eslint fixes

---------

Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
2024-05-23 11:03:10 -04:00
Matthew Olker
aed9b56a7b Add helper functions to game mode 2024-05-22 11:06:24 -04:00
Frederico Santos
3031cc1245
Implement Ball Fetch (#1129)
* Implemented Ball Fetch

* Added once per battle condition

* Ability only functions on player side

* Update ability.ts

---------

Co-authored-by: SamuelHudson <samuel.hudson2017@gmail.com>
Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
2024-05-19 11:13:33 -05:00
Flashfyre
437cb87df9 Add separate achievements for sub-legendaries and rename pseudoLegendary field 2024-05-05 11:05:22 -04:00
Madmadness65
5440c0b40c Add B2W2 Legendary Titan Theme
This is a small part of a larger addition of music, added before the rest due to it being a B2W2 track.
2024-05-04 22:48:23 -05:00
Flashfyre
291f8570e9 Cap money at max safe integer 2024-04-21 21:17:07 -04:00
Flashfyre
05bb384934 Update crit chance to gen 7 odds 2024-04-16 12:14:33 -04:00
Matthew
8945de6d59 Implement Pay Day and Make it Rain 2024-04-05 11:55:16 -04:00
Flashfyre
dd2743bcf5 Discourage enemy trainers from switching too much consecutively 2024-04-05 10:59:03 -04:00
Flashfyre
366e3e5120 Fix battle RNG varying when loading a game 2024-04-01 12:48:35 -04:00
Flashfyre
a76f795cd5 Trainer updates including names and double battle pairs
Add dynamic trainer pairs; add trainer names with Bulbapedia scraping logic; add Hex Maniac trainer; make namebox stretch to fit name
2024-03-21 00:57:28 -04:00
Flashfyre
88e050581e Add score to daily run mode 2024-03-19 00:03:41 -04:00
Flashfyre
11ab31d533 Update score logic for bosses 2024-03-17 21:56:24 -04:00
Flashfyre
f13e1ffa47 Record clears for failed daily runs 2024-03-17 20:31:09 -04:00
Flashfyre
0701598be6 Add session scores 2024-03-17 11:36:19 -04:00
Flashfyre
56f4a71ca6 Add daily runs (WiP) 2024-03-16 22:06:56 -04:00
Flashfyre
879971ae2b Add ""title"" screen and save data slots 2024-03-14 21:49:49 -04:00
Flashfyre
62ed84638f Fix GameMode enum order 2024-03-14 17:15:01 -04:00
Flashfyre
623d600e13 Add wrapper for game mode 2024-03-14 16:26:57 -04:00
Flashfyre
4919dfcaa6 Implement Spite 2024-03-11 15:42:01 -04:00
Flashfyre
da6d4bba2e Fix pickup working on non-transferrable items 2024-03-07 13:07:58 -05:00
Flashfyre
113ac10c1b Implement Pickup ability 2024-03-06 21:05:23 -05:00
Madmadness65
20ad5e6a42 Add music tracks for Gen 1-5 Leaders & Champions
All added tracks are from B2W2, primarily the PWT versions.
2024-03-06 17:57:45 -06:00
Flashfyre
f48464d48d Minor refactoring 2024-02-29 20:08:58 -05:00
Flashfyre
c275620755 Fix wrong BGM name for Kyurem 2024-02-29 15:09:32 -05:00
Flashfyre
fdff3a549c Factor type immunity abilities into enemy AI 2024-02-28 11:40:30 -05:00
Madmadness65
76a6df43c4 Fix off-by-one champions; implement Strong Jaw
This fix currently has the unintended side effect of making Champion Leon unable to be fought, but every other set of Elite Fours is now followed by the proper Champions as intended.
2024-02-22 23:24:44 -06:00
Madmadness65
22054dddd5 Add Hau as a potential Champion
This fixes the Generation 7 Elite Four not having a corresponding Champion to go along with them.
2024-02-18 19:17:30 -06:00
Flashfyre
dadc08d16e Add Terestallization mechanics
Add Terestallization mechanics; implement Stellar type; fix bug with held item weights
2024-02-17 00:40:03 -05:00
Flashfyre
6d8ea0ad79 Fix crash when trainer has no encounter or victory messages 2024-02-14 15:49:10 -05:00
Flashfyre
74f9c51188 Update rival dialogue 2024-02-14 14:41:39 -05:00
Flashfyre
e62bb6e225 Add female trainer and male rival 2024-02-06 16:15:35 -05:00
Madmadness65
6cff22a9fc Implement generation 9 Pokémon & trainers
Generation 9 Pokémon sprites provided by the Generation 9 Resource Pack on Relic Castle, custom trainer sprites provided by Smogon.
2024-02-05 22:46:45 -06:00
Flashfyre
ac456fc5ba Add item shop when choosing items
Add item shop when choosing items; add full restore item; add egg art to egg gacha; fix some minor text errors
2024-02-04 00:30:19 -05:00
Flashfyre
052564f902 Update final boss fight and restructure some files 2024-01-13 12:24:24 -05:00
Flashfyre
38bf435890 Make elite four battles alternate instead of being consecutive 2024-01-12 14:06:29 -05:00
Flashfyre
39b31e7d6f Add back old random seed gaussian function to fix level balancing 2024-01-05 00:44:28 -05:00
Madmadness65
f342ea8e67 Fix minor champion oversight
Iris is no longer listed twice for wave 190, and Geeta has been added for the future
2024-01-04 19:28:24 -06:00
Flashfyre
4776851bb8 Add new boss trainers and tweak boss trainer logic 2024-01-04 19:37:07 -05:00
Flashfyre
e05bf78481 Overhaul random logic and implement battle seed 2024-01-02 21:31:59 -05:00
Flashfyre
c34eb05083 Fix counter and mirror coat implementation 2023-11-27 11:42:03 -05:00