Today I had a battle where this happened. My paralyzed Chansey went in fresh against his paralyzed and full-Amnesia Snorlax. At the beginning, Chansey is faster. In Turn 48, Snorlax used Amnesia - but the move was unsuccessful because his Special can't go any higher. However, in Turn 49 we can see that my speed still dropped. Crystal_ discovered last year that paralysis speed drops are reapplied when your opponent uses a status altering move BUT ONLY if the move was successful. My Chansey's speed SHOULD have dropped if Amnesia had executed. Because Amnesia did not work in this case, my speed should NOT have dropped again - I should have remained faster. The coding that reapplies the speed drop on PO is too broad, and should be updated to reflect the more narrow application - that it only works if the status-altering move that would trigger it works. Start of turn 48 Chansey used Thunderbolt! The foe's Ronflex lost 4% of its health! The foe's Ronflex used Amnesia! The foe's Ronflex's Special won't go any higher! Start of turn 49 The foe's Ronflex used Reflect! But it failed! Chansey used Thunderbolt! The foe's Ronflex lost 4% of its health! Golden Gyarados: hmm thats a bug Start of turn 50 The foe's Ronflex used Reflect! But it failed! Chansey used Thunderbolt! The foe's Ronflex lost 4% of its health! Golden Gyarados: the speed drop shouldnt apply if amnesia cant raise your special more
I managed to fix it I think. I'm going to submit it along with a few other things in a bit. Just to clarify, essentially this mechanic is only applicable to successful stat changing moves? If it fails due to the stat being unable to be raised or lowered, then don't bother with anything. Should be fixed if I'm interpreting this correctly. If so then it'll be applied next time the server is updated.
That's correct - also, the speed drop would not be compounded if the move simply missed, even if there was room for the targeted stat to go down: for instance, if I used Kinesis against a paralyzed Pokemon and it connects, the paralyzed opponent speed would drop. If I used Kinesis against a paralyzed Pokemon but his accuracy is already -6, the speed would not drop again (this is the situation we've already described here). BUT ALSO if I used Kinesis and it simply missed (Kinesis doesn't have great accuracy), the speed would also not drop again, even if the opponent wasn't -6 already.
I think missed moves are functioning correctly before and after the fix I made. This should be fixed then assuming the rest of the pull request is fine. @Fuzzysqurl