mirror of
https://github.com/milimoe/FunGame-Testing.git
synced 2025-12-05 08:09:04 +00:00
新的战技魔法路线图
This commit is contained in:
parent
77404f6e97
commit
040bdade21
@ -25,7 +25,9 @@ im.Load();
|
|||||||
|
|
||||||
FunGameService.InitFunGame();
|
FunGameService.InitFunGame();
|
||||||
FunGameSimulation.InitFunGameSimulation();
|
FunGameSimulation.InitFunGameSimulation();
|
||||||
//new CharacterTest();
|
FunGameController controller = new(new Logger<FunGameController>(new LoggerFactory()));
|
||||||
|
|
||||||
|
await CharacterTest.CharacterTest1();
|
||||||
//foreach (Character c in FunGameConstant.Characters)
|
//foreach (Character c in FunGameConstant.Characters)
|
||||||
//{
|
//{
|
||||||
// Character character = c.Copy();
|
// Character character = c.Copy();
|
||||||
@ -61,15 +63,15 @@ FunGameSimulation.InitFunGameSimulation();
|
|||||||
// m.Level = 8;
|
// m.Level = 8;
|
||||||
// Console.WriteLine(m.GetInfo());
|
// Console.WriteLine(m.GetInfo());
|
||||||
//}
|
//}
|
||||||
Character character = new Oshima.FunGame.OshimaModules.Characters.CustomCharacter(0, "");
|
//Character character = new Oshima.FunGame.OshimaModules.Characters.CustomCharacter(0, "");
|
||||||
character.SetLevel(60);
|
//character.SetLevel(60);
|
||||||
foreach (Item i in FunGameConstant.Equipment)
|
//foreach (Item i in FunGameConstant.Equipment)
|
||||||
{
|
//{
|
||||||
character.Equip(i);
|
// character.Equip(i);
|
||||||
if (i.ItemType == ItemType.GiftBox && i.Name != "毕业礼包") continue;
|
// if (i.ItemType == ItemType.GiftBox && i.Name != "毕业礼包") continue;
|
||||||
Console.WriteLine(i.ToString());
|
// Console.WriteLine(i.ToString());
|
||||||
}
|
//}
|
||||||
Console.WriteLine(character.GetInfo());
|
//Console.WriteLine(character.GetInfo());
|
||||||
//foreach (Item i in FunGameConstant.Equipment)
|
//foreach (Item i in FunGameConstant.Equipment)
|
||||||
//{
|
//{
|
||||||
// StringBuilder builder = new();
|
// StringBuilder builder = new();
|
||||||
@ -105,6 +107,7 @@ Console.ReadKey();
|
|||||||
//Console.ReadKey();
|
//Console.ReadKey();
|
||||||
|
|
||||||
//await FunGameTesting.StartGame(true, false);
|
//await FunGameTesting.StartGame(true, false);
|
||||||
|
//Console.ReadKey();
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
@ -126,8 +129,6 @@ while (true)
|
|||||||
//Console.WriteLine(testc.InitialSTR + $" ({testc.STRGrowth}/Lv)");
|
//Console.WriteLine(testc.InitialSTR + $" ({testc.STRGrowth}/Lv)");
|
||||||
//Console.WriteLine(testc.InitialAGI + $" ({testc.AGIGrowth}/Lv)");
|
//Console.WriteLine(testc.InitialAGI + $" ({testc.AGIGrowth}/Lv)");
|
||||||
//Console.WriteLine(testc.InitialINT + $" ({testc.INTGrowth}/Lv)");
|
//Console.WriteLine(testc.InitialINT + $" ({testc.INTGrowth}/Lv)");
|
||||||
|
|
||||||
FunGameController controller = new(new Logger<FunGameController>(new LoggerFactory()));
|
|
||||||
//Console.WriteLine(controller.GetWinrateRank());
|
//Console.WriteLine(controller.GetWinrateRank());
|
||||||
//Console.WriteLine(controller.GetWinrateRank(true));
|
//Console.WriteLine(controller.GetWinrateRank(true));
|
||||||
//Console.WriteLine(controller.GetRatingRank());
|
//Console.WriteLine(controller.GetRatingRank());
|
||||||
|
|||||||
@ -10,7 +10,7 @@ namespace Milimoe.FunGame.Testing.Tests
|
|||||||
{
|
{
|
||||||
internal class CharacterTest
|
internal class CharacterTest
|
||||||
{
|
{
|
||||||
public CharacterTest()
|
public static async Task CharacterTest1()
|
||||||
{
|
{
|
||||||
GamingQueue queue = new(Console.WriteLine);
|
GamingQueue queue = new(Console.WriteLine);
|
||||||
Character character = new CustomCharacter(0, "");
|
Character character = new CustomCharacter(0, "");
|
||||||
@ -19,12 +19,30 @@ namespace Milimoe.FunGame.Testing.Tests
|
|||||||
Item item = FunGameConstant.Equipment.Where(i => i.Id == 12515).First();
|
Item item = FunGameConstant.Equipment.Where(i => i.Id == 12515).First();
|
||||||
character.Equip(item);
|
character.Equip(item);
|
||||||
Console.WriteLine(character.GetInfo());
|
Console.WriteLine(character.GetInfo());
|
||||||
|
Character teammate = new MagicalGirl();
|
||||||
|
Console.ReadKey();
|
||||||
|
teammate.SetLevel(60);
|
||||||
|
Skill skill = new 毁灭之势(teammate);
|
||||||
|
teammate.Skills.Add(skill);
|
||||||
|
skill.GamingQueue = queue;
|
||||||
|
skill.Character = teammate;
|
||||||
|
skill.Level++;
|
||||||
|
skill = new 绝对领域(teammate);
|
||||||
|
teammate.Skills.Add(skill);
|
||||||
|
skill.GamingQueue = queue;
|
||||||
|
skill.Character = teammate;
|
||||||
|
skill.Level += 6;
|
||||||
|
skill.OnSkillCasted(queue, teammate, [character]);
|
||||||
Character enemy = new CustomCharacter(1, "敌人");
|
Character enemy = new CustomCharacter(1, "敌人");
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
enemy.SetLevel(60);
|
enemy.SetLevel(60);
|
||||||
Skill skill = new 虚弱领域(enemy);
|
skill = new 混沌烙印(enemy);
|
||||||
|
skill.GamingQueue = queue;
|
||||||
skill.Level += 8;
|
skill.Level += 8;
|
||||||
skill.OnSkillCasted(queue, enemy, [character]);
|
skill.OnSkillCasted(queue, enemy, [teammate]);
|
||||||
|
queue.CharacterStatistics[teammate] = new CharacterStatistics();
|
||||||
|
queue.AddCharacter(teammate, 10);
|
||||||
|
await queue.TimeLapse();
|
||||||
character.UnEquip(EquipSlotType.Armor);
|
character.UnEquip(EquipSlotType.Armor);
|
||||||
Console.WriteLine(character.GetInfo());
|
Console.WriteLine(character.GetInfo());
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
|
|||||||
@ -12,25 +12,6 @@ namespace Milimoe.FunGame.Testing.Tests
|
|||||||
{
|
{
|
||||||
public class FunGameTesting
|
public class FunGameTesting
|
||||||
{
|
{
|
||||||
public FunGameTesting()
|
|
||||||
{
|
|
||||||
InitCharacter();
|
|
||||||
Task.Run(async () =>
|
|
||||||
{
|
|
||||||
bool printout = true;
|
|
||||||
List<string> strs = await StartGame(printout);
|
|
||||||
if (printout == false)
|
|
||||||
{
|
|
||||||
foreach (string str in strs)
|
|
||||||
{
|
|
||||||
Console.WriteLine(str);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Console.ReadKey();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Dictionary<Character, CharacterStatistics> CharacterStatistics { get; } = [];
|
public static Dictionary<Character, CharacterStatistics> CharacterStatistics { get; } = [];
|
||||||
public static PluginConfig StatsConfig { get; } = new(nameof(FunGameSimulation), nameof(CharacterStatistics));
|
public static PluginConfig StatsConfig { get; } = new(nameof(FunGameSimulation), nameof(CharacterStatistics));
|
||||||
public static bool IsRuning { get; set; } = false;
|
public static bool IsRuning { get; set; } = false;
|
||||||
@ -135,11 +116,11 @@ namespace Milimoe.FunGame.Testing.Tests
|
|||||||
|
|
||||||
// 开始空投
|
// 开始空投
|
||||||
Msg = "";
|
Msg = "";
|
||||||
int qMagicCardPack = 0;
|
int qMagicCardPack = 5;
|
||||||
int qWeapon = 0;
|
int qWeapon = 5;
|
||||||
int qArmor = 0;
|
int qArmor = 5;
|
||||||
int qShoes = 0;
|
int qShoes = 5;
|
||||||
int qAccessory = 0;
|
int qAccessory = 4;
|
||||||
WriteLine($"社区送温暖了,现在随机发放空投!!");
|
WriteLine($"社区送温暖了,现在随机发放空投!!");
|
||||||
DropItems(gamingQueue, qMagicCardPack, qWeapon, qArmor, qShoes, qAccessory);
|
DropItems(gamingQueue, qMagicCardPack, qWeapon, qArmor, qShoes, qAccessory);
|
||||||
WriteLine("");
|
WriteLine("");
|
||||||
@ -323,6 +304,7 @@ namespace Milimoe.FunGame.Testing.Tests
|
|||||||
mvpBuilder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
|
mvpBuilder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
|
||||||
mvpBuilder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
|
mvpBuilder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
|
||||||
mvpBuilder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
|
mvpBuilder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
|
||||||
|
if (stats.TotalTrueDamage > 0 || stats.TotalTakenTrueDamage > 0) mvpBuilder.AppendLine($"总计真实伤害:{stats.TotalTrueDamage:0.##} / 总承受真实伤害:{stats.TotalTakenTrueDamage:0.##}");
|
||||||
mvpBuilder.Append($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}");
|
mvpBuilder.Append($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,6 +339,7 @@ namespace Milimoe.FunGame.Testing.Tests
|
|||||||
builder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
|
builder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
|
||||||
builder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
|
builder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
|
||||||
builder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
|
builder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
|
||||||
|
if (stats.TotalTrueDamage > 0 || stats.TotalTakenTrueDamage > 0) builder.AppendLine($"总计真实伤害:{stats.TotalTrueDamage:0.##} / 总承受真实伤害:{stats.TotalTakenTrueDamage:0.##}");
|
||||||
builder.Append($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}");
|
builder.Append($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}");
|
||||||
if (count++ <= top)
|
if (count++ <= top)
|
||||||
{
|
{
|
||||||
@ -724,13 +707,14 @@ namespace Milimoe.FunGame.Testing.Tests
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void DropItems(GamingQueue queue, int mQuality, int wQuality, int aQuality, int sQuality, int acQuality)
|
public static void DropItems(GamingQueue queue, int mQuality, int wQuality, int aQuality, int sQuality, int acQuality)
|
||||||
{
|
|
||||||
foreach (Character character in queue.Queue)
|
|
||||||
{
|
{
|
||||||
Item[] weapons = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("11") && (int)i.QualityType == wQuality)];
|
Item[] weapons = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("11") && (int)i.QualityType == wQuality)];
|
||||||
Item[] armors = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality)];
|
Item[] armors = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality)];
|
||||||
Item[] shoes = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality)];
|
Item[] shoes = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality)];
|
||||||
Item[] accessorys = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality)];
|
Item[] accessorys = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality)];
|
||||||
|
Item[] consumables = [.. FunGameConstant.AllItems.Where(i => i.ItemType == ItemType.Consumable && i.IsInGameItem)];
|
||||||
|
foreach (Character character in queue.AllCharacters)
|
||||||
|
{
|
||||||
Item? a = null, b = null, c = null, d = null;
|
Item? a = null, b = null, c = null, d = null;
|
||||||
if (weapons.Length > 0)
|
if (weapons.Length > 0)
|
||||||
{
|
{
|
||||||
@ -769,6 +753,14 @@ namespace Milimoe.FunGame.Testing.Tests
|
|||||||
realItem.SetGamingQueue(queue);
|
realItem.SetGamingQueue(queue);
|
||||||
queue.Equip(character, realItem);
|
queue.Equip(character, realItem);
|
||||||
}
|
}
|
||||||
|
if (consumables.Length > 0 && character.Items.Count < 5)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
Item consumable = consumables[Random.Shared.Next(consumables.Length)].Copy();
|
||||||
|
character.Items.Add(consumable);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user