mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
修复工作获得内容没有进行时间判断的错误
This commit is contained in:
parent
58649dc7c8
commit
a37c62c687
@ -198,7 +198,7 @@ namespace VPet_Simulator.Core
|
||||
var needdrink = TimePass * NowWork.StrengthDrink;
|
||||
double efficiency = 0;
|
||||
int addhealth = -2;
|
||||
if (Core.Save.StrengthFood <= 25)
|
||||
if (Core.Save.StrengthFood <= Core.Save.StrengthMax * 0.25)
|
||||
{//低状态低效率
|
||||
Core.Save.StrengthChangeFood(-needfood / 2);
|
||||
efficiency += 0.25;
|
||||
@ -216,7 +216,7 @@ namespace VPet_Simulator.Core
|
||||
if (Core.Save.StrengthFood >= 75)
|
||||
addhealth += Function.Rnd.Next(1, 3);
|
||||
}
|
||||
if (Core.Save.StrengthDrink <= 25)
|
||||
if (Core.Save.StrengthDrink <= Core.Save.StrengthMax * 0.25)
|
||||
{//低状态低效率
|
||||
Core.Save.StrengthChangeDrink(-needdrink / 2);
|
||||
efficiency += 0.25;
|
||||
@ -236,7 +236,7 @@ namespace VPet_Simulator.Core
|
||||
}
|
||||
if (addhealth > 0)
|
||||
Core.Save.Health += addhealth * TimePass;
|
||||
var addmoney = Math.Max(0, NowWork.MoneyBase * (1.500000000 * efficiency - 0.5));
|
||||
var addmoney = Math.Max(0, TimePass * NowWork.MoneyBase * (2 * efficiency - 0.5));
|
||||
if (NowWork.Type == Work.WorkType.Work)
|
||||
Core.Save.Money += addmoney;
|
||||
else
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 593 KiB After Width: | Height: | Size: 648 KiB |
Binary file not shown.
Before Width: | Height: | Size: 844 KiB After Width: | Height: | Size: 854 KiB |
Binary file not shown.
Before Width: | Height: | Size: 660 KiB After Width: | Height: | Size: 645 KiB |
Loading…
Reference in New Issue
Block a user