Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The weight of an item like ETHER seems incorrect #900

Closed
huanlingzx opened this issue May 15, 2024 · 0 comments
Closed

The weight of an item like ETHER seems incorrect #900

huanlingzx opened this issue May 15, 2024 · 0 comments
Labels
Bug Something isn't working Item Affects an item

Comments

@huanlingzx
Copy link

In the code src/modifier/modifier-type line 985:

new WeightedModifierType(modifierTypes.ETHER, (party: Pokemon[]) => {
  const thresholdPartyMemberCount = Math.min(party.filter(p => p.hp && p.getMoveset().filter(m => (m.getMovePp() - m.ppUsed) <= 5).length).length, 3);
  return thresholdPartyMemberCount * 3;
}, 9),

The value obtained from m.getMove().pp is the default max PP value of each move, without considering PP ups. It may be necessary to change it to m.getMovePp() for correctness.

Additionally, MAX_ETHER, ELIXIR, and MAX_ELIXIR are also handled in this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Item Affects an item
Projects
None yet
Development

No branches or pull requests

3 participants