pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

[Test] Consolidate `doSelectTarget()` into `doAttack()`

Open DayKev opened this issue 6 months ago • 1 comments

What are the changes?

There are no user-facing changes.

Why am I doing these changes?

Suggestion by snooz on Discord.

What did change?

doAttack() now takes an optional targetIndex parameter and calls doSelectTarget() unless targetIndex is null.

How to test the changes?

npm run test

Checklist

  • [x] I'm using beta as my base branch
  • [x] There is no overlap with another PR?
  • [x] The PR is self-contained and cannot be split into smaller PRs?
  • [x] Have I provided a clear explanation of the changes?
  • ~[ ] Have I considered writing automated tests for the issue?~
  • [x] Have I tested the changes (manually)?
    • [x] Are all unit tests still passing? (npm run test)
  • ~[ ] Are the changes visual?~
    • ~[ ] Have I provided screenshots/videos of the changes?~

DayKev avatar Aug 14 '24 05:08 DayKev