mirror of
https://github.com/milimoe/FunGame-Testing.git
synced 2025-12-05 16:16:36 +00:00
新增伤害统计,调整技能参数
This commit is contained in:
parent
1169656ced
commit
9c0f001bc0
@ -5,7 +5,9 @@ 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}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FunGame.Testing.Desktop", "Desktop\FunGame.Testing.Desktop.csproj", "{05FA61CB-22AA-4834-8C45-1161C42DF2C7}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Testing.Desktop", "Desktop\FunGame.Testing.Desktop.csproj", "{05FA61CB-22AA-4834-8C45-1161C42DF2C7}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Core", "..\FunGame.Core\FunGame.Core.csproj", "{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -21,6 +23,10 @@ Global
|
||||
{05FA61CB-22AA-4834-8C45-1161C42DF2C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{05FA61CB-22AA-4834-8C45-1161C42DF2C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{05FA61CB-22AA-4834-8C45-1161C42DF2C7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@ -1,5 +1,14 @@
|
||||
using Milimoe.FunGame.Testing.Tests;
|
||||
|
||||
FunGameSimulation.StartGame(true);
|
||||
bool printout = false;
|
||||
List<string> strs = FunGameSimulation.StartGame(printout);
|
||||
if (printout == false)
|
||||
{
|
||||
foreach (string str in strs)
|
||||
{
|
||||
Console.WriteLine(str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Console.ReadKey();
|
||||
|
||||
@ -24,7 +24,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Duration} 秒内,攻击拥有标记的角色将根据标记层数获得 {吸血 * 100:0.##}% 吸血每层。";
|
||||
public override string Description => $"{Duration} 时间内,攻击拥有标记的角色将根据标记层数获得 {吸血 * 100:0.##}% 吸血每层。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 30;
|
||||
|
||||
@ -51,7 +51,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
{
|
||||
double 获得的魔法值 = Calculation.Round2Digits(实际获得能量值 * 10);
|
||||
character.MP += 获得的魔法值;
|
||||
WriteLine("[ " + character + " ] 发动了三重叠加!额外获得了 " + 获得的魔法值 + " 魔法值!");
|
||||
WriteLine("[ " + character + " ] 发动了三重叠加!回复了 " + 获得的魔法值 + " 魔法值!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => "变幻之心";
|
||||
public override string Description => $"检查 [ 智慧与力量 ] 的模式。在力量模式下,立即回复 {生命值回复 * 100}% 生命值;智力模式下,下一次魔法伤害提升 {伤害提升 * 100}%。";
|
||||
public override string Description => $"检查 [ 智慧与力量 ] 的模式。在力量模式下,立即回复 {生命值回复 * 100:0.##}% 生命值;智力模式下,下一次魔法伤害提升 {伤害提升 * 100:0.##}%。";
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
private double 生命值回复 => Calculation.Round4Digits(0.25 + 0.03 * (Level - 1));
|
||||
|
||||
@ -23,12 +23,12 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => "力量爆发";
|
||||
public override string Description => $"获得 150% 力量 [ {攻击力加成} ] 的攻击力加成,持续 {Duration} 秒,清除硬直时间。";
|
||||
public override string Description => $"获得 150% 力量 [ {攻击力加成} ] 的攻击力加成,持续 {Duration} 时间。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 10 + 1 * (Level - 1);
|
||||
|
||||
private double 攻击力加成 => Calculation.Round2Digits(Skill.Character?.STR * 1.5 ?? 0); // 300% 攻击力加成
|
||||
private double 攻击力加成 => Calculation.Round2Digits(Skill.Character?.STR * 1.5 ?? 0);
|
||||
private double 实际攻击力加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
|
||||
@ -25,59 +25,63 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"生命值高于30%时,受到额外的 [ 20~40% ] 伤害,但是获得 [ 上次所受伤害的 110~140% ] 伤害加成;生命值低于等于30%时,不会受到额外的伤害,仅能获得 [ 上次所受伤害的 35% ] 伤害加成。" +
|
||||
$"在没有受到任何伤害的时候,将获得 {常规伤害加成 * 100:0.##}% 伤害加成。(当前伤害加成:{伤害加成 * 100:0.##}%)";
|
||||
public override string Description => $"生命值高于 30% 时,受到额外的 [ {高于30额外伤害下限}~{高于30额外伤害上限}% ] 伤害,但是获得 [ 累计所受伤害的 {高于30的加成下限}~{高于30的加成上限}% ] 伤害加成;生命值低于等于 30% 时,不会受到额外的伤害,仅能获得 [ 累计受到的伤害 {低于30的加成下限}~{低于30的加成上限}% ] 伤害加成。" +
|
||||
$"在没有受到任何伤害的时候,将获得 {常规伤害加成 * 100:0.##}% 伤害加成。" + (累计受到的伤害 > 0 ? $"(当前伤害加成:{伤害加成(累计受到的伤害) * 100:0.##}%)" : "");
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
private double 上次受到的伤害 = 0;
|
||||
private double 累计受到的伤害 = 0;
|
||||
private double 这次的伤害加成 = 0;
|
||||
private double 受到伤害之前的HP = 0;
|
||||
private double 这次受到的额外伤害 = 0;
|
||||
private readonly double 常规伤害加成 = 0.2;
|
||||
private readonly int 高于30的加成上限 = 40;
|
||||
private readonly int 高于30的加成下限 = 10;
|
||||
private readonly double 低于30的加成 = 0.35;
|
||||
private readonly double 常规伤害加成 = 0.35;
|
||||
private readonly int 高于30额外伤害上限 = 40;
|
||||
private readonly int 高于30额外伤害下限 = 20;
|
||||
private readonly int 高于30的加成上限 = 100;
|
||||
private readonly int 高于30的加成下限 = 80;
|
||||
private readonly int 低于30的加成上限 = 60;
|
||||
private readonly int 低于30的加成下限 = 40;
|
||||
|
||||
private double 伤害加成
|
||||
private double 伤害加成(double damage)
|
||||
{
|
||||
get
|
||||
double 系数 = 常规伤害加成;
|
||||
Character? character = Skill.Character;
|
||||
if (character != null && 累计受到的伤害 != 0)
|
||||
{
|
||||
double 系数 = 常规伤害加成;
|
||||
Character? character = Skill.Character;
|
||||
if (character is null) return 系数;
|
||||
if (上次受到的伤害 != 0)
|
||||
if (character.HP > character.MaxHP * 0.3)
|
||||
{
|
||||
if (character.HP > character.MaxHP * 0.3)
|
||||
{
|
||||
系数 = Calculation.Round2Digits(1.0 + ((new Random().Next(高于30的加成下限, 高于30的加成上限) + 0.0) / 100));
|
||||
}
|
||||
else
|
||||
{
|
||||
系数 = 低于30的加成;
|
||||
}
|
||||
系数 = Calculation.Round4Digits(1.0 + ((new Random().Next(高于30的加成下限, 高于30的加成上限) + 0.0) / 100));
|
||||
}
|
||||
return 系数;
|
||||
else
|
||||
{
|
||||
系数 = Calculation.Round4Digits(1.0 + ((new Random().Next(低于30的加成下限, 低于30的加成上限) + 0.0) / 100));
|
||||
}
|
||||
return Calculation.Round2Digits(系数 * 累计受到的伤害);
|
||||
}
|
||||
return Calculation.Round2Digits(系数 * damage);
|
||||
}
|
||||
|
||||
public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType)
|
||||
{
|
||||
if (character == Skill.Character)
|
||||
{
|
||||
这次的伤害加成 = Calculation.Round2Digits(damage * 伤害加成);
|
||||
这次的伤害加成 = 伤害加成(damage);
|
||||
damage = Calculation.Round2Digits(damage + 这次的伤害加成);
|
||||
WriteLine($"[ {character} ] 发动了玻璃大炮,获得了 {这次的伤害加成} 点伤害加成!");
|
||||
累计受到的伤害 = 0;
|
||||
}
|
||||
|
||||
if (enemy == Skill.Character)
|
||||
{
|
||||
if (character.HP > character.MaxHP * 0.3)
|
||||
受到伤害之前的HP = enemy.HP;
|
||||
if (enemy.HP > enemy.MaxHP * 0.3)
|
||||
{
|
||||
// 额外受到伤害
|
||||
double 系数 = Calculation.Round4Digits((new Random().Next(20, 40) + 0.0) / 100);
|
||||
double 系数 = Calculation.Round4Digits((new Random().Next(高于30额外伤害下限, 高于30额外伤害上限) + 0.0) / 100);
|
||||
这次受到的额外伤害 = Calculation.Round2Digits(damage * 系数);
|
||||
damage = Calculation.Round2Digits(damage + 这次受到的额外伤害);
|
||||
WriteLine($"[ {character} ] 的玻璃大炮触发,将额外受到 {这次受到的额外伤害} 点伤害!");
|
||||
WriteLine($"[ {enemy} ] 的玻璃大炮触发,将额外受到 {这次受到的额外伤害} 点伤害!");
|
||||
}
|
||||
else 这次受到的额外伤害 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,7 +89,12 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
{
|
||||
if (enemy == Skill.Character && damageResult != DamageResult.Evaded)
|
||||
{
|
||||
上次受到的伤害 = damage;
|
||||
累计受到的伤害 = Calculation.Round2Digits(累计受到的伤害 + damage);
|
||||
if (enemy.HP < 0 && 受到伤害之前的HP - damage + 这次受到的额外伤害 > 0)
|
||||
{
|
||||
enemy.HP = 10;
|
||||
WriteLine($"[ {enemy} ] 的玻璃大炮触发,保护了自己不进入死亡!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Duration} 秒内,普通攻击转为魔法伤害,且硬直时间减少50%,并基于 {智力系数 * 100:0.##}% 智力 [{智力加成}] 强化普通攻击伤害。";
|
||||
public override string Description => $"{Duration} 时间内,普通攻击转为魔法伤害,且硬直时间减少50%,并基于 {智力系数 * 100:0.##}% 智力 [{智力加成}] 强化普通攻击伤害。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 40;
|
||||
|
||||
@ -24,12 +24,13 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"对所有角色造成 " +
|
||||
$"450% 其现有能量值 + {智力系数 * 100:0.##}% 智力 [ {智力伤害} ] 的魔法伤害。";
|
||||
$"{能量系数 * 100:0.##}% 其现有能量值 + {智力系数 * 100:0.##}% 智力 [ {智力伤害} ] 的魔法伤害。";
|
||||
public override bool TargetSelf => false;
|
||||
public override double TargetRange => 999;
|
||||
|
||||
private double 智力系数 => Calculation.Round4Digits(0.55 * Level);
|
||||
private double 智力伤害 => Calculation.Round2Digits(智力系数 * Skill.Character?.INT ?? 0);
|
||||
private readonly double 能量系数 = Calculation.Round4Digits(4.5);
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
@ -37,7 +38,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
{
|
||||
WriteLine($"[ {caster} ] 正在毁灭 [ {c} ] 的能量!!");
|
||||
double ep = c.EP;
|
||||
DamageToEnemy(caster, c, true, MagicType, Calculation.Round2Digits(ep * 6.0 + 智力伤害));
|
||||
DamageToEnemy(caster, c, true, MagicType, Calculation.Round2Digits(ep * 能量系数 + 智力伤害));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Duration} 时间内,增加 40% 攻击力 [ {攻击力提升} ]、30% 物理穿透和 25% 闪避率(不可叠加),普通攻击硬直时间额外减少 20%,基于 {系数 * 100:0.##}% 敏捷 [ {伤害加成} ] 强化普通攻击的伤害。";
|
||||
public override string Description => $"{Duration} 时间内,增加 40% 攻击力 [ {攻击力提升} ]、30% 物理穿透和 25% 闪避率(不可叠加),普通攻击硬直时间额外减少 20%,基于 {系数 * 100:0.##}% 敏捷 [ {伤害加成} ] 强化普通攻击的伤害。在持续时间内,【心灵之火】的冷却时间降低至 3 时间。";
|
||||
public override bool TargetSelf => false;
|
||||
public override int TargetCount => 1;
|
||||
public override bool Durative => true;
|
||||
@ -40,6 +40,11 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
character.ExATK2 += 实际的攻击力提升;
|
||||
character.PhysicalPenetration += 0.3;
|
||||
character.ExEvadeRate += 0.25;
|
||||
if (character.Effects.Where(e => e is 心灵之火特效).FirstOrDefault() is 心灵之火特效 e)
|
||||
{
|
||||
e.基础冷却时间 = 3;
|
||||
if (e.冷却时间 > e.基础冷却时间) e.冷却时间 = e.基础冷却时间;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
@ -47,6 +52,16 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
character.ExATK2 -= 实际的攻击力提升;
|
||||
character.PhysicalPenetration -= 0.3;
|
||||
character.ExEvadeRate -= 0.25;
|
||||
if (character.Effects.Where(e => e is 心灵之火特效).FirstOrDefault() is 心灵之火特效 e)
|
||||
{
|
||||
e.基础冷却时间 = 8;
|
||||
}
|
||||
}
|
||||
|
||||
public override CharacterActionType AlterActionTypeBeforeAction(Character character, CharacterState state, ref bool canUseItem, ref bool canCastSkill, ref double pUseItem, ref double pCastSkill, ref double pNormalAttack)
|
||||
{
|
||||
pNormalAttack += 0.1;
|
||||
return CharacterActionType.None;
|
||||
}
|
||||
|
||||
public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType)
|
||||
|
||||
@ -25,20 +25,40 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"增加 20% 攻击力且普通攻击硬直时间减少 20%。";
|
||||
public override string Description => $"普通攻击硬直时间减少 20%。每次使用普通攻击时,额外再发动一次普通攻击,伤害特效可叠加,冷却 {基础冷却时间:0.##} 时间。" +
|
||||
(冷却时间 > 0 ? $"(正在冷却:剩余 {冷却时间:0.##} 时间)" : "");
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
private double 实际增加攻击力 = 0;
|
||||
public double 冷却时间 { get; set; } = 0;
|
||||
public double 基础冷却时间 { get; set; } = 20;
|
||||
private bool 是否是嵌套普通攻击 = false;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
实际增加攻击力 = character.BaseATK * 0.2;
|
||||
character.ExATK2 += 实际增加攻击力;
|
||||
if (character == Skill.Character && isNormalAttack && 冷却时间 == 0 && !是否是嵌套普通攻击 && ActionQueue != null)
|
||||
{
|
||||
WriteLine($"[ {character} ] 发动了心灵之火!额外进行一次普通攻击!");
|
||||
冷却时间 = 基础冷却时间;
|
||||
是否是嵌套普通攻击 = true;
|
||||
character.NormalAttack.Attack(ActionQueue, character, enemy);
|
||||
}
|
||||
|
||||
if (character == Skill.Character && 是否是嵌套普通攻击)
|
||||
{
|
||||
是否是嵌套普通攻击 = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
public override void OnTimeElapsed(Character character, double elapsed)
|
||||
{
|
||||
character.ExATK2 -= 实际增加攻击力;
|
||||
if (冷却时间 > 0)
|
||||
{
|
||||
冷却时间 = Calculation.Round2Digits(冷却时间 - elapsed);
|
||||
if (冷却时间 <= 0)
|
||||
{
|
||||
冷却时间 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime, ref bool isCheckProtected)
|
||||
|
||||
@ -23,7 +23,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => "魔法涌流";
|
||||
public override string Description => $"{Duration} 秒内,增加所有伤害的 {减伤比例 * 100:0.##}% 伤害减免,并将普通攻击转为魔法伤害,可叠加魔法震荡的效果。";
|
||||
public override string Description => $"{Duration} 时间内,增加所有伤害的 {减伤比例 * 100:0.##}% 伤害减免,并将普通攻击转为魔法伤害,可叠加魔法震荡的效果。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 25;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Common.Addon;
|
||||
@ -21,7 +21,7 @@ namespace Milimoe.FunGame.Testing.Tests
|
||||
if (IsRuning) return ["游戏正在模拟中,请勿重复请求!"];
|
||||
|
||||
List<string> result = [];
|
||||
int death = 0;
|
||||
int deaths = 0;
|
||||
Msg = "";
|
||||
|
||||
IsRuning = true;
|
||||
@ -318,6 +318,9 @@ namespace Milimoe.FunGame.Testing.Tests
|
||||
actionQueue.DisplayQueue();
|
||||
if (PrintOut) Console.WriteLine();
|
||||
|
||||
// 总游戏时长
|
||||
double totalTime = 0;
|
||||
|
||||
// 总回合数
|
||||
int i = 1;
|
||||
while (i < 999)
|
||||
@ -365,28 +368,51 @@ namespace Milimoe.FunGame.Testing.Tests
|
||||
}
|
||||
|
||||
// 模拟时间流逝
|
||||
actionQueue.TimeLapse();
|
||||
totalTime += actionQueue.TimeLapse();
|
||||
|
||||
// 使用反射获取私有字段
|
||||
FieldInfo? eliminatedField = actionQueue.GetType().GetField("_eliminated", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
// 从对象中获取该字段的值
|
||||
if (eliminatedField != null)
|
||||
if (actionQueue.Eliminated.Count > deaths)
|
||||
{
|
||||
if (eliminatedField.GetValue(actionQueue) is List<Character> eliminatedList && eliminatedList.Count > death)
|
||||
deaths = actionQueue.Eliminated.Count;
|
||||
string roundMsg = Msg;
|
||||
string[] strs = roundMsg.Split("==== 角色状态 ====");
|
||||
if (strs.Length > 0)
|
||||
{
|
||||
death = eliminatedList.Count;
|
||||
string roundMsg = Msg;
|
||||
string[] strs = roundMsg.Split("==== 角色状态 ====");
|
||||
if (strs.Length > 0)
|
||||
{
|
||||
roundMsg = strs[0];
|
||||
}
|
||||
result.Add(roundMsg);
|
||||
roundMsg = strs[0];
|
||||
}
|
||||
result.Add(roundMsg);
|
||||
}
|
||||
}
|
||||
|
||||
if (PrintOut) Console.WriteLine("--- End ---");
|
||||
if (PrintOut)
|
||||
{
|
||||
Console.WriteLine("--- End ---");
|
||||
Console.WriteLine("总游戏时长:" + Calculation.Round2Digits(totalTime));
|
||||
Console.WriteLine("");
|
||||
}
|
||||
|
||||
// 赛后统计
|
||||
WriteLine("==== 伤害排行榜 TOP6 ====");
|
||||
Msg = "==== 伤害排行榜 TOP6 ====\r\n";
|
||||
// 显示前四的角色统计
|
||||
int count = 1;
|
||||
foreach (Character character in actionQueue.CharacterStatistics.OrderByDescending(d => d.Value.TotalDamage).Select(d => d.Key))
|
||||
{
|
||||
StringBuilder builder = new();
|
||||
CharacterStatistics stats = actionQueue.CharacterStatistics[character];
|
||||
builder.AppendLine($"{count}. [ {character.ToStringWithLevel()} ]");
|
||||
builder.AppendLine($"存活时长:{stats.LiveTime} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn}");
|
||||
builder.AppendLine($"总计伤害:{stats.TotalDamage} / 每秒伤害:{stats.DamagePerSecond} / 每回合伤害:{stats.DamagePerTurn}");
|
||||
builder.Append($"总计物理伤害:{stats.TotalPhysicalDamage} / 总计魔法伤害:{stats.TotalMagicDamage}");
|
||||
if (count++ <= 6)
|
||||
{
|
||||
WriteLine(builder.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine(builder.ToString());
|
||||
}
|
||||
}
|
||||
result.Add(Msg);
|
||||
|
||||
IsRuning = false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user