smogon / damage-calc Goto Github PK
View Code? Open in Web Editor NEWPokemon games damage calculator
Home Page: https://calc.pokemonshowdown.com
License: MIT License
Pokemon games damage calculator
Home Page: https://calc.pokemonshowdown.com
License: MIT License
The calc currently change it to the normal type by default
It seems power of z-moves can only be assigned manually now. I think it would be better if we just type the original move, then check a checkbox or something, and got the corresponding z-move used for calc.
Is anyone working on this? I can have a try if not :)
Seeing it checks 'weakness policy' for getFlingPower
https://github.com/Zarel/honko-damagecalc/blob/master/js/data/item_data.js#L436
but it's not in the item list
Obviously in a competitive battle under those two rulesets, it's possible to max out all the stats so for almost all practical purposes you might as well. However, there are some cases (the most prominent one on my mind is setting up in-game scenarios) where more flexibility in the gamut of player/opponent stats is helpful.
A lot of the time, it's possible to construct the equivalent setup in ADV mode and run the numbers from there, but there are some details that don't quite sync across the generation gap (in particular, the damage variation roll dropping from a d39 to a d16) for cases where the slight changes might tangibly affect the odds.
Having the EV text boxes be hidden by default, and only revealing them on the deselection of a toggle switch like the one used for critical hits, would be fine.
It's like it applies Spectral Thief's effect to any of Marshadow's moves, even Shadow Sneak or Rock Tomb as seen on the pic, which should not happen. It also works for any +X Att, or +X SpA, or +X Def, +X SpD. Actually it goes even further (and is probably the same bug), if you do +1Def on the LEFT, and select a calc on the LEFT side, it will take it into account for the right side :
252 Atk Life Orb Technician Marshadow Rock Tomb vs. +1 0 HP / 4 Def Marshadow: 49-58 (15.2 - 18%) -- possible 6HKO
This does not include Light That Burns The Sky. That means it provides incorrect damage calculations against the likes of Fur Coat, Unaware, etc.
it got a buff of a 0,2x damage multiplier in gen 7 on all affected moves
I see the other Z-move items for the calcs except at first glance, no Grassium-Z choice.
as title.
emm... and also Trick-or-Treat.
Hey
Lately there appears a new little handling inconvenience when typing in the Tapus in the damage calculator.
The calculator seems to not perceive the space between 'Tapu' and Bulu/Lele/Koko/Fini ofcourse you can type Tapu in the search mask and look up the one you need manually but I remember a (maybe?) similar bug during ORAS when it appears to say 'Blank Set' for every Pokémon with a hyphen in its name which you could fix quite fast therefore I hope this is only a little issue too :)
Good job Man!
Nowadays, the canonical ordering of stats is HP-AT-DF-SA-SD-SP, but it was originally ordered as HP-AT-DF-SP-SC, and that's the order that's reflected in the G1 and G2 data structure. If you go into one of those modes and set the Special IV to 14, HP is also supposed to drop to 14 because the low bit there is also the low bit for HP, but the calculator actually sets HP to 13 there, as though it thinks Special controls the 2 bit of HP. That bit is really supposed to be intermeshed with Speed, and setting a 14 there should drop HP to 13 in the absence of anything else, but instead the calc goes to 14 HP--a straight relabeling of the stat order.
Similar to the corresponding issue for the Showdown client. Unfortunately, this will be much harder than the client, as that only needed usability improvements.
<form>
, or associated with one using an attribute, so this looks like invalid html5. Similarly for the notation and mode radio buttons on the top, the move selection, single/doubles, terrain selection, weather selection, and spike layers radios.<span id="damageValues">(211, 214, 216, 218, 220, 224, 226, 227, 231, 234, 235, 238, 242, 243, 246, 250)</span>
aria-hidden
.when tapu lele is attacked by skills like sucker punch, the damage should be 0.
Currently when you take the sets directly from teambuilder the moves will not appear. Edit: Marty has confirmed this is from the extra space Teambuilder adds to support reddit
The Pokemon Elektross does not appear when typing it's name.
Add a toggle option for pokemon holding Mega Stones evolving with the respective stats and type
Should be able to set stat changes in evasion and accuracy for the purpose of correctly calculating stored power's base power. Also having accuracy of moves being considered in the % to OHKO would be nice
Rayquaza-Mega @ Choice Specs
Ability: Aerilate
Shiny: Yes
EVs: 252 HP / 252 Atk / 252 Def / 252 SpA / 252 SpD / 252 Spe
Modest Nature
IVs: 0 Atk
- Boomburst
- Secret Sword
- Magma Storm
- Draco Meteor
This set for example, when I import it, the ability sometimes changes to Delta Stream. Do you guys have this same issue? This is particularly annoying when dealing with Balanced Hackmons calcs.
When attempting to Honkalculate, errors pointing to invalid move data pop up in the JS console.
When clicking the 'Honkalculate' button for All vs One VGC 17, no damage calculations are produced. I did a bit of investigating and it seems to be a problem with Vanilluxe using Sheer Cold which gives an undefined 'move.type' value. After I used Chrome's inbuilt debugger to create an IF statement that sets 'move.type' to Ice when Sheer Cold is used, the problem went away. I don't know why the problem only happens for VGC 17, however.
Don't know if it's intended, but you can't have Water Gun nor Disarming Voice in the calculator.
We use this calculator a lot to calculate damage ranges for speedruns and since the Gen 7 speedruns use Popplio, it's tedious to always replace values of other moves.
I'd make a pull request, but my repo contains other changes on the master branch that are related to speedruns, so I cannot just make a pull request of that. Nevertheless this commit should suffice: https://github.com/wartab/honko-damagecalc/commit/a7f8142aa8dcd73f9c0c509fd92dcad7ebb00e3c
Gogoat's hidden ability, called Grass Pelt
The various Rotom forms no longer have sets. For me, their sets used to show up until I cleared my cache for that page, so this is probably due to a recent change. The normal Rotom forme still has sets.
Screenshot: http://i.imgur.com/SLfGAal.png
Currently battling a Registeel in Gen3, and I noticed that Metal Claw is missing from the move list.
https://pokemonshowdown.com/damagecalc/calc_bc.html?mode=all-vs-one
https://pokemonshowdown.com/damagecalc/calc_bc.html?mode=one-vs-all
Damage (%) and KO Chance column sort
When clicking the column headers to sort by damage, it looks like it's incorrectly sorting alphabetically rather than a number value sort.
e.g.
0
101.5
11
122
13.2
whereas it should be
0
11
13.2
101.5
122
I believe the last time I used this functionality was 2016-07-XX. It was working at that time.
Please take a look.
Thanks!
Picking Passimian when Abomasnow is already loaded defaults to Passimian's Earthquake
Picking Ferroseed when Passimian is already loaded defaults to Passimian's Rock Slide
Picking Magmortar when Ferroseed is already loaded defaults to Magmortar's Thunderbolt
If (No Move) is available it chooses that.
Sometimes it picks the status moves (Recover for Mareanie vs Ferroseed) sometimes it doesn't (Ferroseed vs Passimian)
Hey there, just noticed that Beat Up isn't among the listed moves for a Pokemon to use. I wanted to do Beat Up calcs from a Whimsicott on a Focus Sash Gengar, but it seems that I can't do that because Beat Up isn't a listed move.
Any chance of making an offline capable iOS app?
When you put up 1 layer of spikes, it says that Dragonite's Multiscale is broken on the calc.
Reported from a tweet:
https://twitter.com/fox_emojis/status/970381483851558912
@ PokemonShowdown the “honkalculate” option isnt showing up on my phone/computer when i’m trying to look at the “all vs one” or “one vs all” function on the calc? i took this screenshot on my phone,the same thing is happening on my computer (and a different mobile browser) as well
Pressing Honkalculate with any tier checked prints the following error in console:
Uncaught TypeError: pokeInfo.find is not a function
at new Pokemon (shared_controls.js:408)
at calculate (honkalculate_controls.js:76)
at HTMLButtonElement. (honkalculate_controls.js:231)
at HTMLButtonElement.dispatch (jquery-1.9.1.min.js:3)
at HTMLButtonElement.v.handle (jquery-1.9.1.min.js:3)
This one's easy; just set up a scenario where one of the attacker's moves is blocked by an immunity. Then change the defender's item to Ring Target. It should override the immunity and allow it to show some actual damage, but doesn't.
Setting Speed to +2 does not alter the generated outcome.
Tested with various pokemon that carry a move that would deal 100%+ damage, but get outsped before +2 speed, such as cloyster vs tapu koko, Haxorus vs Garchomp, Gengar vs Alakazam
Not a huge deal, but I figured I'd let you know.
I followed the following steps:
Load this set:
Necrozma-Dusk-Mane @ Solganium Z
Ability: Prism Armor
EVs: 252 Atk / 4 Def / 252 Spe
Adamant Nature
- Sunsteel Strike
- Photon Geyser
- Prismatic Laser
- Brick Break
then load this set:
Gengar
Ability: Cursed Body
IVs: 0 Atk
- Will-O-Wisp
Both imported with success.
Then on the left side, I select 'Only show imported sets', then select my Necrozma-Dusk-Mane set.
Then on the right I select my Gengar manually from the list (since there is no 'Only show imported sets ' option on the right).
Then the calc shows this:
252+ Atk Necrozma-Dusk-Mane Photon Geyser vs. 0 HP / 0 Def
Abomasnow: 584-690 (181.9 - 214.9%) -- guaranteed OHKO
Yes, Abomasnow, and in the right field, everything has Gengar's stuff, except the 'Forme' field, that still has Abomasnow, so the error night come from here. After that if you try to change the Pokémon on the right to like Abra or some other, and then reselect my Gengar set, a lot of weird stuff happens, sometimes it will work, sometimes the previous Pokémon will still show up...
So I'm not sure what's happening exactly but it is not right. And yeah, would be nice to have the 'Only show imported sets' option on the right side too.
I got this bug report from Twitter:
damagecalc
bug:
when pokemon ability is solar power used thunder in Electric Terrain in sun。
Similar to the situation,
+2 252+ SpA Solar Power Abomasnow Thunder vs. +6 0 HP / 0+ SpD Abomasnow: 61-72 (19 - 22.4%) -- guaranteed 4HKO after Stealth Rock, Solar Power damage, Leech Seed recovery, and burn damage"in sun" and "in Electric Terrain" It will not be displayed.
I figured putting a todo list on the GitHub repo itself might be beneficial as it's much easier for developers to see what still needs to be done.
1: Fix Mega's/alolan Pokémon search
currently the calculator doesn't support searching for the Pokémons Mega or Alola forms. If you wanted to search for mega metagross for example, you'd have to type "metagross-mega". Changing the getSetOptions
function in ap_calc.js
should be the solution here
2: Fix best move auto selection
currently when you change a pokemons EVs after already doing a calc it will redirect you off of the move that was previously the strongest. This is annoying people so adding a lock-move option might be a good thing to have, the best being if you double click on a move it stays highlighted.
3: Add forme-change option
a dropdown option that changes the Pokémons forme but not the set. This would require adding hasAltForm
in pokedex_js
4: Imported sets only mode
an option where only your imported sets show up on the left side of the calc, while the other showing sets from setdex_**.js
5: Fix stat dropping moves KO-Chance
auto calculate ko chance with moves that drop a users stats. Pretty straight forward, add dropsStats
to any relevant move in moves.js
then change any relevant code in ko_chance.js
6: Show percent recovered from moves that drain health
There's probably a lot of ways this could be implemented, we could put it right next to the damage output, we could put it under the damage rolls, or just make a new section. The move data part is already done with givesHealth
.
7: take into account defense drops after pokemon with Weak Armor or Stamina get hit by a multi hit move when generating the ko chance.
8:Add a “clear” button for custom sets. Create a button that erases all imported custom sets
I wanted to see how ridiculous Hyper Fang on Gumshoos with Strong Jaw and Adaptability would be, but the calculator doesn't have that move in the system.
I know it is a status move but I imported a set with D-Dance and it is not coming up. Just figured someone would like to know
Function isGrounded is called in getTerrainEffects (defined in calc_ab.js), but I can't find its definition.
When I check Electric Terrain and Misty Terrain, a script error occurred and their effects are not applied. Grassy Terrain and Psychic Terrain work fine.
Please have a look at this.
Following a discussion on Smogon's Forums bug report thread for the calc here, the issue is the following:
Choice items (I tested both) are not taken into account in multi-hit moves (I tested Draco Meteor and Superpower for instance) after the first move.
Here is the proof:
252+ SpA Choice Specs Kingdra Draco Meteor vs. 248 HP / 208+ SpD Mantine: 165-195 (44.2 - 52.2%)
so the min damage of one hit is 165.
Now, the min damage of one hit starting at -2 SpA (to mimick what should be the second hit) is 84:
-2 252+ SpA Choice Specs Kingdra Draco Meteor vs. 248 HP / 208+ SpD Mantine: 84-99 (22.5 - 26.5%)
So the total min damage of 'Twice' Draco Meteor should be 249.
But currently we have a min of 220:
252+ SpA Choice Specs Kingdra Draco Meteor over 2 turns vs. 248 HP / 208+ SpD Mantine: 220-261 (58.9 - 69.9%)
But actually 220-165=55 which is the result of no choice Specs for the second hit:
-2 252+ SpA Kingdra Draco Meteor vs. 248 HP / 208+ SpD Mantine: 55-66 (14.7 - 17.6%)
demonstrating that indeed after the first hit, the Choice Specs is not taken into account anymore.
Just wanted to point out this minor bug.
Hey
I want to suggest an addition too,
thinking it would be a nice feature if you could choose 'Costum Set' with Ash-Greninja in regular Greninja form or when you using a mega but you arent mega evolved yet.
I don't know a single thing about scripting therefore I want to apologize if this is a insanely complicated to implement idea.
Again, keeping up the great work!
I got a report from someone on Twitter:
moves like Moongeist Beam and Menacing Moonraze Maelstrom don't ignore abilities like Multiscale
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.