-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Implement Dancer using the battle queue and the AnyAfterMove event #10975
base: master
Are you sure you want to change the base?
Conversation
data/abilities.ts
Outdated
noCopy: true, // doesn't get copied by Baton Pass | ||
onBeforeMovePriority: 200, | ||
onBeforeMove(source, target, move) { | ||
this.add('-activate', source, 'ability: Dancer'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will erroneously announce Dancer if the Pokemon also has Magic Coat active, the dance move is Feather Dance, and there's a second, slower Dancer on the field that targets this Pokemon with its own copied Feather Dance. We need a way to ensure this announcement only happens for the right move. Maybe Battle#runMove
could just run an '-activate'
message for externalMove
s with a sourceEffect
? Dancer is the only effect that uses externalMove
right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we just check if it is an external move? Would a move reflected by Magic Coat have the external flag?
sim/battle.ts
Outdated
if (!action.speed) { | ||
if (updateSpeed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why didn't this work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!action.speed
gives errors on other tests that update speed mid turn (e.g. Megas). updateSpeed
is not passing the should activate in order of lowest to highest raw speed
test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!action.externalMove) {
is a still hack, but at least is working correctly. I don't know why the argument updateSpeed
was allowing the speed to be updated when false
.
Closes #10929