smogon / damage-calc

Pokemon games damage calculator
https://calc.pokemonshowdown.com
MIT License
387 stars 365 forks source link

Feature Request: HTTP GET Params #586

Open EspoTek opened 11 months ago

EspoTek commented 11 months ago

It would be really handy if the HTML endpoints supported HTTP GET params in the URL.

This would allow people to share specific calc results, or link to specific calc pages programatically.

For example, running /calc on a Showdown battle where you have a Scyther at +2 atk and the opponent has a Klawf at 88% HP could trivially generate a link to (for example) https://calc.pokemonshowdown.com/randoms.html?attacker_pokemon=scyther&defender_pokemon=klawf&attacker_atk=%2B2&defender_hp_percent=88, rather than just https://calc.pokemonshowdown.com/randoms.html

AustinXII commented 3 months ago

587