Add missing tagilla difficultiy settings

This commit is contained in:
Chomp 2021-09-01 14:41:21 +01:00
parent d38cc9c3ea
commit 55ca5ebbbe
4 changed files with 32 additions and 16 deletions

View File

@ -10,18 +10,19 @@
bosskilla = 6,
bosskojaniy = 7,
bosssanitar = 8,
bossstormtrooper = 9,
followerbully = 10,
followergluharassault = 11,
followergluharscout = 12,
followergluharsecurity = 13,
followergluharsnipe = 14,
followerkojaniy = 15,
followersanitar = 16,
followerstormtrooper = 17,
cursedassault = 18,
sectantpriest = 19,
sectantwarrior = 20,
usec = 21
bosstagilla = 9,
bossstormtrooper = 10,
followerbully = 11,
followergluharassault = 12,
followergluharscout = 13,
followergluharsecurity = 14,
followergluharsnipe = 15,
followerkojaniy = 16,
followersanitar = 17,
followerstormtrooper = 18,
cursedassault = 19,
sectantpriest = 20,
sectantwarrior = 21,
usec = 22
}
}

View File

@ -16,7 +16,7 @@ namespace Generator.Helpers
// Read bot setting files from assets folder that match this bots type
// Save into dictionary with difficulty as key
var difficultySettingsJsons = new Dictionary<string, DifficultySettings>();
foreach (var path in difficultyFilePaths.Where(x=>x.Contains($"_{bot.botType.ToString()}", System.StringComparison.InvariantCultureIgnoreCase)))
foreach (var path in difficultyFilePaths.Where(x=>x.Contains($"_{bot.botType}", System.StringComparison.InvariantCultureIgnoreCase)))
{
var json = File.ReadAllText(path);
var serialisedObject = JsonConvert.DeserializeObject<DifficultySettings>(json);
@ -46,7 +46,7 @@ namespace Generator.Helpers
// Split path into parts and find the last part (filename)
// Split filename and take the first part (difficulty, easy/normal etc)
var splitPath = path.Split("\\");
return splitPath.Last().Split("_").First();
return splitPath.Last().Split("_")[0];
}
private static void SaveSettingsIntoBotFile(Bot bot, string difficulty, DifficultySettings settings)

View File

@ -852,7 +852,7 @@
public class Boss
{
public Boss(double bOSS_DIST_TO_WARNING, double bOSS_DIST_TO_WARNING_SQRT, double bOSS_DIST_TO_WARNING_OUT, double bOSS_DIST_TO_WARNING_OUT_SQRT, double bOSS_DIST_TO_SHOOT, double bOSS_DIST_TO_SHOOT_SQRT, double cHANCE_TO_SEND_GRENADE_100, double mAX_DIST_COVER_BOSS, double mAX_DIST_COVER_BOSS_SQRT, double mAX_DIST_DECIDER_TO_SEND, double mAX_DIST_DECIDER_TO_SEND_SQRT, double tIME_AFTER_LOSE, double tIME_AFTER_LOSE_DELTA, int pERSONS_SEND, double dELTA_SEARCH_TIME, bool cOVER_TO_SEND, double wAIT_NO_ATTACK_SAVAGE, double cHANCE_USE_RESERVE_PATROL_100, double kILLA_Y_DELTA_TO_BE_ENEMY_BOSS, double kILLA_DITANCE_TO_BE_ENEMY_BOSS, double kILLA_START_SEARCH_SEC, double kILLA_CONTUTION_TIME, double kILLA_CLOSE_ATTACK_DIST, double kILLA_MIDDLE_ATTACK_DIST, double kILLA_LARGE_ATTACK_DIST, double kILLA_SEARCH_METERS, double kILLA_DEF_DIST_SQRT, double kILLA_SEARCH_SEC_STOP_AFTER_COMING, double kILLA_DIST_TO_GO_TO_SUPPRESS, double kILLA_AFTER_GRENADE_SUPPRESS_DELAY, int kILLA_CLOSEATTACK_TIMES, double kILLA_CLOSEATTACK_DELAY, double kILLA_HOLD_DELAY, int kILLA_BULLET_TO_RELOAD, bool sHALL_WARN, double kOJANIY_DIST_WHEN_READY, double kOJANIY_DIST_TO_BE_ENEMY, double kOJANIY_MIN_DIST_TO_LOOT, double kOJANIY_MIN_DIST_TO_LOOT_SQRT, double kOJANIY_DIST_ENEMY_TOO_CLOSE, double kOJANIY_MANY_ENEMIES_COEF, int kILLA_ENEMIES_TO_ATTACK, double kILLA_ONE_IS_CLOSE, double kILLA_TRIGGER_DOWN_DELAY, double kILLA_WAIT_IN_COVER_COEF)
public Boss(double bOSS_DIST_TO_WARNING, double bOSS_DIST_TO_WARNING_SQRT, double bOSS_DIST_TO_WARNING_OUT, double bOSS_DIST_TO_WARNING_OUT_SQRT, double bOSS_DIST_TO_SHOOT, double bOSS_DIST_TO_SHOOT_SQRT, double cHANCE_TO_SEND_GRENADE_100, double mAX_DIST_COVER_BOSS, double mAX_DIST_COVER_BOSS_SQRT, double mAX_DIST_DECIDER_TO_SEND, double mAX_DIST_DECIDER_TO_SEND_SQRT, double tIME_AFTER_LOSE, double tIME_AFTER_LOSE_DELTA, int pERSONS_SEND, double dELTA_SEARCH_TIME, bool cOVER_TO_SEND, double wAIT_NO_ATTACK_SAVAGE, double cHANCE_USE_RESERVE_PATROL_100, double kILLA_Y_DELTA_TO_BE_ENEMY_BOSS, double kILLA_DITANCE_TO_BE_ENEMY_BOSS, double kILLA_START_SEARCH_SEC, double kILLA_CONTUTION_TIME, double kILLA_CLOSE_ATTACK_DIST, double kILLA_MIDDLE_ATTACK_DIST, double kILLA_LARGE_ATTACK_DIST, double kILLA_SEARCH_METERS, double kILLA_DEF_DIST_SQRT, double kILLA_SEARCH_SEC_STOP_AFTER_COMING, double kILLA_DIST_TO_GO_TO_SUPPRESS, double kILLA_AFTER_GRENADE_SUPPRESS_DELAY, int kILLA_CLOSEATTACK_TIMES, double kILLA_CLOSEATTACK_DELAY, double kILLA_HOLD_DELAY, int kILLA_BULLET_TO_RELOAD, bool sHALL_WARN, double kOJANIY_DIST_WHEN_READY, double kOJANIY_DIST_TO_BE_ENEMY, double kOJANIY_MIN_DIST_TO_LOOT, double kOJANIY_MIN_DIST_TO_LOOT_SQRT, double kOJANIY_DIST_ENEMY_TOO_CLOSE, double kOJANIY_MANY_ENEMIES_COEF, int kILLA_ENEMIES_TO_ATTACK, double kILLA_ONE_IS_CLOSE, double kILLA_TRIGGER_DOWN_DELAY, double kILLA_WAIT_IN_COVER_COEF, double tAGILLA_MELEE_CHANCE_RELOAD, double tAGILLA_MELEE_CHANCE_INTERACTION, double tAGILLA_MELEE_CHANCE_INVENTORY, double tAGILLA_MELEE_CHANCE_MEDS, double tAGILLA_MELEE_CHANCE_FORCED, double eFFECT_REGENERATION_PER_MIN, bool eFFECT_PAINKILLER)
{
BOSS_DIST_TO_WARNING = bOSS_DIST_TO_WARNING;
BOSS_DIST_TO_WARNING_SQRT = bOSS_DIST_TO_WARNING_SQRT;
@ -899,6 +899,13 @@
KILLA_ONE_IS_CLOSE = kILLA_ONE_IS_CLOSE;
KILLA_TRIGGER_DOWN_DELAY = kILLA_TRIGGER_DOWN_DELAY;
KILLA_WAIT_IN_COVER_COEF = kILLA_WAIT_IN_COVER_COEF;
TAGILLA_MELEE_CHANCE_RELOAD = tAGILLA_MELEE_CHANCE_RELOAD;
TAGILLA_MELEE_CHANCE_INTERACTION = tAGILLA_MELEE_CHANCE_INTERACTION;
TAGILLA_MELEE_CHANCE_INVENTORY = tAGILLA_MELEE_CHANCE_INVENTORY;
TAGILLA_MELEE_CHANCE_MEDS = tAGILLA_MELEE_CHANCE_MEDS;
TAGILLA_MELEE_CHANCE_FORCED = tAGILLA_MELEE_CHANCE_FORCED;
EFFECT_REGENERATION_PER_MIN = eFFECT_REGENERATION_PER_MIN;
EFFECT_PAINKILLER = eFFECT_PAINKILLER;
}
public double BOSS_DIST_TO_WARNING { get; set; }
@ -946,6 +953,13 @@
public double KILLA_ONE_IS_CLOSE { get; set; }
public double KILLA_TRIGGER_DOWN_DELAY { get; set; }
public double KILLA_WAIT_IN_COVER_COEF { get; set; }
public double TAGILLA_MELEE_CHANCE_RELOAD { get; set; }
public double TAGILLA_MELEE_CHANCE_INTERACTION { get; set; }
public double TAGILLA_MELEE_CHANCE_INVENTORY { get; set; }
public double TAGILLA_MELEE_CHANCE_MEDS { get; set; }
public double TAGILLA_MELEE_CHANCE_FORCED { get; set; }
public double EFFECT_REGENERATION_PER_MIN { get; set; }
public bool EFFECT_PAINKILLER { get; set; }
}
public class Core

View File

@ -17,6 +17,7 @@ namespace Generator
"bosskilla",
"bosskojaniy",
"bosssanitar",
"bosstagilla",
//"bossstormtrooper",
"followerbully",