1. New to the forums? Check out our Mentorship Program!
    Our mentors will answer your questions and help you become a part of the community!
  2. Welcome to Smogon Forums! Please take a minute to read the rules.

Programming Damage Calculator

Discussion in 'Technical Projects' started by DougJustDoug, Dec 24, 2009.

  1. RBG

    RBG But I keep cruising, can't stop, won't stop grooving.
    is a Smogon Social Media Contributoris a Super Moderatoris a Site Staff Alumnusis a Smogon IRC AOp Alumnusis a Researcher Alumnusis a Tiering Contributor Alumnusis a Battle Server Moderator Alumnus
    Facebook Manager

    Joined:
    Jan 27, 2008
    Messages:
    3,353
    Leftovers does not effect how much damage is done.

    For torrent, you need to lower your HP to a point where the ability is activated.

    And for Anger Point, we can't assume the boost is active, even if it has hat ability.
  2. jc104

    jc104 Humblest person ever
    is a Contributor Alumnus

    Joined:
    Aug 27, 2009
    Messages:
    1,780
    This seems to have been ignored.
  3. david stone

    david stone Fast-moving, smart, sexy and alarming.
    is a Site Staff Alumnusis a Smogon IRC AOp Alumnusis a Programmer Alumnusis a Super Moderator Alumnusis a Researcher Alumnusis a Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Aug 3, 2005
    Messages:
    5,150
    It would be helpful in some cases if the calculator could be forced to output all legal damages, not just the range of damages. In other words, r = 85, 86, ... 99, 100. They should probably show the probability of each occurring, because I'm assuming anyone who wants enough of a level of detail to show every legal damage probably also wants to know the probability weighting of each.
  4. Darkmalice

    Darkmalice Like a facepalm, but better
    is a Tiering Contributor

    Joined:
    Aug 11, 2008
    Messages:
    1,534
    This is a very small issue, but in the damage calculator, Ho-Oh is missing the second capital.
  5. Diesel

    Diesel

    Joined:
    Aug 6, 2007
    Messages:
    1,945
    I'm guessing this has been suggested before, but I didn't see it in this thread, so...

    It'd be awesome if this calculated the probability of a #HKO, maybe even up to 4 or 5 (for the sake of thoroughness, if nothing else). A lot of the time you can "eyeball" it, but it would be really useful for finding specific EV spreads that achieve or prevent 2HKOes, etc. That's the only thing I still have to hop on Libelldra for, everything else is amazing.
  6. david stone

    david stone Fast-moving, smart, sexy and alarming.
    is a Site Staff Alumnusis a Smogon IRC AOp Alumnusis a Programmer Alumnusis a Super Moderator Alumnusis a Researcher Alumnusis a Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Aug 3, 2005
    Messages:
    5,150
    There's really no reason to limit it to 4 or 5HKO. You might as well make it actually NHKO. Type in the number of hits you want.
  7. Wichu

    Wichu ACUPRESSURE
    is a Pokemon Researcher

    Joined:
    May 30, 2007
    Messages:
    1,546
    There's no way to take into account a Flower Gift boost for either attacker or defender. I guess it probably works for Cherrim itself, but I can't see a way to select it for Cherrim's partner... If Helping Hand (a doubles-only move) is included, shouldn't Flower Gift's partner supporting effect also be there?

    Oh, and I don't know whether this is a bug in the damage calculator or the defense EVs applet, but the results of them are inconsistent.
    I used the defense EVs applet to calculate the best EVs for a lv50 Mr. Mime, focusing only on Sp. Def (with 290 EVs available), and it suggested I use 212 HP and 76 Sp. Def. However, using the damage calculator, I found that 220 HP and 68 Sp. Def is actually slightly more effective.
    So clearly, there's a flaw in either the damage calculator or the defense EVs applet...
  8. david stone

    david stone Fast-moving, smart, sexy and alarming.
    is a Site Staff Alumnusis a Smogon IRC AOp Alumnusis a Programmer Alumnusis a Super Moderator Alumnusis a Researcher Alumnusis a Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Aug 3, 2005
    Messages:
    5,150
    For a given calculation a different spread might be slightly more effective. However, Pokemon rounds down at every point in the calculation, so another calculation would lead to slightly different optimal spreads.
  9. jormungand201

    jormungand201

    Joined:
    Jan 29, 2009
    Messages:
    42
    Don't know if this was mentioned, but Beat Up doesn't seem to register. Seeing that the damage is affected by the amount of remaining pokemon on your side, you'll have to create a section where you input the number of pokes that aren't KO'd. Seems like an awful waste of time for a move thats hardly used :/
  10. Ferrouswheel

    Ferrouswheel

    Joined:
    Jun 15, 2009
    Messages:
    805
    I have a bug to report:

    When you use keep preferences under in the preference window, it remembers the level that you set as default in the textbox, but it doesn't actually change the level of the actual pokes when you reload the calculator later, you have to manually hit enter again to get it to change.

    Edit:

    Also, the default level preference doesn't modify the pokemon aside from the first two.

    And I'm using Google Chrome, and have cookies on, just to make that clear. I might not be using the calculator right, but I don't believe it's my browser.
  11. eric the espeon

    eric the espeon maybe I just misunderstood
    is a Forum Moderator Alumnusis a Researcher Alumnusis a CAP Contributor Alumnusis a Tiering Contributor Alumnusis a Contributor Alumnus

    Joined:
    Aug 7, 2007
    Messages:
    3,694
    Natural Gift does not show up in the move listings, which may or may not be intentional.
  12. NixHex

    NixHex what is béisbol
    is a member of the Site Staffis a Forum Moderatoris a Pokemon Researcheris a Contributor to Smogonis a Battle Server Moderator
    Moderator

    Joined:
    Oct 6, 2009
    Messages:
    2,643
    Mold Breaker

    I tried calculating damage from a Rampardos' Earthquake to Levitate Bronzong which did 0 - 0%. Next I checked "Ability Effect" but no dice. Finally, I changed Bronzong's ability to Heatproof, then tried no immunity, which worked. This is a rather round-about way of doing it.

    "Edit" While I was typing this I read the first page and saw that you mentioned Mold Breaker being a problem, so I was wondering if you had made any progress with this? And from a programming standpoint, this sounds like a HUGE pain in the ass.
  13. RBG

    RBG But I keep cruising, can't stop, won't stop grooving.
    is a Smogon Social Media Contributoris a Super Moderatoris a Site Staff Alumnusis a Smogon IRC AOp Alumnusis a Researcher Alumnusis a Tiering Contributor Alumnusis a Battle Server Moderator Alumnus
    Facebook Manager

    Joined:
    Jan 27, 2008
    Messages:
    3,353
    You could click the no Immunity button under "Options" for simplier way around.
  14. DougJustDoug

    DougJustDoug Knows the great enthusiasms
    is a member of the Site Staffis an Artistis a Programmeris a CAP Contributoris an Administratoris a Battle Server Admin Alumnusis a Smogon IRC SOp Alumnusis a Tiering Contributor Alumnus
    CAP Leader

    Joined:
    Jun 26, 2007
    Messages:
    3,083
    Read the Help for "Shared Options". Mold Breaker is mentioned specifically there, and it describes how to handle it.
  15. VKCA

    VKCA (Virtual Circus Kareoky Act)

    Joined:
    Jan 8, 2009
    Messages:
    3,666
    Hippopotas is listed twice in the list to select you're pokemon from.
    edit: Actually it looks like every first form pokemon is listed twice. Is this intentional? It doesn't matter which one you select the moveset options are exactly the same.
  16. Ray Jay

    Ray Jay "The sky's the limit, okey-dokey!"
    is a Site Staff Alumnusis a Forum Moderator Alumnusis a Community Contributor Alumnusis a Tiering Contributor Alumnusis a Contributor Alumnusis a Smogon Media Contributor Alumnus
    Mentor

    Joined:
    May 20, 2010
    Messages:
    1,692
    I was wondering if there's anyway to implement a Power Trick boost into the calculation. I played around with it a bit, and still couldn't get it. Is there a way around this, or does it need to be implemented?
  17. Tyler

    Tyler No Longer Live
    is a VGC1 Winner

    Joined:
    Jan 22, 2009
    Messages:
    630
    Calculating a Blizzard and a Grass Knot from the same Abomasnow against the same Palkia results in one damage higher for max for Grass Knot over Blizzard despite both being 120 bp stab attacks.

    export text (open)

    species=Abomasnow
    ability=Snow Warning
    nature=Quiet
    heldItem=Focus Sash
    level=50
    attackEV=4
    spAttackEV=252
    speedEV=252
    moveName=Grass Knot
    ---
    species=Palkia
    ability=Pressure
    nature=Timid
    heldItem=Haban Berry
    level=50
    hpEV=4

    species=Abomasnow
    ability=Snow Warning
    nature=Quiet
    heldItem=Focus Sash
    level=50
    attackEV=4
    spAttackEV=252
    speedEV=252
    moveName=Blizzard
    ---
    species=Palkia
    ability=Pressure
    nature=Timid
    heldItem=Haban Berry
    level=50
    hpEV=4


    Im guessing it has something to do with finding Grass Knot's base power.
  18. DougJustDoug

    DougJustDoug Knows the great enthusiasms
    is a member of the Site Staffis an Artistis a Programmeris a CAP Contributoris an Administratoris a Battle Server Admin Alumnusis a Smogon IRC SOp Alumnusis a Tiering Contributor Alumnus
    CAP Leader

    Joined:
    Jun 26, 2007
    Messages:
    3,083
    Palkia is Water/Dragon.

    Blizzard is NVE on Water, then it is SE on Dragon.
    Grass Knot is SE on Water, then it is NVE on Dragon.

    Most people think both moves are neutral on Palkia. That's true enough for casual conversation, but it is not technically true. In the damage formula, both multipliers are applied in sequence, rounding down between each operation. In most cases, the two multipliers effectively "nullify" each other perfectly. But depending on the exact numbers involved in the calc, the two moves actually can have a very slight difference in the final damage, due to the order of the damage calc and the rounding applied between each step.

    This is not a mistake or bug in the Damage Calculator. It is the correct implementation of the damage formula.

Users Viewing Thread (Users: 0, Guests: 0)