From 82d0425476a1d7a45759ffeac570c2ef1930fa99 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Fri, 17 May 2024 17:58:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E8=80=97=E4=BD=93=E5=8A=9B=E5=87=8F?= =?UTF-8?q?=E5=85=8D=E5=8A=A0=E6=94=B6=E7=9B=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Core/Display/MainLogic.cs | 12 ++++++++++++ .../ExtensionFunction.cs | 10 +++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/VPet-Simulator.Core/Display/MainLogic.cs b/VPet-Simulator.Core/Display/MainLogic.cs index ee6b491..22746d0 100644 --- a/VPet-Simulator.Core/Display/MainLogic.cs +++ b/VPet-Simulator.Core/Display/MainLogic.cs @@ -197,10 +197,22 @@ namespace VPet_Simulator.Core break; var needfood = TimePass * NowWork.StrengthFood; var needdrink = TimePass * NowWork.StrengthDrink; + double efficiency = 0; int addhealth = -2; double sm25 = Core.Save.StrengthMax * 0.25; double sm60 = Core.Save.StrengthMax * 0.6; + + var nsfood = needfood * .3; + var nsdrink = needdrink * .3; + if (Core.Save.Strength > sm25 + nsfood + nsdrink) + {//可以用体力减少一些消耗,并且增加效率 + Core.Save.StrengthChange(-nsfood - nsdrink); + efficiency += 0.1; + needfood -= nsfood; + needdrink -= nsdrink; + } + if (Core.Save.StrengthFood <= sm25) {//低状态低效率 Core.Save.StrengthChangeFood(-needfood / 2); diff --git a/VPet-Simulator.Windows.Interface/ExtensionFunction.cs b/VPet-Simulator.Windows.Interface/ExtensionFunction.cs index 928736d..4563bbe 100644 --- a/VPet-Simulator.Windows.Interface/ExtensionFunction.cs +++ b/VPet-Simulator.Windows.Interface/ExtensionFunction.cs @@ -98,11 +98,11 @@ namespace VPet_Simulator.Windows.Interface if (work.Type == Work.WorkType.Work) { - work.MoneyBase = Math.Round(work.MoneyBase * 10) / 10; + work.MoneyBase = Math.Round(work.MoneyBase, 1); } else { - work.MoneyBase = Math.Round(work.MoneyBase * 100) / 10; + work.MoneyBase = Math.Round(work.MoneyBase * 10, 1); } work.MoneyBase = Math.Min(work.MoneyBase, lvlimit); } @@ -146,9 +146,9 @@ namespace VPet_Simulator.Windows.Interface { if (value == 1) return work; Work w = (Work)work.Clone(); - w.StrengthFood *= 0.4 + 0.45 * value; - w.StrengthDrink *= 0.4 + 0.45 * value; - w.Feeling *= 0.4 + 0.45 * value; + w.StrengthFood *= 0.5 + 0.4 * value; + w.StrengthDrink *= 0.5 + 0.4 * value; + w.Feeling *= 0.5 + 0.4 * value; w.LevelLimit = (work.LevelLimit + 10) * value; FixOverLoad(w); return w;