完成倍率不能超过4

This commit is contained in:
ZouJin 2024-03-25 13:33:58 +08:00
parent 8a37eb27de
commit fc4dc2139e

View File

@ -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) //等级获取速率限制