mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
修复如果没有可以说的话会报错的问题
This commit is contained in:
parent
9cf2d47c97
commit
51e577e673
@ -556,16 +556,19 @@ namespace VPet_Simulator.Windows
|
||||
if (Core.Save.StrengthFood > sm * 0.60)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
||||
if (txt.Count != 0)
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else if (Core.Save.StrengthFood > sm * 0.40)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
||||
if (txt.Count != 0)
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
||||
if (txt.Count != 0)
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
Main.DisplayStopForce(() => Main.Display(GraphType.Switch_Hunger, AnimatType.Single, Main.DisplayToNomal));
|
||||
@ -580,16 +583,19 @@ namespace VPet_Simulator.Windows
|
||||
if (Core.Save.StrengthDrink > sm * 0.60)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
||||
if (txt.Count != 0)
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else if (Core.Save.StrengthDrink > sm * 0.40)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
||||
if (txt.Count != 0)
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
||||
if (txt.Count != 0)
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
Main.DisplayStopForce(() => Main.Display(GraphType.Switch_Thirsty, AnimatType.Single, Main.DisplayToNomal));
|
||||
@ -607,16 +613,19 @@ namespace VPet_Simulator.Windows
|
||||
if (Core.Save.StrengthFood > sm * 0.40)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
||||
if (txt.Count != 0)
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else if (Core.Save.StrengthFood > sm20)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
||||
if (txt.Count != 0)
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
||||
if (txt.Count != 0)
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
Main.DisplayStopForce(() => Main.Display(GraphType.Switch_Hunger, AnimatType.Single, Main.DisplayToNomal));
|
||||
@ -630,16 +639,19 @@ namespace VPet_Simulator.Windows
|
||||
if (Core.Save.StrengthDrink > sm * 0.40)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.L);
|
||||
if (txt.Count != 0)
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else if (Core.Save.StrengthDrink > sm20)
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.M);
|
||||
if (txt.Count != 0)
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
else
|
||||
{
|
||||
txt = txt.FindAll(x => x.Strength == LowText.StrengthType.S);
|
||||
if (txt.Count != 0)
|
||||
Main.Say(txt[Function.Rnd.Next(txt.Count)].TranslateText);
|
||||
}
|
||||
Main.DisplayStopForce(() => Main.Display(GraphType.Switch_Thirsty, AnimatType.Single, Main.DisplayToNomal));
|
||||
|
Loading…
Reference in New Issue
Block a user