* Use BattlerTag for move-disabling effects
* Fix RUN command causing freeze
* Improve documentation
* Clean up and document PokemonMove.isUsable
* Fix isMoveDisabled missing return
* Tags define the message shown when disabling interrupts a move
* Fix -1 duration on Disable effect
* Add tests for Disable
* En loc and fix message functions
* Fix Disable test
* Fix broken imports
* Fix test
* All disable tests passing
* Localize remaining strings
* Move cancellation logic out of lapse; use use TURN_END for lapse type
* Prevent disabling STRUGGLE
* Inline struggle check function
* Restore RechargingTag docs
* Move cancellation logic back to tag
Wanted to increase similarity to the existing code base to avoid that stupid hyper beam error but it's still happening here
* Fix hyper beam test
* Remove erroneous shit
* Fill movesets with SPLASH for disable test
* More robust condition for disable checking
* Remove DisabledTag lapse
* Simplify DisablingBattlerTag lapse
* Cancel disable-interrupted moves instead of failing them
* Avoid disabling virtual moves
* Consistent access modifiers across Disable tags
* Add abstract function for message when player tries to select the disabled move
* Fix syntax mistake
* Always disable last-used non-virtual move
* Overhaul tests + add tests
* Implement loadTag for DisabledTag
* Update translations
* Update translations
* Reimplement phase changes
* fix battlertag strings
* Fix disable test not running
* Update name of base class
* Rename "disabling" to "restriction"
* Fix sneaky string fuckup
* Fix test failure
* fix merge problems
* fix merge problems
* Update tests
* rerun RNG test
* Properly mock stats in test
* Document everything in battlertag
* More docs + typo fix
* Update tests
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Use default values in the `Battle` class
Turn a couple of comments into tsdoc comments
Replace a `!!` with `?? false`
* Replace `integer` with `number`
* Fix inconsistencies with ability triggers on variable-type moves
* Fix aura effects not accounting for the move user
* Fix Wonder Guard evaluating move type as if the defender used the move
* Some additional test coverage for move-type-changing effects
* Add `isTransferrable` property to `BattlerTag`s
* Update Baton Pass to check `isTransferrable` for `BattlerTag`s
* Don't mark Salt Cure as transferrable
* Add Destiny Bond, remove `GroundedTag` and `ExposedTag`
* Fix daily mode test
* Add test
* Rename `isTransferrable` to `isBatonPassable`
* cherry picked commits / manual copy
* better dex tracking for summary after regular egg hatching
* ui changes
* updated egg hatch bg, added candy tracker, icon anims for new shiny or new form unlock
* added i18 line, reset overrides
* touchup
* code cleanup, documentation and slight refactor
* sprite display fix
* load interrupts, simple sfx and no summary for small egg amounts
* Garbage Collection + Eslint/Docs approved.
* time logging and optimisation
* skip redundant load
* more time logs and fix pre-load issues
* more detailed loading logs
* changed loading to be on demand from cursor nav
* fix missing variant icon fallback
* removing redundant time logs and code touchup
* code cleanup
* Comments so developer doesn't get bugged about garbage collecton
* remove logs n stuff
* lang settings touchup and final touchup plus uploading blank egg summary bg
* fix nits, js imports, extra docs, magic numbers changed
* extra docs and spacing nits
* Update Github
---------
Co-authored-by: James Diefenbach <z5421232@ad.unsw.edu.au>
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: frutescens <info@laptop>
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
* [Bug] Fix reloads causing RNG inconsistencies
* Minor revisions
* Allow reload helper to directly access getSessionSaveData()
* Changed Moody and Acupressure to use seeded RNG
* Fix broken unit test
* [Bug] Fix eggs having exploitable RNG
* Fix Wind Rider test having random chance to fail
* Revert egg's ID back to its own unseeded generation
* Remove change from wind rider test
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
* Create Getters, Setters, and Types
* Work on `pokemon.ts`
* Adjust Types, Refactor `White Herb` Modifier
* Migrate `TempBattleStat` Usage
* Refactor `PokemonBaseStatModifier` Slightly
* Remove `BattleStat`, Use "Stat Stages" & New Names
* Address Phase `integers`
* Finalize `BattleStat` Removal
* Address Minor Manual NITs
* Apply Own Review Suggestions
* Fix Syntax Error
* Add Docs
* Overhaul X Items
* Implement Guard and Power Split with Unit Tests
* Add Several Unit Tests and Fixes
* Implement Speed Swap with Unit Tests
* Fix Keys in Summary Menu
* Fix Starf Berry Raising EVA and ACC
* Fix Contrary & Simple, Verify with Unit Tests
* Implement Power & Guard Swap with Unit Tests
* Add Move Effect Message to Speed Swap
* Add Move Effect Message to Power & Guard Split
* Add Localization Entries
* Adjust Last X Item Unit Test
* Overhaul X Items Unit Tests
* Finish Missing Docs
* Revamp Crit-Based Unit Tests & Dire Hit
* Address Initial NITs
* Apply NIT Batch
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* Fix Moody Test
* Address Multiple Messages for `ProtectStatAbAttr`
* Change `ignoreOverride` to `bypassSummonData`
* Adjust Italian Localization
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
* Fix Moody
---------
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
* Added Donate Link to Community Page
Removed the cookies from the html and added a Donations link on the community page (with guidance from Walker)
* Added Translation Key
* show passive name even if it is locked or disabled
* update passive label with updated new icons
* fix icon remains bug, when go start button and filterbar
* fix for [Bug] Moves That a Pokemon Knows and are not in their List of Learnable TMs Display as "Not Able" Rather than Learned #3930
* convert switch case block to if/elif/else
* [Localisation] [JA] trainer-classes.json
Names taken from Poke Corpus and Bulbapedia.
Some double team names do not exist in the official games so I created some new fitting/localised/funny ones (e.g. (solo) サイキッカー -> (double) サイキッ家)
As we are using Scarlet/Violet Kanji usage conventions, I decided to write all class titles that were Hiragana only in BW/B2W2 with Kanji instead.
* Translate trainer-names.json
Should we localise the names of Finn and Ivy?
Two possible ideas:
Finn -> チトセ (Finn may come from the "Whale Fin" snake plant; Latin Name Sansevieria Masoniana. The Sansevieria family is known as チトセラン属 in Japanese. チトセ(千歳 millenium;long time) can be a reference to endless loop of Classic Mode)
Ivy -> タイチ (Ivy -> IV. IV in Japanese is 固体値 (こたいち). タイチ also sounds like 対置 (opposition)
* Update trainer-classes.json
* Translate trainer-titles.json
* fix: Enable female gender for all default starters and all existing saves
* Fixed Fresh Start so it doesn't restrict gender
---------
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
Co-authored-by: frutescens <info@laptop>
* I hope this is good enough
* renamed variable to better name
* Remove random newline
* When player is ready cool box
* Fixed cancel behavior
* standardized action/cancel behavior
* Added comments
---------
Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Double shiny odds
"anyone wanna double the base shiny odds for me" - damo, 2024
* Adjust Shiny Charm to compensate for increased base odds
* Remove magic number
* Update tsdoc and remove unneeded `console.log()`
* Clarify tsdoc
* Moves copied by Dancer should not consume PP
* Add test for Dancer (unfinished)
* Delete src/test/abilities/dancer.test.ts
This test is not finished lol
* Add test
* Translate tutorial.json via GitLocalize
* Translate challenges.json via GitLocalize
* Translate menu-ui-handler.json via GitLocalize
---------
Co-authored-by: José Ricardo <josefleury@discente.ufg.br>
* implement test for final boss encounter phase switch
* Update Eternatus tests & helper function
* fix endless_boss test following GameManager update
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Implement Tera Shell
* Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update src/data/ability.ts
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* Add comments and fixed damage condition to `applyPreDefend`
* Fix speed tie breaking things in tera shell test
* Change deprecated `startBattle` calls
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* Biome Adjustments 1
* MOUNTAIN OUT FROM ANCIENT RUINS
* snorlax gmax adjustment
* Localizers please calm down - Snorlax Ability + Passive change
* One more time let's give it a go biomes.ts
* fixed ]
* Update biomes.ts
* fixed spelling mistake
* Blah
* Thought about it more
* Removed excess comment
* Purposely tested everything by manually setting bypassLogin to false
---------
Co-authored-by: frutescens <info@laptop>
* Don't recalculate stats that already exist
* add test to cover hp update after evo (#4)
- add evolution phase to phase interceptor
- add mock for video game object
- add returning video mock on add.video()
* add test to make sure pkm are not healed on evolve
* Stop on `EndEvolutionPhase` to prevent game state leak in tests
* Fix imports
* Remove `.js` from import
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* Add docs to mock class
---------
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* fix skipSeenDialogue storing
seen dialogues were stores as actual string instead of their i18n-keys. This fixes it.
Reported on discord:
https://discord.com/channels/1125469663833370665/1176874654015684739/1278794542648131695
* fix falling back to english
* Victory-Rival Dialgoue
* Update src/phases/game-over-phase.ts
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* fix showDialogue for non i18n-key calls
showDialogue can be called with either text or an i18n key. This wasn't taken into account and caused some console spamming.
---------
Co-authored-by: frutescens <info@laptop>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* Adding code to allow use of a testing dialogue translation menu
* Updated to include autocomplete functionality
* Added multiple inputs
* Added locales for other languages as well as checks to make this only available on local/beta
* Updated a few things to try get the dialogue to work for full length of the window
* Fixed issue with message box not taking up full length of the screen (thanks Moka!) and some minor bugs
* Whoops, forgot to stage a file
* Updated locale files
* Fixed broken tests and docs
* Removed keys from json
* Reordered and reorganised some things
* Put admin enum at end to match handlers
* Removed old unneeded line of code
* Updated to include the ability to handle cases where i18 keys are null in the locales json
* Test changes to starter ui stuff for edge case stuff to fix
* Minor bug fixes
* [starter-ui] cleanup outdated fix
* use existing method to get the default form from the caught attributes
* clear the existing StarterPreferences of potential invalid values
* remember the last variant used even when disabling shiny form
* fix variant and shiny checks for edge case with variant flags but no shiny flag
* more fixes for invalid starter prefs and default settings
---------
Co-authored-by: Opaque02 <66582645+Opaque02@users.noreply.github.com>
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
* Biome.END goes somewhere random
* this way island is included too
* no towns or plains
* Enums are dumb
---------
Co-authored-by: frutescens <info@laptop>
* i18n: prepare female DE achievments
and copy keys in base language: en
* adapt gender context for achv
* add a TODO about an odd `this` usage
* remove debugging leftover code
whops
* add `playerGender` to settings helper
* fix test runs
And revert some changes
* feat: Add hasAdminRole property to UserInfo interface and update initLoggedInUser and updateUserInfo functions
This commit adds the hasAdminRole property to the UserInfo interface in the account.ts file. The initLoggedInUser function is updated to set the hasAdminRole property to false by default. The updateUserInfo function is also updated to set the hasAdminRole property to false when bypassLogin is true. This change allows for better management of user roles and permissions.
Co-authored-by: frutescens <info@laptop>
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
* Updated UI for admin panel and menu
* Remove random blank line from merge
* Fix imports in `src/ui/ui.ts`
---------
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Inserts break to prevent fall through in checkFlag
* Adds break to IGNORE_PROTECT case for safety
* Revert "Adds break to IGNORE_PROTECT case for safety"
This reverts commit 2589faf69e.
* Adds break to IGNORE_PROTECT properly
* Translate ability.json via GitLocalize
* Translate arena-flyout.json via GitLocalize
* Translate dialogue-female.json via GitLocalize
* Translate modifier-type.json via GitLocalize
* Translate move.json via GitLocalize
* Translate settings.json via GitLocalize
* Translate tutorial.json via GitLocalize
---------
Co-authored-by: José Ricardo <josefleury@discente.ufg.br>
* Make sure trainers are using fully evolved Pokemon by gym 3
* Expand comment info
Co-authored-by: Mumble <kimjoanne@protonmail.com>
* Implement suggestions
* Update `getPokemonSpecies()` to throw an error if passed `undefined`
---------
Co-authored-by: Mumble <kimjoanne@protonmail.com>
* Re-Added localisation for Meloetta Pirouette
* "Refactored Japanese backlog (json migration)"
* Update pokemon-form.json IT
Mixed with Meloetta PR
* Fixed Meloetta changes sneaking in the JA PR
* Fixed Meloetta changes sneaking in the JA PR again
* Update src/locales/ja/menu-ui-handler.json
This is why translation PRs should not sit for 2 weeks
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
---------
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
* Added settings option to toggle UI sound effects
* Added text to other locales
* Localizations except es and it
* New language locales
* Added italian translation
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
* Refactored on top of PR #3527
* Rebased and updated setting name
* Added comments for the included sound effects
---------
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
* Make type/category read-only
* Fix protean/libero tests
* Refactor Pokemon type effectiveness calculation
* Merge getMoveEffectiveness and getAttackMoveEffectiveness
* Move priority-blocking ability check
* Fix incorrect early stopping implementation in MultiHitAttr
* Fix Aerilate, etc. affecting variable-type moves
* Thunder Wave now respects Attack type immunities
* Use final move types for pre-defend abilities
* Steal some things from flx's PR hehe
* Fix Thousand Arrows + "No effect" messages
* Fix status type effectiveness check
* Another status move effectiveness update + some docs
* changing status logic again...
* Fix unnecessary "No Effect" message for Volt Absorb, etc
* Add type effectiveness unit test
* Add Galvanize integration tests
* Add multi-hit test to galvanize tests
* Add power check to first Galvanize test
* Add missing doc line
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
* Resolve torranx's nits
* Apply suggestions from Kev's code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* More suggestions I missed
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Optimize effectiveness test and make others more stylish (#3)
* Resolve Kev's remaining nits and some test issues
---------
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: flx-sta
Co-authored-by: frutescens
* resize achv box default width
* add language font size option. DE font size 80px
* resize challenge desc window width. fix cursor width. shrink font size of desc. set middle align start label
* [Balance] Gigantamax State/Form Rebalance (WIP)
* GMAX Ability for Orbeetle adjusted
* fixed typo on CHLOROPHYLL
* Adjusted stats so there was a less intense drop in some stats
* Added comments to GMAX Pikachu, Eevee, Meowth
* Updated ability for GMAX Kingler and Eevee
* Added Stellar typing to GMAX Eevee
* Fixed typing on GMAX Eevee and Snorlax
* GMax Garbodor- Toxic Debris > Corrosion
* Corrected Trubbish passive to not overlap with GMax Garbodor
* Update pokemonFixed Coalossal, Flapple, and Centiskorch BST, Alcremie Ability Change
* Changed Alcremie Passive in adjustment with Gmax ability
* Undid Eevee being Stellar
* Gmax Sandaconda Sand Stream -> Sand Spit
* Balance Sweep of changes by damo, less dropped stats and simpler spreads
* fixed 5 Appletun BST I missed
* fixed missing Hatterene BST
* Sets Lunar Blessing selfTarget healing to false
* Removes redundant lines
* Adds unit test for Lunar Blessing
* Adjusts unit tests to spy on function calls
* Enemy trainers will now show their title after defeat
* Basically titles are now always shown (like in the real games)
* Revert "Basically titles are now always shown (like in the real games)"
This reverts commit 6943860539.
* Changed how non-BGM are loaded into the game + moved into directories
* some leftovers
* Apply suggestions from code review
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* Added setting for Field Volume + rewrote playSound() and updateSoundVolume() functions to reflect the new settings.
* Main -> Beta (#3635)
* Fixed issue with falsy issue within condition to get a stat for IV scanner
* add fix setting code to prevent form/variant bug when default form/variant setting is wrong.
in addition, that fix code include gender fix, so i revert old gender fix.
update wrong log message.
* [Hotfix] Fix Memory Mushroom not showing relearner moves (#3619)
* Fix Memory Mushroom not showing relearner moves
* Fix rollout test
* Rewrite player faint logic in FaintPhase (#3614)
* 867 runerigus sprite (#3629)
cropped static frames, fixed cropped sprite
set runerigus exp to use the shiny exp's animation
verified all hex colors are unchanged
- fixed ultra necrozma exp front variant swapped arrays.
- xatu female eye color fix
* [Bug] Preventing the MBH from being stolen in Endless (#3630)
* Endless MBH Fix
* add import
* Revert "add import"
This reverts commit 814a4059c2.
* Revert "Endless MBH Fix"
This reverts commit 8eb4481301.
* removed newline
---------
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: frutescens <info@laptop>
* [Bug] Fix type-hints for immunity (#3620)
* enable mock containers to be found by name
* enable mock text to be found by name
* add test coverage for type-hints
Only for "immunity" and "status moves"
* fix wrong message key of curse(ghost type) (#3631)
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
* [Hotfix] Steal-able Mini Black Hole Pt 2 (#3632)
* Still have no idea where Eternatus is given the MBH....
* typedocs
---------
Co-authored-by: frutescens <info@laptop>
* [Hotfix] Abilities that prevent ATK drops no longer stop other stat drops (#3624)
* Abilities that prevent ATK drops no longer stop other stat drops
* Apply suggestions from code review
Co-authored-by: Mumble <kimjoanne@protonmail.com>
* Add `isNullOrUndefined()` utility function
---------
* Grip Claw now shows the proper pokemon nickname (#3634)
Co-authored-by: frutescens <info@laptop>
---------
Co-authored-by: Opaque02 <66582645+Opaque02@users.noreply.github.com>
Co-authored-by: KimJeongSun <leo@atlaslabs.ai>
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
Co-authored-by: cam <lrlrliwoo@gmail.com>
Co-authored-by: Mumble <kimjoanne@protonmail.com>
Co-authored-by: frutescens <info@laptop>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
* [Bug] Preventing the MBH from being stolen in Endless (#3630)
* Endless MBH Fix
* add import
* Revert "add import"
This reverts commit 814a4059c2.
* Revert "Endless MBH Fix"
This reverts commit 8eb4481301.
* removed newline
---------
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: frutescens <info@laptop>
* [Hotfix] Steal-able Mini Black Hole Pt 2 (#3632)
* Still have no idea where Eternatus is given the MBH....
* typedocs
---------
Co-authored-by: frutescens <info@laptop>
* Deleted phases.ts (#3618)
* Updated sound terms
* Added space for localization
* Update src/locales/ko/settings.ts
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
* Update src/locales/zh_TW/settings.ts
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>
* Update src/locales/pt_BR/settings.ts
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
* Update src/locales/zh_CN/settings.ts
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>
* Update src/locales/de/settings.ts
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
* Update src/locales/ko/settings.ts
Co-authored-by: returntoice <dieandbecome@gmail.com>
* Update src/locales/fr/settings.ts
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
* Update src/locales/it/settings.ts
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
* Include sound effects that were loaded in as BGM.
* Removed stray placeholder localization
---------
Co-authored-by: Frutescens <info@laptop>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Opaque02 <66582645+Opaque02@users.noreply.github.com>
Co-authored-by: KimJeongSun <leo@atlaslabs.ai>
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
Co-authored-by: cam <lrlrliwoo@gmail.com>
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: returntoice <dieandbecome@gmail.com>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
* prevent being able to start with a hidden ability that's not unlocked for some Pokemon
* fix starter ui for pokemon with a single ability and only ability 2 unlocked
* [qol] add animated arrows in the Stats screen to show that the list is scrollable
* make legacy theme checks more explicit
* add some documentation + code cleanup
* Clicking Right from Lock Rarities moves to transfer or check team
* make cursor left movement more natural
---------
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* Improve scroll bar
Remaking these changes on the beta branch since you're supposed to do it for the PR checklist
* Fix potential divide by zero error
Thank you to KimJeongSun for bringing this up
Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com>
* Fix parenthases order
Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com>
---------
Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com>
* fix damage calculations. add test code
* define toIntValue function to replace every repeatitive min floor function.
* revert unnecessary minimum boundary
* update function name `toIntValue` -> `toDmgValue`. update comments.
* add missing updates for changing function name
* Update src/utils.ts
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* remove redundant comment
* update import code for test with phase
---------
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* Adds simulated tag support to all abilities
* Fix compiler errors in ability.ts
Most things are still on fire 😢
* Fix errors left over after merge
* Another pass through simulated ability call logic
* Fix leftover errors from merge resolution
* Another gh pages issue :pikamad:
* Simulated call fixes based on Kev's feedback
* RIP phases.ts
---------
Co-authored-by: Xavion3 <xavion333@gmail.com>
* add `hasTag` to arena
* fix flying type damage calculation for grounded states
Before the grounded state would make e.g. electric moves no more very-effective. This is invalid
Co-authored-by: Tristan D Gant <tgant2017@outlook.com>
* add tests for gravity v. ground v. electric
* Update src/test/arena/arena_gravity.test.ts
fix typo
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* use `arena` instead of this.scene.arena
* use `const arena = this.scene.arean` instead of destructoring
* Apply suggestions from code review
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
* fix es-lint
---------
Co-authored-by: Tristan D Gant <tgant2017@outlook.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
* Fix Jaw Lock not removing TRAPPED tag after enemy faints
* Create tests for Jaw Lock
* Fix overrides import
* Clean up implementation + tests
* minor style change to phases
* Update src/data/move.ts
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* Jaw Lock no longer overlaps its trapping effect
* Friendship ended with JAW_LOCK tag type
Now TRAPPED is my new best friend
---------
Co-authored-by: EmberCM <kooly213@hotmail.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* Fixed issue with falsy issue within condition to get a stat for IV scanner
* add fix setting code to prevent form/variant bug when default form/variant setting is wrong.
in addition, that fix code include gender fix, so i revert old gender fix.
update wrong log message.
* [Hotfix] Fix Memory Mushroom not showing relearner moves (#3619)
* Fix Memory Mushroom not showing relearner moves
* Fix rollout test
* Rewrite player faint logic in FaintPhase (#3614)
* 867 runerigus sprite (#3629)
cropped static frames, fixed cropped sprite
set runerigus exp to use the shiny exp's animation
verified all hex colors are unchanged
- fixed ultra necrozma exp front variant swapped arrays.
- xatu female eye color fix
* [Bug] Preventing the MBH from being stolen in Endless (#3630)
* Endless MBH Fix
* add import
* Revert "add import"
This reverts commit 814a4059c2.
* Revert "Endless MBH Fix"
This reverts commit 8eb4481301.
* removed newline
---------
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: frutescens <info@laptop>
* [Bug] Fix type-hints for immunity (#3620)
* enable mock containers to be found by name
* enable mock text to be found by name
* add test coverage for type-hints
Only for "immunity" and "status moves"
* fix wrong message key of curse(ghost type) (#3631)
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
* [Hotfix] Steal-able Mini Black Hole Pt 2 (#3632)
* Still have no idea where Eternatus is given the MBH....
* typedocs
---------
Co-authored-by: frutescens <info@laptop>
* [Hotfix] Abilities that prevent ATK drops no longer stop other stat drops (#3624)
* Abilities that prevent ATK drops no longer stop other stat drops
* Apply suggestions from code review
Co-authored-by: Mumble <kimjoanne@protonmail.com>
* Add `isNullOrUndefined()` utility function
---------
* Grip Claw now shows the proper pokemon nickname (#3634)
Co-authored-by: frutescens <info@laptop>
---------
Co-authored-by: Opaque02 <66582645+Opaque02@users.noreply.github.com>
Co-authored-by: KimJeongSun <leo@atlaslabs.ai>
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
Co-authored-by: cam <lrlrliwoo@gmail.com>
Co-authored-by: Mumble <kimjoanne@protonmail.com>
Co-authored-by: frutescens <info@laptop>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
* Abilities that prevent ATK drops no longer stop other stat drops
* Apply suggestions from code review
Co-authored-by: Mumble <kimjoanne@protonmail.com>
* Add `isNullOrUndefined()` utility function
---------
* enable mock containers to be found by name
* enable mock text to be found by name
* add test coverage for type-hints
Only for "immunity" and "status moves"
* [Balance] Various Fixes
* Readjusted Legendary same-species eggs back to 10 candy
* Updated some passives
* Changed Chien Pao Passive
* Eevee passive final adjustment
* Chi Yu and Chien Pao changed again
* Arcto passives
Updated Pokemon.getLevelMoves()
Now enforces uniqueness AFTER filtering moves within the given range. This allows a pokemon to learn the same move at two different levels.
Updated pokemon-level-moves.ts
Changed Smeargle to learn Sketch at levels 11, 21, 31, ..., 91, instead of only at level 1.
* Fix daily run generated movesets
* add unit-tests for `fix-daily-run` (#3)
* add `daily` and `classic` helper. split `runToSummon`
there is now a `classicMode.runToSummon` which represents the old one used.
There is now a `dailyMode.runToSummon` too
* add daily_mode.test.ts
covers the occured issue
---------
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* Refactor protection moves
* Revert Protected move result change
* Fix typo in documentation
* Fix merge conflicts in integration tests
* Improve readability of apply function
* Fix effects applying through Protect
* Fix typos in `src/data/egg.ts` comments
* [Localization(it)] Added Honey Gather translation (#2301)
* Update ability.ts [Localization(it)]
* Update ability.ts [Localization(it)]
Fixed capitalization
* Hitting into protect now records a move as failed
* Add check for move success before applying additional effects (Stone Axe)
* `Overrides` should be capitalized
* Add fail conditions for `RechargeAttr` and Jaw Lock
* Update protect test
* Add check for protect in Glaive Rush
* Update tests to use new overrides helpers
* Account for Mat Block and add protect test for Glaive Rush
---------
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
* Crafty Shield now blocks ALL protect-ignoring moves
* Crafty Shield test + Fix blocking ally-target moves
* ESLint
* Mat Block and Wide Guard integration tests
* Fix strict-null errors in integration tests
* Fix strict-null issue in arena-tag
* Fix strict-null in unrelated test :pikamad:
* Fix conflicting AbAttr
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
* Target Pokemon's held items flash with the Pokemon during target selection
* Fixed typedocs issues and adjusted animation
* removed .js from imports
* removed .js from imports
* Slowed down animation + fixed bug
* Implemented Torranx's fixes + slightly widened the range for alpha values
* Apply suggestions from code review
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
* Additional suggestions from code review
* Update src/battle-scene.ts
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
---------
Co-authored-by: Frutescens <info@laptop>
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* Implemented Stall
* Fixed implementation
* AbAttr Name Change
* Wrote test for Stall
* Update src/test/abilities/stall.test.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update src/data/ability.ts
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* Updated ability variables and test
* Apply suggestions from code review
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
* eslint fixes
* Update src/test/abilities/stall.test.ts
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* added documentation and implemented mycelium might
* added note on quick claw
* Documentation + Quick Claw implementation
* This is where I would test quick claw-stall/m.m. if i could override modifierstacks
* Forgot to add edits oops
---------
Co-authored-by: Frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
* Show arena trap/shadow tag dialog immediately instead of as a message phase
* remove flyout that opponent cannot switch out due to opposing arena trap
* change applyAbAttrsInternal signature
* fix bug (no messages appeared) due to prev commit
* fix typedoc docs error
* removed empty message after switching trapped pokemon
* revert empty string argument to null
modified files to adopt null argument
* renamed variable
* [Balance] Egg Adjustments
* Reduced Cost of Same-Species Eggs
* Update egg.ts
* check errors
* Candy per Species-Egg Adjusted
* Set egg cost back to 10 for 9/10 cost mons
* 8-10 Legendaries made to 8 cost Eggs
* Updated some Passive Costs and Cost Reductions
* Change HA rate of eggs to 192
Also clean up the if to make it more readable
* Changed HA Rate from Same-Species Eggs up 1/4 -> 1/8
* Rename "voucher*" variables to "gacha*"
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Included a check for move category in TypeImmunityAbAttr
* Failure 1
* Created new attribute for Levitate - blame Game Freak
* renamed abattr to more descriptive attacktypeimmunityabattr
* need caffeine
* the documentation
---------
Co-authored-by: Frutescens <info@laptop>
Technical issues made it so that my suggestions weren't added in the PR, added them here instead.
toxicSpikesActivateTrapPoison seems to have incorrect dialog in English as well. ( "[X] absorbed [Y]!" )
* Fix typos in `src/data/egg.ts` comments
* Refactor Disguise using Ice Face as a base
i18n {
Co-authored-by: Arxxer <javiptn7@gmail.com>
Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com>
Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>
}
Update tests
* Update jsdoc
* Make recoil damage a parameter
* Fix Ice Face i18n parameter name
* Add i18n placeholder strings for translation
* Update disguise test with override helper functions
* Move a form change from `battle-scene.ts` to `ability.ts`
* Remove a bit of obsolete code from the Disguise test
* Add some translations
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: returntoice <dieandbecome@gmail.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com>
* Add translation placeholder strings for Japanese and Catalan
* Update for strict-null
* Remove unused parameter from the `BattlerTag` class
* Remove species checks, fusion doesn't seem to be an issue (any more?)
* Move Ice Face weather-based code to a subclass
* Condense conditionals
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
---------
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: returntoice <dieandbecome@gmail.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
* update initial filter setting when not in challenge mode
* Modify the code with more consideration for future scalability.
* update initial setting in challenge mode also. no conditional setting!
* Fix some fresh start bugs
* Forgot a !
* Add fresh start check on eviolite too
* Remove part about cost being 3
* Update src/game-mode.ts
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* Rename isFreshStart helper function
---------
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* fix: let flash fire hit after frozen, and baton pass not passing it. added: flash fire test file
* added more tests and made small adjustments
* Update src/test/abilities/flash_fire.test.ts
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
---------
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* [JA] [Localization] Translate starter-select-ui-handler.ts
Unsure about "Enable/Disbale Passive", need some advice.
* Update starter-select-ui-handler.ts
* add unlockable state in passive/cost reduction filter. add egg purchasable filter
* update placeholders
* update option order of UNLOCKABLE between ON and EXCLUDE
* remove egg restriction when buying eggs