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

Tinted pokeball false positive from abilities #883

Closed
Tempo-anon opened this issue May 14, 2024 · 0 comments
Closed

Tinted pokeball false positive from abilities #883

Tempo-anon opened this issue May 14, 2024 · 0 comments
Labels
Bug Something isn't working

Comments

@Tempo-anon
Copy link
Collaborator

More info here but this affects all Pokemon with only 1 ability and makes the caught icon tinted when they appear with their hidden abilities even if the user owns the hidden ability.

This is because in the dexattr the ability is stored as a binary bitmask where 1 is the first ability, 2 is the second ability, and 4 is the hidden ability.

A Pokemon with only 1 ability has their hidden ability at abilityIndex 1 instead of 2 so when the code checks 2^abilityIndex it's getting a value of 2 instead of 4 and this mismatch causes the caught icon to be tinted even when it shouldn't be.

@Tempo-anon Tempo-anon added the Bug Something isn't working label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant