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 enemy sprite disappearing on Roar or Dragon Tail #3925

Closed

Conversation

flx-sta
Copy link
Collaborator

@flx-sta flx-sta commented Aug 30, 2024

Fixes #481

What are the changes the user will see?

When an enemy uses Roar or Dragon Tail the sprite won't disappear anymore

Why am I making these changes?

To fix #481

What are the changes from a developer perspective?

A battle animation was considered isEnemy() only if it wasn't the player pokemon and if Array.isArray(moveAnims.get(this.move)) is true. According to @pom-eranian this might be a relict of the past as animation used to have definitions for player usage & enemy usage.

After removing the Array.isArray() check Roar and Dragon Tail worked as expected.
The reason why it fixes it can be seen in this comment in issue #481

Screenshots/Videos

Screen_Recording_2024-08-30_at_2.07.42_PM.mov

How to test the changes?

const overrides = {
  OPP_MOVESET_OVERRIDE: [ Moves.ROAR, Moves.ROAR, Moves.ROAR, Moves.ROAR ],
} satisfies Partial<InstanceType<typeof DefaultOverrides>>;

or

const overrides = {
  OPP_MOVESET_OVERRIDE: [ Moves.DRAGON_TAIL, Moves.DRAGON_TAIL, Moves.DRAGON_TAIL, Moves.DRAGON_TAIL ],
} satisfies Partial<InstanceType<typeof DefaultOverrides>>;

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 considered writing automated tests for the issue?
  • If I have text, did I make it translatable and add a key in the English locale file(s)?
  • 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?

@flx-sta flx-sta added the P2 Bug Minor. Non crashing Incorrect move/ability/interaction label Aug 30, 2024
@flx-sta flx-sta closed this Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Bug Minor. Non crashing Incorrect move/ability/interaction
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant