From 33dcfc042e048ab228310be1150ca8ac15148c27 Mon Sep 17 00:00:00 2001 From: Chomp Date: Sat, 15 Jan 2022 12:10:58 +0000 Subject: [PATCH] Add medical item override --- Generator/Helpers/Gear/GearChanceHelpers.cs | 22 ++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Generator/Helpers/Gear/GearChanceHelpers.cs b/Generator/Helpers/Gear/GearChanceHelpers.cs index 3c0fed5..b0cb4d3 100644 --- a/Generator/Helpers/Gear/GearChanceHelpers.cs +++ b/Generator/Helpers/Gear/GearChanceHelpers.cs @@ -151,7 +151,7 @@ namespace Generator.Helpers.Gear { bot.generation = new GenerationChances( bot.inventory.items.SpecialLoot.Count, bot.inventory.items.SpecialLoot.Count, - healingMin: 1, healingMax: 2, + healingMin: GetMedicalItemCountByBotType(bot.botType).min, healingMax: GetMedicalItemCountByBotType(bot.botType).max, looseLootMin: GetLooseLootCountByBotType(bot.botType).min, looseLootMax: GetLooseLootCountByBotType(bot.botType).max, magazinesMin: GetMagazineCountByBotType(bot.botType).min, MagazineMax: GetMagazineCountByBotType(bot.botType).max, grenandesMin: 0, grenadesMax: 5); //TODO get dynamically @@ -245,5 +245,25 @@ namespace Generator.Helpers.Gear return new MinMax(min, max); } + + private static MinMax GetMedicalItemCountByBotType(BotType botType) + { + int min; + int max; + + switch (botType) + { + case BotType.bosssanitar: + min = 4; + max = 6; + break; + default: + min = 1; + max = 2; + break; + } + + return new MinMax(min, max); + } } }