[Fixed] 0 Damage Bug

Discussion in 'Solved Bugs' started by Fuzzysqurl, Sep 3, 2013.

  1. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,096
    Likes Received:
    967
    (22:00:04) Tyki: http://puu.sh/4hLYM.png
    (22:00:09) Tyki: is the bullet seed ting a bug?




    When I commented out the line that was added to allow Pokemon to do 0 damage:
    0- Atk Ferroseed Bullet Seed (3 hits) vs. 252 HP / 252+ Def Eviolite Ferroseed: 3-3 (12.5 - 12.5%) -- guaranteed 8HKO

    Ferroseed (M) @ Eviolite
    Trait: Iron Barbs
    EVs: 252 HP / 252 Def
    Bold Nature (+Def, -Atk)
    - Bullet Seed

    Start of turn 1
    Ferroseed used Bullet Seed!
    It's not very effective...
    The foe's Ferroseed lost 4% of its health!
    The foe's Ferroseed lost 4% of its health!
    Hit 2 time(s)!

    The foe's Ferroseed used Bullet Seed!
    It's not very effective...
    Ferroseed lost 1 HP! (4% of its health)
    Ferroseed lost 1 HP! (4% of its health)
    Ferroseed lost 1 HP! (4% of its health)
    Ferroseed lost 1 HP! (4% of its health)
    Hit 4 time(s)!


    Therefore, allowing Pokemon to do 0 damage, which will almost** never happen in the course of normal play, is causing other bugs all around the server.


    EDIT: Using the new server fixes also produce this error. (The !straightattack)
    EDIT2: **See below
     
    Last edited: Sep 3, 2013
  2. ZodiaK

    ZodiaK Get the fuck off my porch

    Joined:
    Apr 27, 2011
    Messages:
    426
    Likes Received:
    19
    It might matter for level 1 F.E.A.R pokemon with priority but idk..
     
  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
    This actually isn't a bug as far as I'm understanding it:
    Following this: http://www.smogon.com/bw/articles/bw_complete_damage_formula

    Assuming both Ferroseeds are running 164 HP / 188 Def / 148 SpDef : Level 5 : Eviolite with perfect IVs
    23 HP / 18 Def / 17 SpDef / 11 Atk
    Eviolite will apply a modifier of 0x1800 (a 1.5x boost exact) so Def will be considered to be 27 from here on out.
    Bullet Seed's base power is 25.

    BaseDamage = (((2 * 5) / 5) + 2) * 25 * 11 / 27 / 50 + 2
    BaseDamage = 1100 / 27 / 50 + 2
    BaseDamage = 40 / 50 + 2 1100/27 = 40.74 but the decimal is truncated because of integer division
    BaseDamage = 2 40/50 = 0.8 but the decimal is truncated because of integer division
    For now let's ignore the random factor that makes BaseDamage fluctuate between 85% and 100% of the original value.
    Apply a modifier of 0x1800 due to Bullet Seed getting STAB: (2 * 6144) / 4096 = 3
    Account for type effectiveness: 3 / 4 = 0.75 which gets rounded down to 0

    So critical hits withstanding, it should never do more than 0 hp.
    0 hp shouldn't become 1 hp in this generation as demonstrated here: http://pokemon-online.eu/forums/sho...mum-damage-bug&p=298890&viewfull=1#post298890

    So unless derwin can prove me wrong with his testing, this is the expected behavior.
     
  4. ZodiaK

    ZodiaK Get the fuck off my porch

    Joined:
    Apr 27, 2011
    Messages:
    426
    Likes Received:
    19
    That 0 damage bug was supposed to be taking effect due to reflect if i'm not mistaken although i don't know the calculations and if what sulcata posted was right but what I did find was this... That AndyPermatax guy posted in that thread it being potentially due to reflect and I youtubed a few things mentioning the 0 damage with reflect. I'll link vids below for references.

    [video=youtube;qPPTz0sDZzU]http://www.youtube.com/watch?v=qPPTz0sDZzU[/video]

    [video=youtube;VXBW1gqo2OU]http://www.youtube.com/watch?v=VXBW1gqo2OU[/video]

    anyway, hope this helps, also double posting to link a third vid cuz the maximum is 2 per post apparently.
     
  5. ZodiaK

    ZodiaK Get the fuck off my porch

    Joined:
    Apr 27, 2011
    Messages:
    426
    Likes Received:
    19
    third vid

    [video=youtube;H5v9kbR7bLI]http://www.youtube.com/watch?v=H5v9kbR7bLI[/video]


    Also first video I linked had these comments attached to the video, apparently kaphotics the guy who posted the BW formula posted on it by what it looks.
    here's the commets

    Uploader Comments (Kaphotics)


    darkuronox
    darkuronox 1 year ago
    wow. Is that real? or some bug?
    Reply ·

    Kaphotics
    Kaphotics 1 year ago
    real
    Reply · in reply to darkuronox

    TheGoomba98
    TheGoomba98 10 months ago
    How is it done?
    Reply · in reply to Kaphotics

    Kaphotics
    Kaphotics 10 months ago
    Final modifiers like Reflect are applied after the game ensures 1 damage.

    Reply · 2 in reply to TheGoomba98
    All Comments (12)

    Sign in now to post a comment!

    LunarRay
    LunarRay 2 months ago
    Confirmed for Gen 1 and Gen 2, though even with a fucking Cloyster, Reflect (TM; compatible back then, not compatible now) and Barrier (breeding), I needed Lv. 3 Caterpie (base Attack of 30). Lv. 2 Pidgey (base Attack of 45) always did 2HP.
    Reply · in reply to Toothache42 (Show the comment)

    Rena Kunisaki
    Rena Kunisaki 4 months ago
    Great coding there guys.
    Reply ·

    RaceBandit
    RaceBandit 6 months ago
    Holy shit, I didn't know this was possible.
    Reply ·

    Link
    Link 11 months ago
    for what
    Reply · in reply to MrRiley97321 (Show the comment)

    Toothache42
    Toothache42 1 year ago
    It was in previous generations
    Reply · in reply to Alejandro Pons (Show the comment)

    Alejandro Pons
    Alejandro Pons 1 year ago
    i always thought the minimun damage was 1, don't know why.
    Reply ·

    darkuronox
    darkuronox 1 year ago
    wow. Is that real? or some bug?
    Reply ·

    Kaphotics
    Kaphotics 1 year ago
    real
    Reply · in reply to darkuronox (Show the comment)

    darkuronox
    darkuronox 1 year ago
    wow. Is that real? or some bug?
    Reply ·

    bolded anything relevant
     
  6. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,096
    Likes Received:
    967
    [video=youtube_share;Lf7fapncecI]http://youtu.be/Lf7fapncecI[/video]

    Just recorded earlier today. The only way it does 0 damage is with Reflect up. If you notice, this is the same Celebi used in the OP of the other thread as well as the first video that Zodiak posted, just not EV trained and with terrible IVs.