diff --git a/Common/BulletHelpers.cs b/Common/BulletHelpers.cs index 22cc5ce..2cdf18f 100644 --- a/Common/BulletHelpers.cs +++ b/Common/BulletHelpers.cs @@ -25,8 +25,10 @@ namespace Common "5cadf6e5ae921500113bb973", // 12.7x55 mm PS12A "5cadf6ddae9215051e1c23b2", // 12.7x55 mm PS12 "5ea2a8e200685063ec28c05a", // .45 acp rip - "5fbe3ffdf8b6a877a729ea82" // .300 aac bcp fmj - }; + "5fbe3ffdf8b6a877a729ea82", // .300 aac bcp fmj + "5e023e6e34d52a55c3304f71", // 7.62x51mm tcw sp + "5e023e88277cce2b522ff2b1" // 7.62x51 ultra nosler + }; public static bool BulletIsOnBlackList(string bullet) { diff --git a/Common/Extensions/EnumExtensions.cs b/Common/Extensions/EnumExtensions.cs new file mode 100644 index 0000000..535ab13 --- /dev/null +++ b/Common/Extensions/EnumExtensions.cs @@ -0,0 +1,15 @@ +using Common.Models; + +namespace Common.Extensions +{ + public static class EnumExtensions + { + /// + /// Add a string to a list only if it doesnt already exist + /// + public static bool IsBoss(this BotType self) + { + return self.HasFlag(BotType.bossbully | BotType.bossgluhar | BotType.bosskilla | BotType.bosskojaniy | BotType.bosssanitar); + } + } +} diff --git a/Common/Extensions/StringToolsExtensions.cs b/Common/Extensions/StringToolsExtensions.cs index bbe6d9a..feefc34 100644 --- a/Common/Extensions/StringToolsExtensions.cs +++ b/Common/Extensions/StringToolsExtensions.cs @@ -12,5 +12,14 @@ namespace Common.Extensions if (!self.Contains(item)) self.Add(item); } + + public static void AddUniqueRange(this IList self, IList itemsToAdd) + { + foreach (var item in itemsToAdd) + { + if (!self.Contains(item)) + self.Add(item); + } + } } } diff --git a/Common/Models/BotType.cs b/Common/Models/BotType.cs new file mode 100644 index 0000000..e9c3ad3 --- /dev/null +++ b/Common/Models/BotType.cs @@ -0,0 +1,28 @@ +namespace Common.Models +{ + public enum BotType + { + assault = 1, + pmcBot = 2, + marksman = 3, + bossbully = 4, + bossgluhar = 5, + bosskilla = 6, + bosskojaniy = 7, + bosssanitar = 8, + 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 + } +} diff --git a/Generator/BaseBotGenerator.cs b/Generator/BaseBotGenerator.cs index f93ab8c..cde18ee 100644 --- a/Generator/BaseBotGenerator.cs +++ b/Generator/BaseBotGenerator.cs @@ -1,7 +1,7 @@ using Common; using Common.Extensions; +using Common.Models; using Generator.Helpers; -using Generator.Models; using Generator.Models.Input; using Generator.Models.Output; using System; diff --git a/Generator/BotChancesGenerator.cs b/Generator/BotChancesGenerator.cs new file mode 100644 index 0000000..cc9de51 --- /dev/null +++ b/Generator/BotChancesGenerator.cs @@ -0,0 +1,50 @@ +using Common; +using Generator.Helpers.Gear; +using Generator.Models.Input; +using Generator.Models.Output; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; + +namespace Generator +{ + internal class BotChancesGenerator + { + private readonly List _bots; + private readonly List _rawParsedBots; + + public BotChancesGenerator(List botsWithGearAndLoot, List parsedBots) + { + _bots = botsWithGearAndLoot; + _rawParsedBots = parsedBots; + } + + internal List AddChances() + { + var stopwatch = Stopwatch.StartNew(); + LoggingHelpers.LogToConsole("Started processing bot gear"); + + foreach (var botToUpdate in _bots) + { + var rawParsedBotOfCurrentType = _rawParsedBots + .Where(x => x.Info.Settings.Role.Equals(botToUpdate.botType.ToString(), StringComparison.OrdinalIgnoreCase)) + .ToList(); + + if (rawParsedBotOfCurrentType.Count == 0) + { + continue; + } + + GearChanceHelpers.CalculateEquipmentChances(botToUpdate, rawParsedBotOfCurrentType); + GearChanceHelpers.AddGenerationChances(botToUpdate); + GearChanceHelpers.CalculateModChances(botToUpdate, rawParsedBotOfCurrentType); + } + + stopwatch.Stop(); + LoggingHelpers.LogToConsole($"Finished processing bot chances. Took {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds"); + + return _bots; + } + } +} \ No newline at end of file diff --git a/Generator/BotGearGenerator.cs b/Generator/BotGearGenerator.cs index 8f383e6..1957c5d 100644 --- a/Generator/BotGearGenerator.cs +++ b/Generator/BotGearGenerator.cs @@ -37,10 +37,6 @@ namespace Generator continue; } - GearChanceHelpers.CalculateEquipmentChances(botToUpdate, rawParsedBotOfCurrentType); - GearChanceHelpers.AddGenerationChances(botToUpdate); - GearChanceHelpers.CalculateModChances(botToUpdate, rawParsedBotOfCurrentType); - foreach (var rawParsedBot in rawParsedBotOfCurrentType) { GearHelpers.AddEquippedGear(botToUpdate, rawParsedBot); diff --git a/Generator/BotLootGenerator.cs b/Generator/BotLootGenerator.cs index 2a249da..eeb470d 100644 --- a/Generator/BotLootGenerator.cs +++ b/Generator/BotLootGenerator.cs @@ -1,12 +1,14 @@ using Common; using Common.Extensions; using Generator.Helpers; +using Generator.Helpers.Gear; using Generator.Models.Input; using Generator.Models.Output; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using System.Threading.Tasks; namespace Generator { @@ -27,15 +29,15 @@ namespace Generator LoggingHelpers.LogToConsole("Started processing bot loot"); // Iterate over assault/raider etc - foreach (var botToUpdate in _botsWithGear) + Parallel.ForEach(_botsWithGear, botToUpdate => { var rawBotsOfSameType = _rawParsedBots - .Where(x => x.Info.Settings.Role.Equals(botToUpdate.botType.ToString(), StringComparison.OrdinalIgnoreCase)) - .ToList(); + .Where(x => x.Info.Settings.Role.Equals(botToUpdate.botType.ToString(), StringComparison.OrdinalIgnoreCase)) + .ToList(); if (rawBotsOfSameType.Count == 0) { - continue; + return; } foreach (var rawParsedBot in rawBotsOfSameType) @@ -44,9 +46,10 @@ namespace Generator } AddTacticalVestLoot(botToUpdate, rawBotsOfSameType); - AddBackbackLoot(botToUpdate, rawBotsOfSameType); + AddBackpackLoot(botToUpdate, rawBotsOfSameType); AddSecureContainerLoot(botToUpdate, rawBotsOfSameType); - } + AddSpecialLoot(botToUpdate); + }); stopwatch.Stop(); LoggingHelpers.LogToConsole($"Finished processing bot loot. Took: {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds"); @@ -54,24 +57,6 @@ namespace Generator return _botsWithGear; } - private void AddTacticalVestLoot(Bot finalAssaultBot, List bots) - { - var tacVestItems = GetItemsStoredInEquipmentItem(bots, "TacticalVest"); - finalAssaultBot.inventory.items.TacticalVest.AddRange(tacVestItems); - } - - private void AddBackbackLoot(Bot finalAssaultBot, List bots) - { - var backpackItems = GetItemsStoredInEquipmentItem(bots, "Backpack"); - finalAssaultBot.inventory.items.Backpack.AddRange(backpackItems); - } - - private void AddSecureContainerLoot(Bot finalAssaultBot, List bots) - { - var tacVestItems = GetItemsStoredInEquipmentItem(bots, "SecuredContainer"); - finalAssaultBot.inventory.items.SecuredContainer.AddRange(tacVestItems); - } - private void AddPocketLoot(Bot finalBot, Datum bot) { // pocket loot @@ -81,6 +66,35 @@ namespace Generator } } + private void AddTacticalVestLoot(Bot finalBot, List bots) + { + var tacVestItems = GetItemsStoredInEquipmentItem(bots, "TacticalVest"); + finalBot.inventory.items.TacticalVest.AddRange(tacVestItems); + } + + private void AddBackpackLoot(Bot finalBot, List bots) + { + // add generic keys to bosses + if (finalBot.botType.IsBoss()) + { + finalBot.inventory.items.Backpack.AddRange(SpecialLootHelper.GetGenericBossKeys()); + } + + var backpackItems = GetItemsStoredInEquipmentItem(bots, "Backpack"); + finalBot.inventory.items.Backpack.AddRange(backpackItems); + } + + private void AddSecureContainerLoot(Bot finalAssaultBot, List bots) + { + var tacVestItems = GetItemsStoredInEquipmentItem(bots, "SecuredContainer"); + finalAssaultBot.inventory.items.SecuredContainer.AddRange(tacVestItems); + } + + private void AddSpecialLoot(Bot botToUpdate) + { + botToUpdate.inventory.items.SpecialLoot.AddRange(SpecialLootHelper.GetSpecialLootForBotType(botToUpdate.botType)); + } + private List GetItemsStoredInEquipmentItem(List bots, string containerName) { var itemsStoredInContainer = new List(); diff --git a/Generator/BotParser.cs b/Generator/BotParser.cs index e5f38f5..a625ed8 100644 --- a/Generator/BotParser.cs +++ b/Generator/BotParser.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using System.Threading.Tasks; namespace Generator { @@ -30,22 +31,20 @@ namespace Generator Console.WriteLine($"{botFiles.Count} bot dump files found"); var parsedBots = new List(); - foreach (var file in botFiles) - { + Parallel.ForEach(botFiles, file => { var splitFile = file.Split("\\"); - var json = File.ReadAllText(file); try { json = PruneMalformedBsgJson(json, splitFile.Last()); - var bots = ParseJson(json, file); + var bots = ParseJson(json); if (bots == null || bots.Count == 0) { Console.WriteLine($"skipping file: {splitFile.Last()}. no bots found, "); - continue; + return; } Console.WriteLine($"parsing: {bots.Count} bots in file {splitFile.Last()}"); @@ -59,7 +58,7 @@ namespace Generator failedFilesCount++; Console.WriteLine($"JSON Error message: {jex.Message} || file: {splitFile.Last()}"); } - } + }); stopwatch.Stop(); LoggingHelpers.LogToConsole($"Cleaned and Parsed: {parsedBots.Count} bots. Failed: {failedFilesCount}. Took {LoggingHelpers.LogTimeTaken(stopwatch.Elapsed.TotalSeconds)} seconds"); @@ -87,10 +86,10 @@ namespace Generator return o.ToString(); } - private static List ParseJson(string json, string file) + private static List ParseJson(string json) { - //Console.WriteLine($"parsing file {file}"); - var serialisedObject = JsonConvert.DeserializeObject(json); + var serialisedObject = JsonConvert.DeserializeObject(json); + return serialisedObject.data; } } diff --git a/Generator/Helpers/DifficultyHelper.cs b/Generator/Helpers/DifficultyHelper.cs index d6c1eb7..ecb0b91 100644 --- a/Generator/Helpers/DifficultyHelper.cs +++ b/Generator/Helpers/DifficultyHelper.cs @@ -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(); - 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(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) diff --git a/Generator/Helpers/Gear/GearChanceHelpers.cs b/Generator/Helpers/Gear/GearChanceHelpers.cs index bc16151..b60790c 100644 --- a/Generator/Helpers/Gear/GearChanceHelpers.cs +++ b/Generator/Helpers/Gear/GearChanceHelpers.cs @@ -123,16 +123,8 @@ namespace Generator.Helpers.Gear public static void AddGenerationChances(Bot bot) { - switch (bot.botType) - { - case BotType.assault: - case BotType.pmcBot: - case BotType.marksman: - bot.generation = new GenerationChances(0, 1, 1, 2, 0, 3, 2, 4, 0, 5); //TODO get dynamically - break; - } + bot.generation = new GenerationChances(bot.inventory.items.SpecialLoot.Count, bot.inventory.items.SpecialLoot.Count, 1, 2, 0, 3, 2, 4, 0, 5); //TODO get dynamically } - public static void CalculateEquipmentChances(Bot bot, List baseBots) { // TODO: Convert to dynamic? diff --git a/Generator/Helpers/Gear/SpecialLootHelper.cs b/Generator/Helpers/Gear/SpecialLootHelper.cs new file mode 100644 index 0000000..45874c9 --- /dev/null +++ b/Generator/Helpers/Gear/SpecialLootHelper.cs @@ -0,0 +1,123 @@ +using Common.Models; +using Generator.Models; +using System.Collections.Generic; + +namespace Generator.Helpers.Gear +{ + public static class SpecialLootHelper + { + private static readonly List _genericBossKeys = new List() + { + "5c1d0d6d86f7744bb2683e1f", // "TerraGroup Labs keycard (Yellow)", + "5c1d0c5f86f7744bb2683cf0", // "TerraGroup Labs keycard (Blue)", + "5c1e495a86f7743109743dfb", // "TerraGroup Labs keycard (Violet)", + "5c1d0dc586f7744baf2e7b79", // "TerraGroup Labs keycard (Green)", + "5c1d0efb86f7744baf2e7b7b", // "TerraGroup Labs keycard (Red)", + "5c1d0f4986f7744bb01837fa", // "TerraGroup Labs keycard (Black)", + "5c94bbff86f7747ee735c08f", // "TerraGroup Labs access keycard", + "5e42c83786f7742a021fdf3c", // "Object #21WS keycard", + "5e42c81886f7742a01529f57", // "Object #11SR keycard", + "59136a4486f774447a1ed172", // "Dorm guard desk key", + "5780cf7f2459777de4559322", // "Dorm room 314 marked key", + "5d80c60f86f77440373c4ece", // "RB-BK marked key", + "5d80c62a86f7744036212b3f", // "RB-VO marked key", + "5ede7a8229445733cb4c18e2", // "RB-PKPM marked key", + "5da743f586f7744014504f72", // "USEC Customs stash key", + "5d8e15b686f774445103b190", // "HEP station storage room key", + "5a13f24186f77410e57c5626", // "Health Resort east wing room 222 key", + "5448ba0b4bdc2d02308b456c", // "Factory emergency exit key", + "5a1452ee86f7746f33111763", // "Health Resort west wing room 222 key", + "5a13f35286f77413ef1436b0", // "Health Resort east wing room 226 key", + "5a0eec9686f77402ac5c39f2", // "Health Resort east wing room 310 key", + "5a13ef7e86f7741290491063", // "Health Resort west wing room 301 key", + "5a0ee30786f774023b6ee08f", // "Health Resort west wing room 216 key", + "5a0ee76686f7743698200d5c", // "Health Resort east wing room 216 key", + "5913877a86f774432f15d444", // "Gas station storage room key", + "5780d0652459777df90dcb74", // "Gas station office key", + "5d80c88d86f77440556dbf07", // "RB-AM key", + "5ede7b0c6d23e5473e6e8c66", // "RB-RLSA key", + "5d8e0e0e86f774321140eb56", // "RB-KPRL key", + "5d80cb3886f77440556dbf09", // "RB-PSP1 key", + "5d95d6fa86f77424484aa5e9", // "RB-PSP2 key", + "5d80cb5686f77440545d1286", // "RB-PSV1 key", + "5d80c6fc86f774403a401e3c", // "RB-TB key", + "5d9f1fa686f774726974a992", // "RB-ST key", + "5d947d3886f774447b415893", // "RB-SMP key", + "5e42c71586f7747f245e1343", // "ULTRA medical storage key", + "5ad5d7d286f77450166e0a89", // "KIBA Arms International outlet outer door key", + "5addaffe86f77470b455f900", // "KIBA Arms International outlet inner grate door key", + "5ad5d64486f774079b080af8", // "NecrusPharm pharmacy key", + "591afe0186f77431bd616a11", // "ZB-014 key", + "5c1e2d1f86f77431e9280bee", // "TerraGroup Labs Weapons testing area key", + "5c1f79a086f7746ed066fb8f", // "TerraGroup Labs Arsenal storage room key", + "5c1e2a1e86f77431ea0ea84c", // "TerraGroup Labs Manager office room key", + "5a144bdb86f7741d374bbde0", // "Health Resort east wing room 205 key", + "5a0ee4b586f7743698200d22", // "Health Resort east wing room 206 key", + "5a145d4786f7744cbb6f4a12", // "Health Resort east wing room 306 key", + "5a145d7b86f7744cbb6f4a13", // "Health Resort east wing room 308 key", + "5a0eecf686f7740350630097", // "Health Resort east wing room 313 key", + "5a0eee1486f77402aa773226" // "Health Resort east wing room 328 key" + }; + + public static IEnumerable GetGenericBossKeys() + { + return _genericBossKeys; + } + + public static IEnumerable GetSpecialLootForBotType(BotType botType) + { + var results = new List(); + switch (botType) + { + case BotType.assault: + break; + case BotType.pmcBot: + break; + case BotType.marksman: + break; + case BotType.bossbully: + break; + case BotType.bossgluhar: + break; + case BotType.bosskilla: + break; + case BotType.bosskojaniy: + results.Add("5d08d21286f774736e7c94c3"); // Shturman's stash key + break; + case BotType.bosssanitar: + results.Add("5efde6b4f5448336730dbd61"); // Keycard with a blue marking + break; + case BotType.bossstormtrooper: + break; + case BotType.followerbully: + break; + case BotType.followergluharassault: + break; + case BotType.followergluharscout: + break; + case BotType.followergluharsecurity: + break; + case BotType.followergluharsnipe: + break; + case BotType.followerkojaniy: + break; + case BotType.followersanitar: + break; + case BotType.followerstormtrooper: + break; + case BotType.cursedassault: + break; + case BotType.sectantpriest: + break; + case BotType.sectantwarrior: + break; + case BotType.usec: + break; + default: + break; + } + + return results; + } + } +} diff --git a/Generator/Models/Enums.cs b/Generator/Models/Enums.cs deleted file mode 100644 index a159155..0000000 --- a/Generator/Models/Enums.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace Generator.Models -{ - public enum BotType - { - assault = 1, - pmcBot = 2, - marksman = 3, - bossbully = 4, - bossgluhar = 5, - 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 - } -} diff --git a/Generator/Models/Output/Difficulty/Difficulty.cs b/Generator/Models/Output/Difficulty/Difficulty.cs index 38eb3a7..029a09e 100644 --- a/Generator/Models/Output/Difficulty/Difficulty.cs +++ b/Generator/Models/Output/Difficulty/Difficulty.cs @@ -1,4 +1,6 @@ -namespace Generator.Models.Output.Difficulty +using System.Collections.Generic; + +namespace Generator.Models.Output.Difficulty { public class Difficulty { @@ -10,1050 +12,19 @@ public class DifficultySettings { - public Lay Lay { get; set; } - public Aiming Aiming { get; set; } - public Look Look { get; set; } - public Shoot Shoot { get; set; } - public Move Move { get; set; } - public Grenade Grenade { get; set; } - public Change Change { get; set; } - public Cover Cover { get; set; } - public Patrol Patrol { get; set; } - public Hearing Hearing { get; set; } - public Mind Mind { get; set; } - public Boss Boss { get; set; } - public Core Core { get; set; } - public Scattering Scattering { get; set; } + public Dictionary Lay { get; set; } + public Dictionary Aiming { get; set; } + public Dictionary Look { get; set; } + public Dictionary Shoot { get; set; } + public Dictionary Move { get; set; } + public Dictionary Grenade { get; set; } + public Dictionary Change { get; set; } + public Dictionary Cover { get; set; } + public Dictionary Patrol { get; set; } + public Dictionary Hearing { get; set; } + public Dictionary Mind { get; set; } + public Dictionary Boss { get; set; } + public Dictionary Core { get; set; } + public Dictionary Scattering { get; set; } } - - public class Lay - { - public Lay(bool cHECK_SHOOT_WHEN_LAYING, double dELTA_LAY_CHECK, double dELTA_GETUP, double dELTA_AFTER_GETUP, - double cLEAR_POINTS_OF_SCARE_SEC, double mAX_LAY_TIME, double dELTA_WANT_LAY_CHECL_SEC, double aTTACK_LAY_CHANCE, - double dIST_TO_COVER_TO_LAY, double dIST_TO_COVER_TO_LAY_SQRT, double dIST_GRASS_TERRAIN_SQRT, double dIST_ENEMY_NULL_DANGER_LAY, - double dIST_ENEMY_NULL_DANGER_LAY_SQRT, double dIST_ENEMY_GETUP_LAY, double dIST_ENEMY_GETUP_LAY_SQRT, double dIST_ENEMY_CAN_LAY, - double dIST_ENEMY_CAN_LAY_SQRT, double lAY_AIM, double mIN_CAN_LAY_DIST_SQRT, double mIN_CAN_LAY_DIST, - double mAX_CAN_LAY_DIST_SQRT, double mAX_CAN_LAY_DIST, double lAY_CHANCE_DANGER, int dAMAGE_TIME_TO_GETUP) - { - CHECK_SHOOT_WHEN_LAYING = cHECK_SHOOT_WHEN_LAYING; - DELTA_LAY_CHECK = dELTA_LAY_CHECK; - DELTA_GETUP = dELTA_GETUP; - DELTA_AFTER_GETUP = dELTA_AFTER_GETUP; - CLEAR_POINTS_OF_SCARE_SEC = cLEAR_POINTS_OF_SCARE_SEC; - MAX_LAY_TIME = mAX_LAY_TIME; - DELTA_WANT_LAY_CHECL_SEC = dELTA_WANT_LAY_CHECL_SEC; - ATTACK_LAY_CHANCE = aTTACK_LAY_CHANCE; - DIST_TO_COVER_TO_LAY = dIST_TO_COVER_TO_LAY; - DIST_TO_COVER_TO_LAY_SQRT = dIST_TO_COVER_TO_LAY_SQRT; - DIST_GRASS_TERRAIN_SQRT = dIST_GRASS_TERRAIN_SQRT; - DIST_ENEMY_NULL_DANGER_LAY = dIST_ENEMY_NULL_DANGER_LAY; - DIST_ENEMY_NULL_DANGER_LAY_SQRT = dIST_ENEMY_NULL_DANGER_LAY_SQRT; - DIST_ENEMY_GETUP_LAY = dIST_ENEMY_GETUP_LAY; - DIST_ENEMY_GETUP_LAY_SQRT = dIST_ENEMY_GETUP_LAY_SQRT; - DIST_ENEMY_CAN_LAY = dIST_ENEMY_CAN_LAY; - DIST_ENEMY_CAN_LAY_SQRT = dIST_ENEMY_CAN_LAY_SQRT; - LAY_AIM = lAY_AIM; - MIN_CAN_LAY_DIST_SQRT = mIN_CAN_LAY_DIST_SQRT; - MIN_CAN_LAY_DIST = mIN_CAN_LAY_DIST; - MAX_CAN_LAY_DIST_SQRT = mAX_CAN_LAY_DIST_SQRT; - MAX_CAN_LAY_DIST = mAX_CAN_LAY_DIST; - LAY_CHANCE_DANGER = lAY_CHANCE_DANGER; - DAMAGE_TIME_TO_GETUP = dAMAGE_TIME_TO_GETUP; - } - - public bool CHECK_SHOOT_WHEN_LAYING { get; set; } - public double DELTA_LAY_CHECK { get; set; } - public double DELTA_GETUP { get; set; } - public double DELTA_AFTER_GETUP { get; set; } - public double CLEAR_POINTS_OF_SCARE_SEC { get; set; } - public double MAX_LAY_TIME { get; set; } - public double DELTA_WANT_LAY_CHECL_SEC { get; set; } - public double ATTACK_LAY_CHANCE { get; set; } - public double DIST_TO_COVER_TO_LAY { get; set; } - public double DIST_TO_COVER_TO_LAY_SQRT { get; set; } - public double DIST_GRASS_TERRAIN_SQRT { get; set; } - public double DIST_ENEMY_NULL_DANGER_LAY { get; set; } - public double DIST_ENEMY_NULL_DANGER_LAY_SQRT { get; set; } - public double DIST_ENEMY_GETUP_LAY { get; set; } - public double DIST_ENEMY_GETUP_LAY_SQRT { get; set; } - public double DIST_ENEMY_CAN_LAY { get; set; } - public double DIST_ENEMY_CAN_LAY_SQRT { get; set; } - public double LAY_AIM { get; set; } - public double MIN_CAN_LAY_DIST_SQRT { get; set; } - public double MIN_CAN_LAY_DIST { get; set; } - public double MAX_CAN_LAY_DIST_SQRT { get; set; } - public double MAX_CAN_LAY_DIST { get; set; } - public double LAY_CHANCE_DANGER { get; set; } - public int DAMAGE_TIME_TO_GETUP { get; set; } - } - - public class Aiming - { - public Aiming(double mAX_AIM_PRECICING, double bETTER_PRECICING_COEF, double rECALC_DIST, double rECALC_SQR_DIST, double cOEF_FROM_COVER, double pANIC_COEF, double pANIC_ACCURATY_COEF, double hARD_AIM, double pANIC_TIME, int rECALC_MUST_TIME, double dAMAGE_PANIC_TIME, double dANGER_UP_POINT, double mAX_AIMING_UPGRADE_BY_TIME, double dAMAGE_TO_DISCARD_AIM_0_100, double mIN_TIME_DISCARD_AIM_SEC, double mAX_TIME_DISCARD_AIM_SEC, double xZ_COEF, int sHOOT_TO_CHANGE_PRIORITY, double bOTTOM_COEF, double fIRST_CONTACT_ADD_SEC, double fIRST_CONTACT_ADD_CHANCE_100, double bASE_HIT_AFFECTION_DELAY_SEC, double bASE_HIT_AFFECTION_MIN_ANG, double bASE_HIT_AFFECTION_MAX_ANG, double bASE_SHIEF, double sCATTERING_HAVE_DAMAGE_COEF, double sCATTERING_DIST_MODIF, double sCATTERING_DIST_MODIF_CLOSE, int aIMING_TYPE, double dIST_TO_SHOOT_TO_CENTER, double dIST_TO_SHOOT_NO_OFFSET, double sHPERE_FRIENDY_FIRE_SIZE, double cOEF_IF_MOVE, double tIME_COEF_IF_MOVE, double bOT_MOVE_IF_DELTA, double nEXT_SHOT_MISS_CHANCE_100, double nEXT_SHOT_MISS_Y_OFFSET, double aNYTIME_LIGHT_WHEN_AIM_100, double aNY_PART_SHOOT_TIME, double wEAPON_ROOT_OFFSET, double mIN_DAMAGE_TO_GET_HIT_AFFETS, double mAX_AIM_TIME, double oFFSET_RECAL_ANYWAY_TIME, double y_TOP_OFFSET_COEF, double y_BOTTOM_OFFSET_COEF, double bASE_SHIEF_STATIONARY_GRENADE, double xZ_COEF_STATIONARY_GRENADE) - { - MAX_AIM_PRECICING = mAX_AIM_PRECICING; - BETTER_PRECICING_COEF = bETTER_PRECICING_COEF; - RECALC_DIST = rECALC_DIST; - RECALC_SQR_DIST = rECALC_SQR_DIST; - COEF_FROM_COVER = cOEF_FROM_COVER; - PANIC_COEF = pANIC_COEF; - PANIC_ACCURATY_COEF = pANIC_ACCURATY_COEF; - HARD_AIM = hARD_AIM; - PANIC_TIME = pANIC_TIME; - RECALC_MUST_TIME = rECALC_MUST_TIME; - DAMAGE_PANIC_TIME = dAMAGE_PANIC_TIME; - DANGER_UP_POINT = dANGER_UP_POINT; - MAX_AIMING_UPGRADE_BY_TIME = mAX_AIMING_UPGRADE_BY_TIME; - DAMAGE_TO_DISCARD_AIM_0_100 = dAMAGE_TO_DISCARD_AIM_0_100; - MIN_TIME_DISCARD_AIM_SEC = mIN_TIME_DISCARD_AIM_SEC; - MAX_TIME_DISCARD_AIM_SEC = mAX_TIME_DISCARD_AIM_SEC; - XZ_COEF = xZ_COEF; - SHOOT_TO_CHANGE_PRIORITY = sHOOT_TO_CHANGE_PRIORITY; - BOTTOM_COEF = bOTTOM_COEF; - FIRST_CONTACT_ADD_SEC = fIRST_CONTACT_ADD_SEC; - FIRST_CONTACT_ADD_CHANCE_100 = fIRST_CONTACT_ADD_CHANCE_100; - BASE_HIT_AFFECTION_DELAY_SEC = bASE_HIT_AFFECTION_DELAY_SEC; - BASE_HIT_AFFECTION_MIN_ANG = bASE_HIT_AFFECTION_MIN_ANG; - BASE_HIT_AFFECTION_MAX_ANG = bASE_HIT_AFFECTION_MAX_ANG; - BASE_SHIEF = bASE_SHIEF; - SCATTERING_HAVE_DAMAGE_COEF = sCATTERING_HAVE_DAMAGE_COEF; - SCATTERING_DIST_MODIF = sCATTERING_DIST_MODIF; - SCATTERING_DIST_MODIF_CLOSE = sCATTERING_DIST_MODIF_CLOSE; - AIMING_TYPE = aIMING_TYPE; - DIST_TO_SHOOT_TO_CENTER = dIST_TO_SHOOT_TO_CENTER; - DIST_TO_SHOOT_NO_OFFSET = dIST_TO_SHOOT_NO_OFFSET; - SHPERE_FRIENDY_FIRE_SIZE = sHPERE_FRIENDY_FIRE_SIZE; - COEF_IF_MOVE = cOEF_IF_MOVE; - TIME_COEF_IF_MOVE = tIME_COEF_IF_MOVE; - BOT_MOVE_IF_DELTA = bOT_MOVE_IF_DELTA; - NEXT_SHOT_MISS_CHANCE_100 = nEXT_SHOT_MISS_CHANCE_100; - NEXT_SHOT_MISS_Y_OFFSET = nEXT_SHOT_MISS_Y_OFFSET; - ANYTIME_LIGHT_WHEN_AIM_100 = aNYTIME_LIGHT_WHEN_AIM_100; - ANY_PART_SHOOT_TIME = aNY_PART_SHOOT_TIME; - WEAPON_ROOT_OFFSET = wEAPON_ROOT_OFFSET; - MIN_DAMAGE_TO_GET_HIT_AFFETS = mIN_DAMAGE_TO_GET_HIT_AFFETS; - MAX_AIM_TIME = mAX_AIM_TIME; - OFFSET_RECAL_ANYWAY_TIME = oFFSET_RECAL_ANYWAY_TIME; - Y_TOP_OFFSET_COEF = y_TOP_OFFSET_COEF; - Y_BOTTOM_OFFSET_COEF = y_BOTTOM_OFFSET_COEF; - BASE_SHIEF_STATIONARY_GRENADE = bASE_SHIEF_STATIONARY_GRENADE; - XZ_COEF_STATIONARY_GRENADE = xZ_COEF_STATIONARY_GRENADE; - } - - public double MAX_AIM_PRECICING { get; set; } - public double BETTER_PRECICING_COEF { get; set; } - public double RECALC_DIST { get; set; } - public double RECALC_SQR_DIST { get; set; } - public double COEF_FROM_COVER { get; set; } - public double PANIC_COEF { get; set; } - public double PANIC_ACCURATY_COEF { get; set; } - public double HARD_AIM { get; set; } - public double PANIC_TIME { get; set; } - public int RECALC_MUST_TIME { get; set; } - public double DAMAGE_PANIC_TIME { get; set; } - public double DANGER_UP_POINT { get; set; } - public double MAX_AIMING_UPGRADE_BY_TIME { get; set; } - public double DAMAGE_TO_DISCARD_AIM_0_100 { get; set; } - public double MIN_TIME_DISCARD_AIM_SEC { get; set; } - public double MAX_TIME_DISCARD_AIM_SEC { get; set; } - public double XZ_COEF { get; set; } - public int SHOOT_TO_CHANGE_PRIORITY { get; set; } - public double BOTTOM_COEF { get; set; } - public double FIRST_CONTACT_ADD_SEC { get; set; } - public double FIRST_CONTACT_ADD_CHANCE_100 { get; set; } - public double BASE_HIT_AFFECTION_DELAY_SEC { get; set; } - public double BASE_HIT_AFFECTION_MIN_ANG { get; set; } - public double BASE_HIT_AFFECTION_MAX_ANG { get; set; } - public double BASE_SHIEF { get; set; } - public double SCATTERING_HAVE_DAMAGE_COEF { get; set; } - public double SCATTERING_DIST_MODIF { get; set; } - public double SCATTERING_DIST_MODIF_CLOSE { get; set; } - public int AIMING_TYPE { get; set; } - public double DIST_TO_SHOOT_TO_CENTER { get; set; } - public double DIST_TO_SHOOT_NO_OFFSET { get; set; } - public double SHPERE_FRIENDY_FIRE_SIZE { get; set; } - public double COEF_IF_MOVE { get; set; } - public double TIME_COEF_IF_MOVE { get; set; } - public double BOT_MOVE_IF_DELTA { get; set; } - public double NEXT_SHOT_MISS_CHANCE_100 { get; set; } - public double NEXT_SHOT_MISS_Y_OFFSET { get; set; } - public double ANYTIME_LIGHT_WHEN_AIM_100 { get; set; } - public double ANY_PART_SHOOT_TIME { get; set; } - public double WEAPON_ROOT_OFFSET { get; set; } - public double MIN_DAMAGE_TO_GET_HIT_AFFETS { get; set; } - public double MAX_AIM_TIME { get; set; } - public double OFFSET_RECAL_ANYWAY_TIME { get; set; } - public double Y_TOP_OFFSET_COEF { get; set; } - public double Y_BOTTOM_OFFSET_COEF { get; set; } - public double BASE_SHIEF_STATIONARY_GRENADE { get; set; } - public double XZ_COEF_STATIONARY_GRENADE { get; set; } - } - - public class Look - { - public Look(double oLD_TIME_POINT, double wAIT_NEW_SENSOR, double wAIT_NEW__LOOK_SENSOR, double lOOK_AROUND_DELTA, - double mAX_VISION_GRASS_METERS, double mAX_VISION_GRASS_METERS_FLARE, double mAX_VISION_GRASS_METERS_OPT, - double mAX_VISION_GRASS_METERS_FLARE_OPT, double lightOnVisionDistance, double fAR_DISTANCE, double farDeltaTimeSec, - double mIDDLE_DIST, double middleDeltaTimeSec, double closeDeltaTimeSec, double pOSIBLE_VISION_SPACE, double gOAL_TO_FULL_DISSAPEAR, - double gOAL_TO_FULL_DISSAPEAR_SHOOT, double bODY_DELTA_TIME_SEARCH_SEC, double cOME_TO_BODY_DIST, double mARKSMAN_VISIBLE_DIST_COEF, - double vISIBLE_DISNACE_WITH_LIGHT, double eNEMY_LIGHT_ADD, double eNEMY_LIGHT_START_DIST, bool cAN_LOOK_TO_WALL, double dIST_NOT_TO_IGNORE_WALL, - double dIST_CHECK_WALL, double lOOK_LAST_POSENEMY_IF_NO_DANGER_SEC, double mIN_LOOK_AROUD_TIME, bool oPTIMIZE_TO_ONLY_BODY) - { - OLD_TIME_POINT = oLD_TIME_POINT; - WAIT_NEW_SENSOR = wAIT_NEW_SENSOR; - WAIT_NEW__LOOK_SENSOR = wAIT_NEW__LOOK_SENSOR; - LOOK_AROUND_DELTA = lOOK_AROUND_DELTA; - MAX_VISION_GRASS_METERS = mAX_VISION_GRASS_METERS; - MAX_VISION_GRASS_METERS_FLARE = mAX_VISION_GRASS_METERS_FLARE; - MAX_VISION_GRASS_METERS_OPT = mAX_VISION_GRASS_METERS_OPT; - MAX_VISION_GRASS_METERS_FLARE_OPT = mAX_VISION_GRASS_METERS_FLARE_OPT; - LightOnVisionDistance = lightOnVisionDistance; - FAR_DISTANCE = fAR_DISTANCE; - FarDeltaTimeSec = farDeltaTimeSec; - MIDDLE_DIST = mIDDLE_DIST; - MiddleDeltaTimeSec = middleDeltaTimeSec; - CloseDeltaTimeSec = closeDeltaTimeSec; - POSIBLE_VISION_SPACE = pOSIBLE_VISION_SPACE; - GOAL_TO_FULL_DISSAPEAR = gOAL_TO_FULL_DISSAPEAR; - GOAL_TO_FULL_DISSAPEAR_SHOOT = gOAL_TO_FULL_DISSAPEAR_SHOOT; - BODY_DELTA_TIME_SEARCH_SEC = bODY_DELTA_TIME_SEARCH_SEC; - COME_TO_BODY_DIST = cOME_TO_BODY_DIST; - MARKSMAN_VISIBLE_DIST_COEF = mARKSMAN_VISIBLE_DIST_COEF; - VISIBLE_DISNACE_WITH_LIGHT = vISIBLE_DISNACE_WITH_LIGHT; - ENEMY_LIGHT_ADD = eNEMY_LIGHT_ADD; - ENEMY_LIGHT_START_DIST = eNEMY_LIGHT_START_DIST; - CAN_LOOK_TO_WALL = cAN_LOOK_TO_WALL; - DIST_NOT_TO_IGNORE_WALL = dIST_NOT_TO_IGNORE_WALL; - DIST_CHECK_WALL = dIST_CHECK_WALL; - LOOK_LAST_POSENEMY_IF_NO_DANGER_SEC = lOOK_LAST_POSENEMY_IF_NO_DANGER_SEC; - MIN_LOOK_AROUD_TIME = mIN_LOOK_AROUD_TIME; - OPTIMIZE_TO_ONLY_BODY = oPTIMIZE_TO_ONLY_BODY; - } - - public double OLD_TIME_POINT { get; set; } - public double WAIT_NEW_SENSOR { get; set; } - public double WAIT_NEW__LOOK_SENSOR { get; set; } - public double LOOK_AROUND_DELTA { get; set; } - public double MAX_VISION_GRASS_METERS { get; set; } - public double MAX_VISION_GRASS_METERS_FLARE { get; set; } - public double MAX_VISION_GRASS_METERS_OPT { get; set; } - public double MAX_VISION_GRASS_METERS_FLARE_OPT { get; set; } - public double LightOnVisionDistance { get; set; } - public double FAR_DISTANCE { get; set; } - public double FarDeltaTimeSec { get; set; } - public double MIDDLE_DIST { get; set; } - public double MiddleDeltaTimeSec { get; set; } - public double CloseDeltaTimeSec { get; set; } - public double POSIBLE_VISION_SPACE { get; set; } - public double GOAL_TO_FULL_DISSAPEAR { get; set; } - public double GOAL_TO_FULL_DISSAPEAR_SHOOT { get; set; } - public double BODY_DELTA_TIME_SEARCH_SEC { get; set; } - public double COME_TO_BODY_DIST { get; set; } - public double MARKSMAN_VISIBLE_DIST_COEF { get; set; } - public double VISIBLE_DISNACE_WITH_LIGHT { get; set; } - public double ENEMY_LIGHT_ADD { get; set; } - public double ENEMY_LIGHT_START_DIST { get; set; } - public bool CAN_LOOK_TO_WALL { get; set; } - public double DIST_NOT_TO_IGNORE_WALL { get; set; } - public double DIST_CHECK_WALL { get; set; } - public double LOOK_LAST_POSENEMY_IF_NO_DANGER_SEC { get; set; } - public double MIN_LOOK_AROUD_TIME { get; set; } - public bool OPTIMIZE_TO_ONLY_BODY { get; set; } - } - - public class Shoot - { - public Shoot(double rECOIL_TIME_NORMALIZE, double rECOIL_PER_METER, double mAX_RECOIL_PER_METER, double hORIZONT_RECOIL_COEF, - double wAIT_NEXT_SINGLE_SHOT, double wAIT_NEXT_SINGLE_SHOT_LONG_MAX, double wAIT_NEXT_SINGLE_SHOT_LONG_MIN, double mARKSMAN_DIST_SEK_COEF, - double fINGER_HOLD_SINGLE_SHOT, double bASE_AUTOMATIC_TIME, double aUTOMATIC_FIRE_SCATTERING_COEF, double cHANCE_TO_CHANGE_TO_AUTOMATIC_FIRE_100, - double fAR_DIST_ENEMY, int sHOOT_FROM_COVER, double fAR_DIST_ENEMY_SQR, double mAX_DIST_COEF, double rECOIL_DELTA_PRESS, double rUN_DIST_NO_AMMO, - double rUN_DIST_NO_AMMO_SQRT, int cAN_SHOOTS_TIME_TO_AMBUSH, double nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_PERCENT, - double nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_SEC, double rELOAD_PECNET_NO_ENEMY, double cHANCE_TO_CHANGE_WEAPON, - double cHANCE_TO_CHANGE_WEAPON_WITH_HELMET, double lOW_DIST_TO_CHANGE_WEAPON, double fAR_DIST_TO_CHANGE_WEAPON, double sUPPRESS_BY_SHOOT_TIME, - int sUPPRESS_TRIGGERS_DOWN, double wAIT_NEXT_STATIONARY_GRENADE, double fINGER_HOLD_STATIONARY_GRENADE) - { - RECOIL_TIME_NORMALIZE = rECOIL_TIME_NORMALIZE; - RECOIL_PER_METER = rECOIL_PER_METER; - MAX_RECOIL_PER_METER = mAX_RECOIL_PER_METER; - HORIZONT_RECOIL_COEF = hORIZONT_RECOIL_COEF; - WAIT_NEXT_SINGLE_SHOT = wAIT_NEXT_SINGLE_SHOT; - WAIT_NEXT_SINGLE_SHOT_LONG_MAX = wAIT_NEXT_SINGLE_SHOT_LONG_MAX; - WAIT_NEXT_SINGLE_SHOT_LONG_MIN = wAIT_NEXT_SINGLE_SHOT_LONG_MIN; - MARKSMAN_DIST_SEK_COEF = mARKSMAN_DIST_SEK_COEF; - FINGER_HOLD_SINGLE_SHOT = fINGER_HOLD_SINGLE_SHOT; - BASE_AUTOMATIC_TIME = bASE_AUTOMATIC_TIME; - AUTOMATIC_FIRE_SCATTERING_COEF = aUTOMATIC_FIRE_SCATTERING_COEF; - CHANCE_TO_CHANGE_TO_AUTOMATIC_FIRE_100 = cHANCE_TO_CHANGE_TO_AUTOMATIC_FIRE_100; - FAR_DIST_ENEMY = fAR_DIST_ENEMY; - SHOOT_FROM_COVER = sHOOT_FROM_COVER; - FAR_DIST_ENEMY_SQR = fAR_DIST_ENEMY_SQR; - MAX_DIST_COEF = mAX_DIST_COEF; - RECOIL_DELTA_PRESS = rECOIL_DELTA_PRESS; - RUN_DIST_NO_AMMO = rUN_DIST_NO_AMMO; - RUN_DIST_NO_AMMO_SQRT = rUN_DIST_NO_AMMO_SQRT; - CAN_SHOOTS_TIME_TO_AMBUSH = cAN_SHOOTS_TIME_TO_AMBUSH; - NOT_TO_SEE_ENEMY_TO_WANT_RELOAD_PERCENT = nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_PERCENT; - NOT_TO_SEE_ENEMY_TO_WANT_RELOAD_SEC = nOT_TO_SEE_ENEMY_TO_WANT_RELOAD_SEC; - RELOAD_PECNET_NO_ENEMY = rELOAD_PECNET_NO_ENEMY; - CHANCE_TO_CHANGE_WEAPON = cHANCE_TO_CHANGE_WEAPON; - CHANCE_TO_CHANGE_WEAPON_WITH_HELMET = cHANCE_TO_CHANGE_WEAPON_WITH_HELMET; - LOW_DIST_TO_CHANGE_WEAPON = lOW_DIST_TO_CHANGE_WEAPON; - FAR_DIST_TO_CHANGE_WEAPON = fAR_DIST_TO_CHANGE_WEAPON; - SUPPRESS_BY_SHOOT_TIME = sUPPRESS_BY_SHOOT_TIME; - SUPPRESS_TRIGGERS_DOWN = sUPPRESS_TRIGGERS_DOWN; - WAIT_NEXT_STATIONARY_GRENADE = wAIT_NEXT_STATIONARY_GRENADE; - FINGER_HOLD_STATIONARY_GRENADE = fINGER_HOLD_STATIONARY_GRENADE; - } - - public double RECOIL_TIME_NORMALIZE { get; set; } - public double RECOIL_PER_METER { get; set; } - public double MAX_RECOIL_PER_METER { get; set; } - public double HORIZONT_RECOIL_COEF { get; set; } - public double WAIT_NEXT_SINGLE_SHOT { get; set; } - public double WAIT_NEXT_SINGLE_SHOT_LONG_MAX { get; set; } - public double WAIT_NEXT_SINGLE_SHOT_LONG_MIN { get; set; } - public double MARKSMAN_DIST_SEK_COEF { get; set; } - public double FINGER_HOLD_SINGLE_SHOT { get; set; } - public double BASE_AUTOMATIC_TIME { get; set; } - public double AUTOMATIC_FIRE_SCATTERING_COEF { get; set; } - public double CHANCE_TO_CHANGE_TO_AUTOMATIC_FIRE_100 { get; set; } - public double FAR_DIST_ENEMY { get; set; } - public int SHOOT_FROM_COVER { get; set; } - public double FAR_DIST_ENEMY_SQR { get; set; } - public double MAX_DIST_COEF { get; set; } - public double RECOIL_DELTA_PRESS { get; set; } - public double RUN_DIST_NO_AMMO { get; set; } - public double RUN_DIST_NO_AMMO_SQRT { get; set; } - public int CAN_SHOOTS_TIME_TO_AMBUSH { get; set; } - public double NOT_TO_SEE_ENEMY_TO_WANT_RELOAD_PERCENT { get; set; } - public double NOT_TO_SEE_ENEMY_TO_WANT_RELOAD_SEC { get; set; } - public double RELOAD_PECNET_NO_ENEMY { get; set; } - public double CHANCE_TO_CHANGE_WEAPON { get; set; } - public double CHANCE_TO_CHANGE_WEAPON_WITH_HELMET { get; set; } - public double LOW_DIST_TO_CHANGE_WEAPON { get; set; } - public double FAR_DIST_TO_CHANGE_WEAPON { get; set; } - public double SUPPRESS_BY_SHOOT_TIME { get; set; } - public int SUPPRESS_TRIGGERS_DOWN { get; set; } - public double WAIT_NEXT_STATIONARY_GRENADE { get; set; } - public double FINGER_HOLD_STATIONARY_GRENADE { get; set; } - } - - public class Move - { - public Move(double bASE_ROTATE_SPEED, double rEACH_DIST, double rEACH_DIST_RUN, double sTART_SLOW_DIST, double bASESTART_SLOW_DIST, double sLOW_COEF, double dIST_TO_CAN_CHANGE_WAY, double dIST_TO_START_RAYCAST, double bASE_START_SERACH, double uPDATE_TIME_RECAL_WAY, double fAR_DIST, double fAR_DIST_SQR, double dIST_TO_CAN_CHANGE_WAY_SQR, double dIST_TO_START_RAYCAST_SQR, double bASE_SQRT_START_SERACH, double y_APPROXIMATION, double dELTA_LAST_SEEN_ENEMY, double rEACH_DIST_COVER, double rUN_TO_COVER_MIN, double cHANCE_TO_RUN_IF_NO_AMMO_0_100, bool rUN_IF_CANT_SHOOT, double rUN_IF_GAOL_FAR_THEN, double sEC_TO_CHANGE_TO_RUN) - { - BASE_ROTATE_SPEED = bASE_ROTATE_SPEED; - REACH_DIST = rEACH_DIST; - REACH_DIST_RUN = rEACH_DIST_RUN; - START_SLOW_DIST = sTART_SLOW_DIST; - BASESTART_SLOW_DIST = bASESTART_SLOW_DIST; - SLOW_COEF = sLOW_COEF; - DIST_TO_CAN_CHANGE_WAY = dIST_TO_CAN_CHANGE_WAY; - DIST_TO_START_RAYCAST = dIST_TO_START_RAYCAST; - BASE_START_SERACH = bASE_START_SERACH; - UPDATE_TIME_RECAL_WAY = uPDATE_TIME_RECAL_WAY; - FAR_DIST = fAR_DIST; - FAR_DIST_SQR = fAR_DIST_SQR; - DIST_TO_CAN_CHANGE_WAY_SQR = dIST_TO_CAN_CHANGE_WAY_SQR; - DIST_TO_START_RAYCAST_SQR = dIST_TO_START_RAYCAST_SQR; - BASE_SQRT_START_SERACH = bASE_SQRT_START_SERACH; - Y_APPROXIMATION = y_APPROXIMATION; - DELTA_LAST_SEEN_ENEMY = dELTA_LAST_SEEN_ENEMY; - REACH_DIST_COVER = rEACH_DIST_COVER; - RUN_TO_COVER_MIN = rUN_TO_COVER_MIN; - CHANCE_TO_RUN_IF_NO_AMMO_0_100 = cHANCE_TO_RUN_IF_NO_AMMO_0_100; - RUN_IF_CANT_SHOOT = rUN_IF_CANT_SHOOT; - RUN_IF_GAOL_FAR_THEN = rUN_IF_GAOL_FAR_THEN; - SEC_TO_CHANGE_TO_RUN = sEC_TO_CHANGE_TO_RUN; - } - - public double BASE_ROTATE_SPEED { get; set; } - public double REACH_DIST { get; set; } - public double REACH_DIST_RUN { get; set; } - public double START_SLOW_DIST { get; set; } - public double BASESTART_SLOW_DIST { get; set; } - public double SLOW_COEF { get; set; } - public double DIST_TO_CAN_CHANGE_WAY { get; set; } - public double DIST_TO_START_RAYCAST { get; set; } - public double BASE_START_SERACH { get; set; } - public double UPDATE_TIME_RECAL_WAY { get; set; } - public double FAR_DIST { get; set; } - public double FAR_DIST_SQR { get; set; } - public double DIST_TO_CAN_CHANGE_WAY_SQR { get; set; } - public double DIST_TO_START_RAYCAST_SQR { get; set; } - public double BASE_SQRT_START_SERACH { get; set; } - public double Y_APPROXIMATION { get; set; } - public double DELTA_LAST_SEEN_ENEMY { get; set; } - public double REACH_DIST_COVER { get; set; } - public double RUN_TO_COVER_MIN { get; set; } - public double CHANCE_TO_RUN_IF_NO_AMMO_0_100 { get; set; } - public bool RUN_IF_CANT_SHOOT { get; set; } - public double RUN_IF_GAOL_FAR_THEN { get; set; } - public double SEC_TO_CHANGE_TO_RUN { get; set; } - } - - public class Grenade - { - public Grenade(double dELTA_NEXT_ATTEMPT_FROM_COVER, double dELTA_NEXT_ATTEMPT, double mIN_DIST_NOT_TO_THROW, double nEAR_DELTA_THROW_TIME_SEC, double mIN_THROW_GRENADE_DIST, double mIN_THROW_GRENADE_DIST_SQRT, double mIN_DIST_NOT_TO_THROW_SQR, double rUN_AWAY, double rUN_AWAY_SQR, double aDD_GRENADE_AS_DANGER, double aDD_GRENADE_AS_DANGER_SQR, double cHANCE_TO_NOTIFY_ENEMY_GR_100, double grenadePerMeter, double rEQUEST_DIST_MUST_THROW_SQRT, double rEQUEST_DIST_MUST_THROW, int bEWARE_TYPE, double sHOOT_TO_SMOKE_CHANCE_100, double cHANCE_RUN_FLASHED_100, double mAX_FLASHED_DIST_TO_SHOOT, double mAX_FLASHED_DIST_TO_SHOOT_SQRT, double fLASH_GRENADE_TIME_COEF, double sIZE_SPOTTED_COEF, double bE_ATTENTION_COEF, double tIME_SHOOT_TO_FLASH, double cLOSE_TO_SMOKE_TO_SHOOT, double cLOSE_TO_SMOKE_TO_SHOOT_SQRT, double cLOSE_TO_SMOKE_TIME_DELTA, double sMOKE_CHECK_DELTA, double dELTA_GRENADE_START_TIME, double aMBUSH_IF_SMOKE_IN_ZONE_100, double aMBUSH_IF_SMOKE_RETURN_TO_ATTACK_SEC, bool nO_RUN_FROM_AI_GRENADES, double mAX_THROW_POWER, double mIN_THROW_DIST_PERCENT_0_1, double grenadePrecision, bool sTOP_WHEN_THROW_GRENADE, double wAIT_TIME_TURN_AWAY, double sMOKE_SUPPRESS_DELTA, double dAMAGE_GRENADE_SUPPRESS_DELTA, double sTUN_SUPPRESS_DELTA, bool cHEAT_START_GRENADE_PLACE, bool cAN_THROW_STRAIGHT_CONTACT, double sTRAIGHT_CONTACT_DELTA_SEC, int aNG_TYPE) - { - DELTA_NEXT_ATTEMPT_FROM_COVER = dELTA_NEXT_ATTEMPT_FROM_COVER; - DELTA_NEXT_ATTEMPT = dELTA_NEXT_ATTEMPT; - MIN_DIST_NOT_TO_THROW = mIN_DIST_NOT_TO_THROW; - NEAR_DELTA_THROW_TIME_SEC = nEAR_DELTA_THROW_TIME_SEC; - MIN_THROW_GRENADE_DIST = mIN_THROW_GRENADE_DIST; - MIN_THROW_GRENADE_DIST_SQRT = mIN_THROW_GRENADE_DIST_SQRT; - MIN_DIST_NOT_TO_THROW_SQR = mIN_DIST_NOT_TO_THROW_SQR; - RUN_AWAY = rUN_AWAY; - RUN_AWAY_SQR = rUN_AWAY_SQR; - ADD_GRENADE_AS_DANGER = aDD_GRENADE_AS_DANGER; - ADD_GRENADE_AS_DANGER_SQR = aDD_GRENADE_AS_DANGER_SQR; - CHANCE_TO_NOTIFY_ENEMY_GR_100 = cHANCE_TO_NOTIFY_ENEMY_GR_100; - GrenadePerMeter = grenadePerMeter; - REQUEST_DIST_MUST_THROW_SQRT = rEQUEST_DIST_MUST_THROW_SQRT; - REQUEST_DIST_MUST_THROW = rEQUEST_DIST_MUST_THROW; - BEWARE_TYPE = bEWARE_TYPE; - SHOOT_TO_SMOKE_CHANCE_100 = sHOOT_TO_SMOKE_CHANCE_100; - CHANCE_RUN_FLASHED_100 = cHANCE_RUN_FLASHED_100; - MAX_FLASHED_DIST_TO_SHOOT = mAX_FLASHED_DIST_TO_SHOOT; - MAX_FLASHED_DIST_TO_SHOOT_SQRT = mAX_FLASHED_DIST_TO_SHOOT_SQRT; - FLASH_GRENADE_TIME_COEF = fLASH_GRENADE_TIME_COEF; - SIZE_SPOTTED_COEF = sIZE_SPOTTED_COEF; - BE_ATTENTION_COEF = bE_ATTENTION_COEF; - TIME_SHOOT_TO_FLASH = tIME_SHOOT_TO_FLASH; - CLOSE_TO_SMOKE_TO_SHOOT = cLOSE_TO_SMOKE_TO_SHOOT; - CLOSE_TO_SMOKE_TO_SHOOT_SQRT = cLOSE_TO_SMOKE_TO_SHOOT_SQRT; - CLOSE_TO_SMOKE_TIME_DELTA = cLOSE_TO_SMOKE_TIME_DELTA; - SMOKE_CHECK_DELTA = sMOKE_CHECK_DELTA; - DELTA_GRENADE_START_TIME = dELTA_GRENADE_START_TIME; - AMBUSH_IF_SMOKE_IN_ZONE_100 = aMBUSH_IF_SMOKE_IN_ZONE_100; - AMBUSH_IF_SMOKE_RETURN_TO_ATTACK_SEC = aMBUSH_IF_SMOKE_RETURN_TO_ATTACK_SEC; - NO_RUN_FROM_AI_GRENADES = nO_RUN_FROM_AI_GRENADES; - MAX_THROW_POWER = mAX_THROW_POWER; - MIN_THROW_DIST_PERCENT_0_1 = mIN_THROW_DIST_PERCENT_0_1; - GrenadePrecision = grenadePrecision; - STOP_WHEN_THROW_GRENADE = sTOP_WHEN_THROW_GRENADE; - WAIT_TIME_TURN_AWAY = wAIT_TIME_TURN_AWAY; - SMOKE_SUPPRESS_DELTA = sMOKE_SUPPRESS_DELTA; - DAMAGE_GRENADE_SUPPRESS_DELTA = dAMAGE_GRENADE_SUPPRESS_DELTA; - STUN_SUPPRESS_DELTA = sTUN_SUPPRESS_DELTA; - CHEAT_START_GRENADE_PLACE = cHEAT_START_GRENADE_PLACE; - CAN_THROW_STRAIGHT_CONTACT = cAN_THROW_STRAIGHT_CONTACT; - STRAIGHT_CONTACT_DELTA_SEC = sTRAIGHT_CONTACT_DELTA_SEC; - ANG_TYPE = aNG_TYPE; - } - - public double DELTA_NEXT_ATTEMPT_FROM_COVER { get; set; } - public double DELTA_NEXT_ATTEMPT { get; set; } - public double MIN_DIST_NOT_TO_THROW { get; set; } - public double NEAR_DELTA_THROW_TIME_SEC { get; set; } - public double MIN_THROW_GRENADE_DIST { get; set; } - public double MIN_THROW_GRENADE_DIST_SQRT { get; set; } - public double MIN_DIST_NOT_TO_THROW_SQR { get; set; } - public double RUN_AWAY { get; set; } - public double RUN_AWAY_SQR { get; set; } - public double ADD_GRENADE_AS_DANGER { get; set; } - public double ADD_GRENADE_AS_DANGER_SQR { get; set; } - public double CHANCE_TO_NOTIFY_ENEMY_GR_100 { get; set; } - public double GrenadePerMeter { get; set; } - public double REQUEST_DIST_MUST_THROW_SQRT { get; set; } - public double REQUEST_DIST_MUST_THROW { get; set; } - public int BEWARE_TYPE { get; set; } - public double SHOOT_TO_SMOKE_CHANCE_100 { get; set; } - public double CHANCE_RUN_FLASHED_100 { get; set; } - public double MAX_FLASHED_DIST_TO_SHOOT { get; set; } - public double MAX_FLASHED_DIST_TO_SHOOT_SQRT { get; set; } - public double FLASH_GRENADE_TIME_COEF { get; set; } - public double SIZE_SPOTTED_COEF { get; set; } - public double BE_ATTENTION_COEF { get; set; } - public double TIME_SHOOT_TO_FLASH { get; set; } - public double CLOSE_TO_SMOKE_TO_SHOOT { get; set; } - public double CLOSE_TO_SMOKE_TO_SHOOT_SQRT { get; set; } - public double CLOSE_TO_SMOKE_TIME_DELTA { get; set; } - public double SMOKE_CHECK_DELTA { get; set; } - public double DELTA_GRENADE_START_TIME { get; set; } - public double AMBUSH_IF_SMOKE_IN_ZONE_100 { get; set; } - public double AMBUSH_IF_SMOKE_RETURN_TO_ATTACK_SEC { get; set; } - public bool NO_RUN_FROM_AI_GRENADES { get; set; } - public double MAX_THROW_POWER { get; set; } - public double MIN_THROW_DIST_PERCENT_0_1 { get; set; } - public double GrenadePrecision { get; set; } - public bool STOP_WHEN_THROW_GRENADE { get; set; } - public double WAIT_TIME_TURN_AWAY { get; set; } - public double SMOKE_SUPPRESS_DELTA { get; set; } - public double DAMAGE_GRENADE_SUPPRESS_DELTA { get; set; } - public double STUN_SUPPRESS_DELTA { get; set; } - public bool CHEAT_START_GRENADE_PLACE { get; set; } - public bool CAN_THROW_STRAIGHT_CONTACT { get; set; } - public double STRAIGHT_CONTACT_DELTA_SEC { get; set; } - public int ANG_TYPE { get; set; } - } - - public class Change - { - public Change(double sMOKE_VISION_DIST, double sMOKE_GAIN_SIGHT, double sMOKE_SCATTERING, double sMOKE_PRECICING, double sMOKE_HEARING, double sMOKE_ACCURATY, double sMOKE_LAY_CHANCE, double fLASH_VISION_DIST, double fLASH_GAIN_SIGHT, double fLASH_SCATTERING, double fLASH_PRECICING, double fLASH_HEARING, double fLASH_ACCURATY, double fLASH_LAY_CHANCE, double sTUN_HEARING) - { - SMOKE_VISION_DIST = sMOKE_VISION_DIST; - SMOKE_GAIN_SIGHT = sMOKE_GAIN_SIGHT; - SMOKE_SCATTERING = sMOKE_SCATTERING; - SMOKE_PRECICING = sMOKE_PRECICING; - SMOKE_HEARING = sMOKE_HEARING; - SMOKE_ACCURATY = sMOKE_ACCURATY; - SMOKE_LAY_CHANCE = sMOKE_LAY_CHANCE; - FLASH_VISION_DIST = fLASH_VISION_DIST; - FLASH_GAIN_SIGHT = fLASH_GAIN_SIGHT; - FLASH_SCATTERING = fLASH_SCATTERING; - FLASH_PRECICING = fLASH_PRECICING; - FLASH_HEARING = fLASH_HEARING; - FLASH_ACCURATY = fLASH_ACCURATY; - FLASH_LAY_CHANCE = fLASH_LAY_CHANCE; - STUN_HEARING = sTUN_HEARING; - } - - public double SMOKE_VISION_DIST { get; set; } - public double SMOKE_GAIN_SIGHT { get; set; } - public double SMOKE_SCATTERING { get; set; } - public double SMOKE_PRECICING { get; set; } - public double SMOKE_HEARING { get; set; } - public double SMOKE_ACCURATY { get; set; } - public double SMOKE_LAY_CHANCE { get; set; } - public double FLASH_VISION_DIST { get; set; } - public double FLASH_GAIN_SIGHT { get; set; } - public double FLASH_SCATTERING { get; set; } - public double FLASH_PRECICING { get; set; } - public double FLASH_HEARING { get; set; } - public double FLASH_ACCURATY { get; set; } - public double FLASH_LAY_CHANCE { get; set; } - public double STUN_HEARING { get; set; } - } - - public class Cover - { - public Cover(double rETURN_TO_ATTACK_AFTER_AMBUSH_MIN, double rETURN_TO_ATTACK_AFTER_AMBUSH_MAX, double sOUND_TO_GET_SPOTTED, double tIME_TO_MOVE_TO_COVER, double mAX_DIST_OF_COVER, double cHANGE_RUN_TO_COVER_SEC, double cHANGE_RUN_TO_COVER_SEC_GREANDE, double mIN_DIST_TO_ENEMY, double dIST_CANT_CHANGE_WAY, double dIST_CHECK_SFETY, double tIME_CHECK_SAFE, double hIDE_TO_COVER_TIME, double mAX_DIST_OF_COVER_SQR, double dIST_CANT_CHANGE_WAY_SQR, double sPOTTED_COVERS_RADIUS, double lOOK_LAST_ENEMY_POS_MOVING, double lOOK_TO_HIT_POINT_IF_LAST_ENEMY, double lOOK_LAST_ENEMY_POS_LOOKAROUND, int oFFSET_LOOK_ALONG_WALL_ANG, double sPOTTED_GRENADE_RADIUS, double mAX_SPOTTED_TIME_SEC, double wAIT_INT_COVER_FINDING_ENEMY, double cLOSE_DIST_POINT_SQRT, double dELTA_SEEN_FROM_COVE_LAST_POS, bool mOVE_TO_COVER_WHEN_TARGET, bool rUN_COVER_IF_CAN_AND_NO_ENEMIES, double sPOTTED_GRENADE_TIME, bool dEPENDS_Y_DIST_TO_BOT, double rUN_IF_FAR, double rUN_IF_FAR_SQRT, double sTAY_IF_FAR, double sTAY_IF_FAR_SQRT, bool cHECK_COVER_ENEMY_LOOK, int sHOOT_NEAR_TO_LEAVE, double sHOOT_NEAR_SEC_PERIOD, int hITS_TO_LEAVE_COVER, int hITS_TO_LEAVE_COVER_UNKNOWN, double dOG_FIGHT_AFTER_LEAVE, bool nOT_LOOK_AT_WALL_IS_DANGER, double mIN_DEFENCE_LEVEL, double gOOD_DIST_TO_POINT_COEF, double eNEMY_DIST_TO_GO_OUT, double sTATIONARY_WEAPON_NO_ENEMY_GETUP, int sTATIONARY_WEAPON_MAX_DIST_TO_USE) - { - RETURN_TO_ATTACK_AFTER_AMBUSH_MIN = rETURN_TO_ATTACK_AFTER_AMBUSH_MIN; - RETURN_TO_ATTACK_AFTER_AMBUSH_MAX = rETURN_TO_ATTACK_AFTER_AMBUSH_MAX; - SOUND_TO_GET_SPOTTED = sOUND_TO_GET_SPOTTED; - TIME_TO_MOVE_TO_COVER = tIME_TO_MOVE_TO_COVER; - MAX_DIST_OF_COVER = mAX_DIST_OF_COVER; - CHANGE_RUN_TO_COVER_SEC = cHANGE_RUN_TO_COVER_SEC; - CHANGE_RUN_TO_COVER_SEC_GREANDE = cHANGE_RUN_TO_COVER_SEC_GREANDE; - MIN_DIST_TO_ENEMY = mIN_DIST_TO_ENEMY; - DIST_CANT_CHANGE_WAY = dIST_CANT_CHANGE_WAY; - DIST_CHECK_SFETY = dIST_CHECK_SFETY; - TIME_CHECK_SAFE = tIME_CHECK_SAFE; - HIDE_TO_COVER_TIME = hIDE_TO_COVER_TIME; - MAX_DIST_OF_COVER_SQR = mAX_DIST_OF_COVER_SQR; - DIST_CANT_CHANGE_WAY_SQR = dIST_CANT_CHANGE_WAY_SQR; - SPOTTED_COVERS_RADIUS = sPOTTED_COVERS_RADIUS; - LOOK_LAST_ENEMY_POS_MOVING = lOOK_LAST_ENEMY_POS_MOVING; - LOOK_TO_HIT_POINT_IF_LAST_ENEMY = lOOK_TO_HIT_POINT_IF_LAST_ENEMY; - LOOK_LAST_ENEMY_POS_LOOKAROUND = lOOK_LAST_ENEMY_POS_LOOKAROUND; - OFFSET_LOOK_ALONG_WALL_ANG = oFFSET_LOOK_ALONG_WALL_ANG; - SPOTTED_GRENADE_RADIUS = sPOTTED_GRENADE_RADIUS; - MAX_SPOTTED_TIME_SEC = mAX_SPOTTED_TIME_SEC; - WAIT_INT_COVER_FINDING_ENEMY = wAIT_INT_COVER_FINDING_ENEMY; - CLOSE_DIST_POINT_SQRT = cLOSE_DIST_POINT_SQRT; - DELTA_SEEN_FROM_COVE_LAST_POS = dELTA_SEEN_FROM_COVE_LAST_POS; - MOVE_TO_COVER_WHEN_TARGET = mOVE_TO_COVER_WHEN_TARGET; - RUN_COVER_IF_CAN_AND_NO_ENEMIES = rUN_COVER_IF_CAN_AND_NO_ENEMIES; - SPOTTED_GRENADE_TIME = sPOTTED_GRENADE_TIME; - DEPENDS_Y_DIST_TO_BOT = dEPENDS_Y_DIST_TO_BOT; - RUN_IF_FAR = rUN_IF_FAR; - RUN_IF_FAR_SQRT = rUN_IF_FAR_SQRT; - STAY_IF_FAR = sTAY_IF_FAR; - STAY_IF_FAR_SQRT = sTAY_IF_FAR_SQRT; - CHECK_COVER_ENEMY_LOOK = cHECK_COVER_ENEMY_LOOK; - SHOOT_NEAR_TO_LEAVE = sHOOT_NEAR_TO_LEAVE; - SHOOT_NEAR_SEC_PERIOD = sHOOT_NEAR_SEC_PERIOD; - HITS_TO_LEAVE_COVER = hITS_TO_LEAVE_COVER; - HITS_TO_LEAVE_COVER_UNKNOWN = hITS_TO_LEAVE_COVER_UNKNOWN; - DOG_FIGHT_AFTER_LEAVE = dOG_FIGHT_AFTER_LEAVE; - NOT_LOOK_AT_WALL_IS_DANGER = nOT_LOOK_AT_WALL_IS_DANGER; - MIN_DEFENCE_LEVEL = mIN_DEFENCE_LEVEL; - GOOD_DIST_TO_POINT_COEF = gOOD_DIST_TO_POINT_COEF; - ENEMY_DIST_TO_GO_OUT = eNEMY_DIST_TO_GO_OUT; - STATIONARY_WEAPON_NO_ENEMY_GETUP = sTATIONARY_WEAPON_NO_ENEMY_GETUP; - STATIONARY_WEAPON_MAX_DIST_TO_USE = sTATIONARY_WEAPON_MAX_DIST_TO_USE; - } - - public double RETURN_TO_ATTACK_AFTER_AMBUSH_MIN { get; set; } - public double RETURN_TO_ATTACK_AFTER_AMBUSH_MAX { get; set; } - public double SOUND_TO_GET_SPOTTED { get; set; } - public double TIME_TO_MOVE_TO_COVER { get; set; } - public double MAX_DIST_OF_COVER { get; set; } - public double CHANGE_RUN_TO_COVER_SEC { get; set; } - public double CHANGE_RUN_TO_COVER_SEC_GREANDE { get; set; } - public double MIN_DIST_TO_ENEMY { get; set; } - public double DIST_CANT_CHANGE_WAY { get; set; } - public double DIST_CHECK_SFETY { get; set; } - public double TIME_CHECK_SAFE { get; set; } - public double HIDE_TO_COVER_TIME { get; set; } - public double MAX_DIST_OF_COVER_SQR { get; set; } - public double DIST_CANT_CHANGE_WAY_SQR { get; set; } - public double SPOTTED_COVERS_RADIUS { get; set; } - public double LOOK_LAST_ENEMY_POS_MOVING { get; set; } - public double LOOK_TO_HIT_POINT_IF_LAST_ENEMY { get; set; } - public double LOOK_LAST_ENEMY_POS_LOOKAROUND { get; set; } - public int OFFSET_LOOK_ALONG_WALL_ANG { get; set; } - public double SPOTTED_GRENADE_RADIUS { get; set; } - public double MAX_SPOTTED_TIME_SEC { get; set; } - public double WAIT_INT_COVER_FINDING_ENEMY { get; set; } - public double CLOSE_DIST_POINT_SQRT { get; set; } - public double DELTA_SEEN_FROM_COVE_LAST_POS { get; set; } - public bool MOVE_TO_COVER_WHEN_TARGET { get; set; } - public bool RUN_COVER_IF_CAN_AND_NO_ENEMIES { get; set; } - public double SPOTTED_GRENADE_TIME { get; set; } - public bool DEPENDS_Y_DIST_TO_BOT { get; set; } - public double RUN_IF_FAR { get; set; } - public double RUN_IF_FAR_SQRT { get; set; } - public double STAY_IF_FAR { get; set; } - public double STAY_IF_FAR_SQRT { get; set; } - public bool CHECK_COVER_ENEMY_LOOK { get; set; } - public int SHOOT_NEAR_TO_LEAVE { get; set; } - public double SHOOT_NEAR_SEC_PERIOD { get; set; } - public int HITS_TO_LEAVE_COVER { get; set; } - public int HITS_TO_LEAVE_COVER_UNKNOWN { get; set; } - public double DOG_FIGHT_AFTER_LEAVE { get; set; } - public bool NOT_LOOK_AT_WALL_IS_DANGER { get; set; } - public double MIN_DEFENCE_LEVEL { get; set; } - public double GOOD_DIST_TO_POINT_COEF { get; set; } - public double ENEMY_DIST_TO_GO_OUT { get; set; } - public double STATIONARY_WEAPON_NO_ENEMY_GETUP { get; set; } - public int STATIONARY_WEAPON_MAX_DIST_TO_USE { get; set; } - } - - public class Patrol - { - public Patrol(double dEAD_BODY_LOOK_PERIOD, double lOOK_TIME_BASE, bool cAN_LOOK_TO_DEADBODIES, bool cAN_CHOOSE_RESERV, bool tRY_CHOOSE_RESERV_WAY_ON_START, bool cAN_FRIENDLY_TILT, bool cAN_HARD_AIM, double rESERVE_TIME_STAY, double fRIEND_SEARCH_SEC, double tALK_DELAY, double mIN_TALK_DELAY, double tALK_DELAY_BIG, double cHANGE_WAY_TIME, double mIN_DIST_TO_CLOSE_TALK, double vISION_DIST_COEF_PEACE, double mIN_DIST_TO_CLOSE_TALK_SQR, double cHANCE_TO_CUT_WAY_0_100, double cUT_WAY_MIN_0_1, double cUT_WAY_MAX_0_1, double cHANCE_TO_CHANGE_WAY_0_100, int cHANCE_TO_SHOOT_DEADBODY, double sUSPETION_PLACE_LIFETIME, double rESERVE_OUT_TIME, double cLOSE_TO_SELECT_RESERV_WAY, double mAX_YDIST_TO_START_WARN_REQUEST_TO_REQUESTER) - { - DEAD_BODY_LOOK_PERIOD = dEAD_BODY_LOOK_PERIOD; - LOOK_TIME_BASE = lOOK_TIME_BASE; - CAN_LOOK_TO_DEADBODIES = cAN_LOOK_TO_DEADBODIES; - CAN_CHOOSE_RESERV = cAN_CHOOSE_RESERV; - TRY_CHOOSE_RESERV_WAY_ON_START = tRY_CHOOSE_RESERV_WAY_ON_START; - CAN_FRIENDLY_TILT = cAN_FRIENDLY_TILT; - CAN_HARD_AIM = cAN_HARD_AIM; - RESERVE_TIME_STAY = rESERVE_TIME_STAY; - FRIEND_SEARCH_SEC = fRIEND_SEARCH_SEC; - TALK_DELAY = tALK_DELAY; - MIN_TALK_DELAY = mIN_TALK_DELAY; - TALK_DELAY_BIG = tALK_DELAY_BIG; - CHANGE_WAY_TIME = cHANGE_WAY_TIME; - MIN_DIST_TO_CLOSE_TALK = mIN_DIST_TO_CLOSE_TALK; - VISION_DIST_COEF_PEACE = vISION_DIST_COEF_PEACE; - MIN_DIST_TO_CLOSE_TALK_SQR = mIN_DIST_TO_CLOSE_TALK_SQR; - CHANCE_TO_CUT_WAY_0_100 = cHANCE_TO_CUT_WAY_0_100; - CUT_WAY_MIN_0_1 = cUT_WAY_MIN_0_1; - CUT_WAY_MAX_0_1 = cUT_WAY_MAX_0_1; - CHANCE_TO_CHANGE_WAY_0_100 = cHANCE_TO_CHANGE_WAY_0_100; - CHANCE_TO_SHOOT_DEADBODY = cHANCE_TO_SHOOT_DEADBODY; - SUSPETION_PLACE_LIFETIME = sUSPETION_PLACE_LIFETIME; - RESERVE_OUT_TIME = rESERVE_OUT_TIME; - CLOSE_TO_SELECT_RESERV_WAY = cLOSE_TO_SELECT_RESERV_WAY; - MAX_YDIST_TO_START_WARN_REQUEST_TO_REQUESTER = mAX_YDIST_TO_START_WARN_REQUEST_TO_REQUESTER; - } - - public double DEAD_BODY_LOOK_PERIOD { get; set; } - public double LOOK_TIME_BASE { get; set; } - public bool CAN_LOOK_TO_DEADBODIES { get; set; } - public bool CAN_CHOOSE_RESERV { get; set; } - public bool TRY_CHOOSE_RESERV_WAY_ON_START { get; set; } - public bool CAN_FRIENDLY_TILT { get; set; } - public bool CAN_HARD_AIM { get; set; } - public double RESERVE_TIME_STAY { get; set; } - public double FRIEND_SEARCH_SEC { get; set; } - public double TALK_DELAY { get; set; } - public double MIN_TALK_DELAY { get; set; } - public double TALK_DELAY_BIG { get; set; } - public double CHANGE_WAY_TIME { get; set; } - public double MIN_DIST_TO_CLOSE_TALK { get; set; } - public double VISION_DIST_COEF_PEACE { get; set; } - public double MIN_DIST_TO_CLOSE_TALK_SQR { get; set; } - public double CHANCE_TO_CUT_WAY_0_100 { get; set; } - public double CUT_WAY_MIN_0_1 { get; set; } - public double CUT_WAY_MAX_0_1 { get; set; } - public double CHANCE_TO_CHANGE_WAY_0_100 { get; set; } - public int CHANCE_TO_SHOOT_DEADBODY { get; set; } - public double SUSPETION_PLACE_LIFETIME { get; set; } - public double RESERVE_OUT_TIME { get; set; } - public double CLOSE_TO_SELECT_RESERV_WAY { get; set; } - public double MAX_YDIST_TO_START_WARN_REQUEST_TO_REQUESTER { get; set; } - } - - public class Hearing - { - public Hearing(double bOT_CLOSE_PANIC_DIST, double cHANCE_TO_HEAR_SIMPLE_SOUND_0_1, double dISPERSION_COEF, double cLOSE_DIST, double fAR_DIST, double sOUND_DIR_DEEFREE, double dIST_PLACE_TO_FIND_POINT, double dEAD_BODY_SOUND_RAD, bool lOOK_ONLY_DANGER, double rESET_TIMER_DIST, double hEAR_DELAY_WHEN_PEACE, double hEAR_DELAY_WHEN_HAVE_SMT, double lOOK_ONLY_DANGER_DELTA) - { - BOT_CLOSE_PANIC_DIST = bOT_CLOSE_PANIC_DIST; - CHANCE_TO_HEAR_SIMPLE_SOUND_0_1 = cHANCE_TO_HEAR_SIMPLE_SOUND_0_1; - DISPERSION_COEF = dISPERSION_COEF; - CLOSE_DIST = cLOSE_DIST; - FAR_DIST = fAR_DIST; - SOUND_DIR_DEEFREE = sOUND_DIR_DEEFREE; - DIST_PLACE_TO_FIND_POINT = dIST_PLACE_TO_FIND_POINT; - DEAD_BODY_SOUND_RAD = dEAD_BODY_SOUND_RAD; - LOOK_ONLY_DANGER = lOOK_ONLY_DANGER; - RESET_TIMER_DIST = rESET_TIMER_DIST; - HEAR_DELAY_WHEN_PEACE = hEAR_DELAY_WHEN_PEACE; - HEAR_DELAY_WHEN_HAVE_SMT = hEAR_DELAY_WHEN_HAVE_SMT; - LOOK_ONLY_DANGER_DELTA = lOOK_ONLY_DANGER_DELTA; - } - - public double BOT_CLOSE_PANIC_DIST { get; set; } - public double CHANCE_TO_HEAR_SIMPLE_SOUND_0_1 { get; set; } - public double DISPERSION_COEF { get; set; } - public double CLOSE_DIST { get; set; } - public double FAR_DIST { get; set; } - public double SOUND_DIR_DEEFREE { get; set; } - public double DIST_PLACE_TO_FIND_POINT { get; set; } - public double DEAD_BODY_SOUND_RAD { get; set; } - public bool LOOK_ONLY_DANGER { get; set; } - public double RESET_TIMER_DIST { get; set; } - public double HEAR_DELAY_WHEN_PEACE { get; set; } - public double HEAR_DELAY_WHEN_HAVE_SMT { get; set; } - public double LOOK_ONLY_DANGER_DELTA { get; set; } - } - - public class Mind - { - public Mind(int hOW_WORK_OVER_DEAD_BODY, int mIN_SHOOTS_TIME, int mAX_SHOOTS_TIME, int tIME_LEAVE_MAP, double tIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC, double dAMAGE_REDUCTION_TIME_SEC, double mIN_DAMAGE_SCARE, double cHANCE_TO_RUN_CAUSE_DAMAGE_0_100, double tIME_TO_FORGOR_ABOUT_ENEMY_SEC, double tIME_TO_FIND_ENEMY, double mAX_AGGRO_BOT_DIST, double hIT_POINT_DETECTION, double dANGER_POINT_CHOOSE_COEF, double sIMPLE_POINT_CHOOSE_COEF, double lASTSEEN_POINT_CHOOSE_COEF, double cOVER_DIST_COEF, double dIST_TO_FOUND_SQRT, double mAX_AGGRO_BOT_DIST_SQR, double dIST_TO_STOP_RUN_ENEMY, bool cAN_TAKE_ITEMS, double eNEMY_LOOK_AT_ME_ANG, double mIN_START_AGGRESION_COEF, double mAX_START_AGGRESION_COEF, double bULLET_FEEL_DIST, double bULLET_FEEL_CLOSE_SDIST, double aTTACK_IMMEDIATLY_CHANCE_0_100, double cHANCE_FUCK_YOU_ON_CONTACT_100, double fRIEND_DEAD_AGR_LOW, double fRIEND_AGR_KILL, double lAST_ENEMY_LOOK_TO, bool cAN_RECIVE_PLAYER_REQUESTS, bool cAN_USE_MEDS, double sUSPETION_POINT_CHANCE_ADD100, bool aMBUSH_WHEN_UNDER_FIRE, double aMBUSH_WHEN_UNDER_FIRE_TIME_RESIST, double aTTACK_ENEMY_IF_PROTECT_DELTA_LAST_TIME_SEEN, double hOLD_IF_PROTECT_DELTA_LAST_TIME_SEEN, double fIND_COVER_TO_GET_POSITION_WITH_SHOOT, bool pROTECT_TIME_REAL, double cHANCE_SHOOT_WHEN_WARN_PLAYER_100, bool cAN_PANIC_IS_PROTECT, bool nO_RUN_AWAY_FOR_SAFE, double pART_PERCENT_TO_HEAL, double pROTECT_DELTA_HEAL_SEC, bool cAN_STAND_BY, bool cAN_THROW_REQUESTS, double gROUP_ANY_PHRASE_DELAY, double gROUP_EXACTLY_PHRASE_DELAY, double dIST_TO_ENEMY_YO_CAN_HEAL, double cHANCE_TO_STAY_WHEN_WARN_PLAYER_100, double dOG_FIGHT_OUT, double dOG_FIGHT_IN, double sHOOT_INSTEAD_DOG_FIGHT, double pISTOL_SHOTGUN_AMBUSH_DIST, double sTANDART_AMBUSH_DIST, double aI_POWER_COEF, double cOVER_SECONDS_AFTER_LOSE_VISION, bool cOVER_SELF_ALWAYS_IF_DAMAGED, double sEC_TO_MORE_DIST_TO_RUN, double hEAL_DELAY_SEC, double hIT_DELAY_WHEN_HAVE_SMT, double hIT_DELAY_WHEN_PEACE, bool tALK_WITH_QUERY, bool wILL_PERSUE_AXEMAN) - { - HOW_WORK_OVER_DEAD_BODY = hOW_WORK_OVER_DEAD_BODY; - MIN_SHOOTS_TIME = mIN_SHOOTS_TIME; - MAX_SHOOTS_TIME = mAX_SHOOTS_TIME; - TIME_LEAVE_MAP = tIME_LEAVE_MAP; - TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC = tIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC; - DAMAGE_REDUCTION_TIME_SEC = dAMAGE_REDUCTION_TIME_SEC; - MIN_DAMAGE_SCARE = mIN_DAMAGE_SCARE; - CHANCE_TO_RUN_CAUSE_DAMAGE_0_100 = cHANCE_TO_RUN_CAUSE_DAMAGE_0_100; - TIME_TO_FORGOR_ABOUT_ENEMY_SEC = tIME_TO_FORGOR_ABOUT_ENEMY_SEC; - TIME_TO_FIND_ENEMY = tIME_TO_FIND_ENEMY; - MAX_AGGRO_BOT_DIST = mAX_AGGRO_BOT_DIST; - HIT_POINT_DETECTION = hIT_POINT_DETECTION; - DANGER_POINT_CHOOSE_COEF = dANGER_POINT_CHOOSE_COEF; - SIMPLE_POINT_CHOOSE_COEF = sIMPLE_POINT_CHOOSE_COEF; - LASTSEEN_POINT_CHOOSE_COEF = lASTSEEN_POINT_CHOOSE_COEF; - COVER_DIST_COEF = cOVER_DIST_COEF; - DIST_TO_FOUND_SQRT = dIST_TO_FOUND_SQRT; - MAX_AGGRO_BOT_DIST_SQR = mAX_AGGRO_BOT_DIST_SQR; - DIST_TO_STOP_RUN_ENEMY = dIST_TO_STOP_RUN_ENEMY; - CAN_TAKE_ITEMS = cAN_TAKE_ITEMS; - ENEMY_LOOK_AT_ME_ANG = eNEMY_LOOK_AT_ME_ANG; - MIN_START_AGGRESION_COEF = mIN_START_AGGRESION_COEF; - MAX_START_AGGRESION_COEF = mAX_START_AGGRESION_COEF; - BULLET_FEEL_DIST = bULLET_FEEL_DIST; - BULLET_FEEL_CLOSE_SDIST = bULLET_FEEL_CLOSE_SDIST; - ATTACK_IMMEDIATLY_CHANCE_0_100 = aTTACK_IMMEDIATLY_CHANCE_0_100; - CHANCE_FUCK_YOU_ON_CONTACT_100 = cHANCE_FUCK_YOU_ON_CONTACT_100; - FRIEND_DEAD_AGR_LOW = fRIEND_DEAD_AGR_LOW; - FRIEND_AGR_KILL = fRIEND_AGR_KILL; - LAST_ENEMY_LOOK_TO = lAST_ENEMY_LOOK_TO; - CAN_RECIVE_PLAYER_REQUESTS = cAN_RECIVE_PLAYER_REQUESTS; - CAN_USE_MEDS = cAN_USE_MEDS; - SUSPETION_POINT_CHANCE_ADD100 = sUSPETION_POINT_CHANCE_ADD100; - AMBUSH_WHEN_UNDER_FIRE = aMBUSH_WHEN_UNDER_FIRE; - AMBUSH_WHEN_UNDER_FIRE_TIME_RESIST = aMBUSH_WHEN_UNDER_FIRE_TIME_RESIST; - ATTACK_ENEMY_IF_PROTECT_DELTA_LAST_TIME_SEEN = aTTACK_ENEMY_IF_PROTECT_DELTA_LAST_TIME_SEEN; - HOLD_IF_PROTECT_DELTA_LAST_TIME_SEEN = hOLD_IF_PROTECT_DELTA_LAST_TIME_SEEN; - FIND_COVER_TO_GET_POSITION_WITH_SHOOT = fIND_COVER_TO_GET_POSITION_WITH_SHOOT; - PROTECT_TIME_REAL = pROTECT_TIME_REAL; - CHANCE_SHOOT_WHEN_WARN_PLAYER_100 = cHANCE_SHOOT_WHEN_WARN_PLAYER_100; - CAN_PANIC_IS_PROTECT = cAN_PANIC_IS_PROTECT; - NO_RUN_AWAY_FOR_SAFE = nO_RUN_AWAY_FOR_SAFE; - PART_PERCENT_TO_HEAL = pART_PERCENT_TO_HEAL; - PROTECT_DELTA_HEAL_SEC = pROTECT_DELTA_HEAL_SEC; - CAN_STAND_BY = cAN_STAND_BY; - CAN_THROW_REQUESTS = cAN_THROW_REQUESTS; - GROUP_ANY_PHRASE_DELAY = gROUP_ANY_PHRASE_DELAY; - GROUP_EXACTLY_PHRASE_DELAY = gROUP_EXACTLY_PHRASE_DELAY; - DIST_TO_ENEMY_YO_CAN_HEAL = dIST_TO_ENEMY_YO_CAN_HEAL; - CHANCE_TO_STAY_WHEN_WARN_PLAYER_100 = cHANCE_TO_STAY_WHEN_WARN_PLAYER_100; - DOG_FIGHT_OUT = dOG_FIGHT_OUT; - DOG_FIGHT_IN = dOG_FIGHT_IN; - SHOOT_INSTEAD_DOG_FIGHT = sHOOT_INSTEAD_DOG_FIGHT; - PISTOL_SHOTGUN_AMBUSH_DIST = pISTOL_SHOTGUN_AMBUSH_DIST; - STANDART_AMBUSH_DIST = sTANDART_AMBUSH_DIST; - AI_POWER_COEF = aI_POWER_COEF; - COVER_SECONDS_AFTER_LOSE_VISION = cOVER_SECONDS_AFTER_LOSE_VISION; - COVER_SELF_ALWAYS_IF_DAMAGED = cOVER_SELF_ALWAYS_IF_DAMAGED; - SEC_TO_MORE_DIST_TO_RUN = sEC_TO_MORE_DIST_TO_RUN; - HEAL_DELAY_SEC = hEAL_DELAY_SEC; - HIT_DELAY_WHEN_HAVE_SMT = hIT_DELAY_WHEN_HAVE_SMT; - HIT_DELAY_WHEN_PEACE = hIT_DELAY_WHEN_PEACE; - TALK_WITH_QUERY = tALK_WITH_QUERY; - WILL_PERSUE_AXEMAN = wILL_PERSUE_AXEMAN; - } - - public int HOW_WORK_OVER_DEAD_BODY { get; set; } - public int MIN_SHOOTS_TIME { get; set; } - public int MAX_SHOOTS_TIME { get; set; } - public int TIME_LEAVE_MAP { get; set; } - public double TIME_TO_RUN_TO_COVER_CAUSE_SHOOT_SEC { get; set; } - public double DAMAGE_REDUCTION_TIME_SEC { get; set; } - public double MIN_DAMAGE_SCARE { get; set; } - public double CHANCE_TO_RUN_CAUSE_DAMAGE_0_100 { get; set; } - public double TIME_TO_FORGOR_ABOUT_ENEMY_SEC { get; set; } - public double TIME_TO_FIND_ENEMY { get; set; } - public double MAX_AGGRO_BOT_DIST { get; set; } - public double HIT_POINT_DETECTION { get; set; } - public double DANGER_POINT_CHOOSE_COEF { get; set; } - public double SIMPLE_POINT_CHOOSE_COEF { get; set; } - public double LASTSEEN_POINT_CHOOSE_COEF { get; set; } - public double COVER_DIST_COEF { get; set; } - public double DIST_TO_FOUND_SQRT { get; set; } - public double MAX_AGGRO_BOT_DIST_SQR { get; set; } - public double DIST_TO_STOP_RUN_ENEMY { get; set; } - public bool CAN_TAKE_ITEMS { get; set; } - public double ENEMY_LOOK_AT_ME_ANG { get; set; } - public double MIN_START_AGGRESION_COEF { get; set; } - public double MAX_START_AGGRESION_COEF { get; set; } - public double BULLET_FEEL_DIST { get; set; } - public double BULLET_FEEL_CLOSE_SDIST { get; set; } - public double ATTACK_IMMEDIATLY_CHANCE_0_100 { get; set; } - public double CHANCE_FUCK_YOU_ON_CONTACT_100 { get; set; } - public double FRIEND_DEAD_AGR_LOW { get; set; } - public double FRIEND_AGR_KILL { get; set; } - public double LAST_ENEMY_LOOK_TO { get; set; } - public bool CAN_RECIVE_PLAYER_REQUESTS { get; set; } - public bool CAN_USE_MEDS { get; set; } - public double SUSPETION_POINT_CHANCE_ADD100 { get; set; } - public bool AMBUSH_WHEN_UNDER_FIRE { get; set; } - public double AMBUSH_WHEN_UNDER_FIRE_TIME_RESIST { get; set; } - public double ATTACK_ENEMY_IF_PROTECT_DELTA_LAST_TIME_SEEN { get; set; } - public double HOLD_IF_PROTECT_DELTA_LAST_TIME_SEEN { get; set; } - public double FIND_COVER_TO_GET_POSITION_WITH_SHOOT { get; set; } - public bool PROTECT_TIME_REAL { get; set; } - public double CHANCE_SHOOT_WHEN_WARN_PLAYER_100 { get; set; } - public bool CAN_PANIC_IS_PROTECT { get; set; } - public bool NO_RUN_AWAY_FOR_SAFE { get; set; } - public double PART_PERCENT_TO_HEAL { get; set; } - public double PROTECT_DELTA_HEAL_SEC { get; set; } - public bool CAN_STAND_BY { get; set; } - public bool CAN_THROW_REQUESTS { get; set; } - public double GROUP_ANY_PHRASE_DELAY { get; set; } - public double GROUP_EXACTLY_PHRASE_DELAY { get; set; } - public double DIST_TO_ENEMY_YO_CAN_HEAL { get; set; } - public double CHANCE_TO_STAY_WHEN_WARN_PLAYER_100 { get; set; } - public double DOG_FIGHT_OUT { get; set; } - public double DOG_FIGHT_IN { get; set; } - public double SHOOT_INSTEAD_DOG_FIGHT { get; set; } - public double PISTOL_SHOTGUN_AMBUSH_DIST { get; set; } - public double STANDART_AMBUSH_DIST { get; set; } - public double AI_POWER_COEF { get; set; } - public double COVER_SECONDS_AFTER_LOSE_VISION { get; set; } - public bool COVER_SELF_ALWAYS_IF_DAMAGED { get; set; } - public double SEC_TO_MORE_DIST_TO_RUN { get; set; } - public double HEAL_DELAY_SEC { get; set; } - public double HIT_DELAY_WHEN_HAVE_SMT { get; set; } - public double HIT_DELAY_WHEN_PEACE { get; set; } - public bool TALK_WITH_QUERY { get; set; } - public bool WILL_PERSUE_AXEMAN { get; set; } - } - - 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) - { - BOSS_DIST_TO_WARNING = bOSS_DIST_TO_WARNING; - BOSS_DIST_TO_WARNING_SQRT = bOSS_DIST_TO_WARNING_SQRT; - BOSS_DIST_TO_WARNING_OUT = bOSS_DIST_TO_WARNING_OUT; - BOSS_DIST_TO_WARNING_OUT_SQRT = bOSS_DIST_TO_WARNING_OUT_SQRT; - BOSS_DIST_TO_SHOOT = bOSS_DIST_TO_SHOOT; - BOSS_DIST_TO_SHOOT_SQRT = bOSS_DIST_TO_SHOOT_SQRT; - CHANCE_TO_SEND_GRENADE_100 = cHANCE_TO_SEND_GRENADE_100; - MAX_DIST_COVER_BOSS = mAX_DIST_COVER_BOSS; - MAX_DIST_COVER_BOSS_SQRT = mAX_DIST_COVER_BOSS_SQRT; - MAX_DIST_DECIDER_TO_SEND = mAX_DIST_DECIDER_TO_SEND; - MAX_DIST_DECIDER_TO_SEND_SQRT = mAX_DIST_DECIDER_TO_SEND_SQRT; - TIME_AFTER_LOSE = tIME_AFTER_LOSE; - TIME_AFTER_LOSE_DELTA = tIME_AFTER_LOSE_DELTA; - PERSONS_SEND = pERSONS_SEND; - DELTA_SEARCH_TIME = dELTA_SEARCH_TIME; - COVER_TO_SEND = cOVER_TO_SEND; - WAIT_NO_ATTACK_SAVAGE = wAIT_NO_ATTACK_SAVAGE; - CHANCE_USE_RESERVE_PATROL_100 = cHANCE_USE_RESERVE_PATROL_100; - KILLA_Y_DELTA_TO_BE_ENEMY_BOSS = kILLA_Y_DELTA_TO_BE_ENEMY_BOSS; - KILLA_DITANCE_TO_BE_ENEMY_BOSS = kILLA_DITANCE_TO_BE_ENEMY_BOSS; - KILLA_START_SEARCH_SEC = kILLA_START_SEARCH_SEC; - KILLA_CONTUTION_TIME = kILLA_CONTUTION_TIME; - KILLA_CLOSE_ATTACK_DIST = kILLA_CLOSE_ATTACK_DIST; - KILLA_MIDDLE_ATTACK_DIST = kILLA_MIDDLE_ATTACK_DIST; - KILLA_LARGE_ATTACK_DIST = kILLA_LARGE_ATTACK_DIST; - KILLA_SEARCH_METERS = kILLA_SEARCH_METERS; - KILLA_DEF_DIST_SQRT = kILLA_DEF_DIST_SQRT; - KILLA_SEARCH_SEC_STOP_AFTER_COMING = kILLA_SEARCH_SEC_STOP_AFTER_COMING; - KILLA_DIST_TO_GO_TO_SUPPRESS = kILLA_DIST_TO_GO_TO_SUPPRESS; - KILLA_AFTER_GRENADE_SUPPRESS_DELAY = kILLA_AFTER_GRENADE_SUPPRESS_DELAY; - KILLA_CLOSEATTACK_TIMES = kILLA_CLOSEATTACK_TIMES; - KILLA_CLOSEATTACK_DELAY = kILLA_CLOSEATTACK_DELAY; - KILLA_HOLD_DELAY = kILLA_HOLD_DELAY; - KILLA_BULLET_TO_RELOAD = kILLA_BULLET_TO_RELOAD; - SHALL_WARN = sHALL_WARN; - KOJANIY_DIST_WHEN_READY = kOJANIY_DIST_WHEN_READY; - KOJANIY_DIST_TO_BE_ENEMY = kOJANIY_DIST_TO_BE_ENEMY; - KOJANIY_MIN_DIST_TO_LOOT = kOJANIY_MIN_DIST_TO_LOOT; - KOJANIY_MIN_DIST_TO_LOOT_SQRT = kOJANIY_MIN_DIST_TO_LOOT_SQRT; - KOJANIY_DIST_ENEMY_TOO_CLOSE = kOJANIY_DIST_ENEMY_TOO_CLOSE; - KOJANIY_MANY_ENEMIES_COEF = kOJANIY_MANY_ENEMIES_COEF; - KILLA_ENEMIES_TO_ATTACK = kILLA_ENEMIES_TO_ATTACK; - 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; - } - - public double BOSS_DIST_TO_WARNING { get; set; } - public double BOSS_DIST_TO_WARNING_SQRT { get; set; } - public double BOSS_DIST_TO_WARNING_OUT { get; set; } - public double BOSS_DIST_TO_WARNING_OUT_SQRT { get; set; } - public double BOSS_DIST_TO_SHOOT { get; set; } - public double BOSS_DIST_TO_SHOOT_SQRT { get; set; } - public double CHANCE_TO_SEND_GRENADE_100 { get; set; } - public double MAX_DIST_COVER_BOSS { get; set; } - public double MAX_DIST_COVER_BOSS_SQRT { get; set; } - public double MAX_DIST_DECIDER_TO_SEND { get; set; } - public double MAX_DIST_DECIDER_TO_SEND_SQRT { get; set; } - public double TIME_AFTER_LOSE { get; set; } - public double TIME_AFTER_LOSE_DELTA { get; set; } - public int PERSONS_SEND { get; set; } - public double DELTA_SEARCH_TIME { get; set; } - public bool COVER_TO_SEND { get; set; } - public double WAIT_NO_ATTACK_SAVAGE { get; set; } - public double CHANCE_USE_RESERVE_PATROL_100 { get; set; } - public double KILLA_Y_DELTA_TO_BE_ENEMY_BOSS { get; set; } - public double KILLA_DITANCE_TO_BE_ENEMY_BOSS { get; set; } - public double KILLA_START_SEARCH_SEC { get; set; } - public double KILLA_CONTUTION_TIME { get; set; } - public double KILLA_CLOSE_ATTACK_DIST { get; set; } - public double KILLA_MIDDLE_ATTACK_DIST { get; set; } - public double KILLA_LARGE_ATTACK_DIST { get; set; } - public double KILLA_SEARCH_METERS { get; set; } - public double KILLA_DEF_DIST_SQRT { get; set; } - public double KILLA_SEARCH_SEC_STOP_AFTER_COMING { get; set; } - public double KILLA_DIST_TO_GO_TO_SUPPRESS { get; set; } - public double KILLA_AFTER_GRENADE_SUPPRESS_DELAY { get; set; } - public int KILLA_CLOSEATTACK_TIMES { get; set; } - public double KILLA_CLOSEATTACK_DELAY { get; set; } - public double KILLA_HOLD_DELAY { get; set; } - public int KILLA_BULLET_TO_RELOAD { get; set; } - public bool SHALL_WARN { get; set; } - public double KOJANIY_DIST_WHEN_READY { get; set; } - public double KOJANIY_DIST_TO_BE_ENEMY { get; set; } - public double KOJANIY_MIN_DIST_TO_LOOT { get; set; } - public double KOJANIY_MIN_DIST_TO_LOOT_SQRT { get; set; } - public double KOJANIY_DIST_ENEMY_TOO_CLOSE { get; set; } - public double KOJANIY_MANY_ENEMIES_COEF { get; set; } - public int KILLA_ENEMIES_TO_ATTACK { get; set; } - 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 class Core - { - public Core(double visibleAngle, double visibleDistance, double gainSightCoef, double scatteringPerMeter, double scatteringClosePerMeter, double damageCoeff, double hearingSense, bool canRun, bool canGrenade, string aimingType, double pistolFireDistancePref, double shotgunFireDistancePref, double rifleFireDistancePref, double accuratySpeed, double waitInCoverBetweenShotsSec) - { - VisibleAngle = visibleAngle; - VisibleDistance = visibleDistance; - GainSightCoef = gainSightCoef; - ScatteringPerMeter = scatteringPerMeter; - ScatteringClosePerMeter = scatteringClosePerMeter; - DamageCoeff = damageCoeff; - HearingSense = hearingSense; - CanRun = canRun; - CanGrenade = canGrenade; - AimingType = aimingType; - PistolFireDistancePref = pistolFireDistancePref; - ShotgunFireDistancePref = shotgunFireDistancePref; - RifleFireDistancePref = rifleFireDistancePref; - AccuratySpeed = accuratySpeed; - WaitInCoverBetweenShotsSec = waitInCoverBetweenShotsSec; - } - - public double VisibleAngle { get; set; } - public double VisibleDistance { get; set; } - public double GainSightCoef { get; set; } - public double ScatteringPerMeter { get; set; } - public double ScatteringClosePerMeter { get; set; } - public double DamageCoeff { get; set; } - public double HearingSense { get; set; } - public bool CanRun { get; set; } - public bool CanGrenade { get; set; } - public string AimingType { get; set; } - public double PistolFireDistancePref { get; set; } - public double ShotgunFireDistancePref { get; set; } - public double RifleFireDistancePref { get; set; } - public double AccuratySpeed { get; set; } - public double WaitInCoverBetweenShotsSec { get; set; } - } - - public class Scattering - { - public Scattering(double minScatter, double workingScatter, double maxScatter, double speedUp, double speedUpAim, double speedDown, double toSlowBotSpeed, double toLowBotSpeed, double toUpBotSpeed, double movingSlowCoef, double toLowBotAngularSpeed, double toStopBotAngularSpeed, double fromShot, double tracerCoef, double handDamageScatteringMinMax, double handDamageAccuracySpeed, double bloodFall, double caution, double toCaution, double recoilControlCoefShootDone, double recoilControlCoefShootDoneAuto, double aMPLITUDE_FACTOR, double aMPLITUDE_SPEED, double dIST_FROM_OLD_POINT_TO_NOT_AIM, double dIST_FROM_OLD_POINT_TO_NOT_AIM_SQRT, double dIST_NOT_TO_SHOOT, double poseChnageCoef, double layFactor, double recoilYCoef, double recoilYCoefSppedDown, double recoilYMax) - { - MinScatter = minScatter; - WorkingScatter = workingScatter; - MaxScatter = maxScatter; - SpeedUp = speedUp; - SpeedUpAim = speedUpAim; - SpeedDown = speedDown; - ToSlowBotSpeed = toSlowBotSpeed; - ToLowBotSpeed = toLowBotSpeed; - ToUpBotSpeed = toUpBotSpeed; - MovingSlowCoef = movingSlowCoef; - ToLowBotAngularSpeed = toLowBotAngularSpeed; - ToStopBotAngularSpeed = toStopBotAngularSpeed; - FromShot = fromShot; - TracerCoef = tracerCoef; - HandDamageScatteringMinMax = handDamageScatteringMinMax; - HandDamageAccuracySpeed = handDamageAccuracySpeed; - BloodFall = bloodFall; - Caution = caution; - ToCaution = toCaution; - RecoilControlCoefShootDone = recoilControlCoefShootDone; - RecoilControlCoefShootDoneAuto = recoilControlCoefShootDoneAuto; - AMPLITUDE_FACTOR = aMPLITUDE_FACTOR; - AMPLITUDE_SPEED = aMPLITUDE_SPEED; - DIST_FROM_OLD_POINT_TO_NOT_AIM = dIST_FROM_OLD_POINT_TO_NOT_AIM; - DIST_FROM_OLD_POINT_TO_NOT_AIM_SQRT = dIST_FROM_OLD_POINT_TO_NOT_AIM_SQRT; - DIST_NOT_TO_SHOOT = dIST_NOT_TO_SHOOT; - PoseChnageCoef = poseChnageCoef; - LayFactor = layFactor; - RecoilYCoef = recoilYCoef; - RecoilYCoefSppedDown = recoilYCoefSppedDown; - RecoilYMax = recoilYMax; - } - - public double MinScatter { get; set; } - public double WorkingScatter { get; set; } - public double MaxScatter { get; set; } - public double SpeedUp { get; set; } - public double SpeedUpAim { get; set; } - public double SpeedDown { get; set; } - public double ToSlowBotSpeed { get; set; } - public double ToLowBotSpeed { get; set; } - public double ToUpBotSpeed { get; set; } - public double MovingSlowCoef { get; set; } - public double ToLowBotAngularSpeed { get; set; } - public double ToStopBotAngularSpeed { get; set; } - public double FromShot { get; set; } - public double TracerCoef { get; set; } - public double HandDamageScatteringMinMax { get; set; } - public double HandDamageAccuracySpeed { get; set; } - public double BloodFall { get; set; } - public double Caution { get; set; } - public double ToCaution { get; set; } - public double RecoilControlCoefShootDone { get; set; } - public double RecoilControlCoefShootDoneAuto { get; set; } - public double AMPLITUDE_FACTOR { get; set; } - public double AMPLITUDE_SPEED { get; set; } - public double DIST_FROM_OLD_POINT_TO_NOT_AIM { get; set; } - public double DIST_FROM_OLD_POINT_TO_NOT_AIM_SQRT { get; set; } - public double DIST_NOT_TO_SHOOT { get; set; } - public double PoseChnageCoef { get; set; } - public double LayFactor { get; set; } - public double RecoilYCoef { get; set; } - public double RecoilYCoefSppedDown { get; set; } - public double RecoilYMax { get; set; } - } - } diff --git a/Generator/Models/Output/Equipment.cs b/Generator/Models/Output/Equipment.cs index 7c74fcf..3bd28cd 100644 --- a/Generator/Models/Output/Equipment.cs +++ b/Generator/Models/Output/Equipment.cs @@ -60,11 +60,13 @@ namespace Generator.Models.Output Pockets = new List(); Backpack = new List(); SecuredContainer = new List(); + SpecialLoot = new List(); } public List TacticalVest { get; set; } public List Pockets { get; set; } public List Backpack { get; set; } public List SecuredContainer { get; set; } + public List SpecialLoot { get; set; } } } diff --git a/Generator/Models/Output/Output.cs b/Generator/Models/Output/Output.cs index 939cee9..f22238f 100644 --- a/Generator/Models/Output/Output.cs +++ b/Generator/Models/Output/Output.cs @@ -1,4 +1,5 @@ -using Newtonsoft.Json; +using Common.Models; +using Newtonsoft.Json; using System.Collections.Generic; namespace Generator.Models.Output diff --git a/Generator/Program.cs b/Generator/Program.cs index 82bc573..4d9733a 100644 --- a/Generator/Program.cs +++ b/Generator/Program.cs @@ -17,6 +17,7 @@ namespace Generator "bosskilla", "bosskojaniy", "bosssanitar", + "bosstagilla", //"bossstormtrooper", "followerbully", @@ -59,9 +60,13 @@ namespace Generator var botLootGenerator = new BotLootGenerator(botsWithGear, parsedBots); var botsWithGearAndLoot = botLootGenerator.AddLoot(); + // Add mod/equipment chances + var botChancesGenerator = new BotChancesGenerator(botsWithGearAndLoot, parsedBots); + var botsWithGearAndLootAndChances = botChancesGenerator.AddChances(); + // Output bot to json file var jsonWriter = new JsonWriter(workingPath, "output"); - jsonWriter.WriteJson(botsWithGearAndLoot); + jsonWriter.WriteJson(botsWithGearAndLootAndChances); } } } diff --git a/PMCGenerator/Program.cs b/PMCGenerator/Program.cs index dacc18e..954393e 100644 --- a/PMCGenerator/Program.cs +++ b/PMCGenerator/Program.cs @@ -21,6 +21,9 @@ namespace PMCGenerator // Create flat lists of weapons + list of mods var flatPrimaryWeaponsList = GetWeaponsFromRawFile(parsedPresets); var flatSecondaryWeaponsList = GetSecondaryWeaponsFromRawFile(parsedPresets); + + var flatAllWeaponsList = CombinePrimaryAndSecondaryWeapons(flatPrimaryWeaponsList, flatSecondaryWeaponsList); + var flatModList = GetModsFromRawFile(parsedPresets); // Add weapon mods to output @@ -28,10 +31,12 @@ namespace PMCGenerator FirstPrimaryWeapon = new List(), Holster = new List(), mods = new Dictionary>>() }; + output.FirstPrimaryWeapon.AddRange(flatPrimaryWeaponsList.Select(x => x.TemplateId).Distinct()); output.Holster.AddRange(flatSecondaryWeaponsList.Select(x => x.TemplateId).Distinct()); - foreach (var weapon in flatPrimaryWeaponsList) + // Loop over each gun + foreach (var weapon in flatAllWeaponsList) { // add weapon if its not already here if (!output.mods.ContainsKey(weapon.TemplateId)) @@ -40,7 +45,7 @@ namespace PMCGenerator output.mods.Add(weapon.TemplateId, new Dictionary>()); } - // Get mods types for this gun, top level + // Get top level mods types for this gun var uniqueModSlots = flatModList.Where(x => x.ParentId == weapon.Id).Select(x => x.SlotId).Distinct().ToList(); var chamberedBulletModItemName = "patron_in_weapon"; uniqueModSlots.AddUnique(chamberedBulletModItemName); @@ -55,24 +60,22 @@ namespace PMCGenerator } // Add compatible bullets to weapons gun chamber - var modItemToAddBulletsTo = output.mods[weapon.TemplateId].FirstOrDefault(x=> x.Key == chamberedBulletModItemName); + var modItemToAddBulletsTo = output.mods[weapon.TemplateId].FirstOrDefault(x => x.Key == chamberedBulletModItemName); + var compatibleBullets = GetCompatibileBullets(itemLibrary, weapon); + modItemToAddBulletsTo.Value.AddUniqueRange(compatibleBullets); - foreach (var bullet in GetCompatibileBullets(itemLibrary, weapon)) - { - if (BulletHelpers.BulletIsOnBlackList(bullet)) - { - continue; - } - - modItemToAddBulletsTo.Value.AddUnique(bullet); - } - // Add compatabible mods to weapon var modsForWeapon = flatModList.Where(x => x.ParentId == weapon.Id).ToList(); Dictionary> weaponMods = output.mods[weapon.TemplateId]; foreach (var mod in modsForWeapon) { weaponMods[mod.SlotId].AddUnique(mod.TemplateId); + + if (mod.SlotId == "mod_magazine") + { + // add special mod item for magazine that gives info on what cartridges can be used + AddCartridgeItemToModListWithCompatibileCartridges(output.mods, compatibleBullets, mod); + } } } @@ -110,6 +113,35 @@ namespace PMCGenerator CreateJsonFile(outputPath, outputJson); } + private static List CombinePrimaryAndSecondaryWeapons(List flatPrimaryWeaponsList, List flatSecondaryWeaponsList) + { + var result = new List(); + result.AddRange(flatPrimaryWeaponsList); + result.AddRange(flatSecondaryWeaponsList); + + return result; + } + + private static void AddCartridgeItemToModListWithCompatibileCartridges(Dictionary>> mods, List compatibiltBullets, ModDetails mod) + { + var cartridges = new Dictionary> + { + { "cartridges", compatibiltBullets } + }; + if (!mods.ContainsKey(mod.TemplateId)) + { + mods.Add(mod.TemplateId, cartridges); // no item at all, create fresh + } + else + { + // Item exists, iterate over bullets and add if they dont exist + foreach (var bullet in compatibiltBullets) + { + mods[mod.TemplateId]["cartridges"].AddUnique(bullet); + } + } + } + /// /// Get a strongly typed dictionary of BSGs items library /// @@ -124,6 +156,9 @@ namespace PMCGenerator } + /// + /// Get combatible bullets for weapon that are not blacklisted + /// private static List GetCompatibileBullets(Dictionary itemLibrary, WeaponDetails weapon) { // Lookup weapon in itemdb @@ -132,11 +167,27 @@ namespace PMCGenerator // Find the guns chamber and the bullets it can use var bullets = weaponInLibrary._props.Chambers.FirstOrDefault()?._props.filters[0]?.filter.ToList(); - // return bullets or return default ammo type - return bullets ?? new List + // no bullets found, return the default bullet the gun can use + if (bullets == null) + { + return new List { weaponInLibrary._props.defAmmo }; + } + + var nonBlacklistedBullets = new List(); + foreach (var bullet in bullets) + { + if (BulletHelpers.BulletIsOnBlackList(bullet)) + { + continue; + } + + nonBlacklistedBullets.AddUnique(bullet); + } + + return nonBlacklistedBullets; } ///