mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-05-21 09:45:48 +08:00
* 调整日志分析一些字段为0时显示为空,增加了异常情况统计(复活、重试、传送失败、战斗超时)。 * 修正一个赋值错误 * 日志分析表格,使隔行颜色样式不一样 * 增加了锄地延时,通过控制延时相对精确的显示怪物数量 * 删除不必要的输出 * 调度器任务,增加 任务倒序排列功能。调度器配置增加“不在某时执行”,当执行完一个路线后,如果时间为当前配置的时间(范围:0-23),则此路径追踪任务后续都将都跳过,适用于连续执行的兜底任务,例如想通宵挂机,并且在4点后,开始执行新的任务。
81 lines
2.9 KiB
C#
81 lines
2.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace LogParse
|
|
{
|
|
public class MoraStatistics
|
|
{
|
|
public string Name;
|
|
public DateTime Date;
|
|
public DateTime? StatisticsStart;
|
|
public DateTime? StatisticsEnd;
|
|
public List<ActionItem> ActionItems { get; set; } = new List<ActionItem>();
|
|
public MoraStatistics GetFilterMoraStatistics(Func<ActionItem, bool> predicate)
|
|
{
|
|
MoraStatistics moraStatistics = new MoraStatistics();
|
|
moraStatistics.ActionItems.AddRange(ActionItems.Where(predicate));
|
|
return moraStatistics;
|
|
}
|
|
|
|
public List<ActionItem> MonsterActionItems => this.ActionItems.Where(item => item.ActionId == 37).ToList();
|
|
|
|
public List<ActionItem> EliteMonsterActionItems =>
|
|
this.MonsterActionItems.Where(item => (item.Num >= 200)).ToList();
|
|
|
|
public List<ActionItem> SmallMonsterActionItems =>
|
|
this.MonsterActionItems.Except(EliteMonsterActionItems).ToList();
|
|
public string EmergencyBonus
|
|
{
|
|
get
|
|
{
|
|
var ls = this.ActionItems.Where(item => item.ActionId == 28).ToList();
|
|
var count = ls.Count();
|
|
if (count == 0)
|
|
{
|
|
return "";
|
|
}
|
|
|
|
return ls.Sum(item=>item.Num)+(count>=10?"":$"({count}/10)");
|
|
}
|
|
}
|
|
|
|
|
|
public string LastEliteTime => EliteMonsterActionItems.MaxBy(item => item?.Time)?.Time ?? null;
|
|
public string LastSmallTime => SmallMonsterActionItems.MaxBy(item => item?.Time)?.Time ?? null;
|
|
|
|
public string EliteDetails => string.Join(", ", EliteMonsterActionItems
|
|
.GroupBy(item => item.Num).OrderBy(item => item.Key) // 按 Num 属性分组
|
|
.Select(group => $"{group.Key}*{group.Count()}"));
|
|
|
|
public int EliteStatistics => EliteMonsterActionItems?.Count ?? 0;
|
|
|
|
//游戏里的上限计算
|
|
public int EliteGameStatistics => EliteMonsterActionItems.Sum(item =>
|
|
{
|
|
if (item?.Num >= 3000)
|
|
{
|
|
return 3;
|
|
}
|
|
else if (item.Num >= 1200)
|
|
{
|
|
return 2;
|
|
}
|
|
else
|
|
{
|
|
return 1;
|
|
}
|
|
});
|
|
|
|
public int EliteMora => EliteMonsterActionItems?.Sum(item => item.Num) ?? 0;
|
|
public int SmallMonsterStatistics => SmallMonsterActionItems?.Count ?? 0;
|
|
public int SmallMonsterMora => SmallMonsterActionItems?.Sum(item => item.Num) ?? 0;
|
|
public int TotalMoraKillingMonstersMora => this.MonsterActionItems.Sum((item) => item.Num);
|
|
public int OtherMora => this.ActionItems.Except(MonsterActionItems).Sum((item) => item.Num);
|
|
public int AllMora => this.ActionItems.Sum((item) => item.Num);
|
|
|
|
public MoraStatistics()
|
|
{
|
|
}
|
|
}
|
|
} |