From 349c3425780b503cb56e81925ceb9c353283dbe5 Mon Sep 17 00:00:00 2001 From: Chomp Date: Fri, 8 Oct 2021 09:44:38 +0100 Subject: [PATCH] Add code to handle equipment chance overrides add tagilla headwear override --- Generator/BotChancesGenerator.cs | 1 + Generator/Helpers/Gear/GearChanceHelpers.cs | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Generator/BotChancesGenerator.cs b/Generator/BotChancesGenerator.cs index ed22a3d..2924749 100644 --- a/Generator/BotChancesGenerator.cs +++ b/Generator/BotChancesGenerator.cs @@ -32,6 +32,7 @@ namespace Generator GearChanceHelpers.AddGenerationChances(botToUpdate); GearChanceHelpers.CalculateModChances(botToUpdate, rawParsedBotOfCurrentType); GearChanceHelpers.ApplyModChanceOverrides(botToUpdate); + GearChanceHelpers.ApplyEquipmentChanceOverrides(botToUpdate); } stopwatch.Stop(); diff --git a/Generator/Helpers/Gear/GearChanceHelpers.cs b/Generator/Helpers/Gear/GearChanceHelpers.cs index ce27a98..6c8b406 100644 --- a/Generator/Helpers/Gear/GearChanceHelpers.cs +++ b/Generator/Helpers/Gear/GearChanceHelpers.cs @@ -82,6 +82,16 @@ namespace Generator.Helpers.Gear kvp => GetPercent(kvp.Value, modCounts.GetValueOrDefault(kvp.Key))); } + internal static void ApplyEquipmentChanceOverrides(Bot botToUpdate) + { + switch (botToUpdate.botType) + { + case BotType.bosstagilla: + botToUpdate.chances.equipment.Headwear = 100; + break; + } + } + public static void ApplyModChanceOverrides(Bot botToUpdate) { switch (botToUpdate.botType)