Commit Graph

35 Commits

Author SHA1 Message Date
ImperialSympathizer
065ac0e779 add offer you can't refuse 2024-07-23 20:11:45 -04:00
ImperialSympathizer
810c50cda2 new Field Trip encounter and add EXP gains to other encounters 2024-07-11 11:40:07 -04:00
ImperialSympathizer
efb00553c9 styling and text coloring fixes 2024-07-10 15:06:12 -04:00
ImperialSympathizer
cf43589260 fix unit tests 2024-07-10 15:04:18 -04:00
ImperialSympathizer
7b35efe95e adds 2 new encounters and colorable text options 2024-07-10 15:03:36 -04:00
ImperialSympathizer
666ec135ba bug fixes, cleanup, and tests 2024-07-10 14:52:27 -04:00
ImperialSympathizer
860e875587 rebase encounters branch with pokerogue/main 2024-07-10 14:51:06 -04:00
Amani H
f7f8988cdb
[Item] Add Light Ball, Thick Club, Metal Powder, and Quick Powder (#1899)
* Add Light Ball, Thick Club, and Metal/Quick Powder

* Fix Typo, Account for Fusions

* Fix Errors with Fusions

* Group Items into Generator

* Refactor Generator and Type, Fix Localization (en)

* Adjust Generator, Add Override Type

* Fix Enum Import

* Localize for de, es, fr, it, ko, zh_CN, zh_TW

* Add Unit Tests

* Add Type

* Fix Items Atlas

* Change Cubone Passive Ability, Adjust Weight
2024-06-26 13:48:10 -05:00
sirzento
9d090f37f9
[Feature] [Same species Egg] Egg class rewrite to enable fully parameterized eggs to generate same species eggs + Egg overrides (#1833)
* Create variant-tiers enum

* Added variant tier override property to the egg class

* Added hasVariants function to pokemon species

* Implement variant override logic to egg hatching phase

* Delete src/enums/variant-tiers

* Create variant-tiers enum

* Added egg shiny and variant overrides

* fixed egg comment in overrides.ts

* Added override logic to egg hatch phase

* Added species pool filter logic when global override is set

* Added global egg tier override logic

* Added global egg tier override

* Added global gacha pull count override logic

* Added global gacha pull count override

* Renamed egg hatch override

* Renamed egg hatch override

* Added gacha pull without voucher global override

* Renamed free gacha pull global override

* Added free gacha pull override logic

* Gacha pull count override name fix

* Bugfix

* restored defaults + savegame bugfix

* eggOptions added to parameterize eggs. Added option to buy eggs of the same species.

* Small Bugfix for same species egg generation

* Removed translation from translator

* Improved the isManaphyEgg() check

* Fixed manaphy egg hatch wave count

* Added comments to IEggOptions

* Added eggOptions for hidden ability and rare egg move override

* Merge Fix: Update egg-hatch-phase.ts

* Fixed manaphy rates back to 1/256 like in PR #2182

* Renamed override, same species egg unlocks after passive is bought. Added code as comment for custom shiny, HA and rare egg move rates.

* Merge fix. Moved enums.

* quick fix for the commented out code

* Fixed that you can't buy an egg over the 99 egg limit

* Fix that you can't buy eternatus

* Use already existing randSeedShuffle instead of my own function

* Eternatus buyable again. Changed overrides to be able to set common tier/variants. Moved getGuaranteedEggTierFromPullCount().

* Changed eggOption gachaType to sourceType. Replaced eggOption overrideRareEggMove with eggMoveIndex to exatly specify an egg move. Moved egg move unlock logic into the egg class. Simplified shiny calculation. Added same species egg type descriptor. Moved custom rates for same species egg code into egg.ts.

* Added 19 unit tests for eggs

* Changed unit test description

* Added higher rates for same species eggs

* Adjusted same species egg cost for 1-3 cost starters and HA rates

* Added legacy egg loading unit test. Fixed gachaType legacy value loaded from DB and legacy tier loading

* Legacy egg loading from server DB fixed
2024-06-21 20:19:56 -04:00
Matthew
dc30dd33b2
[QoL] Reorganize Enum Locations (#2185)
* moving enums

* import updates

* fix tsconfig paths importing (#2184)

* reverse index.ts addition

---------

Co-authored-by: Devin Korb <meepdarknessmeep@gmail.com>
2024-06-13 18:44:23 -04:00
Matthew Olker
e6c24dceab Revert "[QoL] Reorganize Enum Locations (#2142)"
This reverts commit cf06ff3b8d.
2024-06-13 11:30:47 -04:00
Matthew
cf06ff3b8d
[QoL] Reorganize Enum Locations (#2142)
* moving enums
2024-06-13 11:11:12 -04:00
Dmitriy K
0970c2cd4e
[Refactor] Replace forceBypass with bypassFaint flag (#1839)
* replace forceBypass with bypassFaint flag

* add another path alias for src/test

* make form override work for the whole party instead of the first pokemon

* add tests for all abilities that are touched by this change

* remove unnecessary overrides from tests

* move SpeciesFormChangeTimeOfDayTrigger outside arena reset logic

* remove alll resetMock calls, rename it to test
2024-06-13 11:36:12 +02:00
prime
0c85823645
[Enhancement] Golden IVs Chart when all IVs are perfect (#2019)
* golden chart for perfect IVs

The IVs chart is now golden in case all IVs are perfect.

A few overrides have also been added to make testing easier:
- the opponents IVs can be overridden
- the color can be modded via the window.perfectIVsChartColor variable.

* added perfectIVsChartColor to window

* added changes as requested

- removed global variable
- removed chart versatility
- changed color
2024-06-12 09:56:23 -04:00
Greenlamp2
0faccad49e
[Bug Fix] Corrected PostSummonPhase Trigger Timing for Accurate Stat Changes (#2057)
* fix postSummonPhase when opponent does not summon and fix the statsChange from push to unshift

* added switch pokemon helper method

* added on switch tests for intimidate

* fix test by overriding passive in tests

* remove a test not needed

* cleanup imports
2024-06-11 16:12:46 +02: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
prime
1c98106642
[QoL] Move Info Overlay (#1585)
* move info implemented for starter selection

a move info box is displayed when editing the starter moveset.

also menus have now onHover triggers.

todo:
- show ui when selecting TMs
- show ui when selecting moves to remember (memory mushroom)

* More Move Info Overlays

Added overlays during Memory Mushroom use and when viewing TMs.
Furthermore a settings option can enable/disable those overlays.

* Added missing ko language entry

... though translation still remains necessary

* updated ui

also added overrides for item rewards

* minor ui update

moved values to the right in the tm move info box

* fixed typedoc issues

* removed settings in to prepare for merge

* updated settings option

added settings option to new settings implementation

* minor changes

removed unused graphic
moved settings option to accessibility
2024-06-05 20:28:12 -05:00
Benjamin Odom
6dbf99cc72
[Bug] Fix Circular Dependency with BerryType (#1802)
* Fix Potential Circular Dependency with BerryType

* remove .js
2024-06-04 19:03:02 +01:00
Tempoanon
1c73b3b084
Revert "[Feature] Add possibility to override whole user party (#1643)" (#1796)
This reverts commit ef8b6aa4f9.
2024-06-04 16:39:02 +01:00
hayuna
ef8b6aa4f9
[Feature] Add possibility to override whole user party (#1643)
* Add possibility to override whole user party

* Update species overriding

* Replace SPARTER_SPECIES_OVERRIDE with array

* Replace SPARTER_SPECIES_OVERRIDE with array

* Add possibility to override species forms

* Add possibility to override species forms

* Fix eslint styling

* Add possibility to override Abilities for party

* Override status, gender, moveset

* Add possibility to override shinies

* Fix CI
2024-06-04 11:29:38 -04:00
karl-police
f2a6fe5c6a
Autocomplete for modifiers in overrides (#1057)
* Autocomplete for modifiers

* Update overrides.ts

---------

Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
2024-05-31 17:41:09 -05:00
Dmitriy K
b1c208cd86
[Feature] Add status override (#1602) 2024-05-30 12:49:57 -04:00
hayuna
ee2c61c4b8
[Feature] Add possibility to override foe level (#1561)
* Add possibility to override foe level

* Override foe level

* Update code styling

* Replace null with 0 as init value

* Replace null with 0 as init value

* Update order of constants
2024-05-29 15:17:36 -04:00
Adrian T
0d80a045fd
fix gender override (#1469) 2024-05-27 23:59:01 -04:00
hayuna
4c443e7760
Add flag for immediate hatching eggs (#1424)
* Add flag for immediate hatching eggs

* Change time to hatch based on flag in Overrides
2024-05-27 05:49:49 -05:00
Greenlamp2
3120917368
Overrides - Gender, Xp multiplier and arena tint (day & night) overrides (#1201)
* added override gender and arena tint (day & night)

* cleaner diff

* reset override

* fix gender override default value

* removed useless return variable

* also null for opponent

* add override tint, gender, xp multiplier

* remove condition duplicated + set overrides initial value to null

* added comments

* eslint

* Update overrides.ts

---------

Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
2024-05-26 11:17:41 -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
bd902f01a5 Re-order overrides 2024-05-16 18:19:32 -04:00
Matthew
21a0a0276d
add pokeball override (#793) 2024-05-13 03:40:53 -05:00
Matthew
e195c6d799
Show Default Pokemon icon for missing shiny icon (#802) 2024-05-13 06:41:02 +10:00
Matthew
10cf1cd94f
Cleanup overrides and imports (#603)
* cleanup overrides and imports

* Add GreenLamps Modifier Overrides

* added comments

* starting money and biome comments

* account for overriding empty move

* more override descriptions

* added generator held item names to override comment
2024-05-09 14:52:09 -05:00
Reldnahc
84f6f06ca4 add override to force double battles.
add override for passive abilities.
2024-05-06 19:11:34 -04:00
Tempoanon
5b44905b86
Fix Shedinja passive, mummy passive, acupressure, moody, and added a second move override (#369) 2024-05-04 12:30:23 +10:00
Xavion3
ad5efdf4f9 Refactor overrides 2024-04-30 09:12:19 -04:00