feat: add BasePower abstraction

This commit is contained in:
admin
2026-07-26 23:47:38 +02:00
commit 6dbbfc0dde
83 changed files with 7587 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
namespace Cs2SuperPowers;
public static class GlobalConfig
{
public static bool NoDelayEnabled { get; set; } = false;
// Boost levels stack linearly: level 0 = base value, level 1 = 2x, level 2 = 3x, etc.
public static int GrenadeLauncherBoostLevel { get; set; } = 0;
public static int NotSoDecoyBoostLevel { get; set; } = 0;
public static int AirStrikeBoostLevel { get; set; } = 0;
public static int DroppedNadesBoostLevel { get; set; } = 0;
public static int GetGrenadeLauncherCount(int baseCount)
{
return GetBoostedCount(baseCount, GrenadeLauncherBoostLevel);
}
public static int GetNotSoDecoyCount(int baseCount)
{
return GetBoostedCount(baseCount, NotSoDecoyBoostLevel);
}
public static int GetAirStrikeCount(int baseCount)
{
return GetBoostedCount(baseCount, AirStrikeBoostLevel);
}
public static int GetDroppedNadesCount(int baseCount)
{
return GetBoostedCount(baseCount, DroppedNadesBoostLevel);
}
private static int GetBoostedCount(int baseCount, int level)
{
if (baseCount <= 0)
{
return 0;
}
if (level <= 0)
{
return baseCount;
}
long boostedCount = (long)baseCount * (level + 1L);
return boostedCount > int.MaxValue ? int.MaxValue : (int)boostedCount;
}
}