Skip to content

Instantly share code, notes, and snippets.

@Ads20000
Ads20000 / Pokemon Shuffle Escalation Battle Catch Probability.js
Last active November 3, 2016 19:48
A program to find the probability of catching a Pokemon in an Escalator Battle (in Pokemon Shuffle (Mobile)) within a specific number of stage levels
// A program to find the probability of catching a Pokemon in an Escalator Battle (in Pokemon Shuffle (Mobile)) within a specific number of stage levels
// This program is actually a very long-winded way of making this calculation, because you can do the same thing with the formula 1-(99!/(99-n)!/100^n) where n is the number of attempts: https://www.reddit.com/r/PokemonShuffle/comments/44vd9u/diancie_escalation_hp_graph_and_stats/czxjwmz/
// The simplest way to run this program is to open it in or copy it into Mozilla Firefox's Scratchpad (Firefox Menu > Developer > Scratchpad or Shift+F4) and hit 'Run'. The result will pop up in a window in your open tab.
// n is the number of levels which have been attempted
// 1 is the initial value for the program
var n = 1
// p is the probability of it taking n attempts to catch the Pokemon
// 0.01 is the initial value for the program
var p = 0.01
@Ads20000
Ads20000 / Hackmons Cup Level Calculator.js
Last active January 25, 2017 18:29
From the Pokemon Showdown repo
mbstmin = 1307;
// Type the base stats of the Pokemon in manually here:
hp = 79;
atk = 105;
def = 70;
spa = 145;
spd = 80;
spe = 101;
@Ads20000
Ads20000 / Elo update.js
Last active February 13, 2018 00:01
Calculate elo update
// Modify the values below, then hit Display in Firefox's Scratchpad
// https://github.com/Zarel/Pokemon-Showdown/blob/dde05fab18626afad1b666dd0c0875dde5d221e6/ladders.js#L176
elo = 1000;
foeElo = 2000;
score = 0;
// The K factor determines how much your Elo changes when you win or
// lose games. Larger K means more change.
// In the "original" Elo, K is constant, but it's common for K to