mirror of
https://github.com/milimoe/FunGame-Testing.git
synced 2025-12-05 08:09:04 +00:00
执行代码清理
This commit is contained in:
parent
509d65d842
commit
2a75147296
@ -1,6 +1,5 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Common.Addon;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.Testing.Desktop.Solutions
|
||||
|
||||
@ -5,7 +5,10 @@ VisualStudioVersion = 17.5.33516.290
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Testing", "Library\FunGame.Testing.csproj", "{6F6B4A21-8F39-4B0D-84E8-98AE3E93F06F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{63333F35-4433-4710-9D83-048B553ADD5F} = {63333F35-4433-4710-9D83-048B553ADD5F}
|
||||
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E} = {94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}
|
||||
{D74DF3A2-52E7-4C18-8854-81114558D4B2} = {D74DF3A2-52E7-4C18-8854-81114558D4B2}
|
||||
{EFB418D0-EB57-4D71-AF74-205A5A3138E8} = {EFB418D0-EB57-4D71-AF74-205A5A3138E8}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Testing.Desktop", "Desktop\FunGame.Testing.Desktop.csproj", "{05FA61CB-22AA-4834-8C45-1161C42DF2C7}"
|
||||
@ -16,8 +19,29 @@ EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Core", "..\FunGame.Core\FunGame.Core.csproj", "{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OshimaModules", "..\OshimaGameModule\OshimaModules\OshimaModules.csproj", "{35136317-2FBC-41C1-A3A0-C56B198FA440}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E} = {94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OshimaCore", "..\OshimaGameModule\OshimaCore\OshimaCore.csproj", "{A0EDE123-21D0-4886-8960-0802677FBC04}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E} = {94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Implement", "..\FunGame.Server\FunGame.Implement\FunGame.Implement.csproj", "{EFB418D0-EB57-4D71-AF74-205A5A3138E8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E} = {94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Server", "..\FunGame.Server\FunGame.Server\FunGame.Server.csproj", "{63333F35-4433-4710-9D83-048B553ADD5F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E} = {94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.WebAPI", "..\FunGame.Server\FunGame.WebAPI\FunGame.WebAPI.csproj", "{D74DF3A2-52E7-4C18-8854-81114558D4B2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E} = {94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -45,6 +69,18 @@ Global
|
||||
{A0EDE123-21D0-4886-8960-0802677FBC04}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A0EDE123-21D0-4886-8960-0802677FBC04}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A0EDE123-21D0-4886-8960-0802677FBC04}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EFB418D0-EB57-4D71-AF74-205A5A3138E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EFB418D0-EB57-4D71-AF74-205A5A3138E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EFB418D0-EB57-4D71-AF74-205A5A3138E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EFB418D0-EB57-4D71-AF74-205A5A3138E8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{63333F35-4433-4710-9D83-048B553ADD5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{63333F35-4433-4710-9D83-048B553ADD5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{63333F35-4433-4710-9D83-048B553ADD5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{63333F35-4433-4710-9D83-048B553ADD5F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D74DF3A2-52E7-4C18-8854-81114558D4B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D74DF3A2-52E7-4C18-8854-81114558D4B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D74DF3A2-52E7-4C18-8854-81114558D4B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D74DF3A2-52E7-4C18-8854-81114558D4B2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Milimoe.FunGame.Testing.Skills;
|
||||
using Milimoe.FunGame.Testing.Effects.ItemEffects;
|
||||
using Milimoe.FunGame.Testing.Skills;
|
||||
|
||||
namespace Milimoe.FunGame.Testing.Items
|
||||
{
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Oshima.Core.Utils;
|
||||
using Oshima.FunGame.OshimaModules;
|
||||
|
||||
@ -9,4 +12,97 @@ ItemModule im = new();
|
||||
im.Load();
|
||||
|
||||
FunGameSimulation.InitCharacter();
|
||||
FunGameSimulation.StartGame(true, true);
|
||||
|
||||
Stopwatch stopwatch = new Stopwatch();
|
||||
stopwatch.Start();
|
||||
|
||||
for (int i = 0; i < 300; i++)
|
||||
{
|
||||
FunGameSimulation.StartGame(false, false, false);
|
||||
FunGameSimulation.StartGame(false, false, true);
|
||||
}
|
||||
|
||||
stopwatch.Stop();
|
||||
Console.WriteLine($"执行时间:{stopwatch.Elapsed.Seconds} 秒");
|
||||
|
||||
IEnumerable<Character> cs = FunGameSimulation.CharacterStatistics.OrderByDescending(d => d.Value.Rating).ThenByDescending(d => d.Value.Winrates).Select(d => d.Key);
|
||||
Console.WriteLine("=== 个人模式排行榜 ===");
|
||||
foreach (Character c in cs)
|
||||
{
|
||||
CharacterStatistics stats = FunGameSimulation.CharacterStatistics[c];
|
||||
StringBuilder builder = new();
|
||||
|
||||
builder.AppendLine(c.ToString());
|
||||
builder.AppendLine($"场次:{stats.Plays}");
|
||||
builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%");
|
||||
builder.AppendLine($"技术得分:{stats.Rating:0.0#}");
|
||||
|
||||
Console.WriteLine(builder.ToString());
|
||||
}
|
||||
|
||||
IEnumerable<Character> cs2 = FunGameSimulation.TeamCharacterStatistics.OrderByDescending(d => d.Value.Rating).ThenByDescending(d => d.Value.Winrates).Select(d => d.Key);
|
||||
Console.WriteLine("=== 团队模式排行榜 ===");
|
||||
foreach (Character c in cs2)
|
||||
{
|
||||
CharacterStatistics stats = FunGameSimulation.TeamCharacterStatistics[c];
|
||||
StringBuilder builder = new();
|
||||
|
||||
builder.AppendLine(c.ToString());
|
||||
builder.AppendLine($"场次:{stats.Plays}");
|
||||
builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%");
|
||||
builder.AppendLine($"技术得分:{stats.Rating:0.0#}");
|
||||
|
||||
Console.WriteLine(builder.ToString());
|
||||
}
|
||||
|
||||
string input = Console.ReadLine() ?? "";
|
||||
while (true)
|
||||
{
|
||||
if (input == "quit") break;
|
||||
|
||||
if (input.StartsWith("sj"))
|
||||
{
|
||||
input = input.Replace("sj", "").Trim();
|
||||
if (int.TryParse(input, out int id))
|
||||
{
|
||||
Character character = FunGameSimulation.Characters[Convert.ToInt32(id) - 1];
|
||||
if (FunGameSimulation.TeamCharacterStatistics.TryGetValue(character, out CharacterStatistics? stats) && stats != null)
|
||||
{
|
||||
StringBuilder builder = new();
|
||||
|
||||
builder.AppendLine(character.ToString());
|
||||
builder.AppendLine($"总计造成伤害:{stats.TotalDamage:0.##} / 场均:{stats.AvgDamage:0.##}");
|
||||
builder.AppendLine($"总计造成物理伤害:{stats.TotalPhysicalDamage:0.##} / 场均:{stats.AvgPhysicalDamage:0.##}");
|
||||
builder.AppendLine($"总计造成魔法伤害:{stats.TotalMagicDamage:0.##} / 场均:{stats.AvgMagicDamage:0.##}");
|
||||
builder.AppendLine($"总计造成真实伤害:{stats.TotalRealDamage:0.##} / 场均:{stats.AvgRealDamage:0.##}");
|
||||
builder.AppendLine($"总计承受伤害:{stats.TotalTakenDamage:0.##} / 场均:{stats.AvgTakenDamage:0.##}");
|
||||
builder.AppendLine($"总计承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 场均:{stats.AvgTakenPhysicalDamage:0.##}");
|
||||
builder.AppendLine($"总计承受魔法伤害:{stats.TotalTakenMagicDamage:0.##} / 场均:{stats.AvgTakenMagicDamage:0.##}");
|
||||
builder.AppendLine($"总计承受真实伤害:{stats.TotalTakenRealDamage:0.##} / 场均:{stats.AvgTakenRealDamage:0.##}");
|
||||
builder.AppendLine($"总计存活回合数:{stats.LiveRound} / 场均:{stats.AvgLiveRound}");
|
||||
builder.AppendLine($"总计行动回合数:{stats.ActionTurn} / 场均:{stats.AvgActionTurn}");
|
||||
builder.AppendLine($"总计存活时长:{stats.LiveTime:0.##} / 场均:{stats.AvgLiveTime:0.##}");
|
||||
builder.AppendLine($"总计赚取金钱:{stats.TotalEarnedMoney} / 场均:{stats.AvgEarnedMoney}");
|
||||
builder.AppendLine($"每回合伤害:{stats.DamagePerRound:0.##}");
|
||||
builder.AppendLine($"每行动回合伤害:{stats.DamagePerTurn:0.##}");
|
||||
builder.AppendLine($"每秒伤害:{stats.DamagePerSecond:0.##}");
|
||||
builder.AppendLine($"总计击杀数:{stats.Kills}" + (stats.Plays != 0 ? $" / 场均:{(double)stats.Kills / stats.Plays:0.##}" : ""));
|
||||
builder.AppendLine($"总计死亡数:{stats.Deaths}" + (stats.Plays != 0 ? $" / 场均:{(double)stats.Deaths / stats.Plays:0.##}" : ""));
|
||||
builder.AppendLine($"总计助攻数:{stats.Assists}" + (stats.Plays != 0 ? $" / 场均:{(double)stats.Assists / stats.Plays:0.##}" : ""));
|
||||
builder.AppendLine($"总计首杀数:{stats.FirstKills}" + (stats.Plays != 0 ? $" / 首杀率:{(double)stats.FirstKills / stats.Plays * 100:0.##}%" : ""));
|
||||
builder.AppendLine($"总计首死数:{stats.FirstDeaths}" + (stats.Plays != 0 ? $" / 首死率:{(double)stats.FirstDeaths / stats.Plays * 100:0.##}%" : ""));
|
||||
builder.AppendLine($"总计参赛数:{stats.Plays}");
|
||||
builder.AppendLine($"总计冠军数:{stats.Wins}");
|
||||
builder.AppendLine($"总计前三数:{stats.Top3s}");
|
||||
builder.AppendLine($"总计败场数:{stats.Loses}");
|
||||
builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%");
|
||||
builder.AppendLine($"前三率:{stats.Top3rates * 100:0.##}%");
|
||||
builder.AppendLine($"技术得分:{stats.Rating:0.0#}");
|
||||
builder.AppendLine($"上次排名:{stats.LastRank} / 场均名次:{stats.AvgRank}");
|
||||
|
||||
Console.WriteLine(builder.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
input = Console.ReadLine() ?? "";
|
||||
}
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Interface.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.Testing.Skills
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
using System;
|
||||
|
||||
namespace Milimoe.FunGame.Testing.Solutions
|
||||
{
|
||||
class ColorfulConsole
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace DataSetJsonConverter
|
||||
{
|
||||
|
||||
@ -1,8 +1,4 @@
|
||||
using System.Data;
|
||||
using System.Text.Json;
|
||||
using Milimoe.FunGame.Core.Model;
|
||||
|
||||
namespace Milimoe.FunGame.Testing.Solutions
|
||||
namespace Milimoe.FunGame.Testing.Solutions
|
||||
{
|
||||
public class DataTableSolution
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
using Milimoe.FunGame.Core.Api.Transmittal;
|
||||
using Milimoe.FunGame.Core.Interface;
|
||||
using Milimoe.FunGame.Core.Library.Common.Event;
|
||||
using Milimoe.FunGame.Core.Library.Common.Addon;
|
||||
using Milimoe.FunGame.Core.Library.Common.Event;
|
||||
|
||||
namespace FunGame.Testing.Solutions
|
||||
{
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Common.Addon;
|
||||
using Milimoe.FunGame.Testing.Effects.OpenEffects;
|
||||
using Milimoe.FunGame.Testing.Items;
|
||||
using Milimoe.FunGame.Testing.Skills;
|
||||
using Milimoe.FunGame.Testing.Effects.OpenEffects;
|
||||
|
||||
namespace Addons
|
||||
{
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Interface;
|
||||
using Milimoe.FunGame.Core.Library.Common.Addon;
|
||||
|
||||
@ -2,10 +2,9 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Model;
|
||||
using Milimoe.FunGame.Testing.Skills;
|
||||
using Milimoe.FunGame.Testing.Items;
|
||||
using Milimoe.FunGame.Testing.Skills;
|
||||
using MilimoeFunGame.Testing.Characters;
|
||||
using Milimoe.FunGame.Core.Interface.Entity;
|
||||
|
||||
namespace Milimoe.FunGame.Testing.Tests
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user