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;