消耗体力减免加收益

This commit is contained in:
ZouJin 2024-05-17 17:58:40 +08:00
parent d59e421951
commit 82d0425476
2 changed files with 17 additions and 5 deletions

View File

@ -197,10 +197,22 @@ namespace VPet_Simulator.Core
break; break;
var needfood = TimePass * NowWork.StrengthFood; var needfood = TimePass * NowWork.StrengthFood;
var needdrink = TimePass * NowWork.StrengthDrink; var needdrink = TimePass * NowWork.StrengthDrink;
double efficiency = 0; double efficiency = 0;
int addhealth = -2; int addhealth = -2;
double sm25 = Core.Save.StrengthMax * 0.25; double sm25 = Core.Save.StrengthMax * 0.25;
double sm60 = Core.Save.StrengthMax * 0.6; 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) if (Core.Save.StrengthFood <= sm25)
{//低状态低效率 {//低状态低效率
Core.Save.StrengthChangeFood(-needfood / 2); Core.Save.StrengthChangeFood(-needfood / 2);

View File

@ -98,11 +98,11 @@ namespace VPet_Simulator.Windows.Interface
if (work.Type == Work.WorkType.Work) if (work.Type == Work.WorkType.Work)
{ {
work.MoneyBase = Math.Round(work.MoneyBase * 10) / 10; work.MoneyBase = Math.Round(work.MoneyBase, 1);
} }
else else
{ {
work.MoneyBase = Math.Round(work.MoneyBase * 100) / 10; work.MoneyBase = Math.Round(work.MoneyBase * 10, 1);
} }
work.MoneyBase = Math.Min(work.MoneyBase, lvlimit); work.MoneyBase = Math.Min(work.MoneyBase, lvlimit);
} }
@ -146,9 +146,9 @@ namespace VPet_Simulator.Windows.Interface
{ {
if (value == 1) return work; if (value == 1) return work;
Work w = (Work)work.Clone(); Work w = (Work)work.Clone();
w.StrengthFood *= 0.4 + 0.45 * value; w.StrengthFood *= 0.5 + 0.4 * value;
w.StrengthDrink *= 0.4 + 0.45 * value; w.StrengthDrink *= 0.5 + 0.4 * value;
w.Feeling *= 0.4 + 0.45 * value; w.Feeling *= 0.5 + 0.4 * value;
w.LevelLimit = (work.LevelLimit + 10) * value; w.LevelLimit = (work.LevelLimit + 10) * value;
FixOverLoad(w); FixOverLoad(w);
return w; return w;