修复 工作超模判定漏洞 Fix #214

This commit is contained in:
ZouJin 2023-09-17 13:58:31 +08:00
parent c31554598d
commit 4514cf8633

View File

@ -20,6 +20,8 @@ namespace VPet_Simulator.Windows.Interface
/// <returns>是否超模</returns>
public static bool IsOverLoad(this Work work)
{//判断这个工作是否超模
if (work.FinishBonus <= 0)
return true;
var spend = ((work.StrengthFood >= 0 ? 1 : -1) * Math.Pow(work.StrengthFood * 2 + 1, 2) / 6 +
(work.StrengthDrink >= 0 ? 1 : -1) * Math.Pow(work.StrengthDrink * 2 + 1, 2) / 9 +
(work.Feeling >= 0 ? 1 : -1) * Math.Pow((work.Type == Work.WorkType.Play ? -1 : 1) * work.Feeling * 2 + 1, 2) / 12) *