Skip to content

Instantly share code, notes, and snippets.

@oupo
Created November 26, 2017 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oupo/bb2821247ccdd9920a547700925f9fed to your computer and use it in GitHub Desktop.
Save oupo/bb2821247ccdd9920a547700925f9fed to your computer and use it in GitHub Desktop.
// run this in factory-search.html
data = factory_data.slice(1, 1 + 150)
data.sort((x, y) => x.pokemon.stats.reduce((a,b)=>a+b, 0) - y.pokemon.stats.reduce((a,b)=>a+b, 0))
table = data.map(x => {return "<tr><td>" + x.id + "<td>" + x.name + "<td>" + x.item + "<td>" + x.move.join(" ") +
"<td>" + x.pokemon.abilities[0] + "<td>" + (x.pokemon.abilities[0] == x.pokemon.abilities[1] ? "-" : x.pokemon.abilities[1]) +
"<td>" + x.pokemon.stats.reduce((x,y)=>x+y, 0) + "<td>" + get_status(trainer_rank(false, 1), x)[5]}).join("")
document.body.innerHTML = "<h2>rank 1</h2><table>" + table +"</table>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment