mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
修复 工作超模判定漏洞 Fix #214
This commit is contained in:
parent
c31554598d
commit
4514cf8633
@ -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) *
|
||||
|
Loading…
Reference in New Issue
Block a user