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/Refactor] Block moves that shouldn't be selectable under certain conditions, refactor Gravity #3520

Draft
wants to merge 20 commits into
base: beta
Choose a base branch
from

Conversation

schmidtc1
Copy link
Contributor

@schmidtc1 schmidtc1 commented Aug 12, 2024

What are the changes?

Some moves shouldn't be selectable in the move menu under certain conditions.
Refactors Gravity and the Interrupted tag.

Why am I doing these changes?

It is the correct implementation of the moves.

What did change?

Adds UnselectableMoveAttr to the following moves:

  • Stuff Cheeks
  • Bounce
  • Fly
  • Flying Press
  • High Jump Kick
  • Jump Kick
  • Magnet Rise
  • Sky Drop
  • Splash
  • Telekinesis

Adds a check in isUsable() for determining if a move can be selected.
Adds a check in MovePhase for displaying the failed text specific to these moves.
Removes the lapse() function from InterruptedTag. All functionality moved to onAdd() and tag is removed immediately after.
(NOTE: debating whether Interrupted tag should just be removed and place functionality in move.ts as an attribute of Gravity, Smack Down, and Thousand Arrows.)

Screenshots/Videos

Stuff cheeks

Stuff.cheeks.blocked.mp4

Gravity moves

Gravity.moves.mp4

Struggle when no moves are usable

Struggle.with.no.usable.moves.mp4

Semi-invulnerable airborne moves cancelled before second turn goes off

Fly.cancelled.mp4

To-do

  • Update messages to match canon game.
  • Put in text for when Fly/Two turn move is cancelled by gravity (while user is in air).
    • Check if it works in onAdd()/if it affects anything else.
  • Write unit tests.
    • Check if Gravity Arena Tag lasts for 5 turns
    • Check if Gravity interrupts Fly
    • Check if Gravity causes jumping/airborne moves to fail
    • Check if Gravity allows Flying types to be hit by Ground type moves (Merged from [Bug] Fix: Gravity tag removes flying type during damage calculation #3670)
    • Check if Gravity allows Levitate pokemon to be hit by Ground type moves
    • Check if Gravity removes Magnet Rise and allows pokemon to be hit by Ground type moves
    • Check Stuff Cheeks fails if berry is lost before move goes off.

How to test the changes?

Checklist

  • I'm using beta as my base branch
  • 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 considered writing automated tests for the issue?
  • 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?

@Madmadness65 Madmadness65 added (Legacy) Bug Legacy Label, don't apply to new issues/PRs Move Affects a move labels Aug 13, 2024
src/data/move.ts Outdated Show resolved Hide resolved
@schmidtc1 schmidtc1 changed the title [Bug] Block moves that shouldn't be selectable under certain conditions [Bug/Refactor] Block moves that shouldn't be selectable under certain conditions, refactor Gravity Aug 20, 2024
@schmidtc1 schmidtc1 marked this pull request as ready for review August 22, 2024 15:57
@DayKev
Copy link
Collaborator

DayKev commented Aug 22, 2024

Seems like there might be overlap with #2051 in functionality?

@schmidtc1
Copy link
Contributor Author

Seems like there might be overlap with #2051 in functionality?

Wasn't aware of that PR, looks like a decent amount of overlap

@schmidtc1 schmidtc1 marked this pull request as draft September 7, 2024 13:56
@DayKev DayKev removed the (Legacy) Bug Legacy Label, don't apply to new issues/PRs label Sep 19, 2024
@DayKev DayKev added the P2 Bug Minor. Non crashing Incorrect move/ability/interaction label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Move Affects a move P2 Bug Minor. Non crashing Incorrect move/ability/interaction
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants