Comments (5)
That's not correct, this isn't a bug, this is 100% intentional.
from damage-calc.
Why is this impossible? A level 1 Ralts has very low HP, so for a powerful attack to do between 2,600 and 5,600 times its HP is not that unreasonable?
from damage-calc.
The impossible part is the extremely low damage rolls. Stuff like the 5500 BP Last Respects doing 64 damage, or even the 5050 BP one doing 3876. Those numbers are absurdly low for the moves being used.
from damage-calc.
That’s because of damage overflow.
from damage-calc.
Expanding on what KrisXV said about damage overflow. The calculator has several references to OF32 which is defined in the util
file as export function OF32(n: number) { return n > 4294967295 ? n % 4294967296 : n; }
This function takes a number n
and checks if it's over the unsigned 32 bit integer limit. If it is more than the limit it divides that by the integer limit and returns the remainder as the new value of n
. So if we were counting at the top end it would go 4294967295, 4294967296, 1, 2, 3..
The surprisingly low values you noticed are one of the areas where the remainder of the division ends up on the smaller end. Though I'm sure that means that several values are over the integer limit even if it isn't as obvious as the 64 result. This limitation is not so much a limitation of the damage calculator but a limitation of how numbers are handled by TypeScript. There is likely a solution to this problem but it would involve a far more extensive rewrite of the overall calculator only to accommodate amusing theory crafting of absurd conditions.
In short, your number got too big. The calculator lied to you to save your computer getting upset with you. Unless this applies in a scenario remotely achievable in game then it isn't likely to be worth the time it would take to fix. Maybe they could consider adding an error message to let you know that you have caused an integer overflow and it had to round the number down? If people are really bothered by it.
from damage-calc.
Related Issues (20)
- Stored Power base power calculation HOT 1
- Update npm package to support Gen 9 HOT 7
- Randbats calculator not loading data
- RBY 0 damage bug
- Incorrect handling of Pokemon names containing é HOT 1
- Big Root not working in Generation 9 / SV
- Random Battle Button wrapping around to new row HOT 1
- Zoroark and Zoroark-Hisui automatically fill their level as being Level 0 for all legal generations HOT 2
- Add tera raids specific functionalities/battle format
- Fix Kleavor's base stats
- Add Palafin's sets to Palafin-Hero
- Example in README doesn't work with gen 9 HOT 2
- In Gen 4, the combination Klutz + Iron Ball is not properly handled HOT 5
- Calculator does not properly consider Protosynthesis / Quark Drive Def/SpD boosts
- Feat: Calculate damage for Pain Split HOT 3
- Set from previous generation appears in the list HOT 2
- Feature Request: HTTP GET Params HOT 1
- Brendan SS Anne Pokemon missing HOT 3
- Miracle Seed is removed when there is any active Terrain
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from damage-calc.