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

Add AfterMoveSecondaryLast event #10899

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

andrebastosdias
Copy link
Contributor

@andrebastosdias andrebastosdias commented Feb 13, 2025

Currently applies only to Ice Spinner and Pickpocket.

Fixes:

  • Ice Spinner's interaction with Life Orb
  • Pickpocket's interaction with Magician

Let me know if there are any other effects that should activate during this event.

Edit: does it make sense to check for EmergencyExit after the new event?

Comment on lines 532 to 533
this.battle.singleEvent('AfterMoveSecondarySelf', move, null, pokemon, target, move);
this.battle.runEvent('AfterMoveSecondarySelf', pokemon, target, move);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know how the other per-move AfterMoveSecondarySelf handlers should resolve priority compared to other AfterMoveSecondarySelf effects, but in case it helps, you can combine them in one priority system as follows:

Suggested change
this.battle.singleEvent('AfterMoveSecondarySelf', move, null, pokemon, target, move);
this.battle.runEvent('AfterMoveSecondarySelf', pokemon, target, move);
this.battle.runEvent('AfterMoveSecondarySelf', pokemon, target, move, null, true);

Copy link
Contributor Author

@andrebastosdias andrebastosdias Feb 13, 2025

Choose a reason for hiding this comment

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

That code isn't mine, so I'd prefer not to touch it. For AfterMoveSecondaryLast, I used the template from AfterMoveSecondary.

@urkerab
Copy link
Contributor

urkerab commented Feb 13, 2025

Oh, I've been confusing AfterMoveSecondary, AfterMoveSecondarySelf and your new AfterMoveSecondaryLast event... well, I can't say I'm surprised...

@andrebastosdias
Copy link
Contributor Author

I can change it to AfterMoveLast

@pyuk-bot
Copy link
Contributor

I can change it to AfterMoveLast

You’re running Pickpocket in there which is supposed to be suppressed by Sheer Force. It should probably have a name that reflects that (doesn’t this event run before AfterMove as well?)

@andrebastosdias
Copy link
Contributor Author

andrebastosdias commented Feb 13, 2025

You’re running Pickpocket in there which is supposed to be suppressed by Sheer Force. It should probably have a name that reflects that (doesn’t this event run before AfterMove as well?)

Yeah, you're right, and yes, it does!

andrebastosdias and others added 3 commits February 15, 2025 04:56
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
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.

4 participants