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

[battle_engine] Several issues with mega evolution #1916

Closed
kleeenexfeu opened this issue Nov 18, 2021 · 2 comments · Fixed by #2810
Closed

[battle_engine] Several issues with mega evolution #1916

kleeenexfeu opened this issue Nov 18, 2021 · 2 comments · Fixed by #2810
Labels
category: battle-mechanic Pertains to battle mechanics

Comments

@kleeenexfeu
Copy link

kleeenexfeu commented Nov 18, 2021

All of what's mentionned below is fixed in this PR.

According to https://bulbapedia.bulbagarden.net/wiki/Mega_Evolution switching should happen before mega evolving.

As of now it doesn't change much, because the mid-turn speed recalculation aren't implemented (except for #1914 which might include said changes in the future), but when they are, this inconsistency will matter.

@LOuroboros LOuroboros added category: battle-mechanic Pertains to battle mechanics gen: 6 labels Nov 19, 2021
@kleeenexfeu
Copy link
Author

kleeenexfeu commented Dec 3, 2021

Also, the mega evolutions occurs in the wrong order, because of this :
https://github.com/rh-hideout/pokeemerald-expansion/blob/battle_engine/src/battle_main.c#L4676-L4677
The mega evolution is checked for battlerId 0 first (first player's mon), then battlerId 1 (first AI's mon), etc, without taking into account speed/priority.
It can have a great impact on the battle when mega evolving makes you loose/gain a switch in ability, for instance.

@kleeenexfeu
Copy link
Author

kleeenexfeu commented Dec 3, 2021

Mega Evolution wish causes other mega evolution to display the fervent wish message because the isWishMegaEvo field of MegaEvolutionData is only a bool. And once it's set I didn't see a place where it was cleared, letting the game think that all the mega evolutions that follow are wish as well. This field should be 1 bool per battler, even one byte, or more carefully cleared/set when it should. I'll try to fix these issues in a single PR.

@kleeenexfeu kleeenexfeu changed the title [battle_engine] Mega Evolution happens before mons switch [battle_engine] Several issues with mega evolution Dec 3, 2021
AsparagusEduardo pushed a commit that referenced this issue Aug 31, 2023
gbagfx to respect user CC setting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: battle-mechanic Pertains to battle mechanics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants