From 7d74cb7c8fe39732c0af1d5ecdc1f0c1678fc296 Mon Sep 17 00:00:00 2001 From: Chomp Date: Wed, 8 Sep 2021 08:00:39 +0100 Subject: [PATCH] Force tagilla to have 100% chance to spawn with stock + tactical item (fixes mp 155 ultima camera issue) --- Generator/BotChancesGenerator.cs | 1 + Generator/Helpers/Gear/GearChanceHelpers.cs | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/Generator/BotChancesGenerator.cs b/Generator/BotChancesGenerator.cs index 5d35900..f71fa96 100644 --- a/Generator/BotChancesGenerator.cs +++ b/Generator/BotChancesGenerator.cs @@ -31,6 +31,7 @@ namespace Generator GearChanceHelpers.CalculateEquipmentChances(botToUpdate, rawParsedBotOfCurrentType); GearChanceHelpers.AddGenerationChances(botToUpdate); GearChanceHelpers.CalculateModChances(botToUpdate, rawParsedBotOfCurrentType); + GearChanceHelpers.ApplyModChanceOverrides(botToUpdate); } stopwatch.Stop(); diff --git a/Generator/Helpers/Gear/GearChanceHelpers.cs b/Generator/Helpers/Gear/GearChanceHelpers.cs index 5ec0e0c..e580155 100644 --- a/Generator/Helpers/Gear/GearChanceHelpers.cs +++ b/Generator/Helpers/Gear/GearChanceHelpers.cs @@ -82,6 +82,17 @@ namespace Generator.Helpers.Gear kvp => GetPercent(kvp.Value, modCounts.GetValueOrDefault(kvp.Key))); } + public static void ApplyModChanceOverrides(Bot botToUpdate) + { + switch (botToUpdate.botType) + { + case BotType.bosstagilla: + botToUpdate.chances.mods["mod_tactical"] = 100; // force ultima thermal camera + botToUpdate.chances.mods["mod_stock"] = 100; + break; + } + } + public static void AddGenerationChances(Bot bot) { bot.generation = new GenerationChances(