mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
最低有效度为50% #356
This commit is contained in:
parent
4c8a6e1fce
commit
6b31b40512
@ -190,9 +190,9 @@ namespace VPet_Simulator.Windows.Interface
|
|||||||
else
|
else
|
||||||
descs = "有效度".Translate();
|
descs = "有效度".Translate();
|
||||||
if (Type == FoodType.Gift)
|
if (Type == FoodType.Gift)
|
||||||
descs += ":\t" + Math.Max(0.4, 1 - Math.Pow((eattime - now).TotalHours, 2) * 0.01).ToString("p0");
|
descs += ":\t" + Math.Max(0.5, 1 - Math.Pow((eattime - now).TotalHours, 2) * 0.01).ToString("p0");
|
||||||
else
|
else
|
||||||
descs += ":\t" + Math.Max(0.2, 1 - Math.Pow((eattime - now).TotalHours, 2) * 0.02).ToString("p0");
|
descs += ":\t" + Math.Max(0.5, 1 - Math.Pow((eattime - now).TotalHours, 2) * 0.02).ToString("p0");
|
||||||
descs += "\t\t" + "恢复".Translate() + ":\t" + (eattime).ToString("MM/dd HH");
|
descs += "\t\t" + "恢复".Translate() + ":\t" + (eattime).ToString("MM/dd HH");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ using VPet_Simulator.Windows.Interface;
|
|||||||
using static VPet_Simulator.Core.GraphHelper;
|
using static VPet_Simulator.Core.GraphHelper;
|
||||||
using static VPet_Simulator.Core.GraphInfo;
|
using static VPet_Simulator.Core.GraphInfo;
|
||||||
using static VPet_Simulator.Windows.Interface.ExtensionFunction;
|
using static VPet_Simulator.Windows.Interface.ExtensionFunction;
|
||||||
|
using static VPet_Simulator.Windows.Interface.Food;
|
||||||
using Application = System.Windows.Application;
|
using Application = System.Windows.Application;
|
||||||
using ContextMenu = System.Windows.Forms.ContextMenuStrip;
|
using ContextMenu = System.Windows.Forms.ContextMenuStrip;
|
||||||
using Image = System.Windows.Controls.Image;
|
using Image = System.Windows.Controls.Image;
|
||||||
@ -619,10 +620,15 @@ namespace VPet_Simulator.Windows
|
|||||||
{
|
{
|
||||||
eattimes = (eattime - now).TotalHours;
|
eattimes = (eattime - now).TotalHours;
|
||||||
}
|
}
|
||||||
|
double eatuseps;
|
||||||
|
if (item.Type == FoodType.Gift)
|
||||||
|
eatuseps = Math.Max(0.5, 1 - Math.Pow((eattime - now).TotalHours, 2) * 0.01);
|
||||||
|
else
|
||||||
|
eatuseps = Math.Max(0.5, 1 - Math.Pow((eattime - now).TotalHours, 2) * 0.02);
|
||||||
//开始加点
|
//开始加点
|
||||||
Core.Save.EatFood(item, Math.Max(0.5, 1 - eattimes * eattimes * 0.01));
|
Core.Save.EatFood(item, Math.Max(0.5, eatuseps));
|
||||||
//吃腻了
|
//吃腻了
|
||||||
eattimes += Math.Max(0.5, Math.Min(2, 2 - (item.Likability + item.Feeling / 2) / 5));
|
eattimes += Math.Max(0.5, Math.Min(4, 2 - (item.Likability + item.Feeling / 2) / 5));
|
||||||
GameSavesData["buytime"].SetDateTime(item.Name, now.AddHours(eattimes));
|
GameSavesData["buytime"].SetDateTime(item.Name, now.AddHours(eattimes));
|
||||||
//通知
|
//通知
|
||||||
item.LoadEatTimeSource(this);
|
item.LoadEatTimeSource(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user