smogon / pokemon-showdown

Pokémon battle simulator.
https://pokemonshowdown.com
MIT License
4.77k stars 2.79k forks source link

Tailwinds turn counter duration is not based on tailwinds actual duration #6995

Closed EvGym closed 4 years ago

EvGym commented 4 years ago

Go to data -> moves -> tailwind: -> duration and change it to any number other than 4 without the ability triggering to extending it. The counter still starts at 4 and counts down normally.

EDIT: This probably applies to any and all duration counters.

Zarel commented 4 years ago

This is straight-up not a bug. PS has a lot of hardcoded stuff and while we have plans to make it easier to customize, I don't want open issues about all the specific hardcoded things. Please don't file this kind of issue in the future.

EvGym commented 4 years ago

I guess we have different definitions of bugs then. I can understand this not being a priority due to it not showing up in normal play, but it is still a bug as the display does not reflect the actual reality in the code. This hardcoding strategy will only make future additions and maintenance more difficult.

Zarel commented 4 years ago

Hardcoding is often the easiest way to implement complex mechanics. You're right that it can make future maintenance difficult, but everything is a trade-off, and I don't want issue tickets for every small trade-off made by the simulator.

By all means, if you have a better implementation, please do submit a pull request for it! I just believe it to be the wrong use for issue tickets, which I think should be for things that meet a certain threshold of broad interest.

Zarel commented 4 years ago

Supporting customized data in the client in general is tracked in #2557

Zarel commented 4 years ago

The thing that makes this hard, by the way, is that duration is calculated in the code. For instance, there's no variable we can read for "Rain Dance will be 5 turns if you're not holding Damp Rock and 8 if you are". You'd have to either duplicate the code (hardcoding) or massively revise how the data is represented.

EvGym commented 4 years ago

Thank you.

That sounds like a major job for the, hopefully near, future. The more I look into the code, the more stuff I see the client handling stuff that I would have assumed to be the server's job. Like the upkeep and ticking of statuses/weather. I can understand having them calculate it separately to reduce traffic, but fully taking it out of the server's hands just seems weird to me.

I just worry one of these days Nintendo is going to drop some ability or move more bizarre than illusion that showdown won't be able to support due to the constant hardcoding.

Zarel commented 4 years ago

It's nothing about reducing traffic. It's about Pokémon being a game of imperfect information. You don't know whether or not your opponent is using Damp Rock when they use Rain Dance, so it would be cheating if the server told you. So the client needs to independently calculate it.

EvGym commented 4 years ago

I didn't even think about the fact that people could use that to hack their client and pull the real duration. Fair enough on that, Would be nice if the text at least stayed up until it got the tailwind ended signal, there is a message that pops up in the chat so one is sent, though it is probably not in a super useable format.