* Introducing held items
* Pokemon class can add held items
* Example of applyHeldItemAttrs
* Introducing a PokemonItemManager class
* Moving away from HeldItemAttr
* Attempt at incorporating the new framework in modifier-type
* Changes
* More changes
* Splitting up methods in select-modifier-phase.ts
* Newrefactors of reward-pool-manager.ts
* New refactors of select-modifier-phase.ts
* Extracted logic from modifierSelectCallback
* Moved some files around, added many held item ids
* Introduced HeldItemReward class
* Introduced AttackBoosterReward
* Introduced AttackBoosterRewardGenerator
* Removed unused file
* Select modifier phase tentatively working with new held items
* Working leftovers in new style
* Moved modifier-bar to its own file
* Held items now show up in summary
* Added some suggestions
* Implemented more suggestions
* Splitting up held-item file
* Fixing various imports
* Created items folder
* Shell bell
* Converted White Herb
* HeldItem .apply() methods do not really need the stack as input, just the pokemon
* Made heldItems public in heldItemManager
* Update modifier bar is now called in the apply of consumable held items
* Refactored parameters passed to .apply() methods; introduced generic .applyHeldItems() function; all HeldItems classes specify an ITEM_EFFECT
* Lucky egg and Golden egg
* Converted wild pokemon pool to held item rewards
* Temporary stopgap on maxUpgradeCount to avoid game crashing on modifier select ui handler
* Changed held-items.ts to held-item-id.ts and renamed id object accoridngly
* Added reviver seed
* Simplified HeldItemReward
* Added effect of reviver seed (leveraging consumable logic)
* Remove InstantReviveModifier
* Added Stat Boost items; generic name and description in HeldItem class
* Added Crit Boost held items, King's Rock, Focus Band and Quick Claw
* Added Mystical Rock
* Added Shell Bell, Soul Dew
* Added multi lens and wide lens
* Added Baton and Golden Punch
* Baton switch logic in party ui handler now using held item
* Partial implementation of item steal items
* Using held items in some places
* Using phaseManager
* Tracking forms in held item manager
* Shuckle Juice and Old Gateau
* Using phaseManager
* Removed a bunch of modifiers
* Fixed shell bell in ability.ts (why is it here?)
* Changed BattleScene.removeModifier and pokemon.loseHeldItem
* Making some held items unstealable and unsuppressable
* Refactored most of battle-scene.ts with held items
* Added soundName to HeldItem (possibly useless)
* Reworked various effects that steal items
* Refactored Baton logic
* Reworked most entries in Modifier Types
* pokemon.getHeldItems now uses heldItemManager
* Added Evolution Tracker as held item
* MBE is always untransferable
* Improved item transfer
* Fixed types in held item manager
* Various fixes
* Fixed types in shuckle juice and old gateau
* MBE achievement now tracks held items
* Removed AttackTypeBoosterModifierRequirement for MEs
* Fixed Pickup
* Fixing (most) berry usage
* Using Berry held items in move.ts
* Split up vitamins from the rest of stat boosting items
* Fixed form change trigger after merge conflicts
* Added some utility functions to check if an item fits a list of items/categories, or to filter out which held items fit
* Fixed delibirdy encounter
* Various fixes
* Reworked EnemyPokemonConfig to include a HeldItemProperty object (to feed to the heldItemManager). Updated Dark Deal ME
* More various fixes; introduced isMaxStack(item) method to heldItemManager
* Updated modifier-bar.ts
* Converted Berries Abound encounter
* Converted The Strong Stuff encounter
* Fixed Slumbering Snorlax encounter, overrideItems of heldItemConfiguration can deal with items with 0 stack
* Preliminary changes to some MEs
* Changes to the summary ui handler
* Converting to held item pools
* Fixed evo tracker
* Moved many data types for held items to a dedicated file; introduced held item pools for item generation
* Fixed some MEs
* Added function to assign items from a given configuration
* Fixed held item evolution condition
* Fixed some ui handlers
* Fixed select-modifier-phase
* Some changes to modifier files
* Daily run items are generated within the new system
* Held item generation for enemies follows the new scheme
* Fixed init-modifier-pools.ts
* Held item overrides now use the new system
* Removed unused getOrInferTier function (was only used by thief and covet)
* Fixed shady vitamin ME and some HeldItem files
* Updated various MEs. HeldItemManager can now generate a configuration from its items.
* Converted most MEs, introduced some more utility functions and methods
* Replaced ModifierTier with RewardTier
* Fixed some rogue inputs
* Held item pools take a single pokemon as input, set weights to 0 for max stack items
* Restored various changes to held item pool generation; distinguishing target of the generation from the party
* Pools can now take a HaldItemConfigurationId without weights; set up table of item tiers; used custom pools in Clowning Around ME
* Fixing some phases
* Fixed several bugs related to accessing and visualizing held items
* Fixed position of enemy modifier bar
* Fixed berries, removed some debug messages
* Vitamins max stack temporarily set to 30
* Luck upgrades work correctly again (maybe)
* First steps to port tests to the new system
* Form change items work correctly when selected in battle
* Introducing helper functions for a modifier migrator; PokemonItemMap now uses pokemonId
* Renamed file with item migrator functions
* Restored missing strings
* Shuckle juic and Old gateau are not instance dependent
* Simplified HeldItemData
* Migrator utils include shuckle juice
* Introducing trainer items
* Enemy tokens are now also trainer items
* Converted most of modifierTypes
* Fixed various MEs; removed findModifier from battle-scene
* Removed most uses of globalScene.applyModifiers
* Removed more functions from globalScene; changed lure weight function
* Updated a variety of files
* Split out X_accuracy, fixed trainer-item-manager
* Fixed expert breeder ME
* Replaced updateModifiers with updateItems
* Removed modifiers from saveData
* Trainer item rewards are generating during runs, added properly to the scene
* Items (including held items) are saved and loaded correctly.
* Fixed several trainer item names and descriptions, plus various issues with item generation
* Restored override file
* Added icons to tokens
* Fixed Dire Hit starting stack
* Using Pokemon.getMoveType() in generation of attack type boosters
* Test for dire hit; ensuring that lapsing trainer items are added from config at full stack
* Eviolite does not apply to G-Max forms
* Changes to various item tests
* Some still broken tests
* More changes to tests but still failing
* Fixed evo tracker item
* Moved allHeldItems and allTrainerItems definitions to data-lists
* Renamed modifier-bar and moved to ui files
* Fixed held item when pokemon not passed
* Remove `package-lock.json` added by merge issue
* Add review comments as `TODO`s for now
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update biome pools for wild Pokémon
`outputPools` has been run, correcting evolution delays for some Pokémon like Grapploct and Cosmoem, and generally adding spaces to all bracketed lines.
* Revert change to Pawniard line evo delays
Kingambit was evolving before Bisharp due to being an item evolution. The evolution delay for it is now back to level 64.
https://github.com/pagefaultgames/pokerogue/pull/6067
* Fix anger point always procing on multi-hit
when first strike was a crit
* Fix comment spacing
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Rename PostDefendCritStatStageChangeAbAttr
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* replace bad berry juice
* Update item atlas
Updated bad berry juice sprite is now included
---------
Co-authored-by: Madmadness65 <blaze.the.fireman@gmail.com>
* Add pnpm-workspace.yaml to configure dependencies that are allowed to build
* Remove dependency-graph.json
* Go back to && which is cross-platform
* Remove obsolete `depcruise:graph` command
* Set `shellEmulator` config key to `true`
This makes `package.json` scripts work more reliably cross-platform
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
https://github.com/pagefaultgames/pokerogue/pull/6016
* Refactored items and respective MEs
* Changed icon names, added bad berry juice, fixed locales
* Berry juice uses a number parameter again, allowing to convert from old saves without a migrator
* Updated encounter with correct sprite
* Update src/data/mystery-encounters/encounters/weird-dream-encounter.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Replaced bad berry juice icon
* Repacked atlas
* Re-export item atlas
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Madmadness65 <blaze.the.fireman@gmail.com>
* Made `game.phaseInterceptor` fail if move not in moveset
also added a few assorted doc fixes
* Fixed fail comment
* added `map` statement
* Fixed tests
* Fixed test
* Fixed test and comment
* Fixed tests
* Fixed test v2
* Fixed various tests
* Update error msg to not use fullcaps
* Fixed remaining tests
* Fixed test 0.5
* Fixed up tetss
* Fixed test
* Fixed imposter tests
* Fixed imposter tests
* Fiexd remainig tests
* Marked test as TODO
wasn't as if it was doing anything beforehand but w/e
* Update moveHelper.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update moveHelper.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Apply Biome
* Update comment in `spikes.test.ts`
* Add faint checks to Spikes test
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Minor Attempt run phase rework to abstract logic to whole team
* Decoupled individual pokemon from run phase logic
* Formatting
* Completed run phase refactor implementation and updated tests
* Updated run phase to extend field phase instead of pokemon phase
* Removed unused phase decleration in tests
* Removed unecessary arg in turn start phase as refactor no longer needs it
* Cleaned up getPlayerField
* Made adjustments based on reviewer suggestions
* Reintrocuded calculateEscapeChance into AttemptRunPhase and removed run utils
* Resolve merge issues
* Minor TSDoc improvement to `BattleScene#getPlayerField`
* Moved early override check to top of calculateEscapeChance
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Split up Pokemon data types to own files
* Moved `AttackMoveResult` and `TurnMove` to own files
* Moved `customPokemonData` into types folder + fixed comments
* Moved files around + fixed stuff
* Moved `DamageResult` into new file
* Fixed imports
* ran biome
* Fix merge issue
* [WIP] Refactor ability attribute apply args
* [WIP] update ability signatures
* Update callsites in pokemon.ts
* Update callsites in moves.ts
* Update abattr callsites in move-phase
* Update abattr callsites in battler-tags
Also removed stat drop ability application from cancelling ME stat boost effects
* format with biome and remove cancelled from weather lapse
* Update abattr callsites in MEP
* Update callsites in turn-start-phase
* Update abAttr callsites in misc phases
* Remove latent test functionality
* update ability attribute callsite in shield dust test
* update abattr callsite in winstrate challenge encounter
* Fix some tests to mock proper methods
* Remove improper condition in mimicry's ability application
* Fix improper simulated check in moody's apply method
* Pass source to postApplyDamage in pokemon.ts
* [wip] fix cud chew tests
* Make cud chew consumption not subclass postTurnAbAttr
* Fix regression in flower veil
* Update trySetStatus test in pokemon to respect new return value for undefined
* Remove empty, unused file
* Fix blockCrit method broken in merge
* Fix unnecessary attr type cast in move phase
* Address typing issue in safeguard test
* Improve documentation and get rid of ts-expect-error directive
* Minor comment/TSDoc updates and fixes
* Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Apply suggestions from code review
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Cleanup evolution phase
* Update evolution phase and types
* Refactor form change phase
* Simplify game-speed.ts and update evo phase
* Move delay in formChangePhase to first element
* Fix mock video object return methods
* Fix tween chain mock
* Add todo comment to mock phaser's tween manager
* Remove jarring flash when evolution begins
* Fix missing method chaining in evo phase
* Apply biome formatting
https://github.com/pagefaultgames/pokerogue/pull/5932
* Fixed modifier code, removed instances of "0 ID = no mon"
* corrected casing + dejanked seed tag
* Added test file, added overload to `findModifier` if given type predicate
* fixed test
* Revert predicate stuff for now
going in separate PR
* Fix id check syrup bomb test
Wasn't running phase due to being a turn end effect
* [WIP] Changed test to use destiny bond as proper regression
* Removed `instant` and `ignoreUpdate` parameters from `tryTransferHeldItemModifier`; fixed post-battle loot code to _not_ break type safety
* Fixed up tests
* Reverted unneeded changes
* Removed outdated modifier test
* Fix import
* Apply Biome
* Update battler-tags.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update battler-tags.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update arena-tag.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update arena-tag.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Large Number Abbreviations opended for transaltion
* Large Number Abbreviations opended for transaltion
* Apply Biome
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Run `npm audit fix`
* Update Biome to 2.0.0
* Migrate `biome.jsonc` to 2.0
* Apply Biome and fix some suppression comments
* Fix some suppression comments and update config
* More config updates
Added at "error": `noUnusedLabels`, `noThisInStatic`
Changed `useDefaultParameterLast` from "off" to "warn"
Changed `noDocumentCookie` (from recommended) from "warn" to "off"
Changed `noExcessiveCognitiveComplexity` from "warn" to "info"
* Add a bunch of rules
* Apply Biome safe fixes
* Apply Biome unsafe fixes
* Remove irrelevant `useSelfClosingElements` rule
* Upgrade already followed rules to "error"
* Remove unnecessary type cast
* Disable fixer for `useDefaultParameterLast`
* Disable `useJsonImportAttribute` rule and revert changes
* Fix `mockImage.ts`
* ...there's a `@ts-nocheck` in this file
* Use whole-file lint suppression comment in `version_converter.ts`
* Add a couple comments to `biome.jsonc`
* Remove ESLint packages and GitHub workflow
* Implemented AI improvements:
The changes in the game AI were as follows ("pokemon.ts"):
- More accurately accounts for the Pokémon's actual moves and their
effectiveness against the player instead of only the pokemon type
- Introduced logic to decide when a Pokémon should be sacrificed or
switched based on its HP and speed.
Signed-off-by: Matilde Simões <matilde.simoes@tecnico.ulisboa.pt>
Co-authored-by: Fuad Ali <fuad.ali@tecnico.ulisboa.pt>
* Corrected grammar error in variable declaration in getMatchupScore
Signed-off-by: Fuad Ali <fuad.ali@tecnico.ulisboa.pt>
Co-authored-by: Matilde Simões <matilde.simoes@tecnico.ulisboa.pt>
---------
Signed-off-by: Matilde Simões <matilde.simoes@tecnico.ulisboa.pt>
Co-authored-by: Fuad Ali <fuad.ali@tecnico.ulisboa.pt>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: damocleas <damocleas25@gmail.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>