Skip to content

Conversation

@wesleyjnewcomb
Copy link

I tested locally, and this should resolve #41

The Auto Buy was trying to buy 0 copies of a card when the framerate was very fast and autobuyCount was zero. When calculating the card cost, it was passing 0 as the amount bought. This would end up returning the base cost for the card. So the cost was subtracted, and the amount bought -- zero -- was added to the levels.

I moved the break from the for loop to the start. If we have no autobuy count, we shouldn't attempt to buy anything.
I also moved the console.log to after canBought (now levelsToBuy because I think that name is clearer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-Buyer consumes faction currency without actually purchasing upgrades

1 participant