* Use getBattleStat instead of getStat in BattleStatRatioPowerAttr
* Change unnecessary let into const
* Refactor BattleStatRatioPowerAttr into two distinct classes
* Add TSDoc for the new classes
* Implementation of Destiny Bond
* Add TSDocs
* Make the move fail in boss battles
* Fix boss immunity and ally fainting
* Update docs
* Add doc of return value of tag lapse
* Fix ESLint
* Added a champion ribbon on enemy pokemon if they have a classic win.
* Refactored to check for other non-root starterDex entities.
* Check for caughtIcon, if false then move ribbon to the left.
* Fixed Merge.
* Bit of refactoring, added check for classic mode.
* Removed random newline and removed unused import.
* Removed overlapping ribbon.
When the wild evolution delays were updated, the biomes file wasn't updated to match, so that has been fixed.
Additionally, the previous refactor removed the commented-out outputPools function. It is where it is because it allows for easily filling out the biomes file for an update.
* Update battle.ts
update some lines of translation
make some translation more official
* Update egg-list-ui-handler.ts
make text position more accurate
This change allows to move the box containing the battle info of the ennemy pokemons during double battle when the user has to choose a target. In addition to the pokemon opacity constantly changing, the battle info will also move up and down to indicate which Pokemon is targeted.
It exposes the BattleInfo object from the Pokemon object through an accessor method.
* 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>
* Give certain Pokemon who start without a damage dealing move a Level 1 option.
A simple QOL change to certain Pokemon who otherwise didn't start with any sort of damage dealing move, or started out with unreliable moves that made the first biome a chore to get through such as Wrap/Bind or Astonish/Flail. The move choices were simply to help early game for these Pokemon and majority of these moves were moves the Pokemon had access to at some point save for some special cases. The following Pokemon were affected: Abra, Gastly, Lickitung, Dunsparce, Slugma, Wailmer, Spoink, Shuppet, Duskull, Burmy, Chingling, Bonsly, Carnivine, Giratina, Darkrai, Throh, Vanillite, Pumpkaboo, Bounsweet, Pyukumuku, Cosmog, Magearna, Applin, Sinistea, Poltchageist.
* Give certain Pokemon a level 1 damage dealing move
* Added Formatting to indicate what is custom, changed Spoink to pull from Confusion 2 levels earlier
* Drop Shadow Adjustments
Adding support for x,y axis on dropshadow and adjusting the values to be less bad
* Further Refined New Shadow Positons
- Reverted MOVE_INFO_CONTENT to the old default
- Slight adjustments to other values
* Fixed Broken Drop Shadows
Fixed a case where the dropshadow became worse
---------
Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
This allows to skip the faint phase in the `#damage` method for physical and special moves, to ensure we first queue the messages for the effectiveness of the attack and the potential critical hit.
We then explicitly unshift the faint phase in this case.
It was causing some Pokémon to be unevolved in later Classic mode trainer battles (notably the fifth and sixth rival fights). Lowering their evolution delay *should* mean they are fully evolved by these fights now.
* Adds in the accuracy and evasion bypass for Mind's Eye
* Added comment to new IgnoreOpponentEvasionAbAttr class
* Added docs to apply so that it is actually complete
* Drop Shadow Adjustments
Adding support for x,y axis on dropshadow and adjusting the values to be less bad
* Further Refined New Shadow Positons
- Reverted MOVE_INFO_CONTENT to the old default
- Slight adjustments to other values
* test commit
* de modified readme
* first implementation, needs testing with healer
* fixed beahviour if 2+ opponents are on field, also added message
* further fixed
* reset of overrides.ts before merge to main
* fixed grammar
Co-authored-by: Jonas Pinson <jonas.pinson@gmail.com>
* Implemented changes suggested by @bennybroseph and @TempsRay
* Added more docs to the class
* removed old comments
* fixed ability name in comments
* added translation and made message localized
* fixed ability name
* added missing bracket
---------
Co-authored-by: Jonas Pinson <jonas.pinson@gmail.com>
* Move Pokemon info screen when confirming
Prevents the yes/no confirm menu from getting in the way when the Pokemon Info screen is open when catching a new Pokemon
* Greatly sped up makeRoomForConfirmUi()
* return a list of errors if something is wrong with the variant's sprite
* reformat
* added data in error message
* added read comfort + detection of missing json for existing variant
* fix an error of message display
* fix fetch color swap, missing a return
* return a list of errors if something is wrong with the variant's sprite
* reformat
* added data in error message
* added read comfort + detection of missing json for existing variant
* fix an error of message display
* Set the name for the ace trainer female class
* Wrote out the name for all females trainer classes explicitly so they are always used.
Also made some changes (added missing classes) to languages
* Checks if Pokemon is Ghost type when determining if it is trapped
* Adding doc comments based on new standard
* Update ability.ts
---------
Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
* Implemented Ball Fetch
* Added once per battle condition
* Ability only functions on player side
* Update ability.ts
---------
Co-authored-by: SamuelHudson <samuel.hudson2017@gmail.com>
Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
* Implemented Merciless
Attribute CritIfTargetIsPoisonedAbAttr
Fix BlockCritAbAttr
* Changed CritIfTargetPoisonedAbAttr to ConditionalCritAbAttr
Now any condition related to user, target or the move used can be applied to guarantee a critical hit.
* So currently if you meet someone with a title it only shows there name and only then the title (not like trainer classes). So i wanted to change that
* The title is not set again to its own value. It is just got differenlty for the nametag (includeTitle true)
* Added the ; as well as some comments that are hopefully helpful for others (i am terrible at writing comments)
* Forgot getTitle for comments
* Fix Crashes when Sprites for Pokémon are missing
Fixes an issue where a missing sprite will cause the game to crash instead of using the base sprite or the Substitute sprite.
Failsafes were already in place to load these backups, this code just allows a graceful fail and a simple error message instead of a crash.
* Check Against OK status
* Translate 'trainer' into Simplified Chinese.
* fixed translate 'hau'、 ‘diantha’ 、‘leon’ into Simplified Chinese.
* Fixed the replace method that was not executed in check female version exists; And fixed pokefan key in localization;
---------
Co-authored-by: Junhan <junhan.wu@nexttao.com>
* Fix Entry Hazard Miss
Made Entry Hazards bypass the accuracy check as they cannot miss a target. There's still one more bug to fix with this but it requires way more code changes. This change needed to be done as well, so I'm getting it out early.
* Update move.ts
* Add files via upload
* Update zh-CN translation
Adjusted some Chinese translations and added line breaks to some item descriptions in modifier-type.ts
* Add files via upload
Updated the check in place when attempting to play a trainer sprite. Separated it into a separate function to reduce reusing code and to make it easier to exit early when failures occur.
* Some translations (battle, modifier-type, trainer)
* More translations and fixes
* Minor fixes
* finished translations
* minor fix
* removed tera type
Corrected the TrappedTag class so no Ghosts can be trapped
Added special canAdd function to IngrainTag so all Ghosts can use Ingrain not just Trevenant and Phantump.
* Use getBattleStat instead of getStat in BattleStatRatioPowerAttr
* Change unnecessary let into const
* Refactor BattleStatRatioPowerAttr into two distinct classes
* Add TSDoc for the new classes
Took a look at some of the entries for trainers and adjusted accordingly. it looks like all of these trainer types were grabbed from an online source as a sort of future-proofing which is good, but resulted in some errors. Some of which have already been fixed, and some which are included here.
Also prevents an issue if there is a missing image and displays a warning in the console instead of a crash.
* Added localisation for workers class to all languages but german (which already had it...)
* Added missing entries to fr and br.
Now they all have the same keys.
* Added german egg localization
* Changed pull back to english since there isnt enough space for a german word that makes sense and most if not all german players understand "pull"
* This comma was too much
* Issue #745 - Added the option to localize titles, trainer names (for important trainers like elite 4, champs etc) and trainer classes.
- Also i already did the whole localization for german (sorry thats the only language is speak other then english...)
- Also renamed the trainer Type "student" to school_kid (because there apparently really is a trainer class called student since the gen 9 dlc)
- And i changed it so it makes sure that i18 only gets initalized once (it may be needed to initalize it before the loading phase so the elite 4 titles etc can be localized)
* Issue #745 - Removed stuff that wasnt meant for this branch
* Translation of French trainers.ts
* Translation of French trainers.ts
* Translation of French trainers.ts
* Fixed spelling on german translation
* Fixed name of Hex Maniac
* ADded missing "," that were lost in the merge
* For Trainer Classes that have a female and male variant the correct name is now choosen. (If a language has both).
Also added a safety net that if the female version does not exist it uses the one without the suffix
* Reverting override.ts
* Added ptBR trainers.ts (thanks to zé ricardo on discord)
* Updates Pokefan to reflect the correct english spelling (in all languages that still have the english defaults)
* Updated Rich_kid trainer typ to named correctly as "Rich Boy" in english and all non yet localized languages
* Added that the title will get made lower case so the rival is correctly set
* Reverted a formatting change that i didnt make intentionally
---------
Co-authored-by: Lugiad <adrien.grivel@hotmail.fr>
* Added splash messages literals for all languages
* Removed debug code + fixed function casing
---------
Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
* feat: added localisation for eggs and french translations
* fixes on french translations after review
---------
Co-authored-by: Madmadness65 <59298170+Madmadness65@users.noreply.github.com>
Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
* Added german modifier-type.ts
* Fixed Text that was to long and added missing formatting
* Fixed a key that was wrong
* Changed never_melt_ice again. Now it the same as in other languages
Fixed an issue where targeting the user of a Semi-Invulnerable move caused the move to cancel. These moves now miss instead.
No Guard and other accuracy locking moves still function as they were already duplicating their check in hitCheck. Fixed an issue where IGNORE_ACCURACY was checking against the current move for targets instead of Lock-On's target
* Implements localization on ModifierType
* All languages' translation fallback to EN locale
* Fixed some typos
* Add missing QUICK_CLAW translation entry
* Added Gen names localizations in Starter Selection UI
* Added Gen names localizations in Starter Selection UI
* Added Gen names localizations in Starter Selection UI
* Added Gen names localizations in Starter Selection UI
* Added Gen names localizations in Starter Selection UI
* Added Gen names localizations in Starter Selection UI
* Added Gen names localizations in Starter Selection UI
* Added Gen names localizations in Starter Selection UI
* Added Gen names localizations in Starter Selection UI
* Added Gen names localizations in Starter Selection UI
* Added Gen names localizations in Starter Selection UI
* Update starter-select-ui-handler.ts
* Update starter-select-ui-handler.ts
* Added Gen names localizations in Starter Selection UI
* Added Gen names localizations in Starter Selection UI
* Updated with recent pt BR edits
* Fixes the ptBR text in starter menu popping out of the info box and added language personalization, changed some ptBR natures and ordered thw switch case in alphabetic order
* Small fix
* 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>
* added auto hit and 2x damage from certain moves when targetting a pokemon who used minimize
* review fixes and bad merge
* review fixes and bad merge v2
* changed to be double damage instead of power for the minimize condition
* added TSdocs for function]
* remove ability to add minimize tag to dynamax-mons
* status cannot be applied to max-mons, and falls off if they dynamax
* updated doccumentation
* Update move.ts
---------
Co-authored-by: Cae Rulius <cae@polywhack.com>
Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
* Sacrifical Moves (that dont require a target like explosion or self destruct) now also work if the target is flying, diving etc.
There is also a new catagorie of moves. "SacrificalMovesOnHit" for all moves that need to hit for them to be sacrifical like MEMENTO
* Added comments, added (what i think is TSDoc) to functions and classes. Removed empty lines i introduced
* .
* Added fixes for the Review by TempsRay.
* Added missing *
* Remove Target Requirement of SacrificialAttr
* Update move.ts
---------
Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
* 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
Replacing Cave's Beach link with Lake would weaken the "water loop", a situation where players get continually routed back to Beach, leading to frustration. Lake is a crossroads biome that connects to much of the rest of the game, while still connecting to Beach, making it not a drastic detour.
Infernal Vulpix simulated a hypothetical 10k wave endless run for me to see the difference this change would have on biome frequencies. Apologies for the broken formatting from me copying this from Discord:
Odds Alt
Abyss 1.98% 2.40%
Badlands 3.57% 3.46%
Beach 6.30% 4.06%
Cave 5.87% 5.91%
Construction Site 3.90% 4.83%
Desert 1.70% 1.70%
Dojo 2.05% 2.58%
Factory 2.03% 2.57%
Fairy Cave 0.86% 0.59%
Forest 5.79% 5.64%
Grass 2.12% 2.48%
Graveyard 2.03% 2.39%
Ice Cave 4.00% 2.68%
Island 0.79% 0.53%
Jungle 2.80% 2.72%
Laboratory 0.13% 0.13%
Lake 3.37% 6.26%
Meadow 2.93% 2.74%
Metropolis 2.33% 2.55%
Mountain 2.86% 2.40%
Plains 5.96% 6.94%
Power Plant 2.06% 2.63%
Ruins 2.51% 2.59%
Sea 6.16% 4.07%
Seabed 2.90% 2.04%
Slum 2.58% 2.67%
Snowy Forest 3.79% 2.60%
Space 0.37% 0.41%
Swamp 3.79% 4.64%
Tall Grass 4.18% 4.73%
Temple 2.98% 3.06%
Town 0.00% 0.00%
Volcano 2.58% 2.29%
Wasteland 0.72% 0.72%
End 2.00% 2.00%
* Made Sheer Cold not affect Ice Types, as well as implementing the Gen VII change of 20% for non ice types.
* Pushed accurancy change
* Updated and separated the accuracy attribute and the Ice no effect attribute
* Fixed the OHKO attribute (accidentally removed) and fixed multiplier
* Updated attribute names, as well as making the move cancelled instead of 0x multiplier
* Added TSDoc comments
* Updated accuracy logic
* Changed the text response for Sheer Cold immunity
* Added immune to the HitResult enum
* Ability Corrosion
Implemented Corrosion Partially.
Tested against:
- Poison Powder
- Toxic
- Dire Claw
- Sludge Bomb
- Psycho Shift
They all work as expected
Missing ability Magic Bounce to test against.
* Added TSDoc Documentation
Added documentation to the new IgnoreTypeStatusEffectImunnityAbAttr and added comments to the checks for this ability attribute.
* Added More Documentation
Add comment into Phases for what sourcePokemon is for.
Renamed source to sourcePokemon onto trySetStatus and canSetStatus.
Added TSDoc head for what sourcePokemon is and anything else I am aware of what they are used for.
* Removed unfinished TSDoc
Removed TSDoc headers due to not having enough understanding to fill out all of the parameters
* Fix Formatting and Reorder Parameters
* Update arena-tag.ts
* Update phases.ts
* Update ability.ts
Added access modifiers to my class and the class I compared to.
---------
Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
Deoxys, Victini, and Genesect should not be in the Legendary egg pool, to make them consistent with the other mythicals.
Also additional learnset changes for a couple mythicals with no/lacking starting moves.
No longer is it stuck with just two moves via level up. It now has a thematic set of level up moves based on other similar Pokémon and its TM compatibility.
This primarily just affects Zippy Zap, as it loses its always crit attribute for an evasion increase (Associated localization strings will need updating). Also implemented Sparkly Swirl's status curing attribute.
Also included is a wild evolution delay for some stone evolution Pokémon that was previously overlooked.
* Airlock ability now properly announces when it is
in field when the pokemon with it is switched in
* Set message as in the original games, also created
a new attribute for in switch messages to not have
the pokemon name required to be on it.
* Committing language changes (i18n function)
* Revert "Committing language changes (i18n function)"
This reverts commit 2a3152003b.
* Changed message variable name
* Fixes some variable damage moves not working with abilities
* Rework as new ability attribute
* Update variable base power check to original location
* formatting
* Add tsdoc comments
* add floor for potential non int multipliers
* Update pokemon.ts
---------
Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>