Commit Graph

270 Commits

Author SHA1 Message Date
Benjamin Odom
4d15269eec
Fix Error with Typecasting (#1519) 2024-05-28 23:45:18 +01:00
José Ricardo Fleury Oliveira
7e003d68a9
Indicator when a candy upgrade is available (#1083)
* initial implementation

* updated logic

* reverse retTint

* added candy overlays and colors

* added settings and minor fixes

* german changes

* logic fix

* german changes pt2

* german changes pt3

* setting name changed

* Update battle-scene.ts

* initial animation implementation

* minor fixes

* main compatibility

* minor fix

* logic for animations

* eslint fixes

* final generation logic

* Pause Animation when Selected or Purchased

* Disable Indicator if not Root Species

* Add to Reload and Add Anchor

* Fix Animation on Change

* Fix Icon on Change

* Code Cleanup

* fix

---------

Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
2024-05-28 13:49:15 -04:00
Franck TROUILLEZ
99835c27c8
Add setting to change money format (#1261)
* Add setting to change money format

This setting can currently be set either on "normal" or "abbreviated". "normal" will show all the numbers, while "abbreviated" will abbreviate to the most significant numbers and use a suffix to show the power-10.

A new enum has been added for MoneyFormat as well.

* Update src/battle-scene.ts

Co-authored-by: Franck TROUILLEZ <57403591+francktrouillez@users.noreply.github.com>

---------

Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
2024-05-27 22:58:33 -04:00
Jannik Tappert
8a6f87cfea
When the language is changed the game will complety reload (same as F5). (#1438)
Also now only the current language type image is loaded. If it doesnt exist for a language it will load the english one as a fallback

Tested with all lanugages
2024-05-27 10:12:29 -05:00
Greenlamp2
622885767d
Enforce Consistent Spacing with ESLint's space-before-blocks and keyword-spacing Rules (#1308)
* added rule no-trailing-spaces

* added rule space-before-block

* added rule keyword spacing
2024-05-23 19:19:20 -05:00
Greenlamp2
e2be6ba002
added rule no-trailing-spaces (#1307) 2024-05-23 18:45:04 -05:00
Matthew
f7a7b23dd1
Update README and package, re-add money formatter (#1286) 2024-05-23 12:29:18 -04: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
iv
2240e09406
zh_tw localization (#1279)
* zh_tw translation

* update translation to newer version

* follow file naming convention
2024-05-23 07:01:22 -05:00
Benjamin Odom
f93f2bfca6
Reduce EXP Balance (#1128)
* Set max to 4
2024-05-20 19:06:20 +10:00
Lugiad
7216990d87
Locales for Voucher names + Voucher rewards (#1137)
* Update voucher.ts

* Update vouchers-ui-handler.ts

* Update i18n.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Update config.ts

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload
2024-05-19 17:25:52 -05:00
Adrian Torrano
a561e41634
return boolean from changing locale (#848) 2024-05-19 13:25:24 -05:00
Flashfyre
78f7965304 Revert "add logic to conditionally align window (#851)"
This reverts commit 7769c06393.
2024-05-15 12:22:32 -04:00
Adrian Torrano
7769c06393
add logic to conditionally align window (#851) 2024-05-15 11:01:20 -05:00
Flashfyre
ac2e78129e Add Save and Quit option to replace Return to Title 2024-05-15 11:42:18 -04:00
Flashfyre
adf5690383 Migrate data for offline users 2024-05-15 10:55:17 -04:00
Flashfyre
3c8d919ef8 Revert "Implemented Power Split and Guard Split (#699)"
This reverts commit 0b75a5210a.
2024-05-15 10:13:29 -04:00
Frederico Santos
0b75a5210a
Implemented Power Split and Guard Split (#699)
* Implemented Power Split and Guard Split

* Update changeStat method to use summonData for Pokemon stats

This commit modifies the `changeStat` method in the `Pokemon` class to use the `summonData` object for updating Pokemon stats instead of directly modifying the `stats` object. This change ensures that the updated stats are correctly reflected in the `summonData` object, which is used for battle calculations and other related operations.

Refactor the `getStat` method to check if `summonData` exists and return the corresponding stat value from `summonData.stats` if it does. Otherwise, return the stat value from the `stats` object.

This change improves the accuracy of stat calculations during battles and ensures consistency between the `stats` and `summonData` objects.

* Added documentation for Power Split and Guard Split + linting

* removed incorrect files

* Removed incorrect folder

* removed unnecessary import

* Added documentation for getStat and changeSummonStat methods

* New description for getStat()

* Adjusting function descriptions

* adjusted descriptions according to guideline

---------

Co-authored-by: Frederico Santos <frederico.santos@fivedegrees.nl>
2024-05-15 07:41:40 -05:00
Flashfyre
4a7da3e5f6 Fix export not working 2024-05-15 02:01:30 -04:00
Flashfyre
70ecc51f50 Don't clear local data in offline mode 2024-05-15 01:54:15 -04:00
Samuel H
67c18a15e2
Implement client session and re-implement hybrid saving (#888)
* Implement client session and re-implement hybrid saving (WiP)

* Fixes for hybrid saving

* Add local data clears where applicable

* Include client session ID in system update

* Change save threshold from 5 waves to 10 waves or 5 minutes
2024-05-15 00:52:06 -04:00
Nexllon
df499e2f71
offline mode - adds daily run and fixes clear freezes (#834)
* offline mode - adds daily run and fixes clear freezes

* removed unused import
2024-05-14 15:42:30 -04:00
Flashfyre
7943633481 Revert "Implement hybrid saving for optimization"
This reverts commit b45cd2f7e7.
2024-05-13 20:56:28 -04:00
Flashfyre
ab92bc61ba Revert "Only show save icon on server sync"
This reverts commit 5d0dbfff98.
2024-05-13 20:56:19 -04:00
Flashfyre
5d0dbfff98 Only show save icon on server sync 2024-05-13 18:37:48 -04:00
Flashfyre
b45cd2f7e7 Implement hybrid saving for optimization 2024-05-13 18:17:57 -04:00
Flashfyre
9a49691a9e Add max options to language select
Add max options to language select (fixes #819)
2024-05-13 13:10:01 -04:00
José Ricardo Fleury Oliveira
2a32189ea1
Added Portuguese (Brazil) translations (#766)
* Add support for Portuguese (Brazil) locale, except for moves and abilities.

* All ptBR translations, names of moves and abilities maintained in english.

* Small fixes

* Updated Frisk and fixed Plus and Minus descriptions

* Changed the settings label to "Português (BR)"
2024-05-13 11:18:24 -05:00
Matthew
21a0a0276d
add pokeball override (#793) 2024-05-13 03:40:53 -05:00
Samuel H
2b9b63e3f3
Add combined save between waves (#777) 2024-05-12 23:01:05 -04:00
Flashfyre
f540b7d17f Fix always clearing first slot in offline mode 2024-05-11 20:33:03 -04:00
Flashfyre
9cfc09f673 Restructure game over logic to save before clear 2024-05-10 18:12:33 -04:00
Greenlamp2
b32b802ab4
QOL - Settings to choose party Exp display at the end of fight (#488)
* added settings to manage how to display party experience at the end of fight

* added back stats changes support when setting is on but ignored when on skip

* removed a useless parameter

* added new level in the text

* only Lv. UP if level is greated than 200

* cleanup

* added some comment

* TSDoc comment block

* EXP_Party -> EXP_Party_Display, Only Up -> Level Up Notification

* better duration for the level up notification

* typo

Co-authored-by: Samuel H <flashfireex@gmail.com>

---------

Co-authored-by: Samuel H <flashfireex@gmail.com>
2024-05-10 09:54:14 -04:00
Greenlamp2
22a73642df
Fix - Gamepad support setting "lost focus" behaviour (#658)
* fix "lost focus behaviour" when disabling gamepad and thus repeating RIGHT key

* added some comment

* added full TSDoc, helped by chatGPT, refined every entry manually of course
2024-05-10 09:26:45 -04:00
maru
7f0362e124
Fix it for real this time 2024-05-09 07:30:19 -04:00
maru
c1cff02a18
Fix bug with accounts being unable to create new saves 2024-05-09 06:22:33 -04:00
Xavion3
e6ba60364e
Save battler tags (#516)
* Save battler tags

Also saves the rest of the summonData except for transform specific things.

* Add missing values for type boost tag.

* Add intellisense comments
2024-05-09 00:37:51 -05:00
Madmadness65
e39b157767 Make Simplified Chinese locale use zh_CN 2024-05-08 23:13:38 -05:00
Jane620
5992d9eb81
add simplifed chinese locale (#485)
* add chinese locale, but translation is not yet complete.

* Add chs and cht locale

* translate ability,move,pokeball,pokemon

* Add files via upload

* Add files via upload

* Update i18n.ts

* Delete src/locales/zh_cn directory

* Add files via upload

* Update settings.ts

* Delete src/locales/chs directory

* Add files via upload

* add tutorial

* fix conflict issue

* remove cht, due to chs is almost done by justhil

* remove duplicated setting

* spell correction

---------

Co-authored-by: ZXZhuang <2993968012@qq.com>
Co-authored-by: justhil <138752349+justhil@users.noreply.github.com>
Co-authored-by: Jianfeng 2. Wang (NSB) <jianfeng.2.wang@nokia-sbell.com>
2024-05-08 22:59:49 -05:00
Flashfyre
e993bf9945 Fix session slot always saving to first slot in offline mode 2024-05-08 16:36:44 -04:00
Lugiad
e93777e52a
Names of the languages in their respectives languages (#635)
* Names of the languages in their respectives languages in settings

* Names of the languages in their respectives languages
2024-05-08 12:08:34 -05:00
Flashfyre
72b4552b01 Don't update user info on save for optimization 2024-05-07 13:36:52 -04:00
Tempoanon
4fcea107ab
Fix wrong stat displayed for mythicals hatched (#601) 2024-05-07 12:10:48 -05:00
alpaca
36cde21ce3
Adds ribbon in starter screen if mon has beat classic mode (#370)
* adds the ribbon asset, hooking it up

* works if override. need to add field on server side I imagine

* moves count to starterData, increments on win

* formatting

* increment works properly

* recursively check for prevolution

* cleaned up to use getRootSpeciesId()

* changes ribbon to gold medal version

* adds Akuma's ribbon achievements

* ribbons increment correctly

* missed ui handler update

* reorder achievements

* ribbon correct, vouchers not. currently investigating

* increments properly, but voucher reward phase not appearing

* some cleanup

* works great, need to better reflect who is getting ribbon in message and cry

* plays level fanfare, tabling cry for now

* reran items.bat

* Minor fixes

---------

Co-authored-by: Flashfyre <flashfireex@gmail.com>
2024-05-07 00:44:41 -04:00
Flashfyre
6a3ca62490 Add separate sub-legendary stats 2024-05-05 17:11:29 -04:00
Flashfyre
437cb87df9 Add separate achievements for sub-legendaries and rename pseudoLegendary field 2024-05-05 11:05:22 -04:00
Greenlamp2
d98f7733d4
Rework - Inputs management to include all gamepad mapping V2 (#429)
* rework of the input handling, including different gamepad and keyboard

* rework of the input handling, including different gamepad and keyboard

* first version of a too complex inputHandler based on phaser3-merged-input

* removed useless control management and kept it simple for our use case, investigating to put out button_XX()

* renamed inputHandler to inputController

* aggregate directions and some action into a same method + fix menu return value

* added back repeated input feature on keeping down a key

* cleanup + return type

* fix submit/action doing two things simultaneously, still same behaviour as before

* extracted UI inputs out of battle-scene

* tab -> spaces

* tab -> spaces what about now github ?

* tab -> spaces final (maybe)

* tried to fix the plugin loading issue on prod

* remove Plugins things as it's too uncertain how it works on prod

* seems old code source is indented with tab

* cleanup

* cleanup

* cleanup

* putting in an enum file the enum buttons

* fix repeating stats button + change message in event when the key is repeating

* added return type for ui-inputs

* added return type for inputs-controller

* adapted the code to integrate changes of bennybroseph
2024-05-05 10:30:00 -04:00
Benjamin Odom
3ed7649ce5
Remove Debug Code (#480)
Remove code intended only for debugging.
2024-05-05 18:45:54 +10:00
Benjamin Odom
dd76cbc7a2
Add Setting to Swap A and B on Gamepad (#474)
* Add Setting to Swap A and B on Gamepad

Added a new setting to swap the A and B button on controller. Defaults to off which retains the current behavior on live.

* Add comments
2024-05-05 01:25:57 -04:00
Alessandro Bruzzese
41f9420c90
Added Italian translations for ability.ts and other element (#471) 2024-05-04 21:00:28 -05:00
Xavion3
bc319a8eda Fix eggs during dailies 2024-05-03 10:28:40 -04:00
Flashfyre
991f097e9e Rebalance friendship and add starter friendship with candy reward 2024-05-02 17:48:08 -04:00
Flashfyre
86b0596a60 Add rogue achievement and voucher tier 2024-05-01 19:28:07 -04:00
Flashfyre
6b9542511f Add fusion luck as a separate field 2024-04-26 18:27:00 -04:00
Flashfyre
bf2a83993c Make luck independent from shininess and variant 2024-04-26 17:32:28 -04:00
Flashfyre
ef552c7ffd Fix crash with certain animated variant sprites 2024-04-26 02:00:58 -04:00
BronzeMaster5000
e3ef65523a Added german as selectable in options
Also added a comment in i18n that refers to how to add a language to the game settings menu to actually select it.
2024-04-25 21:21:44 -04:00
Flashfyre
4a703c938d Add load message handler for too many connections 2024-04-25 14:47:32 -04:00
Flashfyre
daba4e9482 Fix not updating legendary and mythical Pokemon seen stats 2024-04-25 13:20:32 -04:00
Flashfyre
1d25935aa0 Enforce trainer IDs on write requests for data integrity 2024-04-25 09:17:48 -04:00
Flashfyre
97218be59c Add back missing authorization headers 2024-04-24 19:26:04 -04:00
Flashfyre
cf3a7dca35 Comment out variant data fix to prevent ability data corruption 2024-04-24 09:26:46 -04:00
Flashfyre
e2effee43d Fix typo 2024-04-23 22:32:04 -04:00
Flashfyre
1376ea4e87 Fix initial starters not having first ability unlocked 2024-04-23 22:16:49 -04:00
PabloG02
a71392f2d6 Add Spanish localization for menu, moves and pokeballs 2024-04-23 11:58:47 -04:00
Flashfyre
26b1bb5f03 Don't increment seen shiny count for trainers 2024-04-22 11:28:13 -04:00
Flashfyre
3d9f5fb157 Protect against cross-session overwrites 2024-04-21 16:19:11 -04:00
Flashfyre
c8a9069e8b Add outdated session support and fix older migrations 2024-04-21 10:59:50 -04:00
Flashfyre
17eddd7b02 Consolidate broken variant data for players who missed 1.0.1 2024-04-20 22:30:28 -04:00
Flashfyre
fc06c4d9e1 Fix title querying with placeholder save slot 2024-04-20 18:46:36 -04:00
Flashfyre
706a85ed5b Add missing pipeline data for shiny recolors in certain screens 2024-04-19 23:37:23 -04:00
Flashfyre
0ecc46ab97 Exclude authorization header where unnecessary 2024-04-19 17:35:49 -04:00
Miguel S
95d2ad2fb4
Added language setting (#185)
* Added language setting

* Allow properly changing language

---------

Co-authored-by: Flashfyre <flashfireex@gmail.com>
2024-04-19 14:55:01 -04:00
Flashfyre
e17aee5d48 Fix default starter hidden ability for new accounts 2024-04-19 12:24:52 -04:00
Flashfyre
5c367db8a3 Fix ability edge case when saving starter ability data 2024-04-19 11:01:22 -04:00
Flashfyre
b546203118 Fix shiny eggs corrupting candy count 2024-04-19 01:01:57 -04:00
Flashfyre
c76f8c5e7e Add tiered shiny variants 2024-04-18 22:52:26 -04:00
Flashfyre
eab38a5ad4 Add more exp gains options 2024-04-18 00:50:04 -04:00
Hans Sorongon
0948295a98 Add option to hide exp gains after a battle 2024-04-18 00:50:04 -04:00
Flashfyre
e85179f7cd Fix gamepad support not saving 2024-04-15 22:40:27 -04:00
Flashfyre
1ff206287a Add setting for gamepad support 2024-04-15 20:13:58 -04:00
Flashfyre
0692a343a0 Fix duplicate candy count key for local 2024-04-15 19:47:12 -04:00
Flashfyre
6e59b4dd77 Prevent saving on an outdated client 2024-04-15 10:09:51 -04:00
Flashfyre
824a73ef71 Add candy system for passives and value reductions 2024-04-13 18:59:58 -04:00
Flashfyre
75075c6fab Update missing save data handling 2024-04-11 00:18:16 -04:00
Flashfyre
eb5bdb07a8 Add outage handling 2024-04-10 01:32:49 -04:00
Flashfyre
2a6042ff7e Add HP Bar Speed setting and fix Grip Claw HP skip bug 2024-04-09 15:34:57 -04:00
Flashfyre
b892a8b40e Add option to disable move animations 2024-04-09 15:06:47 -04:00
Flashfyre
5ebc351e4f Add a long-term goal 2024-04-05 22:58:40 -04:00
Flashfyre
3e99ed6bb6 Level up sound no longer pauses BGM 2024-04-04 17:43:37 -04:00
Flashfyre
326918a5f1 Add retry option (easy mode) 2024-04-04 15:22:05 -04:00
Flashfyre
075db8ae0c Show icon when saving data 2024-04-04 10:16:29 -04:00
Flashfyre
84f6456972 Use nature override property instead of overwriting base nature 2024-04-02 23:00:56 -04:00
Flashfyre
a3e09ee5cc Fix game not loading if save data is not found 2024-04-01 15:18:15 -04:00
Flashfyre
366e3e5120 Fix battle RNG varying when loading a game 2024-04-01 12:48:35 -04:00
Flashfyre
70d61700d0 Re-implement UI reskin with working legacy toggle
Re-implement UI reskin with working legacy toggle; add return to title option to menu
2024-03-31 21:14:35 -04:00
Flashfyre
30c7156c1a Revert "Add UI reskin by LJ Birdman (WiP)"
This reverts commit 0200a2688a.
2024-03-31 16:51:53 -04:00
Flashfyre
0200a2688a Add UI reskin by LJ Birdman (WiP) 2024-03-31 16:49:53 -04:00
Flashfyre
ca0ae35422 Change default game speed from 1x to 2x 2024-03-31 00:03:39 -04:00
Flashfyre
7ca5cdc21b Revert "Revert "Fix strong trainer party members often not evolving due to dividing by 0""
This reverts commit baaa00656e.
2024-03-29 20:11:52 -04:00