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

EndTurnEffectOrder Refactor #6224

Open
wants to merge 7 commits into
base: upcoming
Choose a base branch
from

Conversation

AlexOn1ine
Copy link
Collaborator

@AlexOn1ine AlexOn1ine commented Feb 9, 2025

Description

Refactors EndTurnEffects according to smogons research

For consistency I've changed some scripting battlers to gBattlerAttacker. Since all effects happen at the end of the turn there shouldn't be any mutation happen.

Issue(s) that this PR fixes

Closes #5024
Fixes inaccurate Emergency Exit behavior. It is supposed to trigger on residual damage as well.

Note

Ideally this is reviewed before the release of 1.11 so we can merge it as soon as it drops.

@AlexOn1ine AlexOn1ine added type: refactor type: big feature A feature with big diffs and / or high impact / subjectivity / pervasiveness bugfix Bugfixes labels Feb 9, 2025
@AsparagusEduardo
Copy link
Collaborator

Some tests are failing

@AlexOn1ine AlexOn1ine marked this pull request as draft February 9, 2025 20:22
src/battle_end_turn.c Outdated Show resolved Hide resolved
src/battle_script_commands.c Show resolved Hide resolved
test/battle/ability/emergency_exit.c Outdated Show resolved Hide resolved
data/battle_scripts_1.s Show resolved Hide resolved
@AlexOn1ine AlexOn1ine marked this pull request as ready for review February 11, 2025 11:14
@AlexOn1ine
Copy link
Collaborator Author

Review comments applied!

include/battle.h Show resolved Hide resolved
src/battle_end_turn.c Show resolved Hide resolved
data/battle_scripts_1.s Show resolved Hide resolved
src/battle_util.c Outdated Show resolved Hide resolved
src/battle_util.c Show resolved Hide resolved
src/battle_util.c Show resolved Hide resolved
src/battle_util.c Outdated Show resolved Hide resolved
@AlexOn1ine
Copy link
Collaborator Author

AlexOn1ine commented Feb 12, 2025

review comments addressed besides the magic room issue. will fix that one later.

/Edit: all fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Bugfixes type: big feature A feature with big diffs and / or high impact / subjectivity / pervasiveness type: refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants