Created
November 26, 2017 23:59
-
-
Save oupo/bb2821247ccdd9920a547700925f9fed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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