1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Cloudflare Security Issue - Change Your Passwords!

    Hello there, Guest!

    Cloudflare, the internet proxy we use to protect ourselves against DDoS and other malicious attacks, reported on 23rd February 2017 that they had patched a bug reported by Google's Project Zero that was exposing sensitive information in random requests, approximately 0.00003% of all requests, since September 2016.

    Whilst it is unlikely that any information has been leaked from this website, we recommend that all users change their passwords here on the Pokémon Online forums, as a precaution. Remember to use a unique and secure password for every site that requires one.

    We apologise for any inconvenience caused.

    Dismiss Notice
  3. The Main PO Server has moved hosts!, Guest!

    The new advanced connection for the official Pokémon Online server is 137.74.231.216:5080. No other IP addresses other than those listed in this announcement are for the main official server.

    Dismiss Notice

[Fixed] Protect rate

Discussion in 'Solved Bugs' started by coyotte508, Aug 7, 2011.

  1. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    167
    Can someone check if protect is 50% or 100%/2^n for gen 2, 3, 4, 5, just to be sure?
     
    Last edited: Aug 7, 2011
  2. Professor Oak

    Professor Oak Pimp Hand Strong Forum Administrator Server Owner Social Media Rep Forum Administrator Server Owner Social Media Rep

    Joined:
    Apr 21, 2010
    Messages:
    3,435
    Likes Received:
    2,088
    PO Trainer Name:
    Professor Oak
    Fairly sure that Protect is 100% / 2^1 for Gens 2 and 3, and 100% on the first use and 50% on all consecutive uses in Gens 4 and 5. Bulbapedia backs up my knowledge, as do other sources such as Smogon.

    I can test in-game if you want, but it'll take a while.
     
  3. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    167
  4. Professor Oak

    Professor Oak Pimp Hand Strong Forum Administrator Server Owner Social Media Rep Forum Administrator Server Owner Social Media Rep

    Joined:
    Apr 21, 2010
    Messages:
    3,435
    Likes Received:
    2,088
    PO Trainer Name:
    Professor Oak
    Seems like it'd be impossible to confirm in-game without a very large test (which I just don't have the time for, considering all 4 Generations Protect is in) or by checking the code of the games itself.

    If anyone else wants to test out how often Protect works after the first usage in a certain generation, please do so. If you do test Protect, be sure to not use a move that can break through Protect, and note which Generation of game you are using.
     
  5. petero

    petero Member

    Joined:
    Aug 7, 2011
    Messages:
    67
    Likes Received:
    0
    My own site contains descriptions for Protect from each generation:

    http://upokecenter.com/dex/?attack=182

    Note in particular:

    Generation 2: A variable, X, starts at 255, [...] and is halved each time this attack is successful. This attack succeeds at an X/256 chance.

    Generation 3 and 4: A variable, X, starts at 0, [...] and increases by 1 (up to 3) each time this attack is successful. This attack has a 50% chance of failing if X is 1, a 75% chance if X is 2, and an 87.5% chance if X is 3.

    Generation 5: A variable, X, starts at 1, [...] and is doubled each time this attack is successful. This attack has a 1/X chance of succeeding, or 1/(2^32) chance if X is 256 or greater.
     
  6. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    167
    Whoah thanks a lot.

    Does this mean that in generation 2 protect always has a 1/256 chance to fail? (seems weird, so I edited the formula in PO a tiny bit to be consistent but don't hesitate to prove me wrong)

    Anyway I'll edit PO now, thanks again. (Also, you must get this a lot, but on firefox all your links are striked instead of being underlined)
     
    Last edited: Aug 7, 2011
  7. petero

    petero Member

    Joined:
    Aug 7, 2011
    Messages:
    67
    Likes Received:
    0
    You're almost right: it has at least a 1/256 chance of failing in generation 2. In generation 2, the first use has a 255/256 chance of succeeding, the second use has a 127/256 chance of succeeding, the third use has a 63/256 chance of succeeding, and so on.