kanethemediocre / BlingHustle

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

Store ripoff glitch #14

Closed kanethemediocre closed 3 years ago

kanethemediocre commented 3 years ago

Stores sometimes will take money for some sort of purchase in the buy menu, but not give the upgrade or blaster. In two cases with blasters, I cheated for money and bought it a bunch of times. After maybe the 10th iteration the purchase would work.

kanethemediocre commented 3 years ago

Removed redundant checks in ".buy" function of "shopitem" class--now buy function ONLY checks if player has sufficient money. Other relevant checks are handled ONLY by the ".available" member function, which also greys out non-available items. Not tested enough to conclude as a solution, also only really applies to blasters and blaster upgrades.

kanethemediocre commented 3 years ago

AFTER above changes, I observed the glitch again, upgrading Flakker damage -- Buy sound would occur, money would be deducted, but the upgrade price would not update and the flakker stats didn't change either, about 1/2 of the times that I tried (I cheated money, and repeated the purchase until I maxed out the upgrade at level 10).

kanethemediocre commented 3 years ago

More redundant checks removed from the buy function. Another maybe fix?

Possible mechanism is if playermoney was deducted, but then redundantly checked post reduction in the buy function.

kanethemediocre commented 3 years ago

After making changes to the buy functionality (as described in previous comment), no trader ripoffs have been seen in a few days of testing, so I'm closing the issue for now.