* 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>
This Mystery Encounter is a random event that can
occur from wave 50 and above that causes a fog
to appear covering the screen and a wild pokemon
to be hidden underneath it. The player when
facing this encounter may choose one of four
options which includes fighting, using a light
based move or ability to light the way, using a
defog move or ability to clear the fog, or
waiting for the fog to thin out. Depending on
your choice the player might be granted more
experience and better rewards.
The pokemon encountered changes dynamically with
the biome and stage level that the Mystery
Encounter occurs. Changes made:
- Implemented new mystery encounter called
"Creeping Fog" ("creeping-fog-encounter.ts")
and added a new corresponding weather type
called "Heavy Fog" ("weather.ts").
- Updated corresponding weather functions
and fog affected pokemon functions.
("move.ts", "pokemon-forms.ts", "ability.ts",
"pokemon-evolutions.ts").
- Created new Fog Overlay for the mystery
encounter ("fog-overlay.ts").
- Created new item called "Micle Berry" to
grant perfect accuracy ("modifier-type.ts").
- Created Mystery Encounter Creeping Fog unit
test ("creeping-fog-encounter.test.ts").
- Created new Mystery Encounter Light and Defog
moves and abilities requirements
("requirements-groups.ts").
Signed-off-by: Fuad Ali <fuad.ali@tecnico.ulisboa.pt>
Co-authored-by: Matilde Simões <matilde.simoes@tecnico.ulisboa.pt>
This Mystery Encounter is a random event that can
occur from wave 50 and above that causes a fog
to appear covering the screen and a wild pokemon
to be hidden underneath it. The player when
facing this encounter may choose one of four
options which includes fighting, using a light
based move or ability to light the way, using a
defog move or ability to clear the fog, or
waiting for the fog to thin out. Depending on
your choice the player might be granted more
experience and better rewards.
The pokemon encountered changes dynamically with
the biome and stage level that the Mystery
Encounter occurs. Changes made:
- Implemented new mystery encounter called
"Creeping Fog" ("creeping-fog-encounter.ts")
and added a new corresponding weather type
called "Heavy Fog" ("weather.ts").
- Updated corresponding weather functions
and fog affected pokemon functions.
("move.ts", "pokemon-forms.ts", "ability.ts",
"pokemon-evolutions.ts").
- Created new Fog Overlay for the mystery
encounter ("fog-overlay.ts").
- Created new item called "Micle Berry" to
grant perfect accuracy ("modifier-type.ts").
- Created Mystery Encounter Creeping Fog unit
test ("creeping-fog-encounter.test.ts").
- Created new Mystery Encounter Light and Defog
moves and abilities requirements
("requirements-groups.ts").
Signed-off-by: Fuad Ali <fuad.ali@tecnico.ulisboa.pt>
Co-authored-by: Matilde Simões <matilde.simoes@tecnico.ulisboa.pt>
This Mystery Encounter is a random event that can
occur from wave 50 and above that causes a fog
to appear covering the screen and a wild pokemon
to be hidden underneath it. The player when
facing this encounter may choose one of four
options which includes fighting, using a light
based move or ability to light the way, using a
defog move or ability to clear the fog, or
waiting for the fog to thin out. Depending on
your choice the player might be granted more
experience and better rewards.
The pokemon encountered changes dynamically with
the biome and stage level that the Mystery
Encounter occurs. Changes made:
- Implemented new mystery encounter called
"Creeping Fog" ("creeping-fog-encounter.ts")
and added a new corresponding weather type
called "Heavy Fog" ("weather.ts").
- Updated corresponding weather functions
and fog affected pokemon functions.
("move.ts", "pokemon-forms.ts", "ability.ts",
"pokemon-evolutions.ts").
- Created new Fog Overlay for the mystery
encounter ("fog-overlay.ts").
- Created new item called "Micle Berry" to
grant perfect accuracy ("modifier-type.ts").
- Created Mystery Encounter Creeping Fog unit
test ("creeping-fog-encounter.test.ts").
- Created new Mystery Encounter Light and Defog
moves and abilities requirements
("requirements-groups.ts").
Signed-off-by: Fuad Ali <fuad.ali@tecnico.ulisboa.pt>
Co-authored-by: Matilde Simões <matilde.simoes@tecnico.ulisboa.pt>
* 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>
https://github.com/pagefaultgames/pokerogue/pull/5857
* Add test for forecast
* Fix PostSummonFormChangeByWeatherAbAttr
* Fix overrides in forecast test
* Remove a test whose trigger conditions can no longer happen
* Update src/data/abilities/ability.ts
Co-authored-by: Dean <69436131+emdeann@users.noreply.github.com>
* Fix missing tsdoc param
* Apply kev's suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Simplify PostSummonFormChangeByWeather's canApplyPostSummon
* Fix unused params that messed up after rebase
* Fix form change import
Messed up due to improper rebase
---------
Co-authored-by: Dean <69436131+emdeann@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Refactor evo conditions and descriptions
* Fix test
* Fix Shedinja
* Simplify Gimmighoul evolution
* Primeape and Stantler evolve by using their move 10 times
* Basculin white stripe evolves by taking 294 recoil damage
* Primeape and Stantler use modifiers for tracking
* Basculin uses modifier too
* Remove evo count from pokemon data
* No more evo counter data, Gallade/Froslass
* Fix allmoves import
* Clamperl
* Struggle shouldn't count for Basc recoil
* Change to nicer type
* Apply Benjie's suggestions
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
* Address formatting
* Undo new evolution changes
* Remove unused imports
* Fix speciesid
* Fixed up descriptions a little
* Change a key name
* Fix Gimmighoul
* Apply Biome
* Apply Biome unsafe fixes
* Review suggestions
- Convert `EvoCondKey` enum to `const` object
- Use early returns in `SpeciesEvolutionCondition#description`
and `SpeciesFormEvolution#description`
- Replace `!!x.find` with `x.some`
and `y.indexOf() > -1` with `y.includes()`
- Implement `coerceArray`
- Fix Shelmet evolution condition
checking for Shelmet and not Karrablast
- Remove unnecessary type casting in `battle-scene.ts`
* Remove leftover enforce func loop
* Fix circular imports issue
- `getPokemonSpecies` moved to `src/utils/pokemon-utils.ts`
- `allSpecies` moved to `src/data/data-lists.ts`
---------
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>