Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Fix Assist bug of using only the user's moveset instead of whole team's, refactor Assist/Sleep Talk/Metronome implementation #3075

Closed
wants to merge 176 commits into from

Conversation

schmidtc1
Copy link
Contributor

@schmidtc1 schmidtc1 commented Jul 19, 2024

What are the changes?

Properly implements Assist.
Refactors RandomMovesetMoveAttr to extend RandomMoveAttr.
Creates arrays of invalid moves for each move: Assist, Sleep Talk, Metronome, since they each have different sets of uncallable moves.

Why am I doing these changes?

Assist did not call ally moves, had useless code, and was given no distinction in logic from Sleep Talk.
Metronome calls random moves in a similar manner to the two other moves, so it makes sense to have Assist/Sleep Talk reuse the code for calling moves.
None of Assist/Sleep Talk/Metronome had properly implemented lists of uncallable moves.

What did change?

  • Assist now uses the entire team's party
  • Assist/Sleep Talk's attribute now extends RandomMoveAttr and uses its callMoves function (which has been modified slightly to accommodate this) to call the move
  • Sleep Talk targeting is changed to NEAR_ENEMY
  • Assist/Sleep Talk/Metronome now have individual arrays listing uncallable moves. These arrays were created referencing Bulbapedia's list of uncallable moves.
  • Uncallable moves for Assist
  • Uncallable moves for Sleep Talk
  • Uncallable moves for Metronome

Note: Sleep Talk specifies that it targets the opposite opponent. Since there is no MoveTarget specifically for opposite opponents, I chose to make it NEAR_ENEMY for now.

Screenshots/Videos

Metronome

Metronome.mp4

Assist

Assist.mp4

Sleep Talk

Sleep.Talk.mp4

How to test the changes?

Checklist

  • There is no overlap with another PR?
  • The PR is self-contained and cannot be split into smaller PRs?
  • Have I provided a clear explanation of the changes?
  • Have I tested the changes (manually)?
    • Are all unit tests still passing? (npm run test)
  • Are the changes visual?
    • Have I provided screenshots/videos of the changes?

f-fsantos and others added 30 commits June 19, 2024 17:31
feat: Add link to Discord in menu UI

feat: Add Discord and Google login functionality

Add container around discord and google icons

refactor: Update environment variable names for Discord and Google client IDs

feat: Add "Or use" translation for login options in multiple languages

feat: Update menu UI translations for multiple languages

Code review fixes

refactor: Update Discord and Google client IDs in environment variables
this also reduces output noise in tests
* Localization(pt): translated bgm-name.ts

* fix
…gging

[Feature][ENV] make i18n debugging an optional env setting
* Update TMs for more Indigo Disk changes

* Fix typo, more Stored Power
* Refactor challenges and add fresh start

* Add achievement for fresh start challenge
* Fix random damage roll to be 85-100% instead of 85-99%

* Update battle.test.ts to reflect the fix
* [Help] [Move/Bug] Patches Psychic Terrain applicability edge cases

Was cancelling moves even if targeted mons weren't on the terrain.

* [Bug `]Pokemon.isGrounded` does not exist

Replaced with `Pokemon.isGrounded()`, which does.

* [Bug] Psychic Terrain priority move cancel ignoring ungrounded

* [Bug] Semi-invulnerable should not be grounded
* Prevent sizing error

* Make reboot not necessary for show BGM

* Makes the BGM Bar active by default

  + It had originally been decided that this would not be active by default because it was to be displayed outside the pause menu, but since its behavior has changed between this decision and its integration, the default deactivation is no longer necessary
…s#2254 (pagefaultgames#2906)

* Translate forgotten sentences on phases

* Translate to de forgotten sentences on phases

* Translate to es forgotten sentences on phases

* Translate to fr forgotten sentences on phases

* Translate to it forgotten sentences on phases

* Translate to ko forgotten sentences on phases

* Translate to pt br forgotten sentences on phases

* Translate to zh cn forgotten sentences on phases

* Translate to zh tw forgotten sentences on phases

* remove duplicate message

* remove duplicate message

* Update src/locales/pt_BR/battle.ts

Co-authored-by: José Ricardo Fleury Oliveira <[email protected]>

* Update src/locales/de/battle.ts

Co-authored-by: Jannik Tappert <[email protected]>

* Update src/locales/de/battle.ts

Co-authored-by: Jannik Tappert <[email protected]>

* Update battle.ts [Localization(it)]

* Update src/locales/zh_CN/battle.ts

Co-authored-by: Yonmaru40 <[email protected]>

---------

Co-authored-by: Alexis <[email protected]>
Co-authored-by: 송지원 <[email protected]>
Co-authored-by: José Ricardo Fleury Oliveira <[email protected]>
Co-authored-by: Jannik Tappert <[email protected]>
Co-authored-by: Niccolò <[email protected]>
Co-authored-by: Yonmaru40 <[email protected]>
…ltgames#2907)

* Translate pokemon summary

* Translate pokemon summary to fr

* Translate pokemon summary to de

* Translate pokemon summary to es

* Translate pokemon summary to it

* Translate pokemon summary to ko

* Translate pokemon summary to pt br

* Translate pokemon summary to zh cn

* Translate pokemon summary to zh tw

* Fix import

* Update partially for en and ko

* Update interface name for en

* Merge trainerLabel&Text and calculate typeLabel width

* Update src/locales/es/pokemon-summary.ts

Co-authored-by: GoldTra <[email protected]>

* Apply translations key to all languages with interface TranslationEtries

* Update ko/translationKey of status

* Update ko/translationKey of pokemonInfo

* Update de/translationKeys of memostring and metFragment

* Update de/translationKeys of memostring and metFragment 2

* Update src/locales/ko/pokemon-summary.ts

Co-authored-by: Enoch <[email protected]>

* Update src/locales/ko/pokemon-summary.ts

Co-authored-by: returntoice <[email protected]>

* Update src/locales/pt_BR/pokemon-summary.ts

Co-authored-by: José Ricardo Fleury Oliveira <[email protected]>

* Update src/locales/ko/pokemon-summary.ts

* Update src/locales/pt_BR/pokemon-summary.ts

Co-authored-by: José Ricardo Fleury Oliveira <[email protected]>

* Update pokemon-summary.ts [Localization(it)]

* remove unused code

* Update src/locales/zh_CN/pokemon-summary.ts

Co-authored-by: Yonmaru40 <[email protected]>

* Update src/locales/zh_CN/pokemon-summary.ts

Co-authored-by: Yonmaru40 <[email protected]>

* Update src/locales/zh_CN/pokemon-summary.ts

Co-authored-by: Yonmaru40 <[email protected]>

* Update src/locales/es/pokemon-summary.ts

Co-authored-by: Arxxer <[email protected]>

* Update src/locales/es/pokemon-summary.ts

Co-authored-by: Arxxer <[email protected]>

---------

Co-authored-by: Alexis <[email protected]>
Co-authored-by: Mr.WaterT <[email protected]>
Co-authored-by: Alexis Faizeau <[email protected]>
Co-authored-by: GoldTra <[email protected]>
Co-authored-by: returntoice <[email protected]>
Co-authored-by: José Ricardo Fleury Oliveira <[email protected]>
Co-authored-by: 송지원 <[email protected]>
Co-authored-by: Niccolò <[email protected]>
Co-authored-by: Yonmaru40 <[email protected]>
Co-authored-by: Arxxer <[email protected]>
@schmidtc1
Copy link
Contributor Author

Misclicked the close with comment button

schmidtc1 and others added 6 commits July 24, 2024 12:35
…ultgames#3118)

* Make on-summon abilities trigger after the switch check

* Add test
Maintains parity with Air Lock. Both of these probably need to be localized. Should fix issue 491 though
* Option to view Summary before adding new Pokemon to party

* Fixed issues described by HopsWas

* Adjusted makeRoomForConfirmUi to improve window spacing

* Fixed ESLint issue + addressed OrangeRed review

* Fixed Github pages issue

* Removed duplicate unshiftPhase

* Fixed phase order

* Don't start from beginning of catch function

* Option to view Summary before adding new Pokemon to party

* Fixed issues described by HopsWas

* Adjusted makeRoomForConfirmUi to improve window spacing

* Fixed Github pages issue

* Fixed phase order

* Quick fix

* This should fix the summaryOption feature without bugging confirm-ui-handler in other cases

* Revert "Merge remote-tracking branch 'origin/summaryOption1' into summaryOption1"

This reverts commit ea7d0ce, reversing
changes made to 4c56595.

* Added a better conditional that reflects its source and purpose

---------

Co-authored-by: Frutescens <info@laptop>
Co-authored-by: AJ Fontaine <[email protected]>
…te disruption (pagefaultgames#3041)

* Adds frenzyMissFunc trigger on NO_EFFECT hit result

* Refactors FrenzyAttr to properly lapse tags each turn and remove tags on disrupt

* Makes comment on CONFUSED tag clearer

* Changes all integer usages to number in battler-tags

* Update getBattlerTag function to use number instead of integer
@schmidtc1 schmidtc1 changed the title [Bug] Fix Assist bug of using only the user's moveset instead of whole team's, refactor Assist/Sleep Talk implementation [Bug] Fix Assist bug of using only the user's moveset instead of whole team's, refactor Assist/Sleep Talk/Metronome implementation Jul 24, 2024
frutescens and others added 4 commits July 24, 2024 15:25
* Bug Fix

* Update src/system/game-stats.ts

Co-authored-by: flx-sta <[email protected]>

* Fixing a test

* Fixed import

* Revert "Bug Fix"

This reverts commit 8348449.

---------

Co-authored-by: Frutescens <info@laptop>
Co-authored-by: flx-sta <[email protected]>
…ames#3122)

* Bug Fix

* Update src/system/game-stats.ts

Co-authored-by: flx-sta <[email protected]>

* Fixing a test

* Revert "Fixing a test"

This reverts commit 1bdbe2d.

* Test Re-Run

---------

Co-authored-by: Frutescens <info@laptop>
Co-authored-by: flx-sta <[email protected]>
…ch and double battles (pagefaultgames#2462)

* Adjust how counter attacks target to account for uturn/voltswitch

* Creates move flag for metal burst/comeuppance to redirect in some cases

* Remove debug printing

* Bit shifts the redirect counter flag

* Removes extraneous class from prior testing

* Remove vitest timestamp file that was accidentally added
@schmidtc1 schmidtc1 marked this pull request as ready for review July 24, 2024 20:22
Tempo-anon and others added 6 commits July 24, 2024 16:23
Mystic ticket icons in the achievements just confuse players
…red in dex (pagefaultgames#2713)

* Fix reins et al being available without unlocking second mon

* Small fix

* Parentheses for safety

* Add documentation to new function
Co-authored-by: Frutescens <info@laptop>
…stats (pagefaultgames#3117)

* Fixed OHKO moves being affected by accuracy and evasion battle stats

* Added related tests for Fissure, unskipped related test for Hustle

* Tweaked fissure accuracy and evasion tests to use spyOn() for getAccuracyMultiplier() as per feedback

* Fixed accuracy test for Fissure
* [Fix][Sprite] Politoed Back Sprites

Retrieved first version from history.
Rearranged frames to make jump a little less floaty.
Set same anim length for all variations.
Json is identical for all variations.
Spritesheet frame position is identical for all variations.
Trimmed the frame of extra space
Reduced file size of spritesheets and JSON due to less unique frames needed.

* [Fix][Sprite] Politoed Back Sprites  - Reformatted JSON to texturepacker standard

Reformatted json.
* fix remove pokemon menu

* fix dropdown all is not changing bug

* fix bug when go down with no starter on start button

* fix starter corsor bug on deletion. out of screen cursor bug

* fix challenge log

* fix lint error
@DayKev
Copy link
Collaborator

DayKev commented Jul 25, 2024

I would like feedback on the following:

  • If the IGNORE_VIRTUAL flag can be removed since it is only used for Assist/Sleep Talk/Metronome

Oh, the only things in the codebase that use IGNORE_VIRTUAL are these moves? Removing it is probably fine then, I'm not entirely sure what it was supposed to do (since it seems like it's trying to do multiple things at once but not actually doing any of them correctly lmao).

As for using the same MoveAttr for multiple moves here, do whatever makes it easier to read and maintain. If reusing the same attr for all of them makes the code better, do that; if it makes the code start becoming overly complex/convoluted, then go ahead and separate the attrs.

KimJeongSun and others added 6 commits July 25, 2024 00:11
… HA (pagefaultgames#3138)

* Prevent evolution causing a swap from the second ability to the HA

* Add tests

* Update `starter-select-ui-handler.ts`
* More work

* More work

* Should be finished

* Fixed an error in checking target

* Moved white herb effect to StatChangePhase, 50% chance of consumption

* Added graphics for White Herb

* Balance and documentation

* Add localization entry for White Herb apply msg

* Add new keys to other localization files

* German translations

Co-authored-by: Jannik Tappert <[email protected]>

* Update item sprite atlas

* Redo item atlas

* Remove whitespace in move.ts

* Moved decrement outside conditional

* Fix item atlas

---------

Co-authored-by: Jannik Tappert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(Legacy) Bug Legacy Label, don't apply to new issues/PRs Move Affects a move
Projects
None yet
Development

Successfully merging this pull request may close these issues.