Inactive Attack Survival Calculator

Hello Smogon!

The Attack Survival Calculator is a tool that I initially created for my personal use, but which I later put a UI on for the users of Nugget Bridge. Here is a slightly modified version of the post I made on Nugget Bridge:

Hey all.

When I first encountered Nugget Bridge, it was through Ray's 2012 team analysis. I read it numerous times, trying to understand how it was so successful. I would later discover that the chosen Pokemon are the key to a successful team, however at the time I was fascinated by the complicated EV spreads. How did he know just how many EVs to place into Speed, Attack, and Defenses?

Intrigued, I contacted Ray, Wolfey, and Jio, searching for answers. They gave me a fantastic overview into how good spreads are constructed. I soon began tireless research, trying to compile all of the knowledge on the subject, the compendium of which later became my article.

Still, I was dissatisfied. It was too much work to add and subtract EVs from a Pokemon, covering every combination to see which would do the least damage. That's when it hit me: a computer would do it far better. If I was to do it with a computer, however, I would need to understand the damage formula. That's when I posted in the forums, trying to make heads and tails of the complicated process. HeroOfTheWinds was invaluable at this step, helping me to understand the order in which things were calculated. I further looked at the Honkalculator's source code, and based my damage formula off of its order of implementation. I soon put my beginning Computer Science skills to the test as I built and reconstructed from scratch my EV spread searching software a total of six times. This is the result:

The Pokemon Attack Survival Calculator, or as Finally affectionately calls it, the Statinator.



It allows you to do the following.

  • Given an attack's and a defending Pokemon's specifications, it will find the spread with the minimum total number of EV's while maximizing HP for overall bulk. (Input an attack and defender then hit the "Find Minimum EVs button")
  • Given an attack's and a defending Pokemon's specifications, it will find the spread that survives the attack with a specified percentage of HP remaining a specified percentage of the time, while minimizing generic damage on the opposite defensive side. (Input an attack and defender then hit the "Find Best EVs" button)
  • Given an attack, a defending Pokemon, and a comparative attack's specifications, it will do the above while minimizing the damage from the specified comparative attack on the opposite defensive side. (Input an attack, defender, and comparative attack then hit the "Find Best EVs" button)
  • Given an attack, a defending Pokemon, and up to two special HP numbers, it will do the above while hitting the special HP number, in addition to minimizing the damage on the opposite defensive side from either a generic attack or the comparative one. (Input an attack, defender, and a comparative attack if you want, check up two special HP numbers, then click the "Find Best EVs" button)
  • Given an attack, a defending Pokemon, and a comparative attack, it will find the minimum number of EVs necessary to survive both attacks on the respective Defensive and Special Defensive sides with a specified percentage of HP remaining a specified percent of the time. (Input an attacker, defender, and comparative attacker, then check the "Survive Comparative Attack" check box and hit the "Find Best EVs" button)
Because the user interface can be a bit complicated to understand, I included tooltips in the less obvious text boxes, but I will provide an example below just in case.

Goal: Have Rotom-W survive Adamant Mega Mawile's Play Rough and minimize the damage from Modest Mega Charizard's Solarbeam.

Step 1: Input Mega Mawile's specs into the Attacker section. It's a physical attacker, so I leave the 1 in the Attack Type box (as opposed to 2 for a Special Attacker). It has a base Attack of 105, so I input that in the Base Attack box. Most Mega Mawile's run an Adamant Nature, so I leave the 1.1 in the Nature box untouched. Play Rough has a base power of 90, so I replace the 100 in the Base Power box with it. Its Play Rough isn't affected by Weather, Gems, Type-Resist Berries, or a Life Orb, so I skip the next few boxes. Play Rough has neutral effectiveness against Rotom-W, so I leave the effectiveness as 1. Mega Mawile has Huge Power, so I check that box.

Step 2: Input Rotom-W's specs into the Defender section. I input Rotom-W's base stats into their respective boxes, and decide on a Calm Nature because it's impossible to survive Mega Charizard's Solar Beam without it. Therefore, in the Special Defense Nature box, I replace the 1 with 1.1. I want Rotom to survive with at least 1 HP left 100% of the time, so I just leave the .01% HP remaining and 100% of the time boxes as is. For the time being, we'll leave the available EVs as 508.

Step 3: Find out approximately where to start inputting EV's from. I hit the "Find Minimum EVs" button and see that it needs at least 280 EV's to survive Mega Mawile's Play Rough 100% of the time, so I know that my "Available EVs" slot will need to be at least that.

Step 4: Input Mega Charizard Y's specs into the Comparative Attack section. Checking the Comparative Attack check box brings down a section for another attacker. While the program would have minimized the damage on the Special side without inputting a second attack, it isn't optimized to Mega Charizard's Solar Beam. Therefore, I input Mega Charizard's base stats, change the base power to 120, and the effectiveness to 2. Again, Solar Beam's power isn't affected by Weather, Gems, Type-Resist Berries, or a Life Orb, so the three modifier boxes can be left as 1. I uncheck the STAB box because Mega Charizard doesn't get STAB on its Solar Beam.

Step 5: Put in as many EVs as I want depending on the damage taken from Mega Charizard's Solar Beam. Because Mega Mawile's Play Rough requires 280 EV's to survive it 100% of the time, I input that into the Available EVs box and hit the "Find Best Spread" button. Of course, this gives us the same spread that the Minimum EVs button did, as I've inputted the minimum possible number of EVs. I see at the bottom of the output box that the damage from Charizard's Solar Beam is displayed, and I then modify the amount of EVs in the Available EVs box until I'm satisfied with the damage taken from Solar Beam.

Alternatively, if I wanted to survive both of the attacks, I could simply check the "Survive Comparative Attack" check box and hit the "Find Minimum EVs" button.

I hope you all like it and that it makes creating EV spreads easier for you. If you need a calculator for general bulk and not to survive specific attacks, X-Act's calculator does nicely.

If there are any bugs, don't hesitate to post them here or shoot me a PM.
 

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

Top