kanethemediocre / BlingHustle

Open sauce 2d space adventure
GNU General Public License v3.0
0 stars 0 forks source link

Upgrade increased cost too much #24

Closed kanethemediocre closed 3 years ago

kanethemediocre commented 3 years ago

Bought damage upgrade for 300, next damage upgrade listed at 1200 (should be 600).

kanethemediocre commented 3 years ago

Problem was caused by pre-emptively giving w1 the bounce upgrade (Blaster.etier = 1), which was done to troubleshoot the bounce upgrade not working. The cost wasn't recalculated from the base cost until a purchase was made, so the initial price was still the base cost, but when an upgrade was purchased and the level was recalculated ( Blaster.levelcalc() ), both the purchased upgrade and the initialized upgrade were counted towards the blaster level and price. Problem solved by commenting out the line where I pre-emptively gave w1 the bounce upgrade since I'm not currently working on that bug in ubv137