mirror of
https://github.com/milimoe/FunGame-Testing.git
synced 2025-12-05 08:09:04 +00:00
添加重随的确认和取消
This commit is contained in:
parent
0fbcce452a
commit
985a06a3fd
@ -29,27 +29,27 @@ FunGameController controller = new(new Logger<FunGameController>(new LoggerFacto
|
|||||||
Console.WriteLine(controller.CreateSaved(1, "test"));
|
Console.WriteLine(controller.CreateSaved(1, "test"));
|
||||||
|
|
||||||
//żâ´ć˛âĘÔ
|
//żâ´ć˛âĘÔ
|
||||||
PluginConfig pc = new("saved", "1");
|
//PluginConfig pc = new("saved", "1");
|
||||||
pc.LoadConfig();
|
//pc.LoadConfig();
|
||||||
User u = FunGameService.GetUser(pc);
|
//User u = FunGameService.GetUser(pc);
|
||||||
if (u.Inventory.Characters.Count == 0)
|
//if (u.Inventory.Characters.Count == 0)
|
||||||
{
|
//{
|
||||||
u.Inventory.Characters.Add(FunGameService.Characters[0].Copy());
|
// u.Inventory.Characters.Add(FunGameService.Characters[0].Copy());
|
||||||
}
|
//}
|
||||||
Character c = u.Inventory.Characters.First();
|
//Character c = u.Inventory.Characters.First();
|
||||||
Item? i = FunGameService.GenerateMagicCardPack(3);
|
//Item? i = FunGameService.GenerateMagicCardPack(3);
|
||||||
if (i != null)
|
//if (i != null)
|
||||||
{
|
//{
|
||||||
u.Inventory.Items.Add(i);
|
// u.Inventory.Items.Add(i);
|
||||||
c.Equip(i);
|
// c.Equip(i);
|
||||||
}
|
//}
|
||||||
Console.WriteLine(u.Inventory.Characters.First().GetInfo());
|
//Console.WriteLine(u.Inventory.Characters.First().GetInfo());
|
||||||
Item? i2 = c.UnEquip(Milimoe.FunGame.Core.Library.Constant.EquipSlotType.MagicCardPack);
|
//Item? i2 = c.UnEquip(Milimoe.FunGame.Core.Library.Constant.EquipSlotType.MagicCardPack);
|
||||||
Console.WriteLine(i2);
|
//Console.WriteLine(i2);
|
||||||
pc.Add("user", u);
|
//pc.Add("user", u);
|
||||||
pc.SaveConfig();
|
//pc.SaveConfig();
|
||||||
pc.LoadConfig();
|
//pc.LoadConfig();
|
||||||
u = FunGameService.GetUser(pc);
|
//u = FunGameService.GetUser(pc);
|
||||||
|
|
||||||
//for (int i = 1; i <= 100; i++)
|
//for (int i = 1; i <= 100; i++)
|
||||||
//{
|
//{
|
||||||
@ -59,6 +59,8 @@ u = FunGameService.GetUser(pc);
|
|||||||
//Console.WriteLine(string.Join("\r\n", controller.GetInventoryInfo2(1, 2)));
|
//Console.WriteLine(string.Join("\r\n", controller.GetInventoryInfo2(1, 2)));
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
string msg = Console.ReadLine() ?? "";
|
string msg = Console.ReadLine() ?? "";
|
||||||
if (msg == "quit") return;
|
if (msg == "quit") return;
|
||||||
@ -71,6 +73,14 @@ while (true)
|
|||||||
}
|
}
|
||||||
else Console.WriteLine(controller.ExchangeCredits(1));
|
else Console.WriteLine(controller.ExchangeCredits(1));
|
||||||
}
|
}
|
||||||
|
else if (msg == "jscs")
|
||||||
|
{
|
||||||
|
Console.WriteLine(controller.RandomCustomCharacter(1));
|
||||||
|
}
|
||||||
|
else if (msg == "qrjscs")
|
||||||
|
{
|
||||||
|
Console.WriteLine(controller.RandomCustomCharacter(1, true));
|
||||||
|
}
|
||||||
else if (msg == "kb")
|
else if (msg == "kb")
|
||||||
{
|
{
|
||||||
Console.WriteLine(string.Join("\r\n", controller.GenerateMagicCardPack()));
|
Console.WriteLine(string.Join("\r\n", controller.GenerateMagicCardPack()));
|
||||||
@ -108,3 +118,8 @@ while (true)
|
|||||||
Console.WriteLine(string.Join("\r\n", controller.GetInventoryInfo2(1, page2)));
|
Console.WriteLine(string.Join("\r\n", controller.GetInventoryInfo2(1, page2)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user