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

Protect failed after using Energy Ball #5864

Open
wiz1989 opened this issue Dec 22, 2024 · 3 comments
Open

Protect failed after using Energy Ball #5864

wiz1989 opened this issue Dec 22, 2024 · 3 comments
Labels
bug Bug category: battle-mechanic Pertains to battle mechanics status: unconfirmed This bug has not been reproduced yet

Comments

@wiz1989
Copy link

wiz1989 commented Dec 22, 2024

Description

I have a tropius in a double battle against a lumineon. The pokemon not mentioned seemed irrelevant to the bug (cradily spamming stockpile vs my scizor attacking it with iron head)

Turn 1: lumineon uses bounce and springs up. Tropius misses leech seed, as it is slower than lumineon
Turn 2: I protect tropius. Lumineon bounce hits scizor.
Turn 3: Lumineon bounces again. Tropius targets Lumineon with energy ball, but the move fails because Lumineon is untargettable.
Turn 4: I click protect on Tropius. Protect fails, and Lumineon bounce hits Tropius.

wiz1989: potentially a not cleared var to handle protects?

Version

1.9.4

Upcoming/master Version

No response

Discord contact info

wiz1989

@wiz1989 wiz1989 added bug Bug category: battle-mechanic Pertains to battle mechanics status: unconfirmed This bug has not been reproduced yet labels Dec 22, 2024
@AlexOn1ine
Copy link
Collaborator

AlexOn1ine commented Dec 29, 2024

@wiz1989 Can you check if the following change in function TryResetProtectUseCounter fixes the issue?

-    u32 lastMove = gLastResultingMoves[battler];
+    u32 lastMove = gLastMoves[battler];

@wiz1989
Copy link
Author

wiz1989 commented Jan 2, 2025

I'll need some time until I get to test this.
Thanks for the proposal!
I will update here as soon as I have results.

@hedara90
Copy link
Collaborator

I cannot replicate this on 1.10.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug category: battle-mechanic Pertains to battle mechanics status: unconfirmed This bug has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

3 participants