Closed Riprefro54 closed 1 month ago
Oops didnt know adding 2 stars (*) makes it italic
The troops being reduced to the cap is intended behaviour, this should still not happen though. The attack cost formula requires tweaking (it is to be expected that at least the troops on that tile help defending) like most troop-based formulas. I'll keep this open until the formulas finally make some sense
Using troop density instead of troops for attack cost might work. I found this bug when a 15K bot killed 30K me
Formula adjusted in 137cb3e
Expected Behavior
When attacked, target should lose only
Math.ceil((1 + attackCost) / 2);
amount of troopsActual Behavior
When the target reaches it's maximum troops (which is territory100), for every pixel that attacker conquered target loses 100 more troops because a player cant have more than territory100 troops. Problably because of this:
addTroops(amount: number) { this.troops = Math.min(this.territorySize * 100, this.troops + amount); }
in player.tsSteps to Reproduce
Attack a bot that has reached maximum troops, or wait until you have maximum troops and get attacked
Which browser are you using?
Chrome
If you selected "Other", please specify
No response
Additional Information
Maybe instead of checking in addTroops it can be checked in income (add income if player has less troops than territory*100) I would just try fixing it and make a pull req but im busy lately, sorry.