Commit Graph

5350 Commits

Author SHA1 Message Date
Wlowscha
b8324e85f7
Moved getPartyBerries() utility function 2025-07-13 13:20:42 +02:00
Wlowscha
e034d7e04e
Added test override for pokeballs 2025-07-13 13:04:46 +02:00
Wlowscha
eaead476e8
Add some type specifications so biome is happy 2025-07-13 12:55:07 +02:00
Wlowscha
e7bb3a7443
formChangeItemName function 2025-07-13 12:45:11 +02:00
Wlowscha
d411702716
Cleaned up more files 2025-07-13 12:34:18 +02:00
NightKev
8118d00a07 Remove relative imports 2025-07-13 02:57:47 -07:00
NightKev
ff5d891c6e Fix some imports 2025-07-13 02:52:02 -07:00
NightKev
882c256933 Create and apply #items import alias 2025-07-13 02:42:22 -07:00
NightKev
4494debaa0 Merge branch 'beta' into modifier-rework 2025-07-13 02:36:31 -07:00
NightKev
c697a47f5b Apply Biome 2025-07-13 02:34:03 -07:00
NightKev
cd2f0b8a6e Merge branch 'beta' into modifier-rework 2025-07-13 02:32:49 -07:00
Madmadness65
d22a4d5c9f [i18n] Update locales submodule 2025-07-13 02:59:50 -05:00
NightKev
8cf1b9f766
[Dev] Enable Biome import sorting (#6052)
* [Dev] Enable Biome import sorting

Additional changes:

- Implement import aliases

- Convert default exports to named exports

- Remove relative imports

* Apply changes

* Misc fixes

* Merge cleanup
2025-07-13 00:21:25 -07:00
Jonathan Bankston
22c386ea9e
[BUG] Fix Transform and Imposter issues (#6008)
* Fixed Transform and Imposter Bug

* Updated Comments

* Revised Comments

* Revised Changes on how tranformed pokemon are referenced to align with reviewer's suggestions

* Removed unused BattlerTag type for transform

* Removed addition of the transform tag to a pokemon in the PokemonTransformPhase

* Moved the check for whether Transform can be used within the TransformAttr class as suggested and removed uneccesary moveId check

* Consolidated if statement regarding isTransformed

* Removed overrides

* Added move condition to Transform + fixed up imposter target selection

* Condensed tests into 1 file + added more automated tests

This includes a couple regression tests for the fusion shenanigans

* Fixed comment

* Updated override typo for unimplemented methods

* Remove redundant parentheses

* Apply suggestions from code review

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>

---------

Co-authored-by: Bertie690 <taylormw163@gmail.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
2025-07-12 23:39:48 -07:00
Bertie690
664f2fab0d
[Refactor/Bug] Fix Protean not applying due to terrain + minor cleanup of move phase (#5855)
* Squashed protean/libero changes

* Update protean-libero.test.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update protean-libero.test.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update ability.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update move-phase.ts

* Fixed counter move logic using inverted conditional

* Update move-phase.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update move-phase.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update ability.ts commentfix

* Update src/data/abilities/ability.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

---------

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-07-13 05:59:38 +00:00
Bertie690
12fbff71d2
[Test] Added tests for Intimidate, Fishious Rend/Bolt Beak, Payback and Moongeist Beam & co. (#5858)
* Added additional tests for intimidate & ability-ignoring moves

* Added a few basic tests for Fishious Rend and Bolt Beak

* Fixed comment

* Fixe test and added commetn

* Update first-attack-double-power.test.ts

* Fixed incorrect ignore-abilities.test.ts test suite description

* Update ignore-abilities.test.ts suite name

* Fix first-attack-double-power.test.ts

* Actually fixed import

* Update intimidate.test.ts

* Fix test imprts

* Added guard dog tests

* Fixed tests

* Renamed test file

* Added Payback tests

* Fixed accidental unusde class

* Fixed tests

* Fixed flaky test due to 1 length trainer thing

* dd

---------

Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>
2025-07-13 05:55:05 +00:00
Sirz Benjie
940c3c6f42
[Refactor] Cleanup fight UI (#5883)
* Cleanup fight ui handler

* Add types to fight-ui-handler#show

* Fix poor logic in toggleInfo

* Make addInfoToggle capable of taking in multiple toggles
2025-07-12 17:54:43 -07:00
Wlowscha
414a6b10ea
Cleaned up more tests 2025-07-13 00:42:29 +02:00
Wlowscha
9925b0c358
Some minor fixes 2025-07-12 20:36:13 +02:00
Wlowscha
0d2bae0fcc
Rename SelectModifierPhase to SelectRewardPhase 2025-07-12 20:23:11 +02:00
Wlowscha
5b14a5899c
Renamed various ModifierRewardPhase classes 2025-07-12 17:20:27 +02:00
Wlowscha
2344bdf32a
Renamed modifier-se-ect-ui-handler to reward-select-ui-handler 2025-07-12 17:14:03 +02:00
Wlowscha
88634ca081
Partially fixed delibirdy test 2025-07-12 17:01:15 +02:00
Wlowscha
6fc7db8939
More partial test fixes 2025-07-12 13:22:49 +02:00
Wlowscha
ee2412cafb
Partially fixed absolute avarice, fixed HeldItemRequirement to actually count the items 2025-07-12 13:14:35 +02:00
Wlowscha
e312a4b8f2
Fixed bug-type-superfan encounter; split up HoldingItemRequirement from HeldItemRequirement 2025-07-12 12:56:58 +02:00
Wlowscha
dbfbc24c8a
Fixed fiery fallout encounter and relative test by making sure that isCategoryId works properly 2025-07-12 00:35:42 +02:00
Wlowscha
849550808a
HeldItemManager's .hasItem() now also works on categories 2025-07-11 23:58:49 +02:00
Wlowscha
f2e9ea0e93
Merge branch 'beta' into modifier-rework 2025-07-11 23:29:45 +02:00
Sirz Benjie
edbba6e635
[Bug][Performance] Plug memory leak related to enemy pokemon lingering around (#6083)
Remove animationupdate in sprite cleanupAndComplete
2025-07-11 12:57:19 -07:00
Lugiad
ca4df7233f
[UI/UX] [Localization] Japanese font change and custom size edits (#6026)
* Delete Japanese Galmuri11 font

* Delete Japanese Galmuri9 font

* Added pokemon-bw font for Japanese

* Changed Japanese Font + removed font size adjustment

* Added Japanese Custom Adjustments

* Slightly increased spacing for Ability name+desc labels

* Japanese starterInfoText adjustments

* Japanese custom lineSpacing adjustment

* Spacing for Ability desc labels adjusted

* Friendship count text adjustment

* Japanese former custom adjustments removal

* TextStyle adjustments

* TextStyle.PARTY adjustments

* Added new TextStyle

* Added new TextStyle

* Added new TextStyle

* Added new TextStyle

* Added new TextStyle

* Add new TextStyle

* Add new Text Style

* Add new TextStyle

* Add new TextStyle

* Add new TextStyle

* Add new TextStyle

* Add new TextStyle

* PARTY_CANCEL_BUTTON TextStyle Correction

* PARTY_CANCEL_BUTTON TextStyle Correction

* Removal of old Japanese line spacing parameter

* Removed old Japanese adjustments

* Apply Biome

* PARTY_CANCEL_BUTTON Adjustments

* partyCancelText position adjustment

* Update i18n.ts

* Change TextStyle of valueLimitLabel

* Added new TextStyle

* Add MOVE_LABEL TextStyle

* Add MOVE_LABEL TextStyle

* Line formatting correction

* MOVE_LABEL TextStyle padding correction

* Added GROWTH_RATE_TYPE TextStyle

* Add GROWTH_RATE_TYPE TextStyle

* Line formatting correction

* Egg Moves title text indepentent from pokemonEggMovesContainer

* Egg Moves title text indepentent from pokemonEggMovesContainer

* Update src/ui/starter-select-ui-handler.ts

* Correction to eggMovesLabel

* Update starter-select-ui-handler.ts

* Added SUMMARY_STATS_GOLD

* Added SUMMARY_STATS_GOLD

* Added proper multiplication symbol

* Added proper multiplication symbol

* Added proper multiplication symbol

* Added proper multiplication symbol

* Added GROWTH_RATE_TYPE

* Added INSTRUCTIONS_TEXT TextStyle

* Added INSTRUCTIONS_TEXT TextStyle

* Added INSTRUCTIONS_TEXT TextStyle

* Added INSTRUCTIONS_TEXT TextStyle

* Added INSTRUCTIONS_TEXT TextStyle

* INSTRUCTIONS_TEXT adjustments

* Added proper multiplication symbol

* Added SUMMARY_DEX_NUM TextStyle

* Added SUMMARY_DEX_NUM

* Revert SUMMARY_DEX_NUM to wrong text

* Add SUMMARY_DEX_NUM

* Removed outdated Japanese custom line spacing

* Removed outdated Japanese custom line spacing

* Removed outdated Japanese custom line spacing

* Correction outdated Japanese custom line spacing

* Added MOVE_LABEL TextStyle

* Fixed corped tooltipbox and tooltipbox scrolling

* Corrected ME descriptiuon scrolling

* Added MOVE_LABEL

* Apply HEADER_LABEL TextStyle

* Apply HEADER_LABEL

* Added custom values for SETTINGS_VALUE

* Apply MOVE_LABEL

* Added STATS_HEXAGON TextStyle

* Apply STATS_HEXAGON TextStyle

* Typo correction

* Delete outadated pokemon-bw font

* Add updated pokemon-bw font

* Update pokemon-bw format

* Added EGG_SUMMARY_NAME and EGG_SUMMARY_DEX TextStyles

* Apply EGG_SUMMARY_NAME and EGG_SUMMARY_DEX

* Add LUCK_VALUE TextStyle

* Apply LUCK_VALUE TextStyle

* Apply LUCK_VALUE TextStyle

* Adjusted LUCK_VALUE

* Apply LUCK_VALUE TextStyle

* Adjustments for Japanese

* Adjusted Japanese custom

* Added FILTER_BAR_MAIN TextStyle

* Apply FILTER_BAR_MAIN TextStyle

* Added japanese to custom TextStyle

* Added English language settings

* Apply Biome

* pokemon-bw font update

* pokemon-bw font updated

* pokemon-bw font update

* pokemon-bw font update

* pokemon-bw font update

* pokemon-bw font update

* pokemon-bw font update

* pokemon-bw font update

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>
2025-07-11 13:51:59 -04:00
Sirz Benjie
bc45869912
[Performance] [Refactor] [UI/UX] Cleanup egg gacha UI, Speed Up Machines (#5889)
* Convert egg gacha type into an object literal

* Refactor egg gacha ui handler

* Apply kev's suggestions from code review

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Condense Object.freeze inside of gacha-type.ts

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-07-11 17:38:35 +00:00
Bertie690
9958e4fe13
[Test] Remove duplicate tests (#6082)
* Remove duplicate tests from parental bond test file

* Remove duplicate multi lens + pollen puff test
2025-07-11 19:33:15 +02:00
Sirz Benjie
ee02366ccf
[Misc] Make FixedInt support coercion to number primitive (#6081) 2025-07-11 02:09:09 -05:00
Wlowscha
2744567b21
Auxiliary functions to fix type complaints in item managers 2025-07-10 23:21:58 +02:00
Wlowscha
175f2b74e9
Fixed some ME tests 2025-07-10 19:21:40 +02:00
Wlowscha
61cd122223
Removed default value from maxStackCount 2025-07-10 18:50:41 +02:00
NightKev
d0ebb32f9e Add a couple of TODOs 2025-07-10 01:49:20 -07:00
NightKev
fee6320502 Normalize naming 2025-07-10 01:45:28 -07:00
NightKev
d576d66617 Rename HELD_ITEM_EFFECT enum-object to HeldItemEffect 2025-07-10 01:31:55 -07:00
NightKev
79779765e2 Add as const in trainer-item-id.ts 2025-07-10 01:27:54 -07:00
NightKev
e64117d6a6 Fix isItemInRequested 2025-07-10 01:26:00 -07:00
NightKev
1f77eb4dff Add as const to enum-objects in held-item-id.ts 2025-07-10 01:25:02 -07:00
Wlowscha
7e2418b957 Held item refactor (#5656)
* 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>
2025-07-10 01:05:25 -07:00
Bertie690
8c05693b83
[Docs] Fix typos in localization.md (#6076) 2025-07-09 22:15:16 +00:00
damocleas
c3bad86ae0
[Audio] Replace Abyss biome BGM with custom BGM by Firel (#6075)
* Replace End biome BGM with custom BGM by Firel

* Update locales submodule

* Replaced PMD Abyss music

Penumbra Chasm

* Update arena.ts

* Trim track, update loop point

* Update track

---------

Co-authored-by: Madmadness65 <blaze.the.fireman@gmail.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-07-09 20:42:06 +00:00
Bertie690
4ba6e69aa1
[Docs] Add localization.md (#5970)
* Create localization.md (WIP)

Not done yet but want to save my changes

* Fix up first half of doc

* Update localization.md 0.75

* Update localization.md .8

* Update localization.md

* Update localization.md

* Nearly finished locales md!!!!

just gotta upload images to github so we don't track em

* Fix images in locales md

* Updated README.md to mention new locales markdown & other notable files

Tbh this thing needs an overhaul

* Update CONTRIBUTING.md 0.5

* Fix CONTRIBUTING.md

* Update localization.md

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update localization.md

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update localization.md

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update localization.md

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update localization.md

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Fix typo in CONTRIBUTING.md

Reach out reach out oops

* Revert half of CONTRIBUTING.md

* Fix localization.md

* Update localization.md

* Update localization.md

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Revert unneeded step in CONTRIBUTING.md

i am 99% sure flag not needed

* Update localization.md to remove unneeded step

* Update CONTRIBUTING.md

Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>

* Revert change to CONTRIBUTING.md

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
2025-07-09 14:28:23 +00:00
Madmadness65
cab15c36f0
[Balance] Update biome pools for wild Pokémon (#6074)
* 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.
2025-07-09 14:36:32 +02:00
NightKev
9b0f0b7a0f
[Refactor] Replace .fill().map "loops" with real for loops (#6071) 2025-07-08 00:53:36 -07:00
Sirz Benjie
2fbaca7b5e
[Bug] Prevent save corruption when loading a pokemonData that has no moves (#6070)
Prevent save corruption when loading a pokemonData that has no moves
2025-07-07 23:10:32 -04:00