1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Welcome to Pokemon Perfect, Guest!

    Our motto is Pokémon Practice makes Pokémon Perfect. We are a competitive-battling community that encourages the development of players and their ideas, and fosters positive and respectful attitudes. We love Collaboration (working together), Competition (getting stronger), and Communication (being informed).

    You are free to post everywhere, unless the thread explicitly states otherwise (usually in the case of a vote), and there are no private forums whatsoever. We just require you to not make multiple accounts. Let us greet you by posting a thread in the Introduce Yourself! forum.

  3. Tiers

    View Introduction to Tiers if you don't know what tiers are. Pokémon Perfect tiers are named differently to those on Smogon. A numeral followed by the letter U, e.g. 1U, 2U, 3U, represents a main tier on Pokémon Perfect – the '1' of '1U' representing the tier level. For a tier to be a main tier, it must be balanced (nothing is too powerful and game-breaking) and diverse enough (include a variety of Pokémon and strategies). A numeral followed by the letter P, e.g. 1P, 2P, 3P contain all Pokémon that are deemed overpowered in the respective 1U, 2U, 3U tiers. The 1st tier level allows Pokémon that are banned in the 2nd level, and this process continues down. Read the tier list, and in-depth explanations of the tiers naming system and tiering system. Also check out our analyses for all tiers.

  4. Tournaments

    RBY 1U Seasons and its master tournaments are responsible for starting up the community, and tournaments continue to play a big role in maintaining interest in the forums. Signups Open gives you a list of tournaments you can join, and Ongoing lists tournaments that you might want to follow. Additionally, you can tap to find out approximate Schedules for tournaments.

    For historical threads, check out Signups Closed, Finished tournaments and Results. We also have Nominations, Voting and Event threads for exhibitions – past and present.

RBY Help! Softboiled just failed! What's going on? [Discussion Ready]

Discussion in 'Analysis and Research' started by Sceptross, Oct 17, 2017.

  1. Sceptross

    Sceptross Leader

    Joined:
    Oct 22, 2016
    Messages:
    314
    Likes Received:
    692
    Help! Softboiled just failed! What's going on?
    I've seen lots of players question me in the ladder what was going on when their Alakazam, Starmie or Chansey failed to use Recover or Softboiled, when they were not at full HP. Also, I've seen even more players (myself included) that sometimes forget to check if their Pokemon is "recoverable" before actually trying to Recover them. Although there is already an excellent article explaining all the intricacies of RBY (you can find it here), I believe it's important to address this one separately because of how common it is finding players that still are not aware of it, and even those that are, they often forget about checking their HP when they are at a potential Recover-failing HP percentage.

    [​IMG]
    The wrath of the RBY Gods - we've all been at the receiving end of it.

    So, what is going on exactly?

    Every HP recovery move fails when your current HP lost equals 255 or 511. This includes Rest, Softboiled and Recover. The reason this is happening is pretty simple (you can skip to the next section if you don't want to read nerdy explanations):


    You see, computers only read 0s and 1s. Everything that is done in your computer is a bunch of 0s and 1s. Which means numbers as we know them are also represented as 0s and 1s. This is called binary representation*.

    You also probably know that a byte is composed of 8 bits. And that a bit is the smallest piece of information that exists in a computer. Unsurprinsigly, it can only take either the value 0 or 1. If we stack 8 bits together, the biggest number we can represent is 11111111, or 255. Which means 1 byte is not enough to represent HP (heck, Chansey can have 703 HP, how would that be enough?). If we use two bytes, we get 11111111 11111111 or 65535. That's definitely enough. Which means, HP has to be represented as two bytes.


    * If you want to convert a number to binary representation, all you have to do is repeatedly divide the number by 2 until you get a quotient of either 1 or 0. Then, write the quotient of the last division, then all remainders you got, from the last one to the first one. Then you have your number in binary. Just a small off-topic in case you were curious.

    So, the total HP and current HP are represented by two bytes each. I'm sure you all know that Recover/Softboiled/Rest fail if you are currently at full HP. The game, in order to check if you are at full HP, subtracts your total and current HP. If the subtraction equals zero, the move fails. Straight and simple. Except when you ask the intern to code this. Let's pretend that our 703 HP Chansey is at 448 HP. This is what we get in binary:

    703 = 00000010 10111111
    448 = 00000001 11000000
    However, Game Freak, when performing the subtraction, forgot to check the first byte. Which means only the second one is considered in the subtraction. So, in practice, what the game sees, when performing the subtraction, is only the bolded part. 10111111 corresponds to 191 and 11000000 corresponds to 192. After this mistake, other two very weird decisions are made by Game Freak:
    1. Instead of subtracting Max HP - Current HP, they subtract Current HP - Max HP.
    2. If the carry flag is set (a flag raised by the CPU when overflows are detected), 1 is subtracted to the result.
    So, this leaves us with 192 ("Current HP") - 191 ("Max HP") - 1(Carry flag raised) = 0. Since the subtraction, in the eyes of the game, equals zero, the move fails.

    Okay, cool stuff nerd, but in what does that affect me?

    First of all, as previously mentioned, this glitch only affects Rest, Recover and Softboiled. Since Mega Drain, for instance, doesn't fail if the user is at full HP, it is unaffected by this glitch. This also means that, in some specific HP spots, you won't be able to recover HP at all. Knowing these spots can obviously completely change the way you want to play. So it's important that, if you are serious about competitive battling in RBY, know these spots. I'll list the more common Rest, Softboiled and Recover users here, along with their "sweet spots" and HP percentage, as shown in Pokemon Showdown!.

    ------------1U------------

    [​IMG]

    703 - 255 = 448 (64%)
    703 - 511 = 192 (28%)

    [​IMG]

    313 - 255 = 58 (19%)

    [​IMG]

    323 - 255 = 68 (22%)

    [​IMG]

    393 - 255 = 138 (36%)

    [​IMG]

    523 - 255 = 268 (52%)
    523 - 511 = 12 (3%)

    [​IMG]

    333 - 255 = 78 (24%)

    [​IMG]
    303 - 255 = 48 (16%)

    [​IMG]

    463 - 255 = 209 (46%)

    ------------1P------------

    [​IMG]

    415 - 255 = 160 (39%)

    [​IMG]

    403 - 255 = 148 (37%)

    ------------2U------------

    [​IMG]

    373 - 255 = 118 (32%)

    [​IMG]

    283 - 255 = 28 (10%)

    ------------3U------------

    [​IMG]

    363 - 255 = 108 (30%)

    [​IMG]

    393 - 255 = 138 (35%)

    [​IMG]

    383 - 255 = 128 (33%)

    [​IMG]

    363 - 255 = 108 (30%)

    [​IMG]

    463 - 255 = 208 (45%)

    ------------4U------------

    [​IMG]

    383 - 255 = 128 (33%)

    [​IMG]

    361 - 255 = 106 (29%)

    [​IMG]

    343 - 255 = 88 (26%)

    [​IMG]

    383 - 255 = 128 (33%)

    [​IMG]

    263 - 255 = 8 (3%)

    [​IMG]

    333 - 255 = 78 (23%)

    ------------5U------------

    [​IMG]

    263 - 255 = 8 (3%)

    [​IMG]

    313 - 255 = 58 (19%)

    [​IMG]

    323 - 255 = 68 (21%)

    [​IMG]

    321 - 255 = 66 (21%)

    [​IMG]

    363 - 255 = 108 (30%)

    ------------6U------------

    [​IMG]

    413 - 255 = 158 (38%)​

    That's all, folks! I hope this article has been of use for you (I'll probably remember it every time I click that Softboiled button again with 64% HP and miserably fail. Trust me, that's gonna happen. A lot.). See you in the next article!
     
    Last edited: Mar 18, 2018
  2. Sceptross

    Sceptross Leader

    Joined:
    Oct 22, 2016
    Messages:
    314
    Likes Received:
    692
    I'm outright asking someone else to tell me what are the most commonly used Rest users in the lower tiers so that I can add them to the article, because I don't have enough experience to know them. Thanks in advance :)
     
    Last edited: Oct 17, 2017
  3. GGFan

    GGFan Member

    Joined:
    May 25, 2013
    Messages:
    1,078
    Likes Received:
    1,035
    Gastly and Seadra run Rest in (I think) 4U. Drowzee runs it too.
     
    Sceptross and Disaster Area like this.
  4. Disaster Area

    Disaster Area Little Ball of Fur and Power Member

    Joined:
    May 4, 2014
    Messages:
    5,385
    Likes Received:
    2,232
    1U - Cloyster
    3U - Aerodactyl, Clefable, Dewgong, Golduck, Vaporeon
    4U - Arcanine, Blastoise, Omastar, Slowpoke, Staryu (Recover), Porygon (Recover)
    5U - Wartortle, Seaking
    6U - Muk

    One that aren't really relevant enough to include but I'll mention:
    Exeggutor (1U) / Poliwrath (2U) / Electrode (5U) / Ninetales (5U) / Magneton (6U)

    plus what GGFan said
     
    Sceptross likes this.
  5. EB0LA

    EB0LA KING OF PP Member

    Joined:
    Jul 26, 2017
    Messages:
    106
    Likes Received:
    75
    Also some players use rest on Lapras in 1U.
    463 - 255 = 208 (45%)

    2U: Omastar-
    343 - 255 = 88 (26%)

    Also, you made a small typo on Alakazam's HP. It's 313 not 303, but you got the math right- just wrote it in wrong on the post.
     
    Disaster Area and Sceptross like this.
  6. Lusch

    Lusch A critical hit! Member

    Joined:
    Sep 22, 2015
    Messages:
    431
    Likes Received:
    478
    Cool article though :]
     
    Disaster Area and Sceptross like this.
  7. Sceptross

    Sceptross Leader

    Joined:
    Oct 22, 2016
    Messages:
    314
    Likes Received:
    692
    Okay, fixed the typos and added the lower tier mons. Thanks for your help guys :)
     
    Last edited: Oct 17, 2017
  8. Sceptross

    Sceptross Leader

    Joined:
    Oct 22, 2016
    Messages:
    314
    Likes Received:
    692
    Diegolh pointed to me that Gastly and Seadra were in 4U, not 5U, as supposed. Fixed.
     
    Last edited: Oct 22, 2017
    Diegolh likes this.
  9. Golden Gyarados

    Golden Gyarados Moderator

    Joined:
    Apr 30, 2013
    Messages:
    635
    Likes Received:
    359
    This is a great resource.

    Might also be fun to do a rough calculation of how likely it is for common Pokemon face-offs to result in a failure point. Obviously it's not something you should strategize for on offense, but on defense knowing the match-ups are sometimes easier to recall in the heat of battle than keeping an eye out for specific percentages.

    For instance, Chansey's 64% failure point is right in the window of Tauros's Body Slam from full health, and Chansey's 28% failure is in Tauros's Hyper Beam range from full health. If you're the Chansey in that situation, knowing that taking a Body Slam or a Hyper Beam from full health could have put you in a failure position is an easy, contextualized reminder to check your HP before clicking.
     
    Last edited: Mar 18, 2018

Share This Page