From 1c9d8b770029d944854038988ad1ed247f755210 Mon Sep 17 00:00:00 2001 From: Chomp Date: Wed, 15 Dec 2021 09:04:11 +0000 Subject: [PATCH] Add code to choose loose loot min/max based on bot type exUsec have higher values than others --- 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 d3906cc..f8b2f75 100644 --- a/Generator/Helpers/Gear/GearChanceHelpers.cs +++ b/Generator/Helpers/Gear/GearChanceHelpers.cs @@ -140,7 +140,7 @@ namespace Generator.Helpers.Gear bot.generation = new GenerationChances( bot.inventory.items.SpecialLoot.Count, bot.inventory.items.SpecialLoot.Count, healingMin: 1, healingMax: 2, - looseLootMin: 0, looseLootMax: 3, + 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 } @@ -213,5 +213,25 @@ namespace Generator.Helpers.Gear return new MinMax(min, max); } + + private static MinMax GetLooseLootCountByBotType(BotType botType) + { + int min; + int max; + + switch (botType) + { + case BotType.exUsec: + min = 3; + max = 4; + break; + default: + min = 1; + max = 4; + break; + } + + return new MinMax(min, max); + } } }