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

Programming 6th Gen Damage Calculator

Discussion in 'Technical Projects' started by Honko, Nov 18, 2013.

  1. 6feetunder

    6feetunder

    Joined:
    Nov 17, 2013
    Messages:
    224
    Mold Breaker is bugged. Mold Breaker is only supposed to ignore abilities that affect the mold breaker mon's moves (levitate, flash fire, sturdy, etc.), but on the calc, it cancels out all opposing abilities regardless of their effect.

    For example, calcing CB Azumarill's play rough vs. a haxorus yields this:

    252+ Atk Choice Band Azumarill Play Rough vs. 36 HP / 0 Def Haxorus: 294-348 (97.3 - 115.2%) -- 81.3% chance to OHKO

    when it should be this:

    252+ Atk Choice Band Huge Power Azumarill Play Rough vs. 36 HP / 0 Def Haxorus: 584-690 (193.3 - 228.4%) -- guaranteed OHKO

    The calc negated Azumarill's huge power because Haxorus has mold breaker, which is not how mold breaker works. Removing mold breaker yields the proper calc.
  2. Honko

    Honko
    is a Programmeris a Tiering Contributoris a Contributor to Smogon

    Joined:
    Dec 6, 2009
    Messages:
    1,132
    Fixed that bug.
    6feetunder likes this.
  3. Sixonesix

    Sixonesix
    is a Past SPL Winner

    Joined:
    Dec 2, 2007
    Messages:
    2,603
    Think you could add an option to turn off default sets? I'm asking because since I always calc for VGC, the singles sets (and sometimes even the VGC specific sets, going by last gen) are of no value to me and are often in the way.
    darkie, Pocket and Dekzeh like this.
  4. ziggy1221

    ziggy1221

    Joined:
    Jul 2, 2005
    Messages:
    3
    Can't wait for the one vs all and all vs one to be done. Nice work Honko
  5. Darkrar

    Darkrar

    Joined:
    Aug 27, 2010
    Messages:
    32
    I don't know if this is the right board for my topic. If not, please move it into the correct board.

    This damage calculator, linked on the main page of smogon, seems to be incorrect.

    Currently I am resetting a Zygarde on my Pokémon X. I calculated the maximum and minimum damage that Moltres can do with his attacks and perfect (SpAtk-) IVs against my Pokémon. While the calculations for Moltres were correct, the calculator seems to be incorrect for Zygarde's damage.

    The Zygarde (Lvl 70), Adamant, should have with perfect IVs 252 HP, 182 Atk, 196 Def, 126 SpAtk, 159 SpDef and 159 Speed.
    My Pokémon, Fearow (Lvl 58), has 159 HP, 117 Atk, 90 Def, 87 SpAtk, 80 SpDef and 158 Speed.

    Zygarde has three moves that can damage: Crunch, Earthquake and Dragon Pulse. After using his fourth move, Camouflage, his other moves will lose their STAB.

    The calculator says:
    Crunch: 84-99 damage
    Dragon Pulse before Camouflage: 103-123 damage
    Dragon Pulse after Camouflage: 69-82 damage

    But I know: An adamant Zygarde's damage against my Fearow is not so high as the calculator says.

    Is this my fault or is the calcutor incorrect?




    Edit: I am a retard... My first Pokémon was Staraptor with Intimidate... xD
    Last edited: Dec 28, 2013
  6. Honko

    Honko
    is a Programmeris a Tiering Contributoris a Contributor to Smogon

    Joined:
    Dec 6, 2009
    Messages:
    1,132
    Added 5th gen to the calc in time for SPL! All the B/W Smogon sets and old base stats, typings, and move BPs are there. Just click B/W up at the top.

    Also updated the 6th gen usage-based sets to use December's usage stats.

    Yeah, this sounds like a good idea. Adding it my todo list.
    Last edited: Jan 4, 2014
    Pocket likes this.
  7. Arcticblast

    Arcticblast I want to be Splatooned
    is a Forum Moderatoris a Community Contributoris a Tiering Contributoris a Battle Server Moderator Alumnusis a SPL Winner
    Moderator

    Joined:
    Nov 29, 2008
    Messages:
    5,154
    Selecting certain Pokemon in the calculator causes it to stop responding. Currently I have found this problem with the combination of Tyranitar on one side and Kyogre or Kyu-B on the other side.

    EDIT: Weather damage is not implemented either - "252+ Atk Tyranitar Stone Edge vs. 0 HP / 0 Def (Custom): 368-434 (94.1 - 110.9%) -- 62.5% chance to OHKO" should say "guaranteed OHKO after sandstorm damage." This was one of my favorite parts of the old calc and I'd love to see it back :<
  8. Honko

    Honko
    is a Programmeris a Tiering Contributoris a Contributor to Smogon

    Joined:
    Dec 6, 2009
    Messages:
    1,132
    Weather damage is implemented, but selecting a Pokemon with Sand Stream/Drizzle/etc doesn't automatically set the weather right now. I just haven't gotten around to that yet. If you set the weather to Sand manually, you'll see what you're looking for.

    I'm looking into the other thing now.
    Edit: Fixed. Thanks for letting me know and giving a specific matchup that was causing it.
    Last edited: Jan 4, 2014
  9. Furai

    Furai wellfare
    is a Site Staff Alumnusis a Team Rater Alumnusis a Forum Moderator Alumnusis a Community Contributor Alumnusis a Smogon Media Contributor Alumnusis a Contributor Alumnusis a Past SPL Winner

    Joined:
    May 4, 2010
    Messages:
    2,821
    The calc as hosted on Pokemon Showdown doesn't refresh accordingly. Adding SR, changing an existing move to another, and changing EVs doesn't refresh it, from what I've tried.
  10. Honko

    Honko
    is a Programmeris a Tiering Contributoris a Contributor to Smogon

    Joined:
    Dec 6, 2009
    Messages:
    1,132
    Fixed. (It takes a little while for the files to refresh on the PS server, so the fix might not start working for a while, but it's pushed.)

    I'm going to be gone this week so hopefully everything is working now...
    Last edited: Jan 5, 2014
    Furai likes this.
  11. Level 51

    Level 51 getting worse at mons day by day
    is a member of the Site Staffis a Forum Moderatoris a Smogon Media Contributoris a Tiering Contributoris a Battle Server Moderator
    Moderator

    Joined:
    Dec 16, 2011
    Messages:
    1,638
    is there any chance you could implement control of the EVs in each stat via the ↑ ↓ buttons (+4 / -4 each time)? this would make it so much faster to design custom EV spreads ;O
    (yeah I'm really really lazy)
    Kingler12345 likes this.
  12. yawg07

    yawg07

    Joined:
    Aug 7, 2009
    Messages:
    166
    First, your calculator is absolutely wonderful. I just have one question about a possible function.
    Would it be possible to set it to auto level to 50 instead of always 100?
  13. Honko

    Honko
    is a Programmeris a Tiering Contributoris a Contributor to Smogon

    Joined:
    Dec 6, 2009
    Messages:
    1,132
    6th Gen Damage Calculator? More like Every Gen Damage Calculator. I've added Gens 1-4, each with their own sets and damage formula quirks.

    Yeah, I'll do this.
    EDIT: Done. If you use a browser that supports number inputs (Chrome or Opera at the moment, and Firefox should be adding it soon), you can now adjust EVs more easily.

    Letting you choose the default level is already on the to-do list.
    Last edited: Jan 17, 2014
    SAGA, Soul Fly, Pocket and 2 others like this.
  14. sandshrewz

    sandshrewz
    is a Site Staff Alumnusis an Artist Alumnusis a Forum Moderator Alumnusis a Smogon Media Contributor Alumnusis a Contributor Alumnusis a Battle Server Moderator Alumnus

    Joined:
    Oct 18, 2010
    Messages:
    2,422
    All gens????? really?????? wth??????????

    Honko is too OP. G_G
    Meaty Man and Kingler12345 like this.
  15. Pocket

    Pocket GOJIRA
    is a member of the Site Staffis a Forum Moderatoris a Tiering Contributoris a Contributor to Smogonis a Team Rater Alumnusis a Community Contributor Alumnus
    Doubles Co-Leader

    Joined:
    Dec 22, 2004
    Messages:
    8,533
    Awesome job, Honko, my fren :]

    Btw, is it possible for the damage calc to take into account current HP? It would be gravy if the damage calc calculate the KO % of -1 Dragonite's ExtremeSpeed to an 18% Garchomp, for instance.
  16. Bahgera

    Bahgera

    Joined:
    Jan 18, 2014
    Messages:
    3
    Hello Hanko! Let me start out by saying that I absolutely love your battle calc! I co-own a pokemon roleplay site that uses it as our main calculator, and it makes things a lot easier. That being said, my members have pointed out some moves that seem to be simply missing from your calculator. I've looked through this forum and have seen a brief mention of multi-hit moves being added, but these are not multi-hit for most of them. We can't quite find and rhyme or reason to which ones are missing, so here they are:

    Astonish
    Constrict
    Fairy Wind
    Gust
    Mega Punch
    Poison Fang
    Scratch
    Vine Whip
    Last edited: Jan 18, 2014
  17. Honko

    Honko
    is a Programmeris a Tiering Contributoris a Contributor to Smogon

    Joined:
    Dec 6, 2009
    Messages:
    1,132
    Yep, I am planning to do this eventually, just haven't gotten to it yet.

    There are lots of moves missing, and it's intentional. I only included moves that are competitively viable in some situation (with just a couple of exceptions), mainly to keep the move dropdown as uncluttered as possible. At some point I would like to have every move implemented and add an option to show all moves instead of just viable moves, but that's pretty low priority for me.
  18. Bahgera

    Bahgera

    Joined:
    Jan 18, 2014
    Messages:
    3
    I'm not sure what you mean by 'completely viable'? Could you possibly explain it to me a bit more?
  19. Kingler12345

    Kingler12345 COOKIE COOKIE COOKIE STARTS WITH C
    is a Contributor to Smogon

    Joined:
    May 26, 2013
    Messages:
    1,371
    Moves that have actual utility and/or aren't totally outclassed by another move that most pokemon would otherwise use are 'completely viable'. Astonish doesn't provide much coverage on anything--against super effective threats, it hits with 60 BP. On a user of it, like Crobat, Brave Bird is an infinitely better option as it hits for 180 BP against neutral threats. Hope this helped.
  20. Bahgera

    Bahgera

    Joined:
    Jan 18, 2014
    Messages:
    3
    Ah, yes, that does explain it. Unfortunately, it doesn't help in my situation. We start out with low level pokemon and raise them up, and a lot of the missing moves are the starter moves that pokemon have. Oh, well. I'll relay this to everyone. We'll figure something else out. Thanks for clarifying!
  21. darkie

    darkie mfw i see alison brie
    is a member of the Site Staffis a Smogon IRC AOPis a Super Moderatoris a Smogon Media Contributoris a Contributor to Smogonis a CAP Contributor Alumnusis a Battle Server Moderator Alumnus
    Public Relations

    Joined:
    Dec 25, 2005
    Messages:
    6,047
    You can always adjust the move BP/type to match a certain other move.
  22. BenTheDemon

    BenTheDemon

    Joined:
    Oct 28, 2011
    Messages:
    488
    Honko, you are the best. Without your damage calculator, I would not be as good in OU (or any other metagame or that matter) as I am.
  23. neooo

    neooo

    Joined:
    Dec 10, 2013
    Messages:
    54
    I'm not trying to bite the hand that feeds, let me come out and say that I absolutely love how the calculator has evolved over time, but one of the newest "features" irks me slightly.

    The drop down java menu (where you select a Pokemon) is rather laggy (and no, it's not my computer). To me at least, the old version of the drop down menu was better. Other than that, I really like what you guys have done.
    Last edited: Jan 21, 2014
  24. Vryheid

    Vryheid fudge jelly

    Joined:
    Oct 15, 2013
    Messages:
    147
    I know this probably isn't a priority for you but I miss the CAP sets when you had them, they made damage calculations for the meta a hell of a lot easier. If you want, I can write up a list of usage sets for each of them, I'm familiar enough with the meta that I know how they're usually used in Gen 6.
  25. Honko

    Honko
    is a Programmeris a Tiering Contributoris a Contributor to Smogon

    Joined:
    Dec 6, 2009
    Messages:
    1,132
    Yeah, there is definitely a bit of lag when opening the new dropdowns right now (about half a second on my machine, but I imagine it's longer for some people). I have a couple of ideas that should cut that lag way down that I just haven't had time to try yet. If those work and the lag mostly goes away, I think the new dropdowns are a clear improvement in terms of making it easy to find a specific set and keeping the dropdowns from being too cluttered (which makes me more willing to add things like blank sets and non-viable moves). If it turns out that I can't cut the lag down as much as I hope, then I might consider switching back to the old dropdowns.

    I hadn't even realized I removed them, but now that they're gone I'll need to think about the best way to add them back. I'd rather not have them mixed in with the official Pokemon by default, just because it could be confusing for new users to see them show up, especially once I add the mass calculators. They will be back eventually though.

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