class CyBotBases expands CyBot
abstract;

#exec AUDIO IMPORT NAME="Cybot_Openning" FILE=SOUNDS\Cybot_Openning.wav GROUP="Cybot"

var() int Health;
var() bool bEMPWeak;

simulated function PostBeginPlay()
{
	PlayAnim('Openning', 0.4, 0.0);
	PlaySound(Sound'Cybot_Openning',,12.0,,2400);
}

singular function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation, vector momentum, name damageType )
{
	if ((instigatedBy.PlayerReplicationInfo.Team == Instigator.PlayerReplicationInfo.Team && instigatedBy!=Instigator) && 
	Level.Game.IsA('TeamGamePlus') && !Level.Game.IsA('MonsterHunt'))
		return;

	if (bEMPWeak && damageType == 'Electrified')
		NDamage = 3 * NDamage;

		Health -= NDamage;

	If (Health <= 0)
	{
		SpawnWreckedPiece(momentum);
		Spawn(Class'UT_SuperRing2',,,, rot(16384,0,0));
		Spawn(Class'CybotWreckExplosion');
	}
}

function SpawnWreckedPiece( vector SpawnDir)
{
	//Handled by the subclasses
}

defaultproperties
{
	bCollideWorld=True
	bBlockActors=True
	bBlockPlayers=True
	bCollideActors=True
	bProjTarget=True
	CollisionHeight=10.000000
	CollisionRadius=6.000000
}
