Fixed 'zombie' error spam

This commit is contained in:
Chomp
2025-01-21 13:47:01 +00:00
parent eec9c0eba1
commit 639cf7e559
3 changed files with 25 additions and 1 deletions
+6 -1
View File
@@ -51,7 +51,7 @@ public class BotHelper(
public bool IsBotBoss(string botRole)
{
return _botConfig.Bosses.Any(x => x.ToLower() == botRole.ToLower());
return _botConfig.Bosses.Any(x => string.Equals(x, botRole, StringComparison.CurrentCultureIgnoreCase));
}
public bool IsBotFollower(string botRole)
@@ -59,6 +59,11 @@ public class BotHelper(
return botRole?.ToLower().StartsWith("follower") ?? false;
}
public bool IsBotZombie(string botRole)
{
return botRole?.ToLower().StartsWith("zombie") ?? false;
}
/// <summary>
/// Add a bot to the FRIENDLY_BOT_TYPES list
/// </summary>
@@ -102,6 +102,11 @@ public class DurabilityLimitsHelper(
return "follower";
}
if (_botHelper.IsBotZombie(botRole))
{
return "zombie";
}
var roleExistsInConfig = _botConfig.Durability.BotDurabilities.ContainsKey(botRole);
if (!roleExistsInConfig)
{
+14
View File
@@ -281,6 +281,20 @@
"minDelta": 0,
"minLimitPercent": 15
},
"weapon": {
"lowestMax": 90,
"highestMax": 100,
"maxDelta": 10,
"minDelta": 0,
"minLimitPercent": 15
}
},
"zombie": {
"armor": {
"maxDelta": 10,
"minDelta": 0,
"minLimitPercent": 15
},
"weapon": {
"lowestMax": 90,
"highestMax": 100,