Add missing parenthesis in the Petra diplomacyManager. Else the requested tribute amount would always be wrong.

Reviewed by: @bb
Differential Revision: https://code.wildfiregames.com/D1826
This was SVN commit r22192.
This commit is contained in:
Stan 2019-04-16 16:39:17 +00:00
parent 2c8efc9751
commit b127cba874

View File

@ -404,7 +404,7 @@ m.DiplomacyManager.prototype.handleDiplomacyRequest = function(gameState, player
{
response = "acceptWithTribute";
requiredTribute = gameState.ai.HQ.pickMostNeededResources(gameState)[0];
requiredTribute.wanted = Math.max(1000, gameState.getOwnUnits().length * requestType === "ally" ? 10 : 5);
requiredTribute.wanted = Math.max(1000, gameState.getOwnUnits().length * (requestType === "ally" ? 10 : 5));
this.receivedDiplomacyRequests.set(player, {
"status": "waitingForTribute",
"wanted": requiredTribute.wanted,