Added max phoenix spirits to 4
This commit is contained in:
@@ -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; }
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user