Force non-pmc bots to have exp of 0 + level of 1

This commit is contained in:
Chomp
2025-01-26 10:00:35 +00:00
parent 4cf908eaae
commit 0cb8ca69e4
2 changed files with 9 additions and 0 deletions
@@ -27,6 +27,11 @@ public class BotLevelGenerator(
/// <returns>IRandomisedBotLevelResult object</returns>
public RandomisedBotLevelResult GenerateBotLevel(MinMax levelDetails, BotGenerationDetails botGenerationDetails, BotBase bot)
{
if (!botGenerationDetails.IsPmc.GetValueOrDefault(false))
{
return new RandomisedBotLevelResult() { Exp = 0, Level = 1 };
}
var expTable = _databaseService.GetGlobals().Configuration.Exp.Level.ExperienceTable;
var botLevelRange = GetRelativeBotLevelRange(botGenerationDetails, levelDetails, expTable.Length);
@@ -158,6 +158,8 @@ public record Info
public int? PrestigeLevel { get; set; }
public string? Voice { get; set; }
public int? Level { get; set; }
///Experience the bot has gained
public int? Experience { get; set; }
public List<Ban>? Bans { get; set; }
public bool? BannedState { get; set; }
@@ -198,6 +200,8 @@ public record BotInfoSettings
{
public string? Role { get; set; }
public string? BotDifficulty { get; set; }
// Experience given for being killed
public int? Experience { get; set; }
public double? StandingForKill { get; set; }
public double? AggressorBonus { get; set; }