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

Fix [BUG] #5081 Wrong visual text when using priority moves on Psychic Terrain #5091

Merged
merged 8 commits into from
Feb 16, 2025

Conversation

KennethWest
Copy link
Contributor

What are the changes the user will see?

When battling on Psychic Terrain the user will now get battle text that properly reflects which Pokémon was protected from a priority move blocked by the terrain.

Why am I making these changes?

Currently the text says the user of the move is protected by the Psychic Terrain, that can be confusing for players. More over it withholds information from the player about which Pokémon is being targeted by the opponent in double battles.

Fixes #5081

What are the changes from a developer perspective?

All changes occurred in src/phases/move-phase.ts. Changed the arguments passed to the function getTerrainBlockMessage().
Previously the argument list was:
getTerrainBlockMessage(this.pokemon, this.scene.arena.getTerrainType()) which would pass the Pokémon that used the move along to rather that the target of the move.
It was changed to:
getTerrainBlockMessage(targets[0], this.scene.arena.getTerrainType()).

Screenshots/Videos

Before:

Psychic.Terrain.Text.Bug.mp4

After:

FixedPsychicTerrainVisualText.mp4

How to test the changes?

My overrides.ts file only gave Pokémon the psychic surge ability and priority moves to test. Separate tests forced opponent move sets to have priority moves as well. Didn't feel the need for automated tests, and there are no special requirements to test if this works.

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 tested the changes manually?
  • Are all unit tests still passing? (npm run test)
    • Have I created new automated tests (npm run create-test) or updated existing tests related to the PR's changes?
  • Have I provided screenshots/videos of the changes (if applicable)?
    • Have I made sure that any UI change works for both UI themes (default and legacy)?

Are there any localization additions or changes? If so:

  • Has a locales PR been created on the locales repo?
    • If so, please leave a link to it here:
  • Has the translation team been contacted for proofreading/translation?

@KennethWest KennethWest requested a review from a team as a code owner January 6, 2025 03:08
@Madmadness65 Madmadness65 added the P3 Bug Non gameplay affecting bug. typos, graphical issues, or other minor incorrect interactions. label Jan 6, 2025
@Snailman11
Copy link
Collaborator

Does your PR's behaviour in Double Battles match mainline? (Message/check plays from right to left)

DoublesMisty.mp4

@KennethWest
Copy link
Contributor Author

Does your PR's behaviour in Double Battles match mainline? (Message/check plays from right to left)

DoublesMisty.mp4

I'm not sure this is applicable at the moment, since by current definition Psychic Terrain cannot block moves that target multiple or adjacent Pokémon even if they become priority moves.

Copy link
Collaborator

@Madmadness65 Madmadness65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one change is necessary, since the BattleScene is called through globalScene now.

src/phases/move-phase.ts Outdated Show resolved Hide resolved
@KennethWest
Copy link
Contributor Author

Just one change is necessary, since the BattleScene is called through globalScene now.

Thanks, I've committed the change.

@Madmadness65 Madmadness65 merged commit 4bc617b into pagefaultgames:beta Feb 16, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Bug Non gameplay affecting bug. typos, graphical issues, or other minor incorrect interactions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Priority Moves used in Psychic Terrain Display Incorrect Battle Text
4 participants