From fbedc060d35b4c70992e4d627f69cc7946148ac6 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Sun, 31 Mar 2024 22:29:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=83=E6=83=85=E5=B7=AE=E4=B9=9F=E4=BC=9A?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E4=B9=B0=E9=9B=B6=E9=A3=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/MainWindow.cs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index 58ce888..f1a4d35 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -534,11 +534,20 @@ namespace VPet_Simulator.Windows GameSavesData.Statistics[(gint)"stat_autobuy"]++; Main.Display(item.GetGraph(), item.ImageSource, Main.DisplayToNomal); } - else if (Set.AutoGift && Core.Save.Feeling < Core.Save.FeelingMax * 0.50) + else if (Core.Save.Feeling < Core.Save.FeelingMax * 0.50) { - food = food.FindAll(x => x.Type == Food.FoodType.Gift && x.Feeling > Math.Min(Core.Save.FeelingMax * 0.10, 50)); - if (food.Count == 0) - return; + if (Set.AutoGift) + { + food = food.FindAll(x => x.Type == Food.FoodType.Gift && x.Feeling > Math.Min(Core.Save.FeelingMax * 0.10, 50)); + if (food.Count == 0) + return; + } + else // 没有自动购买礼物的可以试试自动购买零食能加点是一点 + { + food = food.FindAll(x => x.Type == Food.FoodType.Snack && x.Feeling > Math.Min(Core.Save.FeelingMax * 0.10, 50)); + if (food.Count == 0) + return; + } var item = food[Function.Rnd.Next(food.Count)]; Core.Save.Money -= item.Price * 0.2; TakeItem(item);