Programming Damage Calculator

Jumpman16

np: Michael Jackson - "Mon in the Mirror" (DW mix)
is a Site Content Manager Alumnusis a Top Team Rater Alumnusis a Battle Simulator Admin Alumnusis a Smogon Discord Contributor Alumnusis a Researcher Alumnusis a Top Tiering Contributor Alumnusis a Top Contributor Alumnusis an Administrator Alumnus
Very minor suggestion here, but in the Report window, the Critical Hit checkbox one has selected in Options does not show up in the Report. For example:

252 Adamant Quick Claw Rhydon Stone Edge
vs. 252/4 Bold Mesprit : 88.2% - 104.3%

This is a CH. Pretty self-explanatory and I'm sure incredibly minor effort will need to be expended on your part.
 

Atlas

I'm the Mary!
is a Smogon Discord Contributor Alumnusis a Researcher Alumnus
ev's slider need to be reworked, its starts off going by 4s and then goes by 3 then 4 again which screws up the how it works (0,4,8,11,15,19,23,27,31,34, etc)
 
The ability Scrappy does not appear to work. For example, a Scrappy Miltank's CB Body Slam does no damage to any Ghost-Type. I didn't see anything about this in the Help Section, but I apologize if I overlooked something. Thanks!
 

chaos

is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Smogon Discord Contributoris a Contributor to Smogonis an Administratoris a Tournament Director Alumnusis a Researcher Alumnus
Owner
My thoughts:

- Calculator "moves" drop down shouldn't include non-attacking moves. Trying to select, say, Swords Dance, does nothing anyway.
- Abilities that don't do anything of worth in damage calculator (natural cure, etc) shouldn't be included, just more to scroll through
- It would be useful if you could select Nature by boost and not by name.
- Types are currently separated with \, I have always seen /.
- IVs, EVs, and stats are separated with -, I have always seen /.
- Trying to calculate damage on a Pokemon that has not been filled in displays Infinity damage; it should probably just not show anything

These are all nitpicks, the calculator is solid. Good work DJD.
 

chaos

is a Site Content Manageris a Battle Simulator Administratoris a Programmeris a Smogon Discord Contributoris a Contributor to Smogonis an Administratoris a Tournament Director Alumnusis a Researcher Alumnus
Owner
You're right. Isn't that counterintuitive? I expect a move to do something when I click "calculate"
 

DougJustDoug

Knows the great enthusiasms
is a Site Content Manageris a Top Artistis a Programmeris a Forum Moderatoris a Top CAP Contributoris a Battle Simulator Admin Alumnusis a Smogon Discord Contributor Alumnusis a Top Tiering Contributor Alumnusis an Administrator Alumnus
Non-damaging moves are only in the Quick Moves list; they aren't in the normal moves list. I explained their inclusion in the help page for the Quick Moves List (bolding added here only):

The Quick Moves List has special features to handle certain Boost Moves differently than other non-damaging moves. See the help for Quick Boosts for more information.

The Quick Moves List will show ALL moves associated with the Moveset, including moves that are not damage-dealing attacks. These non-damaging moves are included only for completeness, and if picked, will not be accepted as a valid damage calculation move.

It may seem odd to include moves in a list, even though the calculator ignores them. But many movesets could be hard to identify if the non-damaging moves were removed. For example, if you picked the "SubSeeder" set for a Grass pokemon, it would look pretty strange if the moves Substitute and Leech Seed were missing. So, even though Substitute and Leech Seed are not attacking moves, and cannot be used by an Attacker to initiate a damage Calculation -- they are listed in the Quick Moves List, if they are part of the Moveset.
And the choice to make boosts actually do something when chosen from the Quick Moves list, I explained that in the help for Quick Boosts:

The Quick Boosts feature is an entry convenience when using common Movesets. Since many damage calculations for common movesets involve the use of standard boosts (ex. "How much damage does Salamence do with DClaw after a DD?"), the calculator takes advantage of the fact that common Boost Moves are often readily available in the Quick Moves List.
I'm not saying that everyone needs to agree with my design choices there, I'm just pointing out the reasoning behind it. In general, the inclusion of Smogon movesets changed my perception about what the calculator should do to take full advantage of them.
 

Atlas

I'm the Mary!
is a Smogon Discord Contributor Alumnusis a Researcher Alumnus
- It would be useful if you could select Nature by boost and not by name.
this would be awsome, i always have to have supremecy open to figure out most natures


also is it possible to load just the applet in a pop up window
 
Hi i dont know if this counts as a problem, but I'll post anyway.

I imput a Heracross (With Guts and Adamant and 252 Atk EVs) with Life ORB uses Close Combat against a the standard Wish Support Jirachi straight from the Smogon Calc. And the damage out put is: 52.6% - 62.3%.

The same secenerio however the item Heracross holds is Flame Orb. I expected a greater damage output thanks to Guts , however it does less, which, at least I think isn't right. The damage output is: 40.6% - 48.1%.

Thanks for helping. ^_^
 

Atlas

I'm the Mary!
is a Smogon Discord Contributor Alumnusis a Researcher Alumnus
under heracross' ability in the "other" button, you need to go to status and activate "burn", this will activate guts ability into the damage (which turns out to be 60.8% - 71.8%)
 

DougJustDoug

Knows the great enthusiasms
is a Site Content Manageris a Top Artistis a Programmeris a Forum Moderatoris a Top CAP Contributoris a Battle Simulator Admin Alumnusis a Smogon Discord Contributor Alumnusis a Top Tiering Contributor Alumnusis an Administrator Alumnus
- It would be useful if you could select Nature by boost and not by name.
this would be awsome, i always have to have supremecy open to figure out most natures
I really wanted to put some more features on the Nature widget/pick list. I investigated several alternative selection widgets, that would allow multiple attributes to be displayed/selected. But, all the widgets had a lot of framework associated with them, and they didn't play nicely with the rest of the calc, without requiring me to modify the widget code, the calculator, or both. I had already gone through quite a bit of hassle implementing some other custom widgets (like the sliders and dialogs, for example). So, my motivation to do anything special just for the Nature list was really low.

I finally decided to make the Nature field a text field, and put a "dialog button" next to it (like the Type field, for example) that would open a dialog with several features for assisting with picking Nature based on boosts or drops. I just never got around to coding it. Like I said, my motivation to whip up a bunch of special coding for Nature, was really low by the end of the project. So, I just left it as a regular select list dropdown.

I did put a table of all the boosts and drops on the help page for Nature. So, if you just press the Help Tool and then click the nature field, you can quickly see a list of all the natures and their respective stat boosts. I put that table in the help, specifically because I knew the information would be helpful when picking nature (I personally forget certain natures all the time!).

also is it possible to load just the applet in a pop up window
The Damage Calculator is not a java applet. It's a webpage, with a boatload of javascript. But, yes, it could be opened with a call to window.open(), set the frame size, etc. Such a call would likely get blocked by many people's popup blockers, but still -- it is possible to do it. I don't think that should be the default mode of opening the calc, but it might be an interesting option somewhere.
 

supermarth64

Here I stand in the light of day
is a Contributor Alumnus
Primeape doesn't seem to work on my computer under Chrome, Safari, and Firefox. However, it works fine on IE. This is what happens in Chrome:



If I go to another Pokemon and choose its move and calculate it, then go back to Primeape, the movesets stay the same.



That's the only Pokemon I've seen it happen on so far.
 

DougJustDoug

Knows the great enthusiasms
is a Site Content Manageris a Top Artistis a Programmeris a Forum Moderatoris a Top CAP Contributoris a Battle Simulator Admin Alumnusis a Smogon Discord Contributor Alumnusis a Top Tiering Contributor Alumnusis an Administrator Alumnus
Primeape doesn't seem to work on my computer under Chrome, Safari, and Firefox. However, it works fine on IE. This is what happens in Chrome:

If I go to another Pokemon and choose its move and calculate it, then go back to Primeape, the movesets stay the same.

That's the only Pokemon I've seen it happen on so far.
There were a bunch of unprintable characters in the analysis text for Primeape on the database. I don't know when all that junk was introduced, but I cleaned up the analysis text, and updated the movesets for the calculator. It may take a while before the server recaches the new file, so don't expect to see the fix immediately.
 

DougJustDoug

Knows the great enthusiasms
is a Site Content Manageris a Top Artistis a Programmeris a Forum Moderatoris a Top CAP Contributoris a Battle Simulator Admin Alumnusis a Smogon Discord Contributor Alumnusis a Top Tiering Contributor Alumnusis an Administrator Alumnus
2v2 Should be a universal modifier under field (if at all possible) because it effects some attacking moves (Surf has less BP, as well as EQ and Discharge I believe in 2v2)
Very minor suggestion here, but in the Report window, the Critical Hit checkbox one has selected in Options does not show up in the Report. For example:

252 Adamant Quick Claw Rhydon Stone Edge
vs. 252/4 Bold Mesprit : 88.2% - 104.3%

This is a CH. Pretty self-explanatory and I'm sure incredibly minor effort will need to be expended on your part.
I just posted a new version of the Damage Calculator that has some changes to the Options Dialog. There is now a section called "Shared Options", which are options that can be toggled on either the Attacker or the Defender, and will affect the damage calculation equally regardless of which side is toggled. Read the Help page for Shared Options for more info.

I added a new option called "No Immunity" that will cause the calculator to disregard any immunity involved in a calculation. This option is intended to address the various conditions that can cause immunities to be bypassed -- like Foresight, Miracle Eye, Roost, Mold Breaker, Gravity, etc. I wrestled with a few different ways of handling it, and this option had the most "bang for the buck". It covers many of the situations, and wasn't a huge change to the calculator.

I also added specific support for the Scrappy ability, as it applies to hitting Ghosts with Normal and Fighting moves. Scrappy pokemon do NOT need to toggle the "No Immunity" option to get the right calc. Scrappy is now built in to the basic damage calc.

I also changed the Report window to have a setting to "Show Options", which includes Critical Hits, Flash Fire, Light Screen, etc.

I updated the help pages for all the changes described above.
 
When you select lucario as the defending pokemon, it doesn't show any movesets for it. But it does show if you select lucario as the attacking pokemon. Only reason why I even pointed this out is because I like using the calc. when I'm comparing speed stats.
 
Setting the levels to 50, and clicking the shared option 2 v 2 seems to not be working (tried 2v2 on attacker, defender, and both). This was for both Water Spout and Surf.


Just tried resetting the levels back to 100 and it still doesn't seem to affect the calcs at all.
 
Salamence is not working in the sense that you can select his name and edit his moveset and EVs, etc. But you cannot pick any sets. If you had a pokemon selected before Salamence, it'll try and pull from those movesets. Essentially the same problem as Scuba Stevee and supermarth-- except mine doesn't work for the defender, either.
 

DougJustDoug

Knows the great enthusiasms
is a Site Content Manageris a Top Artistis a Programmeris a Forum Moderatoris a Top CAP Contributoris a Battle Simulator Admin Alumnusis a Smogon Discord Contributor Alumnusis a Top Tiering Contributor Alumnusis an Administrator Alumnus
Setting the levels to 50, and clicking the shared option 2 v 2 seems to not be working (tried 2v2 on attacker, defender, and both). This was for both Water Spout and Surf.


Just tried resetting the levels back to 100 and it still doesn't seem to affect the calcs at all.
2v2 was broken in all cases, due to a stupid typo on my part. Now it is fixed. Thanks for the bug report.

As far as I know, Struggle ignores type advantages and disadvantages. The calculator does not account for this.
I totally forgot to include Struggle when implementing "typeless" attacks like Doom Desire and Future Sight. Now, Struggle should work correctly. Thanks for the bug report.

Salamence is not working in the sense that you can select his name and edit his moveset and EVs, etc. But you cannot pick any sets. If you had a pokemon selected before Salamence, it'll try and pull from those movesets. Essentially the same problem as Scuba Stevee and supermarth-- except mine doesn't work for the defender, either.
Since the Damage Calculator reads movesets from Smogon analyses, it is relying on the Analysis writers and C&C editors to make sure all the analyses are in the correct format. In the case with Salamence, the analysis writer did not properly format the speed EV's for a couple of sets. So, the program was abending behind the scenes every time it tried to load the Salamence movesets.

I'm sure people will continue to mention moveset issues like that in this thread. But, for anyone tracking this thread, try to remember that any time a pokemon's movesets do not appear, and it leaves the previous pokemon's movesets in place -- then it is 99% likely to be a formatting problem with the pokemon's analysis. You can contact any member of Site Staff to review the analysis and try to locate the error. Most Site Staff should be familiear enough with the proper data format to locate the error.

The most common formatting errors are usually in the EV lines. The EV number and stat must be separated by a space (ie. "252 Atk" not "252Atk") and the abbreviation must be correct ("Spe", not "Speed") ("SpD", not "SDef").
 

jc104

Humblest person ever
is a Top Contributor Alumnus
I'm very surprised that no-one has noticed this, but at the moment the burn status is cutting special attack as well as attack
 
Torrent doesn't work for me. I was using Blastoise vs. Skarmory if that matters. The damage was the same after I checked the ability box.
EDIT: Shouldn't abilities like Anger Point just boost their corresponding stat? Either way, Anger Point's boost needs to be entered in manually. I get the feeling the abilities are still being developed.
 

Jumpman16

np: Michael Jackson - "Mon in the Mirror" (DW mix)
is a Site Content Manager Alumnusis a Top Team Rater Alumnusis a Battle Simulator Admin Alumnusis a Smogon Discord Contributor Alumnusis a Researcher Alumnusis a Top Tiering Contributor Alumnusis a Top Contributor Alumnusis an Administrator Alumnus
Would it be possible to add a "Level" checkbox to the Reports window, for a corresponding "252 Timid Lv96 Gengar Sludge Bomb" (or Lv. 96 or Lv.96 or Lv 96, etc) output? It's not too big a pain to type these manually but there appears to be room for additional checkboxes for report outputs.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top