Added max phoenix spirits to 4

This commit is contained in:
2021-11-16 13:20:56 -05:00
parent 1cbe2c35a5
commit ca9aba9e99
3 changed files with 3 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ namespace TOOHUCardAPI.Data
public static int PointsPerLevelNormal { get; set; } public static int PointsPerLevelNormal { get; set; }
public static int FirstWinBonusPointsMin { get; set; } public static int FirstWinBonusPointsMin { get; set; }
public static int FirstWinBonusPointsMax { get; set; } public static int FirstWinBonusPointsMax { get; set; }
public static int MaxPhoenixSpirits { get; set; }
public static int PointsPerKey { get; set; } public static int PointsPerKey { get; set; }
public static int MaxKeyPurchaseAmount { get; set; } public static int MaxKeyPurchaseAmount { get; set; }
public static string StarterDeckGroupKey { get; set; } public static string StarterDeckGroupKey { get; set; }

View File

@@ -49,7 +49,7 @@ namespace TOOHUCardAPI.Data.Services
public async Task<int> ChangePowerMaxTotal(long steamId, int amt) public async Task<int> ChangePowerMaxTotal(long steamId, int amt)
{ {
User user = await _userRepository.GetUser(steamId); User user = await _userRepository.GetUser(steamId);
user.PowerMaxTotal = Math.Clamp(user.PowerMaxTotal + amt, 0, int.MaxValue); user.PowerMaxTotal = Math.Clamp(user.PowerMaxTotal + amt, 0, AppSettings.MaxPhoenixSpirits);
await _userRepository.UpdateUser(user); await _userRepository.UpdateUser(user);
_logger.LogInformation("User {SteamId} changed the number of MaxPower items they had by {Amount}", user.SteamId, amt); _logger.LogInformation("User {SteamId} changed the number of MaxPower items they had by {Amount}", user.SteamId, amt);
return user.PowerMaxTotal; return user.PowerMaxTotal;

View File

@@ -16,6 +16,7 @@
"PointsPerKey": "2", "PointsPerKey": "2",
"FirstWinBonusPointsMin": "1", "FirstWinBonusPointsMin": "1",
"FirstWinBonusPointsMax": "5", "FirstWinBonusPointsMax": "5",
"MaxPhoenixSpirits": "4",
"MaxKeyPurchaseAmount": "200", "MaxKeyPurchaseAmount": "200",
"DefaultRankBonus": "10", "DefaultRankBonus": "10",
"StarterDeckGroupKey": "cardgroup1", "StarterDeckGroupKey": "cardgroup1",