diff --git a/TOOHUCardAPI/DTO/GameConfigResponse.cs b/TOOHUCardAPI/DTO/GameConfigResponse.cs index 194a01a..428e325 100644 --- a/TOOHUCardAPI/DTO/GameConfigResponse.cs +++ b/TOOHUCardAPI/DTO/GameConfigResponse.cs @@ -20,13 +20,13 @@ namespace TOOHUCardAPI.DTO public class GameConfigResponse { private static string SUCCESS_CODE = "0000"; - private static string DEFAULT_GAME_MESSAGE = "Welcome to english Touhou Card"; + private static string DEFAULT_GAME_MESSAGE = "Welcome to english Touhou Card."; [JsonProperty("code")] public string Code { get; set; } = SUCCESS_CODE; [JsonProperty("msg")] public string Message { get; set; } = string.Empty; [JsonProperty("game_code")] public string GameCode { get; set; } = string.Empty; [JsonProperty("game_msg")] public string GameMessage { get; set; } = DEFAULT_GAME_MESSAGE; [JsonProperty("luck_card")] public string LuckCard { get; set; } = string.Empty; - [JsonProperty("luck_crit")] public float LuckCrit { get; set; } = .25f; + [JsonProperty("luck_crit")] public int LuckCrit { get; set; } = 250; // = crit damage, /10 = crit chance [JsonProperty("new_card_list")] public string NewCardList { get; set; } = string.Empty; [JsonProperty("open_day_list")] public string OpenDayList { get; set; } = string.Empty; [JsonProperty("is_open_day")] public int IsOpenDay { get; set; } = 1; diff --git a/TOOHUCardAPI/Data/Services/GameConfigurationService.cs b/TOOHUCardAPI/Data/Services/GameConfigurationService.cs index 745e934..7f0b835 100644 --- a/TOOHUCardAPI/Data/Services/GameConfigurationService.cs +++ b/TOOHUCardAPI/Data/Services/GameConfigurationService.cs @@ -36,6 +36,7 @@ namespace TOOHUCardAPI.Data.Services var enumerable = validCards as string[] ?? validCards.ToArray(); var index = random.Next(0, enumerable.Length); response.LuckCard = enumerable.ElementAt(index); + response.GameMessage = response.GameMessage + $" Today's lucky card is {response.LuckCard}!"; return response; } }