Max chance not calculated correctly when accounting for dual slot
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1.2k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 21
Description
In Generation IV, diamond pearl and platinum, you can boost the encounter rate of certain Pokemon by using the dual slot method: https://bulbapedia.bulbagarden.net/wiki/Dual-slot_mode
Obviously, one cannot have multiple pokemon in the dual slot. However, the entry for Diglett lists its max_chance as if dual slots are mutually compatible. Its true best odds is 5% - 4% for anything other than LeafGreen, and 1% when not using the PokeRadar. It is listed as 21%.
My current project uses this API to calculate which games are required for which Pokemon. If this feature were not added, then I would have to manually calculate max_chance, including a dictionary of exclusive conditions and adding the one with the best %.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Diglett encounter endpoint at /api/v2/pokemon/50/encounters and trace how encounter conditions are combined into max_chance. Review the Dual-slot mode rules and compare the generated value with the stated 5%, 4%, and 1% cases. Done means mutually exclusive conditions no longer produce an inflated maximum.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100