[Fixed] Gen 1 Speed Drop Reapplication After Paralysis Too Broad

Discussion in 'Solved Bugs' started by Golden Gyarados, Feb 11, 2016.

  1. Golden Gyarados

    Golden Gyarados Active Member

    Joined:
    Feb 22, 2013
    Messages:
    101
    Likes Received:
    148
    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
     
    sulcata and mibuchiha like this.
  2. sulcata

    sulcata stéphane curry best waifu Forum Moderator Server Administrator Forum Moderator Server Administrator

    Joined:
    Jun 13, 2012
    Messages:
    968
    Likes Received:
    744
    I'll start looking into it later today when I get the time.
     
  3. sulcata

    sulcata stéphane curry best waifu Forum Moderator Server Administrator Forum Moderator Server Administrator

    Joined:
    Jun 13, 2012
    Messages:
    968
    Likes Received:
    744
    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.
     
    Last edited: Feb 14, 2016
  4. Golden Gyarados

    Golden Gyarados Active Member

    Joined:
    Feb 22, 2013
    Messages:
    101
    Likes Received:
    148
    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.
     
  5. sulcata

    sulcata stéphane curry best waifu Forum Moderator Server Administrator Forum Moderator Server Administrator

    Joined:
    Jun 13, 2012
    Messages:
    968
    Likes Received:
    744
    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
     
  6. Golden Gyarados

    Golden Gyarados Active Member

    Joined:
    Feb 22, 2013
    Messages:
    101
    Likes Received:
    148
    Thanks sulcata!