Script changes for diplomatic stances.

This was SVN commit r4258.
This commit is contained in:
Matei
2006-08-28 03:07:07 +00:00
parent ad5054205c
commit 1b4f2763d9
@@ -718,7 +718,7 @@ function performGather( evt )
function performHeal( evt )
{
if ( evt.target.player != this.player )
if ( this.player.getDiplomaticStance(evt.target.player) == DIPOLMACY_ENEMY )
{
console.write( "You have a traitor!" );
return;
@@ -1116,7 +1116,7 @@ function entityEventTargetChanged( evt )
if( evt.target && this.actions )
{
if( this.actions.attack &&
evt.target.player != this.player &&
this.player.getDiplomaticStance(evt.target.player) != DIPLOMACY_ALLIED &&
evt.target.traits.health &&
evt.target.traits.health.max != 0 )
{