Updated to store standing for kill in a dictionary keyed by difficulty
This commit is contained in:
parent
1dbf46179d
commit
8c0db8e0c2
@ -71,14 +71,14 @@ public class Experience
|
||||
{
|
||||
level = new MinMax(0, 1);
|
||||
reward = new MinMax(-1, -1);
|
||||
standingForKill = -0.02;
|
||||
aggressorBonus = 0.01;
|
||||
standingForKill = new Dictionary<string, object>();
|
||||
aggressorBonus = null;
|
||||
useSimpleAnimator = false;
|
||||
}
|
||||
|
||||
public MinMax level { get; set; }
|
||||
public MinMax reward { get; set; }
|
||||
public object standingForKill { get; set; }
|
||||
public Dictionary<string, object> standingForKill { get; set; }
|
||||
public object aggressorBonus { get; set; }
|
||||
public bool useSimpleAnimator { get; set; }
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ using Common.Models.Input;
|
||||
using Common.Models.Output;
|
||||
using Generator.Helpers;
|
||||
using Generator.Helpers.Gear;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Generator
|
||||
{
|
||||
@ -42,8 +41,14 @@ namespace Generator
|
||||
|
||||
private static void AddStandingForKill(Bot botToUpdate, Datum rawBotData)
|
||||
{
|
||||
botToUpdate.experience.standingForKill = rawBotData.Info.Settings.StandingForKill;
|
||||
botToUpdate.experience.aggressorBonus = rawBotData.Info.Settings.AggressorBonus;
|
||||
botToUpdate.experience.standingForKill ??= new Dictionary<string, object>();
|
||||
|
||||
if (!botToUpdate.experience.standingForKill.ContainsKey(rawBotData.Info.Settings.BotDifficulty))
|
||||
{
|
||||
botToUpdate.experience.standingForKill.Add(rawBotData.Info.Settings.BotDifficulty, rawBotData.Info.Settings.StandingForKill);
|
||||
}
|
||||
|
||||
botToUpdate.experience.aggressorBonus ??= rawBotData.Info.Settings.AggressorBonus;
|
||||
}
|
||||
|
||||
private static void AddExperience(Bot botToUpdate, Datum rawBotData)
|
||||
|
Loading…
x
Reference in New Issue
Block a user