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 multi-hit early stopping on spread moves #2648

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

innerthunder
Copy link
Collaborator

What are the changes?

This fixes a bug where a spread move (e.g. Earthquake) from a source holding Multi-Lens only strikes each target once if one of those targets is protected or has an ability that nullifies damage.

Why am I doing these changes?

This bug was reported in the Discord. You can see Discharge incorrectly stopping in the video below

Screen_Recording_20240627_104035_Chrome.mp4

The user also provided beautiful artwork of the move's current behavior:

image
image

What did change?

Pokemon.stopMultiHit() now has an optional target parameter. If target is specified, the target is removed from the targets list in MoveEffectPhase for future strikes of the move.

Screenshots/Videos

The video below shows Earthquake hitting the opponents multiple times despite the user's ally using Protect in the same turn.

PokeRogue.-.Google.Chrome.2024-06-26.20-42-24.mp4

How to test the changes?

To test via overrides.ts:

  • Force double battles.
  • Give player pokemon a spread move (e.g. Moves.EARTHQUAKE) and Moves.PROTECT)
  • Add `{name: "MULTI_LENS"} to the starting held item override array
  • In battle, make the Pokemon with Multi-Lens use the spread move, and have the other Pokemon use Protect. The spread move should hit the enemies twice and hit into your ally's Protect once.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants