From fc4dc2139e73c3fbe088c77729038b2b9cdb16db Mon Sep 17 00:00:00 2001 From: ZouJin Date: Mon, 25 Mar 2024 13:33:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=80=8D=E7=8E=87=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E8=B6=85=E8=BF=874?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExtensionFunction.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/VPet-Simulator.Windows.Interface/ExtensionFunction.cs b/VPet-Simulator.Windows.Interface/ExtensionFunction.cs index c19780b..e794370 100644 --- a/VPet-Simulator.Windows.Interface/ExtensionFunction.cs +++ b/VPet-Simulator.Windows.Interface/ExtensionFunction.cs @@ -59,6 +59,8 @@ namespace VPet_Simulator.Windows.Interface work.Feeling *= -1;//旧版本代码兼容 if (work.Time < 10) work.Time = 10; + if (work.FinishBonus > 4) + work.FinishBonus = 4; var spend = work.Spend(); var get = work.Get(); @@ -82,6 +84,17 @@ namespace VPet_Simulator.Windows.Interface double stepSize = 0.01; int maxIterations = 100; + if (work.LevelLimit < 0) + work.LevelLimit = 0; + if (work.FinishBonus < 0) + work.FinishBonus = 0; + if (work.Type == Work.WorkType.Play && work.Feeling > 0) + work.Feeling *= -1;//旧版本代码兼容 + if (work.Time < 10) + work.Time = 10; + if (work.FinishBonus > 4) + work.FinishBonus = 4; + for (int i = 0; i < maxIterations; i++) { while (Math.Abs(work.Get()) > 1.1 * work.LevelLimit + 10) //等级获取速率限制