Commit Graph

85 Commits

Author SHA1 Message Date
innerthunder
b2048148c9
[Bug] Fix Make It Rain not applying effect on KO (#2670) 2024-06-27 19:52:13 -04:00
innerthunder
e521862096
[Bug] Fix Make It Rain applying effects for each target (#2664)
* Fix Make It Rain applying effects for each target

* Revert MoneyAttr change

* Remove RNG from parental bond tests
2024-06-27 15:21:24 -04:00
NightKev
23a1c461a9
[unittest] Remove more RNG from Dry Skin tests (#2647) 2024-06-27 01:06:16 -04:00
NightKev
8933a9bb05
[Test] Prevent RNG from breaking Dry Skin tests (#2630) 2024-06-26 21:39:35 -04:00
innerthunder
55dd6b5100
[Bug] Fix Multi-Lens/PBond interaction for spread moves (#2633) 2024-06-26 21:05:03 -04:00
Dmitriy K
576f099243
[Test] Optimize Quick Draw tests (#2625)
* optimize the tests

* add level override in favor of directly changing stats
2024-06-26 17:01:14 -04:00
innerthunder
cd92d4d7d3
[Ability] Implement Parental Bond (#2384)
* Parental Bond basic implementation

* Parental Bond unit tests

* ESLint

* PBond AbAttr rework, documentation, and multi-target unit tests

* Update post-target move attribute logic

For Parental Bond interaction.

* AddSecondStrikeAbAttr now uses Constructor util

* Unit tests for PBond + Multi-Lens interaction

* Remove random damage spread in unit test

* Add null checks to PBond AbAttr

* Set player pokemon for unit test

* Fixed Post Target check to account for KO's

* Fix multi-strike moves applying effects at wrong times

* Test cases for updated effect timing

* Add Wake-Up Slap test case

* Fix Fury Cutter/Echoed Voice multi-hit interaction

* Fix Pay Day, Relic Song, and Fury Cutter (again)

* Add early stopping to multi-hit moves

* RecoilAttr now uses lastHitOnly

* Add faint check to last hit logic
2024-06-26 16:03:14 -04:00
Amani H
f7f8988cdb
[Item] Add Light Ball, Thick Club, Metal Powder, and Quick Powder (#1899)
* Add Light Ball, Thick Club, and Metal/Quick Powder

* Fix Typo, Account for Fusions

* Fix Errors with Fusions

* Group Items into Generator

* Refactor Generator and Type, Fix Localization (en)

* Adjust Generator, Add Override Type

* Fix Enum Import

* Localize for de, es, fr, it, ko, zh_CN, zh_TW

* Add Unit Tests

* Add Type

* Fix Items Atlas

* Change Cubone Passive Ability, Adjust Weight
2024-06-26 13:48:10 -05:00
Adrian T
fd08983181
[Ability] fix damage taken by disguise (#2601) 2024-06-25 15:32:45 -04:00
Teju Rajbabu
c8db3bff4c
[QOL] UI Improvement - Shiny Icon (#2372)
* Test changes to change variant label color based on Tint

* Revert "Test changes to change variant label"

This reverts commit 0ad0f62930.

* minimal recovery changes

* Finalized recovery and implemented ShinyIcon

* add setY in MockSprite

* added back some unintentional removed code

* added shiny_icons

* Initial test for tier change

* implemented Shiny Icon full functionality

* slight setY change for non-Base starters
2024-06-25 13:48:48 -04:00
Corrade
e70113073f
[Bug] Fix Dry Skin and ReceivedMoveDamageMultiplierAbAttr abilities (#2592)
* Dry skin and ReceivedMoveDamageMultiplierAbAttr bug fix: first cut

* Dry skin and ReceivedMoveDamageMultiplierAbAttr bug fix: removed redundant branch

* Dry skin and ReceivedMoveDamageMultiplierAbAttr bug fix: reworded test cases that had typos anyway

* Dry skin and ReceivedMoveDamageMultiplierAbAttr bug fix: renamed PreDefendMovePowerToOneAbAttr (Disguise) to mention damage rather than power

* Dry skin and ReceivedMoveDamageMultiplierAbAttr bug fix: renamed powerMultiplier to damageMultiplier in ReceivedMoveDamageMultiplierAbAttr
2024-06-25 13:23:48 -04:00
Puchimono
8e6cbad3fc
[Bug] Legendary pull rate fix from Leg. up machine (#2587) 2024-06-25 10:14:28 -04:00
Amani H
136652caa9
[Item] Implement Eviolite Behavior (#2161)
* Add Eviolite with Unit Tests

* Localize for de, es, fr, it, ko, zh_CN, zh_TW

* Adjust German Localization

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Adjust Italian Localization

* Change Multiplier Type

* Adjust Unit Test Import

* Change Constructor

* Make Unit Tests Localized

* Comment Out of Reward Pool

---------

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
2024-06-24 21:00:59 -05:00
damocleas
ec91d2453a
[Balance] Protean / Libero changed to Gen 6-8 Implementation (#2473)
* Protean / Libero changed to Gen 6-8 Implementation

* take 2

* please just work

* Update protean.test.ts

* Update libero.test.ts
2024-06-24 20:58:50 -05:00
cadi
8c8ddd26b5
[Ability] Implement Quick Draw (#2287)
* implement quick draw

* add line

* change ability success condition

* quick draw comes before quick claw effect

* now ability has chance variable to test conditional situation

* add unit test

* Merge branch 'main' into ability-quick-draw

* modifed: ability.getTriggerMessage

* modified: to use pokemon.battleData.abilityRevealed

* modified: changed private variable to public

* erase expect interceptor log

* add localizations

* modified: add comma in locales

* modified: ability docs & trigger logic

* modified: changed test logic
2024-06-24 11:22:15 -04:00
Adrian T
e9fb13cce9
[Move] Implement Flower Shield (#2543)
* implement flower shield

* add unit tests

* refactors, add test

* use HideSpriteTag instead

* update comment

* replace HideSpriteTag with SemiInvulnerableTag
2024-06-24 10:37:24 -04:00
innerthunder
905ecd6576
[Bug] Remove grounding moves' arbitrary turn limits (#2526)
* Remove grounding moves' arbitrary turn limits

* Added documentation for GroundedTag

* Rename GROUNDED tag + add tag check to isGrounded

* Fix remaining GROUNDED reference

* Clean up calls to getTag
2024-06-23 12:48:49 -04:00
sirzento
0bd25e925e
[BUG] Legendary egg pity & manaphy counter fix + Egg unit tests (#2534)
* Fixed bug that legendary egg pity only increased by one if egg pulled out of legendary gacha

* Removed debug logs

* Added new unit tests. Fixed bug that sometimes common eggs do count as manaphy eggs.
2024-06-23 12:40:37 -04:00
Adrian T
7f15efcd34
[Refactor] unit tests cleanup (#2533) 2024-06-23 12:38:40 -04:00
Matthew
d2f4c5b59c
[UI] UI Small Adjustments (#2525)
* UI Small Adjustments

* Fix Unit Tests

* Null check event display before clear

* better empty move placeholder debug name
2024-06-23 12:09:23 -04:00
hibiya (김종이)
cb5016d10f
[Localization] include pokemon names, stats into battle:stat* keys (#2373)
* [Localization] include pokemon names, stats into battle:stat* keys

* [Localization(fr)] Update stat change messages

Co-Authored-By: Lugiad <adrien.grivel@hotmail.fr>

* [Localization(es)] Update stat change messages

Co-Authored-By: GoldTra <162721984+GoldTra@users.noreply.github.com>

---------

Co-authored-by: Lugiad <adrien.grivel@hotmail.fr>
Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com>
2024-06-22 21:55:09 -04:00
Jacob Hatchett
77d25d18f9
[Ability] Implemented Aura Break (#2252)
* re-adjust according to new changes

* added unit tests

* add test fixes

* add documentation

* more fixes
2024-06-22 11:37:46 -04:00
Dmitriy K
3bbe01b288
[Ability] Implement Costar Ability (#1218)
* Add unthaw to moves that are missing it

Add unthaw to all damaging fire moves

Add Status Effect overrides for easier testing

clean up comments and readd status cure before fainting

* implement Costar ability, refactor TraceAbAttr to be more generic

* format code, clean up comments

* Revert "Add unthaw to moves that are missing it"

This reverts commit 89494fa0c8.

* clean up comments, remove unused call

* ability now copies negatives changes as well

* separate PostSummonCopy into two different classes

* small refactor of copy ability attrs

* add costar to test suite

* remove abstract declaration from comments

* remove broken import statement

* actually fix broken imports
2024-06-22 11:35:25 -04:00
Adrian T
464ffe7332
[Enhancement][Unit Test] Refactor + Unit Tests for Light Screen, Reflect and Aurora Veil (#2514)
* refactor copy pastas

* add tests

* specify arena tag types
2024-06-22 10:09:23 -04:00
sirzento
9d090f37f9
[Feature] [Same species Egg] Egg class rewrite to enable fully parameterized eggs to generate same species eggs + Egg overrides (#1833)
* Create variant-tiers enum

* Added variant tier override property to the egg class

* Added hasVariants function to pokemon species

* Implement variant override logic to egg hatching phase

* Delete src/enums/variant-tiers

* Create variant-tiers enum

* Added egg shiny and variant overrides

* fixed egg comment in overrides.ts

* Added override logic to egg hatch phase

* Added species pool filter logic when global override is set

* Added global egg tier override logic

* Added global egg tier override

* Added global gacha pull count override logic

* Added global gacha pull count override

* Renamed egg hatch override

* Renamed egg hatch override

* Added gacha pull without voucher global override

* Renamed free gacha pull global override

* Added free gacha pull override logic

* Gacha pull count override name fix

* Bugfix

* restored defaults + savegame bugfix

* eggOptions added to parameterize eggs. Added option to buy eggs of the same species.

* Small Bugfix for same species egg generation

* Removed translation from translator

* Improved the isManaphyEgg() check

* Fixed manaphy egg hatch wave count

* Added comments to IEggOptions

* Added eggOptions for hidden ability and rare egg move override

* Merge Fix: Update egg-hatch-phase.ts

* Fixed manaphy rates back to 1/256 like in PR #2182

* Renamed override, same species egg unlocks after passive is bought. Added code as comment for custom shiny, HA and rare egg move rates.

* Merge fix. Moved enums.

* quick fix for the commented out code

* Fixed that you can't buy an egg over the 99 egg limit

* Fix that you can't buy eternatus

* Use already existing randSeedShuffle instead of my own function

* Eternatus buyable again. Changed overrides to be able to set common tier/variants. Moved getGuaranteedEggTierFromPullCount().

* Changed eggOption gachaType to sourceType. Replaced eggOption overrideRareEggMove with eggMoveIndex to exatly specify an egg move. Moved egg move unlock logic into the egg class. Simplified shiny calculation. Added same species egg type descriptor. Moved custom rates for same species egg code into egg.ts.

* Added 19 unit tests for eggs

* Changed unit test description

* Added higher rates for same species eggs

* Adjusted same species egg cost for 1-3 cost starters and HA rates

* Added legacy egg loading unit test. Fixed gachaType legacy value loaded from DB and legacy tier loading

* Legacy egg loading from server DB fixed
2024-06-21 20:19:56 -04:00
innerthunder
86cc1018e3
[Bug] Fix Thousand Arrows not hitting Pokemon with Levitate (#2493) 2024-06-21 14:04:11 -04:00
Adrian T
d3e516b496
[Bug][Unit Test] fix and optimize sturdy unit tests (#2455)
* fix and optimize sturdy unit tests

* re-add timeout
2024-06-21 10:59:10 -04:00
innerthunder
7cad385a38
[Bug] Fix Thousand Arrows grounding opponents before use (#2485)
* Fix Thousand Arrows grounding opponents before use

* Use existing AddBattlerTag instead
2024-06-21 10:39:00 -04:00
Mark
eff1c8c333
[Unittest] Fix Ice Face Test where speed tie was sometimes breaking multi-hit test (#2487) 2024-06-21 10:37:09 -04:00
innerthunder
22e26621b3
[Unittest] Remove HP assignment in unit tests (#2466) 2024-06-20 15:02:17 -04:00
Zach Day
f9d74aa836
[Fix] Fix randomness in Gastro Acid unit test (#2443)
* Make ability suppression fail if ability is already suppressed

* Document SuppressAbilitiesAttr

* Add gastro acid unit tests

* Fix rng broken unit test

* Fix it for both tests
2024-06-20 14:02:05 -04:00
Adrian T
a6dba35291
[Unit Test] add tailwind unit tests (#2436)
* add tailwind unit tests

* add addtl test
2024-06-20 11:27:16 +02:00
Adrian T
9181f434b7
add wind power unit tests (#2431) 2024-06-20 11:26:50 +02:00
Adrian T
0c42da8f10
[Enhancement] add wind rider unit tests (#2428)
* add wind rider unit tests

* specify wind rider ability on shiftry
2024-06-20 11:12:55 +02:00
innerthunder
c803cb5cb0
[Enhancement] Optimize Unit tests (#2444)
* Optimize Unit tests

- Battery
- Unseen Fist
- Rage Powder
- Follow Me
- Spotlight
- Power Spot

* Fix Screen Cleaner unit test bug
2024-06-20 11:11:29 +02:00
Zach Day
07b9f5476a
[Fix] Ability suppression effects not failing correctly (#2440)
* Make ability suppression fail if ability is already suppressed

* Document SuppressAbilitiesAttr

* Add gastro acid unit tests
2024-06-20 00:43:45 -04:00
Adrian T
29b8b3aa1f
[Bug] Fixes dragon tail vs ice face eiscue interaction (#2397)
* add optional chaining

* specify first hit
2024-06-19 09:51:50 -04:00
Adrian T
9463da8797
[Bug] Fix ice face blocking all hits from multihit moves (#2391)
* fix ice face bug

* add multihit test
2024-06-18 22:56:44 -04:00
ReneGV
026c048359
[ablity] Add tests to sturdy (#2362) 2024-06-17 23:39:59 -04:00
NxKarim
c52e0ac5b6
[Ability] Serene Grace, Shield Dust, Sheer Force (P) (#246)
Co-authored-by: okimin <danielgaston6@gmail.com>
2024-06-17 20:30:42 -04:00
innerthunder
3b3b9e39af
[Move] Implement Follow Me, Rage Powder, and Spotlight (#1834)
* Implement "Center of Attention" battler tag + moves

* Powder immunity logic for Rage Powder

* Center of Attention unit tests
2024-06-17 18:05:21 -04:00
Adrian T
fd1baef244
[Ability] Implement Power Spot & Battery (#2268)
* add battery

* add power spot

* refactor

* remove FieldVariableMovePowerAbAttr

* remove showing ability bar

* document + cleanup

* add unit tests

* update test name

* update variable names

* update multiplier
2024-06-17 16:12:11 -04:00
Adrian T
57b5c33c4b
[Ability] Implement Screen Cleaner (#2346)
* implement screen cleaner

* add documentation

* add unit tests

* rename arena to arenaTag
2024-06-17 15:37:11 -04:00
Frisk17
89eba349c9
[Move] Implemented Magnet Rise (#2081)
* Partially implemented Magnet Rise

* Implemented Magnet Rise

* Changed pokemon.ts so all TypeImmune tags work instead of just
MagnetRisen

* Magnet Risen is now removed when Gravity is used.

* Magnet Rise is ignored by Thousand Arrows
and Smack Down.

* Fixed a bug where status ground type moves
would also be ignored by Magnet Rise

* Added a message when Magnet Rise is removed

* Inserted TypeImmuneTag check in
getAttackMoveEffectiveness() for the AI

* Created a magnetRiseCondition separately

* Created a test for Magnet Rise

* Bug Fix in Magnet Rise test

* Created Magnet Rise test with Gravity

* Shifted the code from getAttackMoveEffectiveness
and apply into getAttackTypeEffectiveness instead

* Replaced onNextPrompt with doAttack

* Removed redundant runFrom(Phase)

* Replaced magnetRiseCondition with
battlerTags.every anonymous function

* Fixed import errors

* Added an undefined check for summonData
for TypeImmuneTag in getAttackTypeEffectiveness

* Replaced undefined-check with optional chaining
2024-06-17 17:35:06 +02:00
layharu0
942cbb2181
[Localization][ko] StatRose, StatFell Message Fix (#2285) 2024-06-16 22:01:08 -04:00
Devin Korb
e10d67858f
remove the duplicate document.fonts code (#2282) 2024-06-16 00:37:02 -04:00
Devin Korb
728ee3809a
Add dependency cruiser command (#2192)
* add dependency cruiser and fix all default errors

* create svg render of dependencies in command

* move configs to ts files, await font loading

* fix i18n

* fix dependencies...

* fix typedoc generation and tsconfig exclusions

* revert github-pages fix for another pr

* no-circular -> no-circular-at-runtime for type imports (future)
2024-06-16 00:26:37 -04:00
Lee ByungHoon
9b8f6f312b
[Localization] Modification some code about battle stat for localization (#1985)
* [Localization] Modification some code about battle stat for localization.

* Corrections to failed generating typedoc docs.

* [Localization] Modification some code about battle stat for localization.

* Corrections to failed generating typedoc docs.

* Corrections to change localized key for battle stat and level change description.

* Deleted battle-stat.ts file in Deutsch locales.

* Fixed build failure

* Move unit test file into localisation folder from battle folder.

* Fixed localization key

* Fixed build failure

* Fix merge conflict

* Fix merge conflict again

---------

Co-authored-by: Tempoanon <163687446+Tempo-anon@users.noreply.github.com>
Co-authored-by: Temps Ray <temps.ray@gmail.com>
2024-06-15 22:25:18 -04:00
innerthunder
01435ed0e0
[Ability] Implement Unseen Fist (#1776)
* Implement Unseen Fist

* Add unit tests for Unseen Fist

* Fix unit test imports
2024-06-15 22:14:49 -04:00
Adrian T
0b019d9823
[Ability] Implement Wonder Skin (#2231)
* implement wonder skin

* add unit tests

* fixes

* move applyPreDefendAbAttrs
2024-06-15 17:06:32 +01:00