pagefaultgames / pokerogue

A browser based Pokémon fangame heavily inspired by the roguelite genre.
https://pokerogue.net
GNU Affero General Public License v3.0
3.92k stars 1.57k forks source link

[BUG] Money cap at Number.MAX_SAFE_INTEGER means everything eventually costs the maximum money you can hold #1714

Open Mattadore opened 1 month ago

Mattadore commented 1 month ago

Describe the bug Money and cost are currently capped at Number.MAX_SAFE_INTEGER but in endless that is very reachable, and at some point it's not possible to gain more money and everything just costs the max amount of money it is possible to hold.

To Reproduce Reach 5000s in endless

Expected behavior Uncapped money and cost

Screenshots / Videos image

Device Browser

Additional context It seems like you'd need to replace money and cost variables with Javascript BigInt or string to allow uncapped integer size.

YounesM commented 1 month ago

Since every cost is relative to the floor your at anyway would'nt be be easier to have a smaller cap (1M for example) and fixed item costs at some point? I don't see the point of having big money numbers when you have to pay x% of it to get an item anyway.

Mattadore commented 1 month ago

Big numbers make dopamine go brrr

I mean, if they want to rework the entire pricing system to avoid reaching the double precision floating point integer cap that's fine but this seems more straightforward. Either way, it's currently broken