ochadenas / cpudefense

A tower defense game for Android based on a microprocessor theme
MIT License
118 stars 10 forks source link

Prevent interacting with chips while paused #92

Closed Cwpute closed 8 months ago

Cwpute commented 8 months ago

It didn't seem like a big issue at first, but i found ways to abuse this very easily, and with wildly different recruit upgrades.

  1. Selling and buying the same chip right away while on pause resets that chip's cooldown. Needless to say this is overly powerful with the MEM chip, which means you only get to pay 12bit for any attacker to instantly disapear once the pause is resumed, then pause again and replace it with a new MEM.
  2. A variation of the above abuse allows the player to safely deal with coins (although at a great cost). Wait for the coin to pass over an upgraded SHR chip, then pause and sell it, buy a SUB chip in its place, unpause-repause to see if the coin got destroyed, if not, sell the SUB chip, buy a SHR instead and upgrade it to the max, unpause-repause, replace it with a SUB… repeat until coin is destroyed.
  3. Exploiting Tramiel's last upgrade allows you to get lots of extra money by infinitely reselling above the buying price (as reported in #71 ), even at the start of a game if you chose to get more initial info through Hollerith.
ochadenas commented 8 months ago

I'd like to retain the ability to sell chips in PAUSED state; I think this has also been reqested by someone. Better address the problems you've mentioned.

  1. Selling and buying again the same chip should not reset the cooldown. I'll have to think of a way to prevent this, even if I'm not quite sure how. The simplest way would be to start an initial cooldown cycle when it is placed, but that may be too hard when a chip is placed the first time. Or have a last cooldown after selling it, so that you can't immediately put a new one in the same slot.

  2. phew ... yes. If you want to, why not ... But that's so tedious, it will turn you from a player into a worker.

  3. Currently, the max refund is 110%. I thought it was fun to have this little extra coin, but if you think this is a problem, then Tramiel can easily be limited to 100%.

I think the most promising solution is to complete the last cooldown phase after selling a chip, and only then permit to place a new one. This should resolve all the three problems.

Cwpute commented 8 months ago

I think the most promising solution is to complete the last cooldown phase after selling a chip

I agree this must be the best solution :)

Le 16 janvier 2024 12:27:00 GMT+01:00, ochadenas @.***> a écrit :

I'd like to retain the ability to sell chips in PAUSED state; I think this has also been reqested by someone. Better address the problems you've mentioned.

  1. Selling and buying again the same chip should not reset the cooldown. I'll have to think of a way to prevent this, even if I'm not quite sure how. The simplest way would be to start an initial cooldown cycle when it is placed, but that may be too hard when a chip is placed the first time. Or have a last cooldown after selling it, so that you can't immediately put a new one in the same slot.

  2. phew ... yes. If you want to, why not ... But that's so tedious, it will turn you from a player into a worker.

  3. Currently, the max refund is 110%. I thought it was fun to have this little extra coin, but if you think this is a problem, then Tramiel can easily be limited to 100%.

I think the most promising solution is to complete the last cooldown phase after selling a chip, and only then permit to place a new one. This should resolve all the three problems.

-- Reply to this email directly or view it on GitHub: https://github.com/ochadenas/cpudefense/issues/92#issuecomment-1893555081 You are receiving this because you authored the thread.

Message ID: @.***>

ochadenas commented 8 months ago

Done as discussed (in 1.28): When selling chips, they first become grey, but complete their cooldown cycle. They can no longer be upgraded. After that time, they disappear completely.

The refund is credited the moment they are sold.

Also fixed a bug that the cooldown was reset when changing between apps.

Cwpute commented 8 months ago

will test that next update!

Le 18 janvier 2024 14:30:21 GMT+01:00, ochadenas @.***> a écrit :

Closed #92 as completed.

-- Reply to this email directly or view it on GitHub: https://github.com/ochadenas/cpudefense/issues/92#event-11525265087 You are receiving this because you authored the thread.

Message ID: @.***>