* 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>
* Add support for Portuguese (Brazil) locale, except for moves and abilities.
* All ptBR translations, names of moves and abilities maintained in english.
* Small fixes
* Updated Frisk and fixed Plus and Minus descriptions
* Changed the settings label to "Português (BR)"
* Added passives to the Summary Screen
Adds the ability to view passives on the Summary screen. Just like in the starter select, you can only see the passive once it is unlocked.
There is a small pixel button prompt which helps indicate you are able to press the button to view the passive. This buttons shows an A when gamepad support is enabled and a Z otherwise.
* Update summary-ui-handler.ts
* Updated for Legacy Support
* changed nonfunctioning rockruff form check to ability check for own tempo for dusk form evos
* testing changes
* rockruff OT uses formIndex for dusk form evolution, removed temporary debug rockruff getFormIndex changes
* reverted overrides
* fixed spacing issue
* evolution times revised
* revised dawn and dusk evos for rockruff
* reordering evo times for consistency
* removed unused imports (abilities, attackTypeBoosterModifierType)
---------
Co-authored-by: James Diefenbach <z5421232@ad.unsw.edu.au>
* Fixes sturdy to stop popping up even if not used
* Made changes to better the code, also added
a check for wonder_guard 1hp
* Refined code, as requested by bennybroseph
* Made a small fix and added better comments in
relation to interaction with Wonder_guard ability
* added more german translations
* added german translation for move.ts
* more german translations
* ability.ts wih german translation updated
* added missing german translation for abilites.ts
* added more missing translations
* changed description of frisk
The Vivillon forms can all be encountered properly now, and Calyrex's forms have since been removed from the wild encounter pool, requiring a form change item to obtain.
If the pokemon species and form is the same as the second fusion component, then skip the logic to make a fused cry and just use the cry of the primary component.
With egg moves factoring in to trainer Pokémon's learnsets now, Oblivion Wing was too problematic for a common egg move. So it has been swapped with V-create to make fights with it more tolerable.
* Heart Swap implementation.
Simply switches the values in 3 arrays.
* Fixed missing space
* Removed some lines.
Removed a for loop.
* Removed an unneccesary line
* TSDoc commentation added
* Changed message method to be more descriptive
* Adjusted message line to be consistent with Pokemon Showdown
* Adjusted priorBoostArray to priorBoost integer
Only one values is relevant at a time, so the array was pointless, woops.
* Redo moveset generation
* Decrease the weight of lower power moves and egg moves
* More weight tweaking
Trainers never get OHKO moves, are less likely to get self KO and multiturn moves, and more likely to get stat buffing moves. All pokemon are less likely to get offstat moves.
* Implemented Snipe Shot and Stalwart/Propeller Tail
* Remove Testing Overrides
I don't know why these got pushed, they are in the gitignore file.
* Snipe Shot also has a high crit rate
* Add Comment
* Add TsDoc documentation to BypassRedirectAttr
* Add ability pop-up for when Propeller Tail/Stalwart proc.
* Fix Formatting
* Tab align comment
* added settings to manage how to display party experience at the end of fight
* added back stats changes support when setting is on but ignored when on skip
* removed a useless parameter
* added new level in the text
* only Lv. UP if level is greated than 200
* cleanup
* added some comment
* TSDoc comment block
* EXP_Party -> EXP_Party_Display, Only Up -> Level Up Notification
* better duration for the level up notification
* typo
Co-authored-by: Samuel H <flashfireex@gmail.com>
---------
Co-authored-by: Samuel H <flashfireex@gmail.com>
* fix "lost focus behaviour" when disabling gamepad and thus repeating RIGHT key
* added some comment
* added full TSDoc, helped by chatGPT, refined every entry manually of course
* Hydro Steam, Spirit Shackle, U-turn fix
Match formatting to project style
Co-authored-by: Samuel H <flashfireex@gmail.com>
* Fix Hydro Steam power up in Sun, even harsh sun if type changes
* Fix issue with Hydro Steam outside sun
* Add comments to IgnoreWeatherTypeDebuffAttr for documentation
* Move U-turn fix to another PR
---------
Co-authored-by: Samuel H <flashfireex@gmail.com>
* adds frame for StatusCureAttr
* heal bell and aromatherapy functioning as intended
* refactor attr to solely handle party cure, party interaction unique enough to justify
* adds header to PartyStatusCureAttr
* code comment
* comment formatting improvement
* checks for passives as well
* code comment
* shows ability bar if immune
* Save battler tags
Also saves the rest of the summonData except for transform specific things.
* Add missing values for type boost tag.
* Add intellisense comments
* Implements healer
* adds an ally check to the condition
* done testing, changes chance back to 30%
* adds comment header for PostTurnResetStatusAbAttr
* adds override to resetStatus to not allow revive
* dont revive
* override revert
* implements cursed body
* 30 percent chance to proc
* check if max
* removes unimplemented tag
* bypasses faint
* un-disable message specifies pokemon name
* adds prefix to un-disable message
* space issue
Each individual token heals 1 percent less, but now stacks to 15 instead of 10, to maintain the current maximum of 30% recovered per turn.
The purpose of this change is to make the healing more gradual, and just generally less painful if you get multiple early on.
* fix scrappy and mindseye working as passive ability
* update apply for ignoretypeimmunityabattr
* simplify logic for ignoretypeimmunityabattr
---------
Co-authored-by: contra1337 <jpbastyr@gmail.com>
* Fixed Crash Moves and Reckless
Added a new MoveFlags flag 'RECKLESS_MOVE' to make crash and recoil moves in line with other move flag boosting attacks.
Modified how flags were defined so they are easier to maintain.
Added the appropriate flag to all mvoes listed as being affected by Reckless. Steel Beam and Mind Blown do not count according to source:
https://bulbapedia.bulbagarden.net/wiki/Reckless_(Ability)
* Update move.ts
* Update abilities.ts
* Added hyperlinks to Moves enum
Yes, I'm aware of what this looks like in the file itself, but it enables a nice neat little hyperlink shown below to the bulbapedia page when you hover over a move. I feel like the added convenience is worth making the file harder to read considering nobody is ever going to touch that file anyway. I plan on adding a python script to finish the rest of them, but didn't want to actually sink time into this if we absolutely despise it.
* Added Python Script
Created a python script to add comments with a url to abilities.ts, moves.ts, and species.ts using regex