From 031f70fc2f7aac3e2d3ec7f764772817b88bc3a8 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Thu, 28 Mar 2024 15:31:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=8A=A8=E8=B4=AD?= =?UTF-8?q?=E4=B9=B0=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/MainWindow.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index 2c5f719..35eed27 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -508,11 +508,11 @@ namespace VPet_Simulator.Windows { if (Core.Save.StrengthFood < sm * 0.50) {//太饿了,找正餐 - food = food.FindAll(x => x.Type == Food.FoodType.Meal && x.StrengthFood > sm * 0.20); + food = food.FindAll(x => x.Type == Food.FoodType.Meal && x.StrengthFood > Math.Min(sm * 0.20, 100)); } else {//找零食 - food = food.FindAll(x => x.Type == Food.FoodType.Snack && x.StrengthFood > sm * 0.10); + food = food.FindAll(x => x.Type == Food.FoodType.Snack && x.StrengthFood > Math.Min(sm * 0.10, 50)); } if (food.Count == 0) return; @@ -524,7 +524,7 @@ namespace VPet_Simulator.Windows } else if (Core.Save.StrengthDrink < sm75) { - food = food.FindAll(x => x.Type == Food.FoodType.Drink && x.StrengthDrink > 10); + food = food.FindAll(x => x.Type == Food.FoodType.Drink && x.StrengthDrink > Math.Min(sm * 0.10, 50)); if (food.Count == 0) return; var item = food[Function.Rnd.Next(food.Count)]; @@ -535,7 +535,7 @@ namespace VPet_Simulator.Windows } else if (Set.AutoGift && Core.Save.Feeling < Core.Save.FeelingMax * 0.50) { - food = food.FindAll(x => x.Type == Food.FoodType.Gift && x.Feeling > 10); + food = food.FindAll(x => x.Type == Food.FoodType.Gift && x.Feeling > Math.Min(Core.Save.FeelingMax * 0.10, 50)); if (food.Count == 0) return; var item = food[Function.Rnd.Next(food.Count)];