From 91f092fa316eff572940e1326aedfccc650dfc4d Mon Sep 17 00:00:00 2001 From: milimoe Date: Sun, 17 Nov 2024 23:36:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OshimaCore/Controllers/FunGameController.cs | 6 ++--- OshimaCore/OshimaWebAPI.cs | 26 +++++++++++++++++++ OshimaCore/Utils/FunGameService.cs | 6 ++++- .../oshima-studios/oshima.fungame.items.json | 2 +- 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/OshimaCore/Controllers/FunGameController.cs b/OshimaCore/Controllers/FunGameController.cs index 6d5c152..085778b 100644 --- a/OshimaCore/Controllers/FunGameController.cs +++ b/OshimaCore/Controllers/FunGameController.cs @@ -13,9 +13,9 @@ namespace Oshima.Core.Controllers { [ApiController] [Route("[controller]")] - public class FunGameController(ILogger logger) : ControllerBase + public class FunGameController(ILogger logger) : ControllerBase { - private readonly ILogger _logger = logger; + private readonly ILogger _logger = logger; private const string noSaved = "你还没有创建存档!请发送【创建存档】创建。"; [HttpGet("test")] @@ -551,7 +551,6 @@ namespace Oshima.Core.Controllers int characterSequence = characters.Take((showPage - 1) * 10).Count(); int itemSequence = items.Take((showPage - 1) * 10).Count() - characterSequence; - if (showPage > 1) itemSequence++; foreach (int index in seq) { @@ -690,6 +689,7 @@ namespace Oshima.Core.Controllers } else { + pc.Add("user", user); pc.SaveConfig(); return NetworkUtility.JsonSerialize($"消耗 {reduce} {General.GameplayEquilibriumConstant.InGameCurrency},你什么也没抽中……"); } diff --git a/OshimaCore/OshimaWebAPI.cs b/OshimaCore/OshimaWebAPI.cs index 12e1f3a..5ba4dfd 100644 --- a/OshimaCore/OshimaWebAPI.cs +++ b/OshimaCore/OshimaWebAPI.cs @@ -46,6 +46,8 @@ namespace Oshima.Core.WebAPI FunGameSimulation.InitFunGame(); Task taskTime = Task.Factory.StartNew(async () => { + bool check9 = true; + bool check15 = true; while (true) { try @@ -75,6 +77,30 @@ namespace Oshima.Core.WebAPI { Daily.ClearDailys = true; } + if (now.Hour == 9 && now.Minute == 0 && check9) + { + check9 = false; + Console.ForegroundColor = ConsoleColor.Magenta; + Console.WriteLine("\r閲嶇疆鐗╁搧浜ゆ槗鍐峰嵈鏃堕棿銆"); + Console.ForegroundColor = ConsoleColor.Gray; + Console.Write("\r> "); + } + if (now.Hour == 9 && now.Minute == 1) + { + check9 = true; + } + if (now.Hour == 15 && now.Minute == 0 && check15) + { + check15 = false; + Console.ForegroundColor = ConsoleColor.Magenta; + Console.WriteLine("\r閲嶇疆鐗╁搧浜ゆ槗鍐峰嵈鏃堕棿銆"); + Console.ForegroundColor = ConsoleColor.Gray; + Console.Write("\r> "); + } + if (now.Hour == 15 && now.Minute == 1) + { + check15 = true; + } await Task.Delay(1000); } catch (Exception e) diff --git a/OshimaCore/Utils/FunGameService.cs b/OshimaCore/Utils/FunGameService.cs index 6f25ae1..035a262 100644 --- a/OshimaCore/Utils/FunGameService.cs +++ b/OshimaCore/Utils/FunGameService.cs @@ -180,7 +180,11 @@ namespace Oshima.Core.Utils Skill skill = Factory.OpenFactory.GetInstance(item.Id, item.Name, []); GenerateAndAddEffectsToMagicCard(skill, str, agi, intelligence); - if (magic.Level > 1) item.Name += $" +{magic.Level - 1}"; + if (magic.Level > 1) + { + item.Name += $" +{magic.Level - 1}"; + magic.Name += $" +{magic.Level - 1}"; + } skill.Level = 1; List strings = []; if (str > 0) strings.Add($"{str:0.##} 鐐瑰姏閲"); diff --git a/OshimaModules/configs/oshima-studios/oshima.fungame.items.json b/OshimaModules/configs/oshima-studios/oshima.fungame.items.json index eb20782..48e48db 100644 --- a/OshimaModules/configs/oshima-studios/oshima.fungame.items.json +++ b/OshimaModules/configs/oshima-studios/oshima.fungame.items.json @@ -653,7 +653,7 @@ { "Id": 8020, "mdftype": 0, - "mdfvalue": 0.2 + "mdfvalue": 0.1 } ] }