This was SVN commit r17995.
This commit is contained in:
sanderd17 2016-04-07 08:23:06 +00:00
parent ffe2c7bbb4
commit f7099d364c

View File

@ -519,40 +519,40 @@ Player.prototype.SetAlly = function(id)
* Check if given player is our ally
*/
Player.prototype.IsAlly = function(id)
{
return this.diplomacy[id] > 0;
};
/**
* Check if given player is our ally excluding ourself
*/
Player.prototype.IsStrictAlly = function(id)
{
return (this.playerID != id) && this.IsAlly(id);
};
/**
* Check if given player is our ally, and we are its ally
*/
Player.prototype.IsMutualAlly = function(id)
{
var cmpPlayer = QueryPlayerIDInterface(id);
return this.IsAlly(id) && cmpPlayer && cmpPlayer.IsAlly(this.playerID);
};
/**
* Check if given player is our ally, and we are its ally, exclding ourself
*/
Player.prototype.IsStrictMutualAlly = function(id)
{
return (this.playerID != id) && this.IsMutualAlly(id);
};
Player.prototype.SetEnemy = function(id)
{
this.SetDiplomacyIndex(id, -1);
};
{
return this.diplomacy[id] > 0;
};
/**
* Check if given player is our ally excluding ourself
*/
Player.prototype.IsStrictAlly = function(id)
{
return (this.playerID != id) && this.IsAlly(id);
};
/**
* Check if given player is our ally, and we are its ally
*/
Player.prototype.IsMutualAlly = function(id)
{
var cmpPlayer = QueryPlayerIDInterface(id);
return this.IsAlly(id) && cmpPlayer && cmpPlayer.IsAlly(this.playerID);
};
/**
* Check if given player is our ally, and we are its ally, excluding ourself
*/
Player.prototype.IsStrictMutualAlly = function(id)
{
return (this.playerID != id) && this.IsMutualAlly(id);
};
Player.prototype.SetEnemy = function(id)
{
this.SetDiplomacyIndex(id, -1);
};
/**
* Get all enemies of a given player.
*/