LagoLunatic / DSVEdit

Multi-purpose editor for ROM hacking DS and GBA Castlevania games
MIT License
90 stars 13 forks source link

Item drop formula for Portrait of Ruin? #75

Closed SilentHeII closed 1 year ago

SilentHeII commented 1 year ago

I noticed that Portrait of Ruin didn't have documentation on the item drop formula.

Would a similar formula to the wiki be the key? I noticed this formula generates values within 0.01% of error from those displayed by the Gambler's Glasses.

(Base Chance)×(52+LCK)/(52×256)

e.g. image Frilly Camisole has a base chance of 8 while Pudding Bucket has base chance of 4.

When I follow the formula above I get 8.59% and 4.29% respectively. I'm trying to work out if either the error is due to rounding or if there is any other change that can be made to the formula.

LagoLunatic commented 1 year ago

I just looked through the code, and it seems the formula is this: drop% = (base_chance (100 + (LCK 1.92))) / divisor Where:

It also caps at 50% drop chance.