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

[Tests] Enemy Held Item overrides are now applied after generateEnemyModifiers() #4922

Open
wants to merge 5 commits into
base: beta
Choose a base branch
from

Conversation

frutescens
Copy link
Collaborator

What are the changes the user will see?

None.

Why am I making these changes?

This change is needed to test item-related moves and abilities without having unwanted items interfere with test conditions.

What are the changes from a developer perspective?

overrideModifiers and overrideHeldItems are now applied after generateEnemyModifiers() in encounter-phase.ts. Previously, they were applied in addEnemyPokemon(), but addEnemyPokemon() was run before generateEnemyModifiers() so the items in the override would be given but additional items could also be generated afterwards.

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)

@frutescens frutescens added the Tests Automated tests related label Nov 19, 2024
@frutescens frutescens requested a review from a team as a code owner November 19, 2024 20:56
@frutescens
Copy link
Collaborator Author

These flakey tests...
Uploading image.png…

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

Successfully merging this pull request may close these issues.

3 participants