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

Fixes Multi Hit and Powder moves called by Metronome #2877

Closed

Conversation

AlexOn1ine
Copy link
Collaborator

Description

Fixes #2860

Solves issue were Multi Hit moves hit only once when they were called by Metronome.
metronome_multi_hit
Also solves Powder moves being able to hit Grass types when called by Metronome.
metronome_powder_moves

Discord contact info

AlexOnline#2331

Comment on lines +12993 to +12997
if (gBattleMoves[gCurrentMove].effect == EFFECT_MULTI_HIT)
gBattleStruct->atkCancellerTracker = CANCELLER_MULTIHIT_MOVES;
else if (gBattleMoves[gCurrentMove].flags & FLAG_POWDER)
gBattleStruct->atkCancellerTracker = CANCELLER_POWDER_MOVE;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it go through every move canceller instead of adding these patches?

Copy link
Collaborator Author

@AlexOn1ine AlexOn1ine Mar 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably but it goes through them already for other moves. Powder and Multi Hit (except for Scale Shot) moves specifically didn't seem to work.

/Edit: The reason it doesn't check those is because the move is still considered Metronome so these checks are false:

if (gBattleMoves[gCurrentMove].effect == EFFECT_MULTI_HIT)
if ((gBattleMoves[gCurrentMove].flags & FLAG_POWDER) && (gBattlerAttacker != gBattlerTarget))

Scale Shot has a dedicated script in battle_scripts_1.s so it works fine while all other multi hit moves use EFFECT_HIT

@AlexOn1ine AlexOn1ine marked this pull request as draft May 2, 2023 19:09
@AlexOn1ine
Copy link
Collaborator Author

AlexOn1ine commented May 2, 2023

Putting this as draft for now because I noticed that mirror move has the same problem as metronome and solving this in patches seems wrong.

@AsparagusEduardo AsparagusEduardo changed the base branch from upcoming to bugfixes June 3, 2023 15:54
@AsparagusEduardo AsparagusEduardo changed the base branch from bugfixes to master June 19, 2023 13:10
@mrgriffin
Copy link
Collaborator

Superseded by #3135.

@mrgriffin mrgriffin closed this Jul 16, 2023
@AlexOn1ine AlexOn1ine deleted the multi_hit_powder_moves branch July 19, 2023 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metronome bugged on Multi Hit / Powder Moves
3 participants