mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-14 10:12:59 +02:00
Fixed AI constantly visiting towns thinking they can get a huge upgrade
Due to morale-considerations the AI sometimes calculated that their strongest army after doing an exchange had slightly lower total value than the army they used before. But by using unsigned "slightly lower" became near infinite. So they constantly wanted to upgrade their army because they considered it more useful than anything else. Changing the unsigned into signed fixes this.
This commit is contained in:
parent
d4308c2ce4
commit
94e5b5519c
@ -32,7 +32,7 @@ struct SlotInfo
|
||||
struct ArmyUpgradeInfo
|
||||
{
|
||||
std::vector<SlotInfo> resultingArmy;
|
||||
uint64_t upgradeValue = 0;
|
||||
int64_t upgradeValue = 0;
|
||||
TResources upgradeCost;
|
||||
|
||||
void addArmyToBuy(std::vector<SlotInfo> army);
|
||||
|
Loading…
Reference in New Issue
Block a user