//=============================================================================
// ChallengeBotInfo.
//=============================================================================
class ChallengeBotInfo expands BotInfo
	config;

var config class<VoicePack> VoiceType[32];

function PostBeginPlay()
{
	local string[32] NextBotClass;

	Super.PostBeginPlay();

	// FIXME TEMP HACK
	NumClasses = 6;
	AvailableClasses[0]="BotPack.MalThreeBot";
	AvailableClasses[1]="BotPack.MalTwoBot";
	AvailableClasses[2]="BotPack.FemOneBot";
	AvailableClasses[3]="BotPack.MalOneBot";
	AvailableClasses[4]="BotPack.FemTwoBot";
	AvailableClasses[5]="BotPack.SkaarjBot";
}

function CHIndividualize(bot NewBot, int n, int NumBots)
{
	local texture NewSkin;

	// Set bot's skin
	if ( (n >= 0) && (n < 32) && (BotSkins[n] != "") && (BotSkins[n] != "None") )
	{
		NewSkin = texture(DynamicLoadObject(BotSkins[n], class'Texture'));
		if ( NewSkin != None )
			NewBot.Skin = NewSkin;
	}

	// Set bot's name.
	if ( (BotNames[n] == "") || (ConfigUsed[n] == 1) )
		BotNames[n] = "Bot";

	Level.Game.ChangeName( NewBot, BotNames[n], false );
	if ( BotNames[n] != NewBot.PlayerReplicationInfo.PlayerName )
		Level.Game.ChangeName( NewBot, ("Bot"$NumBots), false);

	ConfigUsed[n] = 1;

	// adjust bot skill
	NewBot.Skill = FClamp(NewBot.Skill + BotSkills[n], 0, 3);
	NewBot.ReSetSkill();

	NewBot.FavoriteWeapon = FavoriteWeapon[n];
	NewBot.Accuracy = BotAccuracy[n];
	NewBot.CombatStyle = NewBot.Default.CombatStyle + 0.7 * CombatStyle[n];
	NewBot.Aggressiveness = 0.5 * (NewBot.Default.Aggressiveness + NewBot.CombatStyle);
	NewBot.CampingRate = Camping[n];
	if ( VoiceType[n] != None )
		NewBot.PlayerReplicationInfo.VoiceType = VoiceType[n];
}

function class<bot> CHGetBotClass(int n)
{
	return class<bot>( DynamicLoadObject(GetBotClassName(n), class'Class') );
}

defaultproperties
{
	BotClasses(0)="BotPack.MalThreeBot"
	BotClasses(1)="BotPack.MalTwoBot"
	BotClasses(2)="BotPack.FemOneBot"
	BotClasses(3)="BotPack.MalOneBot"
	BotClasses(4)="BotPack.FemTwoBot"
	BotClasses(5)="BotPack.MalThreeBot"
	BotClasses(6)="BotPack.SkaarjBot"
	BotClasses(7)="BotPack.FemOneBot"
	BotClasses(8)="BotPack.MalThreeBot"
	BotClasses(9)="BotPack.MalTwoBot"
	BotClasses(10)="BotPack.FemTwoBot"
	BotClasses(11)="BotPack.SkaarjBot"
	BotClasses(12)="BotPack.FemOneBot"
	BotClasses(13)="BotPack.MalOneBot"
	BotClasses(14)="BotPack.MalTwoBot"
	BotClasses(15)="BotPack.SkaarjBot"

	BotNames(16)="Dominator"
	BotNames(17)="Cholerae"
	BotNames(18)="Apocalypse"
	BotNames(19)="Bane"
	BotNames(20)="Hippolyta"
	BotNames(21)="Eradicator"
	BotNames(22)="Nikita"
	BotNames(23)="Arcturus"
	BotNames(24)="Shiva"
	BotNames(25)="Vindicator"
	BotNames(26)="Dominator"
	BotNames(27)="Cholerae"
	BotNames(18)="Apocalypse"
	BotNames(29)="Bane"
	BotNames(30)="Hippolyta"
	BotNames(31)="Eradicator"
}
