Commit Graph

3327 Commits

Author SHA1 Message Date
NightKev
ff7429f240
[Bug] Update Sweet Scent to reduce evasion by 2 (#1910)
cf https://bulbapedia.bulbagarden.net/wiki/Sweet_Scent_(move)
2024-06-07 21:42:17 -04:00
Matthew
3022aabc32
Cleanup format, show correct value for money rewards (#1926) 2024-06-08 02:09:12 +01:00
Matthew Olker
7422ebdb28 Walker asked me to commit to main 2024-06-07 19:43:21 -04:00
Greenlamp2
1a149bfa04
[Testing] Flexible Testing Wrapper for Phaser-Based Battle-Scenes (#1908)
* refactor executed code while importing and initializing all of these in loading-scene

* reset to main

* fix server url

* added rule no-trailing-spaces

* made progress

* test somme data from a session save is working

* trying to launch a battle

* added fetch wrapper to load data locally

* trying to mockAllSettled

* pushPhase & shiftPhase

* check integrity of exported session

* set toke + loggedInUser in tests

* progress on starting new battle

* tring to test phase but it's async

* mocking fetch

* working mock fetch

* need to handle pile of data

* attempt to use real phaser classes

* reorder overrides

* refactored to use some real classes from phaser

* removed useless things

* started to work on some container mock

* finished the mockContainer time to add some logic

* some more mock containers

* removed addMethods since there is the mock classes now

* commented issues

* attempt to create mockTextureManager

* fix tests

* mockSprite & mockText

* yes but not really

* yes but not really

* fix tutorial callback

* reached mode title

* added achievement tests

* fix test achievements with current state of mock

* correct sequence loading for BattleScene with mockLoader !

* deep dive into next step

* working wait until starter selection screen

* added newGame method into wrapper

* expect to save_slot

* trying to manage pokemon sprite for getAll without success yet

* added test for egg output

* fixed egg test for June

* fix tests + locate next issue to fix

* we are in battle baby

* added new game in one-line

* export is working but export only what's in the fetch

* fix start game as guest

* refactored how we start a battle + cleanup

* overrided mewtwo but issue with currentBattle

* refactor: rename InitAchievements to initAchievements

* added missing mock method

* override level and pokemon forms working as intended

* bringToTop Obj

* remove launch battle in achivement test

* fix getIndex when same pokemon

* can run all tests

* first attack, faint, and shop modifiers, MockClock

* on method for container

* added doAttack one-liner

* one-line export data

* removed throw error

* feat: Make `scenes` property of `GameWrapper` class public

The `scenes` property of the `GameWrapper` class was changed from private to public. This change allows external access to the `scenes` map, which is used to store Phaser scenes. This modification was made to enable easier manipulation and interaction with the scenes in the game.

* correction

* removed CanvasRenderer

* added a param to remove console.log and added a param to preven scene create call

* fix encounter wave 30 when it's a trainer

* test double-battle

* test fight without KO

* test double fight no ko

* fix crashing texture + added Text wrapper to log fight

* fix tests on boss - trainer - rival

* chore: Refactor BattleScene initialization and add new phases

Refactor the BattleScene initialization code to remove unnecessary delay and improve performance. Also, add new phases for the title and unavailable states to enhance the game experience.

* rework of Game tests

* skipFn is working

* added onNextPrompt and restore Og Start

* better newGame

* added skipFN in remove

* not yet working test but updated interceptors

* do attack work but not on PostSummonPhase phase when there is mention of silcoon and wurmple

* error located, it's just a double fight, i was not there yet

* single OHKO & double no OHKO

* added expirationFn into next prompt

* all tests are passing

* working test on non damaging move from opponent

* cleaned a bit

* removed phaser initialisation on every tests

* renamed test file

* added load system data

* added some ability support

* added onKill & onSummon abilities test

* removed useless test + cleanup

* removed useless test + cleanup

* fixed tests after merge main

* added itemHeld endTurn trigger test (toxic orb)

* added runFrom..To

* added mustRun to assert currentPhase

* added no-miss move to test things

* cleaner restore mock

* fix test

* fix moxie test + game speed

* improve test speed

* added onOurself and onOpponent mvoe test

* added onDamage test for tackle

* removed timeout in intervals to run tests faster

* cleanup

* added never crit override + separate file per test + remove randomness in randBattleSeedInt

* move folders

* better org

* renamed itemHeld folder to items

* fix deploy.yml

* cleanup

* simplified the gameManager start battle and allow single pokemon in party

* remove the need of mode development

* added input handler to test inputs + remove time from phaser into inputController

* added keyboard support

* added fakeMobile support

* added details

* removed a console.log + added logUp

* move test to folder

* fixed canvas issue

* added starter select tests

* added some more test on starter-select

* added battle-order tests

* added battle-order tests

* fixing Phaser RNG

* ordering stats for better reading

* fix tests for main

* adapt battle-order test to be more readable

* fix merge

* fix some errors and silent all errors from gameWrapper since it's not possible to avoid them

* fix mocks to manage childs & stuffs

* added some docs

* fix achievement test

* removed an unused file

* separate misc tests to clean battle.test file

* added a basic french lokalization test

* added i18n where it needs to be used only

* revers extracted method

* removed unused method

* removed handler fetch since we do not test anything server related

* fix test with handlers removed

* added intrepid sword test

* fix enum exp party

---------

Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
2024-06-07 18:33:45 -04:00
Madmadness65
3d87e86e58 Fix minor typo in Surskit's German name 2024-06-07 16:57:26 -05:00
Jannik Tappert
ece7c9f2d5
Added missing german dialogue for sailor and firebreather (#1883) 2024-06-07 22:51:49 +01:00
AJ Fontaine
f3898dbabd
[Bug] Fix female trainer names on male Backpackers/Hikers (#1919)
* Fix female trainer names on male Backpackers/Hikers

* Remove duplicate Backpacker Ruth
2024-06-07 17:44:35 -04:00
AJ Fontaine
eb058d7eb7
[Bug] Fix Harvest not checking stack limits for berries (#1920) 2024-06-07 17:42:48 -04:00
Madmadness65
83c11a0865 Allow Partner Pikachu & Eevee to Gigantamax
Note that they will revert back to regular Pikachus and Eevees if deactivated due to an existing bug with the form changes.
2024-06-07 16:21:18 -05:00
Matthew Olker
63d98fe70e Hotfix: types breaking gh-pages action 2024-06-07 17:05:44 -04:00
td76099
0a17c2495a
Bugfix: Abilities check final move type instead of default move type (#1440)
* Added check for move changing type before determining if defending is immune to it because of an ability

* Remove duplicate Ability change class and added getType() function under a move

* Reworking how moves get passed into hit calc

* Fixing exceptions and overreaching changes

* reverting forwarn and dancing move back to original since they are not being changed

* fixing some small move related bugs

* Fixing file permissions after testing

* Fixing move type not resetting after individual MoveEffectPhase

* Fixing move.ts permissions (again)

* Addressing some MR feedback and adding some documentation for PokemonMove class
2024-06-07 16:57:57 -04:00
sodam
636cb9c8f2
[Localization] #1761 Korean trainer dialogue (some unnamed trainers) (#1911)
* localized to korean (some unnamed trainers)

* fixed dialogue's meaning clear

Co-authored-by: returntoice <dieandbecome@gmail.com>

* fixed spacing right

Co-authored-by: Sangmin Lee <66083363+GINK-SS@users.noreply.github.com>

---------

Co-authored-by: returntoice <dieandbecome@gmail.com>
Co-authored-by: Sangmin Lee <66083363+GINK-SS@users.noreply.github.com>
2024-06-07 21:52:31 +01:00
prime
f5f98ec537
[Bug] fixed wrong stacking of move info overlay issues (#1888)
* fixed wrongly stacking overlay issues

- starter selection
 - IVs are now behind the overlay
 - the overlay should clear when exiting it via controller (requires tests as i don't have a controller)
- TM
 - will prevent C/Shift from showing the overlay until the next item selection, when selecting a TM as item reward.
 - will prevent C/Shift from showing the overlay when canceling item selection

* removed reference to previously deleted resource

* fixed override
2024-06-07 16:45:49 -04:00
Jannik Tappert
97dde2d1f3
[QoL] Added https and server url is read from the env now (#1764)
* Added https and server url is read from the env now

* Added the new key to the vite.env.d.ts
2024-06-07 21:43:32 +01:00
Arxalc
7c3ace7204
[Bug] Fixed primal weather interaction. (#1744)
* Fixed primal weather interaction.

* Made adjustments

* Improved code readability
2024-06-07 15:22:06 -04:00
Corrade
c177f3c1fb
[Bug] Ignored strong winds for stealth rock and anticipation (#1682) 2024-06-07 15:15:24 -04:00
Lee ByungHoon
d592187f2c
[Localization] Add localization in party-ui-handler (#1712)
* [Localization] Add localization in party-ui-handler

* [Localization] Add "Release", "Apply", "Teach" localization, changed translation of Korean

* [Localization] Translated party-ui-handler's localization to Deutsch
2024-06-07 15:08:34 -04:00
Madmadness65
a224f5e822 Add Partner Pikachu & Eevee party icons
This also necessitated giving them unique front & back sprites too, even if they are currently just duplicates of the normal forms. This change will help players identify when they are using/have encountered a Partner Pikachu or Eevee.
2024-06-07 13:58:48 -05:00
Adam Clemons
fb21caa769
[Bug] Fix ability Download switch in (1669) (#1679)
* Update ability Dowbload

* Remove whitespace

* Update ability.ts
2024-06-07 14:17:22 -04:00
hayuna
bb1dde5b0c
[Refactor] Move enum ExpNotification into separated file (#1909)
* Move enum ExpNotification into separated file

* Update phases.ts

* Change type of this.scene.expParty into enum
2024-06-07 13:14:52 -04:00
雪霁
19712e0d43
fix language auto detect (#1784) 2024-06-07 11:27:42 -05:00
Matthew Olker
20a3a4f60f added a few more gameobject names for debug 2024-06-07 10:27:36 -04:00
MutenYoshii
f17a4ff3f2
[Move] Implemented Court Change (#1799)
* [Move] Implemented Court Change

* Returned overides to normal

* Added recommended changes

* Removed an unnecessary if statement for swaparenatagsattr

* Move the swaptags array to the call as well as changes to the quiet boolean

---------

Co-authored-by: Juan <jmora279@fiu.edu>
2024-06-07 09:27:11 -05:00
MadridPawmot
4745b591c2
[Localization] Spanish dialogues (#1892)
* Update dialogue.ts

* Fixed typo
2024-06-07 15:02:24 +01:00
Sangmin Lee
50bf717c5c
[Localization] #1761 Korean trainer dialogue (roark, gardenia, maylene, fantina) (#1905)
* [Localization] #1761 Korean trainer dialogue (roark, gardenia)

* [Localization] #1761 Korean trainer dialogue (maylene, fantina)

* Modified Roark's dialogue more natural

Co-authored-by: returntoice <dieandbecome@gmail.com>

---------

Co-authored-by: returntoice <dieandbecome@gmail.com>
2024-06-07 09:57:14 -04:00
DustinLin
ffdbdc1139
fix sleep talk targeting (#1813) 2024-06-07 13:38:22 +01:00
José Ricardo Fleury Oliveira
132d01776e
[ptBR Localization] Updated dialogue.ts, Tera Shards and trainer.ts (#1881)
* updated sailor dialogue

* tera fix

* trainers

* ice face
2024-06-07 12:57:10 +01:00
Cycrum
cc2e31dbe0
[Localization] Corrected capitalization on Quick Claw activation text (#1894)
* Update pokemon-species.ts

Updated Pokemon genders to canonical rates

* Corrected capitalization of Quick Claw activation
2024-06-07 00:45:36 -04:00
MrWaterT
a852106a9d
[Localization] Correct and apply updates to Korean (#1863)
* [Localization] Apply Korean to update

ability-trigeer.ts
  windPowerCharged: Wind Power/Wind Rider #1566
  Perish Body #1554
  Poison Heal #1245
menu.ts
  Loading screen disclaimer 7c9e5e9
modifier-type.ts
  TM description with overlay key notice #1585

* Correct wrong text and align text width

change RV
remove space from FGEN

* Edit wrong space

* Use special color(official) rather than unofficial shiny

* Translate iceFaceAvoidedDamage
2024-06-07 00:19:45 -04:00
Xavion3
9013921523
[Bug] Fix speed tie code (#1895)
* Fix speed tie code

* Fix off by one error

* Shuffle before sorting to make code cleaner
2024-06-06 23:01:13 -04:00
DustinLin
a815b73d96
[Documentation] documentation of move.ts (#1828)
* starting documentation of move.ts

* more docs

* fixing comments

* updating comments
2024-06-06 20:11:14 -05:00
Benjamin Odom
4cce8a1bfa
Update index.css (#1898) 2024-06-06 19:57:12 -05:00
prime
5568def1a4
Show C-Button on mobile during modifier selection (#1893) 2024-06-06 19:20:13 -05:00
Raidette
209a69d098
[Move] Rototiller implementation (#1885)
* rototiller implementation

* attack now fails if no eligible grass type pokémon is fielded
2024-06-06 17:22:04 -04:00
Greenlamp2
9c1a13eb54
Fix - double inputs (#1842)
* fix an issue where the input repeated itself too fast

* remove remnant code
2024-06-06 22:55:01 +02:00
returntoice
a18d796e2e
[Localization] Fix Korean multi lens description (#1891) 2024-06-06 16:43:25 -04:00
Cycrum
4fcc3ef9ff
[Feature] Update Gardevoir, Glalie, and Meloetta genders (#1864)
Updated Pokemon genders to canonical rates
2024-06-06 16:19:41 -04:00
Jannik Tappert
1312d4f825
[Qol] The title will now be displayed in the voucher overview (and flyout) (#1886)
* The title will now be displayed in the voucher overview

* Update src/system/voucher.ts

* Intend
2024-06-06 15:01:21 -04:00
Tempoanon
ac8ae6c724
Thunderclap should not let the AI read your inputs (#1884) 2024-06-06 12:59:22 -05:00
Tempoanon
609efb0cf9
Fix typo in healing charm for Chinese localization (#1874) 2024-06-06 12:58:02 -05:00
Matthew Olker
1276006de3 Money shouldn't cover full screen even if its funny 2024-06-06 13:30:43 -04:00
HighMans
17edaeb708
[QoL] Sort items on summary screen (#1880) 2024-06-06 13:13:14 -04:00
MadridPawmot
f3de114d2b
[enhancement] Added Sailor trainer class (#1411)
* Add files via upload

* Update trainer-type.ts

* Update biomes.ts

* Update trainer-config.ts

* Update trainer-names.ts

* Update trainer-names.ts

* Update trainers.ts

* Update trainers.ts

* Added German translation

Thanks to CodeTappert

* Update trainers.ts

* Update trainers.ts

* Update trainers.ts

* Update trainers.ts

* Update trainers.ts

* Update trainers.ts

* Update trainers.ts to resolve conflicts

* Fixed syntax error

* Update biomes.ts

* Re-added possible biomes for the Sailor trainer class

* Added data for dialogue lines for the sailor class

* Added dialogue from FRLG

* Added locale

* Added locale

* Added locale

* Update trainers.ts

* Added locale

* Added locale

* Added Korean translation

* Added locale

* Added Portuguese translation

* Added locale

* Added locale

* Added Mandarin Chinese translation

* Added Cantonese Chinese translation

* Added images

* Recentered sprite

* Added Spanish translation for the dialogue

* Delete duplicate

* Delete duplicate

* Updated dialogue with requested changes

* Update Spanish translation to reflect the changes

* Update dialogue.ts

* Update dialogue.ts

* Update dialogue.ts

* Update dialogue.ts

* Update dialogue.ts

* Update dialogue.ts

* Update dialogue.ts
2024-06-06 11:55:32 -05:00
Noor Q
14b5d141c1
[QoL] Added an indicator when money changes. (#1772)
* added an animation and color shift when adding/removing money

* eslint fix

* The animation is now vertically centered, larger and faster.
2024-06-06 11:50:02 -05:00
Lee ByungHoon
90aa9b4209
[Localization] #1761 Korean trainer dialogue (#1853)
* [Localization] #1761 Translation to Korean about some trainers

### trainer list
- ace_trainer
- parasol_lady
- twins
- cyclist
- black_belt

* fixed the grammar of some sentences. and changed Korean about ace trainer.

* Modify translation dialogue with parasol lday and cyclist
2024-06-06 12:22:31 -04:00
HighMans
a221a46220
Attempt to sort items on summary & battle screen for user's party. (#1188)
* Sort items in summary screen by type then name.

* Use modifierSortFunc from modifier.ts

* Implement proper sort function which also applies to the battle scene.

* Implement proper sort function which also applies to the battle scene.

* Run linter.

* Fix type assertions.
2024-06-06 11:10:38 -05:00
Dmitriy K
223d8a731d
[Feature] Implement Full Heal/Lum/Full Restore to heal Confusion #1658 (#1876)
* Added Confusion to be healed with Full Heals and Full Restores

* Semi-Colon oversight

* Changed resetStatus to have a condition whether to include confusion or not, defaults to false so you manually have to add

* Fixed spacing and semicolon

* Refactored the Lum Berry case

* Fix berry conflicts

* Update {}

* Fix PP Conflict

* Build fix?

* Fix Modifier

* Build Fix

* Fix

* Fix StatuHeal from eslint

* Fix revive (will show testing through everything again)

* Update documentation

---------

Co-authored-by: Ethan <hensley.ethan64@gmail.com>
Co-authored-by: Ethan <71776311+EvasiveAce@users.noreply.github.com>
2024-06-06 12:04:16 -04:00
Adrian T
8d6a0bb0a1
[Ability] Implement Ice Face (#1755)
* implement ice face ability

* remove showing ability bar

* fixes

* add documentations

* move code out of phases.ts

* add hardcoded eiscue check, localization

* add KO locale

* remove unnecessary constructor

* use && instead of || to specify ice form on eiscue
2024-06-06 11:49:50 -04:00
MrWaterT
ba66f2c916
[Bug] Remove text on summary bg (#1709) 2024-06-06 11:31:31 -04:00
SeafoamQueen
3fea384dc1
[Feature] Added Battle Style setting (#1872)
* Added Battle Style setting with Shift and Set options

* Changed 'Shift' option to 'Switch' to match the Gen 8 setting.
2024-06-06 11:26:04 -04:00