//=============================================================================
// UnrealGameInfo.
//
// default game info is normal single player
//
//=============================================================================
class UnrealGameInfo expands GameInfo
	abstract
	config;

#exec AUDIO IMPORT FILE="Sounds\Generic\land1.WAV" NAME="Land1" GROUP="Generic"
#exec AUDIO IMPORT FILE="Sounds\Generic\lsplash.WAV" NAME="LSplash" GROUP="Generic"
#exec AUDIO IMPORT FILE="Sounds\Generic\dsplash.WAV" NAME="DSplash" GROUP="Generic"
#exec AUDIO IMPORT FILE="Sounds\Generic\wtrexit1.WAV" NAME="WtrExit1" GROUP="Generic"

#exec AUDIO IMPORT FILE="Sounds\pickups\genwep1.WAV" NAME="WeaponPickup" GROUP="Pickups"

var(DeathMessage) string[32]   DeathMessage[32];    // Player name, or blank if none.

function int ReduceDamage(int Damage, name DamageType, pawn injured, pawn instigatedBy)
{
	if (injured.Region.Zone.bNeutralZone)
		return 0;

	if ( instigatedBy == None)
		return Damage;
	//skill level modification
	if ( instigatedBy.bIsPlayer )
	{
		if ( (injured == instigatedby) && (instigatedby.skill == 0) )
			Damage = 0.5 * Damage;
		else if ( !injured.bIsPlayer )
			Damage = float(Damage) * (1.0 - 0.05 * injured.skill);
	}
	else if ( injured.bIsPlayer )
		Damage = Damage * (0.4 + 0.2 * instigatedBy.skill);
	return (Damage * instigatedBy.DamageScaling);
}

function PlaySpawnEffect(vector Loc)
{
	spawn( class 'ReSpawn',,, Loc );
}

function bool ShouldRespawn(Actor Other)
{
	return false;
}

function string[64] PlayerKillMessage(name damageType, pawn Other)
{
	local string[64] message;
	local float decision;
	
	decision = FRand();

	if ( (Other.Health < - 25) && (decision < 0.3) )
	{
		decision = FRand();
		if ( decision < 0.35 )
			message = "ripped a new one";
		else if ( decision < 0.7 )
			message = "messed up real bad";
		else 
			message = "given a new definition of pain";
	}	
	else
	{
		if ( DamageType == 'Decapitated' )
		{
			if ( FRand() < 0.4 )
				return(" lost his head while fighting ");
			message = "decapitated";
		}
		else
			message = DeathMessage[Rand(32)];
		if ( message ~= "" )
			message = "killed";

		decision = Other.Health * FRand();
		if ( decision < -8 )
			message = "thoroughly "$message;
		else if ( decision < -15 )
			message = "completely "$message;
		else if ( decision < -22 )
			message = "absolutely "$message;
		else if ( decision < -30 )
			message = "totally "$message;
		else if ( decision < -35 )
			message = "utterly "$message;
	}	
	
	return ( " was "$message$" by " );
} 	

