Fix [BUG] #5081 Wrong visual text when using priority moves on Psychic Terrain #5091
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
beta
as my base branchnpm run test
)npm run create-test
) or updated existing tests related to the PR's changes?Are there any localization additions or changes? If so: