Giter VIP home page Giter VIP logo

pvpoke's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pvpoke's Issues

Suggestion/Request: Randomize Button For Pokemon Selection

Sometimes you don't have a specific opponent to simulate, sometimes you just want to see how your Pokemon works against a bunch of random opponents. Other times maybe you want to randomize the entire battle just to try to stumble across something unexpected.

It would be nice to see the battle simulator and team builder to have a "Random" button to randomize the species selection, and maybe a "Randomize All" button to randomly select all the Pokemon selection slots currently on screen if you wanted to randomize both pokemon in a battle simulation, or your entire team in the team builder.

Show Pokemon without legacy moves in the ranking

Some players don't have a lot of Pokemon with legacy moves. They might have Pokemon from the top of the ranking with good stats but different non-legacy moves but they don't know how well their Pokemon would perform.

It would be an amazing feature to be able to click a checkbox to display also Pokemon without legacy moves. So for example in Timeless Cup there would be 2 Venusaurs: 1 with Frenzy Plant and 1 with a different charge move. Return and Frustration should also be treated as legacy moves. I have a #3 Dratini but it's not shadow/purified and I'd need to spend 250k stardust on it. So I don't know how well Dragonair without Return performs and if it's worth the cost.

Another idea would be a checkbox to display only Pokemon without legacy moves. So there would be only 1 Venusaur without Frenzy Plant if the checkbox was marked. This idea is inferior but perhaps easier to implement.

Potential threats / alternative sections wrong?

I think the potential threats and potential alternatives sections are showing opposite of that they are meant to?

It seems to be showing me my strong match ups instead of my bad matches?

Am I doing something wrong?
Seems incorrect.
Uploading Screenshot_20200325_125409_com.android.chrome.jpg…
Screenshot_20200325_125357_com android chrome

Addition of a third move leads to worse matchup rankings

I was playing around with the pvpoke site, and created a team with two Togekiss in Ultra league.

First Togekiss: Charm, Ancient Power, none
Second Togekiss: Charm, Ancient Power, Flamethrower

(Trying to see what I actually gained by adding the second move)

Oddly, the only difference was that the matchup versus Registeel went from a Win (for registeel) to a Close Win (for registeel) - when I had the extra flamethrower on the togekiss.

This seems minor, but may indicate a deeper problem - adding a second move should never result in overall worse performance, as you always have the option to simply not use it. Comparing a pokemon with two moves to a pokemon with the same two moves and one additional move, should only ever show gains.

Feature: Winning Teams section

I was thinking of doing a winning teams section but I'm currently a bit too tight on time. So if anyone wants to start implementing it I would be happy to help out later (probably next year). Just wanted to leave this idea here.

Idea: Create a Tab that shows the highest ranking team in the each of the highly competitive regions. I think it would be interesting to see what others used and maybe check out their element of surprise or pokemon team strategies. I'm not sure if this data would have to be provided by the winning players or if we can get it through silphroad tbh.

I was thinking something like this: https://www.mtgtop8.com/event?e=23793&f=ST

Missing Pokemon for Timeless Cup rankings

Many, many Pokemon are missing from the Timeless Cup Rankings, such as Caterpie, Kakuna, Weedle, Kakuna, Ekans, Pikachu... I noticed because my own starter as a kid was a Pikachu from Pokemon Yellow. I've looked through the src/data/gamemaster.json file and src/data/rankingoverrides.json, but I haven't found the code where these Pokemon are filtered out. Where does this occur? Is this the intended behavior?

Feature Request: Dockerfile

I want to run some automated queries vs pvpoke, but don't want to hit the public server. I'll fork and give it a stab, but probably not for several days.

Custom level and IV's should be set again after switching leagues

Someone on Twitter reported that customizing level and IV's doesn't seem to produce the right results.

I believe the source of the problem is that Pokemon IV's reset after switching leagues, causing a mismatch between the Pokemon's actual IV's and the ones entered into the fields.

A few solutions:

  1. Clear the level and IV fields after switching leagues
  2. Set Pokemon level and IV's using the supplied fields after switching leagues

I think number 2 is the better option since it'll preserve the user-entered values.

AI opponents charging way past 100 energy and losing battles they should win

A few of my pvpoke training battles the past couple days have involved AI opponents charging way past 100 energy and losing battles they should win. I noticed it a bunch of times in great league training last night when using a Vigoroth against the AI's Azumarill where the Azumarill would use 12-16 Bubbles before using a charge move, thus losing 32-66 of energy after capping at 100 with the result being that my Vigoroth would win the battle even though it should lose. I noticed it again just now in master league training when my Dialga battled against the AI's Mewtwo, and the Mewtwo used 15 Pyscho Cuts before throwing a charge move, thus losing 35 energy after capping at 100, not being able to get to a second charge move, and losing to my Dialga in the 1x1 shield even though it should win that battle. In general the past couple of days it seems like AI opponents have been charging much longer before throwing charge moves, but these are extreme examples where it is changing the outcome. (Love the site by the way, been using it for quite a while, and it is enormously helpful.)

Shouldn't Muk be using Dark Pulse after four Snarls, not 5?

In this battle, Muk builds up enough energy (50) to use Dark Pulse after 4 Snarls (4 * 13 = 52), yet it doesn't use Dark Pulse until it has launched a fifth Snarl and it lands:

(Edit: this is the battle I meant to link to:)
https://pvpoke.com/battle/2500/swampert/muk_alolan/01/0-2-0/2-2-0/

This video seems to show Muk throwing Dark Pulse after the expected 4 Snarls:

https://youtu.be/x57E47uEN4Q?t=75

Also, in the video neither Pokemon uses any fast moves between Swampert landing the Hydro Cannon and Muk throwing the Dark Pulse, yet your battle shows each Pokemon landing two fast moves in this time.

Is something not simulating correctly, or am I misinterpreting things?

Residual energy bar incorrectly wasted

It looks like after a charge move is used the energy is "reset" to zero.

Instead, the residual energy due to non-integer number of fast moves needed to charge a charge move should be saved and added to the energy accumulated for the next charge move.

Example: in http://pvpoke.com/battle/1500/skarmory/marshtomp/12/031/031/ Marshtomp should have the 2nd Surf charged after 9 Mud Shots (9 x 9 = 81 > 80) but instead it waits until after the 10th Mud Shot.

Possible fix: in Battle.js, at line 402, instead of

attacker.energy = 0;

you should put

attacker.energy -= move.energy;

XSS vulnerabilities

Hi there!

There are multiple cross-site-scripting issues in your code that attackers can use to attack your users. You state you like to keep it simple and not introduce fancy frameworks but you also removed the seatbelts to stay with your readme language. I did not do a thorough analysis, only tried some basic old payloads.

Would you like me to disclose the vulnerabilities here or chat about it somewhere else? I also could help mitigating them if you accept contributions in that regard.

Feature: Add status effects on charged moves

Since the changes in the new moves and the addition of a LOT of status effects, it would be great to add them into the moves section for extra information.

I'll take a look at the codebase and see what I can do to contribute to this.

chargedMoveUsed in Battle.js is not declared

In Battle.js, a variable called chargedMoveUsed is set to true or false many times throughout the code, however it's not declared anywhere, so every time it's set it is actually setting a global variable on the window. I'd submit a pull request but because the behaviour is fairly complex and I'm just getting my head around the code base, I don't know where in the scope it should be declared - however it's very likely leading to some unexpected behaviour!

Community Day moves are unlisted for Shadow forms

Hey there is no real way anyone could have known until a few hours ago; but it is possible to get CD moves on Shadow Pokemon as a result of this latest event.
As long as you TMed away Frustration, you can evolve them later without having Frustration reassigned; this means you can get legacy move-sets on them later.

PvPoke bad rankings

I love the website and is the tool I use the most for researching pvp. That being said, it has one major flaw on its ranking system

It ranks pokemons based on all their moves in their moveset when they can only have 1 quick move and 2 charged

A system like that puts Drapion as the 2nd best overall pokemon when is "best" fast attack is only used 59%, while azumarill is 4th and should arguably be the 1st since in all its matchups he uses the same fast move

In my opinion it would be best if pvpoke ranked the pokemon based on their moveset ( 1 fast and 2 charged ) than ALL of their moves

thank you for your time reading this

Question: Shield usage

Simming Kyogre vs TTar in Master League, I give them both 2 shields:

https://pvpoke.com/battle/10000/kyogre/tyranitar/22/023/012/

But the results only have 1 shield being used each (Kyogre has no shield on the first Crunch, and TTar doesn't shield the 2nd Thunder). I read the blurb about shield usage, and according to "Pokemon will always shield themselves if possible", I couldn't see a reason that the 2nd shield isn't used here. Is this a bug? Or am I missing something?

HP Grass dealing SE damage to Qwilfish

Observed in Qwilfish v Togekiss in Twilight League cup - HP Grass deals 12 damage like the SE types of Electric/Psychic/Ground, rather than the 8 damage done by other neutral types. (Grass is SE vs Water and NVE vs Poison, so Poison's grass resistance in general might be missing.)

Feature Request - Opponent 'Flashcard'

The pvpoke algorithms and the site are fantastic. Kudos to Empoleon_Dynamite and the team!

The one feature that I would find most useful is a simple reference 'flashcard' how my team of 3 pokemon compare to any particular singular opponent pokemon. I set my custom 3 pokemon team, and then just would be able to search for any pokemon, and it returns a 'flashcard' screen with the critical information. It would have the typing, and rows for each of my pokemon and each of their attacks - displaying if NVE, neutral or SE (similar to the last table on Team Builder / Rate Team) or even better the actual damage per attack, the battle rating of each of the three in 0,1,2 shield scenarios, and for each of the opponent pokemon attacks, how much damage it would be doing to each of my pokemon.

This would be fantastic for studying and strategizing how I will play various pokemon. I need to know not only which pokemon on my team of 3 'should win', but which attacks to use and which to watch out for. I'd like to study the top meta pokemon and how my team would function, and if I should consider alternates.

Presuming it is a fast function, one could potentially use it in real time. "Wait - is that an Uxie!?" type it in, and in <3 sec. you have a great 'flashcard' highlighting your best matchups & attacks.

I think you have all the functionality, it's just preparing another view.

Thanks!

Bug with Simmed Pokemon not using Charge Moves

I was swimming the Escavalier vs Steelix matchup. If you set Escavalier to max overall stat product and leave Steelix with default IVs the Steelix will not use a 2nd Crunch. This is despite it being available when viewed in the sandbox mode. The same issue occurs in the Shadow Snorlax matchup vs Escavalier. This time I was swimming the max overall stat product, a 2-11-12, a 7-11-13, and a 5-15-5. And only the 5-15-5 had the Shadow Snorlax use the Body Slam. It could be related to the Pokemon being about to feint? Seems to happen when the Pokemon will feint within a few turns of charge move being available

Styling issue with Ranking sub-menu

Currently the ranking icon overlaps with the "Custom Rankings" text in the Ranking sub-menu. I was looking into resolving this and wanted to ask about the size of the icon while I am in that area of the code. It seems that the size of the icon is determined by the height of the sub-menu option and with "Custom Rankings" being the only sub-menu text that wraps to 2 lines, the icon for that sub-menu option is twice the size of the other sub-menu options.
image

I think there are a few solutions for this, with the one I'm leaning toward being to make the icon the same size as if it were a single line menu option and centering it vertically. Is this implementation something that fits the styling of the project, or would a different approach be preferred?

how to map moveStr from data files ?

Hi,

I'm using your data files to make a tool for my needs while preparing a new meta. The things is I can't map the moveStr with the right moves.

It seems it's not the move index into the fastMove or ChargedMoves array, then I can't find the right way to parse this moveStr to obtain the best pool moves for each species the way you did on pvpoke.

Even reading your code couldn't help me.

Is it possible to have more information or documentation about the moveStr or the best moves to select ?

Feature Request: Search by move

Not extremely useful for the Silph cups, but quite useful for custom draft leagues where you want to find, for example, the best razor leafer left in the draft.

Javascript isn't my strong point, but could probably contribute a pull request.

Feature Request for Team Builder - Custom Scorecard.

Your current team builder has this "Meta Scorecard" which sadly does NOT reflect the meta AT ALL. it has some good inclusions, but lacks a lot of meta relevant pokemon as the metagame changes all the time (due to youtuber influencers and counter teams and counter-counter teams and counter-counter-counter teams). What about allowing us to actually customize the pokemon we want to rank our team against?

I mean like... I have NEVER seen in my Ultra league battles:
Giratina (Origin)
Mew
Machamp
Regirock
Mewtwo (Armored)
Lucario
Regice
Gliscor
Blaziken
Heracross
Dragonite
Lugia
Meganium
Zapdos

It's like 14 out of 20 are USELESS for comparison there right now.

And it is missing from the current meta:
Muk (Alolan)
Togekiss
Blastoise
Snorlax
Lickilicky
and many others.

Proposal: node module

Would you be interested in working together to extract the core logic into a node module?

I've done a simple proof of concept/prototype that just does some of the stuff that was easy to port over:

https://github.com/nrkn/pvpoke-node

I started it because I wanted to use bits and pieces of the code from the command line to help me with my own team building etc, just ad hoc little things that wouldn't be worth adding to pvpoke in general, but I couldn't run it outside the browser as is

If you're interested, I'd be happy to move the repo over to this organization and just work as a contributor

Be forewarned, it's quite different in style to your code, the readme has justifications/excuses for why that is - I'm happy to discuss adapting it to something that would suit you better if need be

My email is in my profile if you'd rather discuss this that way

[translation]i18n for pvpoke.com

I'm using pvpoke.com, but I don't know English Pokémon names so much, it prevents me searching pokémon name at the site.
If only I used Japanese Pokémon name, I don't have to google name each time.

Pokemon with deselected charged moves still use charged moves in the simulation

This issue was reported on Discord. It appears that if both charged moves are set to "none", a Pokemon will still use Charged Moves in the simulation. I've tested this in a number of cases and can't seem to reproduce the error, so any help would be appreciated!

A separate but related issue is that links to battles where Pokemon have no charged moves don't work correctly, and give that Pokemon a charged move. My hunch is this is just an issue with how the page processes the URL parameters, so I'll be taking a look at that.

Stat decreasing move not used when appropiate

In the matchup Tentacruel vs Bastiodon, the simulation says Tentacruel wins with 1v1 shields, but loses with 1v0 shields.
In the 1v1 situation, due to shield baiting being enabled, Tentacruel will use Acid Spray first, which lowers Bastiodons defense, and lands a kill with Hydro pump.
In the 1v0 situation, Tentacruel will use Hydro Pump first due to being the better move overall, and only use Acid spray before fainting.

Not even sure if this qualifies as a bug since Tentacruel wins thanks to the side-effect defense lowering of shield baiting, not due to tactical defense lowering. Still, it feels quite unintuitive that a 1v1 matchup can be better than a 1v0 matchup.

https://pvpoke.com/battle/1500/tentacruel/bastiodon/10/1-3-1/1-3-1/

Make top Overall Stats accesible

Inside the advanced battle simulation settings you can choose any IV's and Level and it gives you an Overall score for the stats. Could it be possible that the simulator gives you the best combination of IV's under 1500 with the highest Overall score ? Instead of having to check every combination manually.

Thanks

Unova stats

How to you populate your version of gamemaster.json? Can we generate stats until they hit the real game master?

Incorrect data for darumaka

Pokemon.js?v=1.12.34.0:737 Uncaught TypeError: Cannot read property 'moveId' of undefined
at Pokemon.selectRecommendedMoveset (Pokemon.js?v=1.12.34.0:737)
at rankerObject.rank (TeamRanker.js?v=1.12.34.0:116)
at interfaceObject.generateMultiBattleResults (Interface.js?v=1.12.34.0:824)
at Interface.js?v=1.12.34.0:1647
Screenshot_39
Screenshot_38

Feature Request: Add Non-Legendary filter

Lots of communities prohibits Legendaries and Mythicals to make the tournaments more accessible to everyone.

So I think it's great to filter Legendaries and/or Mythicals.

Example:

  • All Pokemon
  • All but Legendary
  • All but Mythical
  • All but Legendary and Mythical
  • Boulder Cup
  • Twilight Cup
  • Tempest Cup

String Builder

PvPoke in Battle mode may adjust IVs and level to obtain maximum rating pkmn.
I use combination PvPoke ratings+Pokemongohub string builder in Community Days for search best-rated pvp-oriented pokemon.
It'll be very useful if we could copy something like on the attached picture
pvpokestrbuild

NodeJS library for pvp js functions?

I want to use this swesome libraries on my server, but there are some codes that depend on the site.
If you like to support npm package, I feel good to use and contribute your project, thanks!:smile:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.